(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:MY_OCAML_BUILD)
          op: assign_op.Equal
          rhs: {(DQ <'-o myocamlbuild'>)}
          spids: [8]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$REASON_BUILD_DIR'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REASON_BUILD_DIR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<ocamlfind>} {<query>} {<reason>})
                      )
                    }
                  spids: [30]
                )
              ]
            )
          ]
          spids: [14 27]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$REASON_BUILD_DIR'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Couldn\'t find Reason'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [42 55]
        )
      ]
    )
    (C {<eval>} {<Id.Lit_VarLike 'REASON_BUILD_DIR='> ($ Id.VSub_DollarName '$REASON_BUILD_DIR')})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobEqual
                          left: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <Id.VSub_At '@'>
                                  suffix_op: 
                                    (suffix_op.Slice
                                      begin: 
                                        (arith_expr.Unary
                                          op_id: Id.Node_UnaryMinus
                                          child: {<Id.Lit_Digits 2>}
                                        )
                                    )
                                )
                              )
                            }
                          right: {(DQ (${ Id.VSub_Name MY_OCAML_BUILD))}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:UNIXIDX)
                  op: assign_op.Equal
                  rhs: {<-1>}
                  spids: [133]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:i)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [137]
                )
              ]
            )
            (command.ForEach
              iter_name: var
              iter_words: [{(DQ ($ Id.VSub_At '$@'))}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_EqualTilde
                                          left: {($ Id.VSub_DollarName '$var')}
                                          right: {(DQ <unix.cmxa>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (command.DBracket
                                              expr: 
                                                (bool_expr.Binary
                                                  op_id: Id.BoolBinary_ne
                                                  left: {($ Id.VSub_DollarName '$UNIXIDX')}
                                                  right: {<-1>}
                                                )
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<set>} {<-->} 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            token: <Id.VSub_At '@'>
                                            suffix_op: 
                                              (suffix_op.Slice
                                                begin: {<Id.Lit_Digits 1>}
                                                length: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Minus
                                                    left: <Id.Lit_ArithVarLike i>
                                                    right: {<Id.Lit_Digits 1>}
                                                  )
                                              )
                                          )
                                        )
                                      } 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            token: <Id.VSub_At '@'>
                                            suffix_op: 
                                              (suffix_op.Slice
                                                begin: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Plus
                                                    left: <Id.Lit_ArithVarLike i>
                                                    right: {<Id.Lit_Digits 1>}
                                                  )
                                              )
                                          )
                                        )
                                      }
                                    )
                                  ]
                                  spids: [186 200]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:UNIXIDX)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$i')}
                                  spids: [234]
                                )
                              ]
                            )
                          ]
                          spids: [155 171]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:i)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$i') <Id.Lit_Other '+'> <1>}
                          spids: [241]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<set>} {<-->} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_At '@'>
                    suffix_op: 
                      (suffix_op.Slice
                        begin: {<Id.Lit_Digits 1>}
                        length: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Minus
                            left: {($ Id.VSub_Pound '$#')}
                            right: {<Id.Lit_Digits 3>}
                          )
                      )
                  )
                )
              } {(DQ ($ Id.VSub_DollarName '$REASON_BUILD_DIR') <'/reasonbuild.cmx'>)} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_At '@'>
                    suffix_op: 
                      (suffix_op.Slice
                        begin: (arith_expr.Unary op_id:Id.Node_UnaryMinus child:{<Id.Lit_Digits 3>})
                      )
                  )
                )
              }
            )
          ]
          spids: [81 106]
        )
      ]
    )
  ]
)