(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rcm_script_version='> name:rcm_script_version)
          op: assign_op.Equal
          rhs: {<1>}
          spids: [83]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'rcm_script_func_info='>
              name: rcm_script_func_info
            )
          op: assign_op.Equal
          rhs: {(DQ <'RDSv3 (un)configuration rcm script'>)}
          spids: [86]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rcm_cmd_timeout='> name:rcm_cmd_timeout)
          op: assign_op.Equal
          rhs: {<10>}
          spids: [91]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rcm_resource_name='> name:rcm_resource_name)
          op: assign_op.Equal
          rhs: {<'/devices/ib/rdsv3'> <Id.Lit_At '@'> <0> <Id.Lit_Colon ':'> <rdsv3>}
          spids: [94]
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name: do_scriptinfo
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (C {<printf>} {(DQ <'rcm_script_version=%d'> <Id.Lit_BadBackslash '\\'> <n>)} 
                  {($ Id.VSub_DollarName rcm_script_version)}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (C {<printf>} 
                  {
                    (DQ <'rcm_script_func_info='> ($ Id.VSub_DollarName rcm_script_func_info) 
                      <Id.Lit_BadBackslash '\\'> <n>
                    )
                  }
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (C {<printf>} {(DQ <'rcm_cmd_timeout=%d'> <Id.Lit_BadBackslash '\\'> <n>)} 
                  {($ Id.VSub_DollarName rcm_cmd_timeout)}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_register
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: 
                (C {<printf>} {(DQ <'rcm_resource_name=%s'> <Id.Lit_BadBackslash '\\'> <n>)} 
                  {($ Id.VSub_DollarName rcm_resource_name)}
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_resourceinfo
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<x> (DQ ($ Id.VSub_Number 1))} {<Id.Lit_Equals '='>} 
                          {<x> (DQ <'/devices/ib/rdsv3@0:rdsv3'>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.Sentence
                      child: 
                        (C {<printf>} 
                          {
                            (DQ <'rcm_resource_usage_info=RDSv3 IB device 0'> 
                              <Id.Lit_BadBackslash '\\'> <n>
                            )
                          }
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [186 205]
                )
              ]
              else_action: [
                (command.Sentence
                  child: 
                    (C {<printf>} 
                      {
                        (DQ <'rcm_failure_reason=Unknown RDSv3 device'> <Id.Lit_BadBackslash '\\'> <n>)
                      }
                    )
                  terminator: <Id.Op_Semi _>
                )
                (command.Sentence
                  child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>})
                  terminator: <Id.Op_Semi _>
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_queryremove
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'output='> name:output)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Simple
                            words: [{<'/usr/sbin/fuser'>} {($ Id.VSub_DollarName rcm_resource_name)}]
                            redirects: [
                              (redir
                                op: <Id.Redir_GreatAnd '2>&'>
                                loc: (redir_loc.Fd fd:2)
                                arg: {<1>}
                              )
                            ]
                            more_env: []
                            do_fork: T
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [255]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ret='> name:ret)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [268]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sockrds='> name:sockrds)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {(DQ ($ Id.VSub_DollarName output))})
                              (C {<grep>} {(SQ <sockrds>)})
                            ]
                            negated: F
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [273]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName ret)} {<-eq>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                              {(DQ ($ Id.VSub_DollarName sockrds))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      ]
                    )
                  action: [
                    (C {<printf>} {(DQ <'rcm_log_warn=RDSv3 is being used currently. '>)})
                    (C {<printf>} {(DQ <'Please stop processes currently running on it '>)})
                    (command.Sentence
                      child: 
                        (C {<printf>} 
                          {
                            (DQ <'before un-configuring IB HCA/RDSv3.'> <Id.Lit_BadBackslash '\\'> <n>)
                          }
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: 
                        (C {<printf>} 
                          {
                            (DQ <'rcm_failure_reason=RDSv3 is being used on this system'> 
                              <Id.Lit_BadBackslash '\\'> <n>
                            )
                          }
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [294 321]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName ret)} {<-ne>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<printf>} 
                      {
                        (DQ <'rcm_log_warn=\'fuser '> ($ Id.VSub_DollarName rcm_resource_name) 
                          <'\' command failed.'>
                        )
                      }
                    )
                    (C {<printf>} 
                      {
                        (DQ <'rcm_failure_reason=\'fuser '> ($ Id.VSub_DollarName rcm_resource_name) 
                          <'\' command '>
                        )
                      }
                    )
                    (command.Sentence
                      child: (C {<printf>} {(DQ <failed.> <Id.Lit_BadBackslash '\\'> <n>)})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  spids: [364 377]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_preremove
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_undoremove
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_postremove
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number 1))}
      arms: [
        (case_arm
          pat_list: [{<scriptinfo>}]
          action: [(C {<do_scriptinfo>})]
          spids: [480 481 484 -1]
        )
        (case_arm
          pat_list: [{<register>}]
          action: [(C {<do_register>})]
          spids: [487 488 491 -1]
        )
        (case_arm
          pat_list: [{<resourceinfo>}]
          action: [(C {<do_resourceinfo>} {($ Id.VSub_Number 2)})]
          spids: [494 495 500 -1]
        )
        (case_arm
          pat_list: [{<queryremove>}]
          action: [(C {<do_queryremove>} {($ Id.VSub_Number 2)})]
          spids: [503 504 509 -1]
        )
        (case_arm
          pat_list: [{<preremove>}]
          action: [(C {<do_preremove>} {($ Id.VSub_Number 2)})]
          spids: [512 513 518 -1]
        )
        (case_arm
          pat_list: [{<undoremove>}]
          action: [(C {<do_undoremove>} {($ Id.VSub_Number 2)})]
          spids: [521 522 527 -1]
        )
        (case_arm
          pat_list: [{<postremove>}]
          action: [(C {<do_postremove>} {($ Id.VSub_Number 2)})]
          spids: [530 531 536 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [(C {<echo>} {<Unknown>} {<option>} {($ Id.VSub_Number 1)})]
          spids: [539 540 549 -1]
        )
      ]
      redirects: []
    )
  ]
)