(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: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$REASON_BUILD_DIR'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:25)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REASON_BUILD_DIR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:31)
                        command_list: 
                          (command.CommandList
                            children: [(C {(ocamlfind)} {(query)} {(reason)})]
                          )
                      )
                    }
                  spids: [30]
                )
              ]
            )
          ]
          spids: [14 27]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$REASON_BUILD_DIR'))} 
                  {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:53)
            )
          ]
          action: [
            (C {(echo)} {(DQ ("Couldn't find Reason"))})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:65)
              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: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobEqual
                      left: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: (Token id:Id.VSub_At val:'@' span_id:87)
                              suffix_op: 
                                (suffix_op.Slice
                                  begin: 
                                    (arith_expr.Unary
                                      op_id: Id.Node_UnaryMinus
                                      child: (arith_expr.ArithWord w:{(Id.Lit_Digits 2)})
                                    )
                                )
                            )
                          )
                        }
                      right: {(DQ (${ Id.VSub_Name MY_OCAML_BUILD))}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:104)
            )
          ]
          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: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_EqualTilde
                                      left: {($ Id.VSub_DollarName '$var')}
                                      right: {(DQ (unix.cmxa))}
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:168)
                            )
                          ]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Binary
                                              op_id: Id.BoolBinary_ne
                                              left: {($ Id.VSub_DollarName '$UNIXIDX')}
                                              right: {(-1)}
                                            )
                                        )
                                      terminator: (Token id:Id.Op_Semi val:';' span_id:197)
                                    )
                                  ]
                                  action: [
                                    (C {(Id.KW_Set set)} {(--)} 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            token: (Token id:Id.VSub_At val:'@' span_id:209)
                                            suffix_op: 
                                              (suffix_op.Slice
                                                begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                                length: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Minus
                                                    left: 
                                                      (arith_expr.VarRef
                                                        token: 
                                                          (Token
                                                            id: Id.Lit_ArithVarLike
                                                            val: i
                                                            span_id: 213
                                                          )
                                                      )
                                                    right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                                  )
                                              )
                                          )
                                        )
                                      } 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            token: (Token id:Id.VSub_At val:'@' span_id:221)
                                            suffix_op: 
                                              (suffix_op.Slice
                                                begin: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Plus
                                                    left: 
                                                      (arith_expr.VarRef
                                                        token: 
                                                          (Token
                                                            id: Id.Lit_ArithVarLike
                                                            val: i
                                                            span_id: 224
                                                          )
                                                      )
                                                    right: (arith_expr.ArithWord w:{(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 {(Id.KW_Set set)} {(--)} 
              {
                (DQ 
                  (braced_var_sub
                    token: (Token id:Id.VSub_At val:'@' span_id:260)
                    suffix_op: 
                      (suffix_op.Slice
                        begin: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                        length: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Minus
                            left: (arith_expr.ArithWord w:{($ Id.VSub_Pound '$#')})
                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 3)})
                          )
                      )
                  )
                )
              } {(DQ ($ Id.VSub_DollarName '$REASON_BUILD_DIR') (/reasonbuild.cmx))} 
              {
                (DQ 
                  (braced_var_sub
                    token: (Token id:Id.VSub_At val:'@' span_id:277)
                    suffix_op: 
                      (suffix_op.Slice
                        begin: 
                          (arith_expr.Unary
                            op_id: Id.Node_UnaryMinus
                            child: (arith_expr.ArithWord w:{(Id.Lit_Digits 3)})
                          )
                      )
                  )
                )
              }
            )
          ]
          spids: [81 106]
        )
      ]
    )
  ]
)