(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ME_)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_Backtick val:'`' span_id:164)
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(expr)} {(DQ (./) ($ Id.VSub_Number '$0'))} {(Id.Lit_Other ':')} 
                        {(SQ (Token id:Id.Lit_Chars val:'.*/\\(.*\\)$' span_id:181))}
                      )
                    ]
                  )
              )
            }
          spids: [163]
        )
      ]
    )
    (command.ShFunction
      name: Exit
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: (C {(Id.KW_Set set)} {(Id.Lit_Other '+') (e)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:212)
            )
            (command.Sentence
              child: 
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Exit val:exit span_id:215)
                          arg_word: {($ Id.VSub_Number '$1')}
                        )
                      ]
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:219)
            )
            (command.Sentence
              child: 
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:221)
                  arg_word: {($ Id.VSub_Number '$1')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:224)
            )
          ]
        )
    )
    (C {(Id.Lit_Other ':')} 
      {
        (braced_var_sub
          token: (Token id:Id.VSub_Name val:stderr_fileno_ span_id:250)
          suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{(2)})
        )
      }
    )
    (command.ShFunction
      name: warn_
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName '$IFS')}
              arms: [
                (case_arm
                  pat_list: [{(SQ (Token id:Id.Lit_Chars val:' ' span_id:288)) (Id.Lit_Star '*')}]
                  action: [
                    (command.Simple
                      words: [
                        {(printf)}
                        {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:296))}
                        {(DQ ($ Id.VSub_Star '$*'))}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:303)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(test)} {($ Id.VSub_DollarName '$stderr_fileno_')} {(Id.Lit_Equals '=')} 
                          {(2)}
                        )
                        (command.BraceGroup
                          children: [
                            (command.Sentence
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:324))} 
                                      {(DQ ($ Id.VSub_Star '$*'))}
                                    )
                                    (command.Simple
                                      words: [{(sed)} {(1q)}]
                                      redirects: [
                                        (redir.Redir
                                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:337)
                                          fd: -1
                                          arg_word: {($ Id.VSub_DollarName '$stderr_fileno_')}
                                        )
                                      ]
                                    )
                                  ]
                                  negated: F
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:340)
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  spids: [287 291 344 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.Subshell
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IFS)
                                      op: assign_op.Equal
                                      rhs: {(SQ (Token id:Id.Lit_Chars val:' ' span_id:353))}
                                      spids: [351]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:355)
                            )
                            (C {(warn_)} {(DQ ($ Id.VSub_At '$@'))})
                          ]
                        )
                    )
                  ]
                  spids: [347 348 363 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: fail_
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (C {(warn_)} 
                  {(DQ ($ Id.VSub_DollarName '$ME_') (': failed test: ') ($ Id.VSub_At '$@'))}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:384)
            )
            (command.Sentence
              child: (C {(Exit)} {(1)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:389)
            )
          ]
        )
    )
    (command.ShFunction
      name: skip_
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (C {(warn_)} 
                  {(DQ ($ Id.VSub_DollarName '$ME_') (': skipped test: ') ($ Id.VSub_At '$@'))}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:407)
            )
            (command.Sentence
              child: (C {(Exit)} {(77)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:412)
            )
          ]
        )
    )
    (command.ShFunction
      name: fatal_
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (C {(warn_)} {(DQ ($ Id.VSub_DollarName '$ME_') (': hard error: ') ($ Id.VSub_At '$@'))})
              terminator: (Token id:Id.Op_Semi val:';' span_id:430)
            )
            (command.Sentence
              child: (C {(Exit)} {(99)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:435)
            )
          ]
        )
    )
    (command.ShFunction
      name: framework_failure_
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (C {(warn_)} 
                  {(DQ ($ Id.VSub_DollarName '$ME_') (': set-up failure: ') ($ Id.VSub_At '$@'))}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:453)
            )
            (command.Sentence
              child: (C {(Exit)} {(99)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:458)
            )
          ]
        )
    )
    (command.ShFunction
      name: returns_
      body: 
        (command.BraceGroup
          children: [
            (command.BraceGroup
              children: [
                (command.Sentence
                  child: (C {(Id.KW_Set set)} {(Id.Lit_Other '+') (x)})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:499)
                )
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'2>' span_id:503)
                  fd: 2
                  arg_word: {(/dev/null)}
                )
              ]
            )
            (C {(local)} {(Id.Lit_VarLike 'exp_exit=') (DQ ($ Id.VSub_Number '$1'))})
            (C {(shift)})
            (C {(DQ ($ Id.VSub_At '$@'))})
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {(test)} {($ Id.VSub_QMark '$?')} {(-eq)} {($ Id.VSub_DollarName '$exp_exit')})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ret_)
                      op: assign_op.Equal
                      rhs: {(0)}
                      spids: [534]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:ret_)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [539]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(test)} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.Lit_Equals '=')} 
                              {(yes)}
                            )
                            (C {(test)} {(DQ ($ Id.VSub_DollarName '$gl_set_x_corrupts_stderr_'))} 
                              {(Id.Lit_Equals '=')} {(false)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:567)
                    )
                  ]
                  action: [(C {(Id.KW_Set set)} {(-x)})]
                  spids: [544 569]
                )
              ]
            )
            (command.BraceGroup
              children: [
                (command.Sentence
                  child: 
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:582)
                      arg_word: {($ Id.VSub_DollarName '$ret_')}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:585)
                )
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'2>' span_id:589)
                  fd: 2
                  arg_word: {(/dev/null)}
                )
              ]
            )
          ]
        )
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:DUALCASE)
                  op: assign_op.Equal
                  rhs: {(1)}
                  spids: [598]
                )
              ]
            )
          terminator: (Token id:Id.Op_Semi val:';' span_id:600)
        )
        (C {(export)} {(DUALCASE)})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {(test)} {(-n)} 
                      {
                        (DQ 
                          (braced_var_sub
                            token: (Token id:Id.VSub_Name val:ZSH_VERSION span_id:614)
                            suffix_op: (suffix_op.Unary op_id:Id.VTest_Plus arg_word:{(set)})
                          )
                        )
                      }
                    )
                    (command.Subshell
                      command_list: (command.CommandList children:[(C {(emulate)} {(sh)})])
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:628)
                          fd: -1
                          arg_word: {(/dev/null)}
                        )
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:631)
                          fd: 2
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:633)
            )
          ]
          action: [
            (C {(emulate)} {(sh)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NULLCMD)
                  op: assign_op.Equal
                  rhs: {(Id.Lit_Other ':')}
                  spids: [643]
                )
              ]
            )
            (C {(alias)} {(-g)} 
              {(SQ (Token id:Id.Lit_Chars val:'${1+"$@"}' span_id:652)) (Id.Lit_Equals '=') 
                (SQ (Token id:Id.Lit_Chars val:'"$@"' span_id:656))
              }
            )
            (C {(setopt)} {(NO_GLOB_SUBST)})
          ]
          spids: [606 635]
        )
      ]
      else_action: [
        (command.Case
          to_match: 
            {
              (command_sub
                left_token: (Token id:Id.Left_Backtick val:'`' span_id:669)
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Subshell
                        command_list: (command.CommandList children:[(C {(Id.KW_Set set)} {(-o)})])
                        redirects: [
                          (redir.Redir
                            op: (Token id:Id.Redir_Great val:'2>' span_id:678)
                            fd: 2
                            arg_word: {(/dev/null)}
                          )
                        ]
                      )
                    ]
                  )
              )
            }
          arms: [
            (case_arm
              pat_list: [{(Id.Lit_Star '*') (posix) (Id.Lit_Star '*')}]
              action: [(C {(Id.KW_Set set)} {(-o)} {(posix)})]
              spids: [685 688 696 -1]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:gl_shell_test_script_)
          op: assign_op.Equal
          rhs: 
            {
              (SQ (Token id:Id.Lit_Chars val:'\n' span_id:767) 
                (Token
                  id: Id.Lit_Chars
                  val: 'test $(echo y) = y || exit 1\n'
                  span_id: 768
                ) (Token id:Id.Lit_Chars val:'f_local_() { local v=1; }; f_local_ || exit 1\n' span_id:769) 
                (Token id:Id.Lit_Chars val:'score_=10\n' span_id:770) (Token id:Id.Lit_Chars val:'if test "$VERBOSE" = yes; then\n' span_id:771) 
                (Token
                  id: Id.Lit_Chars
                  val: 
'  test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9\n'
                  span_id: 772
                ) (Token id:Id.Lit_Chars val:'fi\n' span_id:773) 
                (Token
                  id: Id.Lit_Chars
                  val: 'test -z "$EXEEXT" && exit $score_\n'
                  span_id: 774
                ) (Token id:Id.Lit_Chars val:'shopt -s expand_aliases\n' span_id:775) 
                (Token id:Id.Lit_Chars val:'alias a-b="echo zoo"\n' span_id:776) (Token id:Id.Lit_Chars val:'v=abx\n' span_id:777) 
                (Token id:Id.Lit_Chars val:'     test ${v%x} = ab \\\n' span_id:778) (Token id:Id.Lit_Chars val:'  && test ${v#a} = bx \\\n' span_id:779) 
                (Token id:Id.Lit_Chars val:'  && test $(a-b) = zoo \\\n' span_id:780) (Token id:Id.Lit_Chars val:'  && exit $score_\n' span_id:781)
              )
            }
          spids: [765]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(test)} {(DQ (x) ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} {(DQ (x--no-reexec))})
              terminator: (Token id:Id.Op_Semi val:';' span_id:799)
            )
          ]
          action: [(C {(shift)})]
          spids: [785 801]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:gl_set_x_corrupts_stderr_)
              op: assign_op.Equal
              rhs: {(false)}
              spids: [813]
            )
          ]
        )
        (C {(export)} {(gl_set_x_corrupts_stderr_)})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:marginal_)
              op: assign_op.Equal
              rhs: (word.Empty)
              spids: [827]
            )
          ]
        )
        (command.ForEach
          iter_name: re_shell_
          iter_words: [
            {(__current__)}
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Name val:CONFIG_SHELL span_id:845)
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(no_shell)})
                )
              )
            }
            {(/bin/sh)}
            {(bash)}
            {(dash)}
            {(zsh)}
            {(pdksh)}
            {(fail)}
          ]
          do_arg_iter: F
          body: 
            (command.DoGroup
              children: [
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {(test)} {(DQ ($ Id.VSub_DollarName '$re_shell_'))} {(Id.Lit_Equals '=')} 
                      {(no_shell)}
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Continue val:continue span_id:881)
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(test)} {(DQ ($ Id.VSub_DollarName '$re_shell_'))} {(Id.Lit_Equals '=')} 
                              {(fail)}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:904)
                        )
                      ]
                      action: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$marginal_'))})
                            (C {(skip_)} {(failed)} {(to)} {(find)} {(an)} {(adequate)} {(shell)})
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:re_shell_)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_DollarName '$marginal_')}
                              spids: [934]
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Break val:break span_id:938)
                        )
                      ]
                      spids: [893 906]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(test)} {(DQ ($ Id.VSub_DollarName '$re_shell_'))} {(Id.Lit_Equals '=')} 
                              {(__current__)}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:964)
                        )
                      ]
                      action: [
                        (command.Subshell
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(eval)} {(DQ ($ Id.VSub_DollarName '$gl_shell_test_script_'))})
                              ]
                            )
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'>' span_id:991)
                              fd: -1
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:995)
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                      spids: [953 966]
                    )
                  ]
                  else_action: [
                    (command.Simple
                      words: [
                        {(DQ ($ Id.VSub_DollarName '$re_shell_'))}
                        {(-c)}
                        {(DQ ($ Id.VSub_DollarName '$gl_shell_test_script_'))}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'2>' span_id:1012)
                          fd: 2
                          arg_word: {(/dev/null)}
                        )
                      ]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:st_)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_QMark '$?')}
                      spids: [1020]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(test)} {($ Id.VSub_DollarName '$st_')} {(Id.Lit_Equals '=')} {(10)})
                          terminator: (Token id:Id.Op_Semi val:';' span_id:1038)
                        )
                      ]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:gl_set_x_corrupts_stderr_)
                              op: assign_op.Equal
                              rhs: {(false)}
                              spids: [1043]
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Break val:break span_id:1047)
                        )
                      ]
                      spids: [1029 1040]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(test)} 
                              {
                                (DQ ($ Id.VSub_DollarName '$st_') (':') 
                                  ($ Id.VSub_DollarName '$marginal_')
                                )
                              } {(Id.Lit_Equals '=')} {(9) (Id.Lit_Other ':')}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:1073)
                        )
                      ]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:marginal_)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName '$re_shell_'))}
                              spids: [1078]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:gl_set_x_corrupts_stderr_)
                              op: assign_op.Equal
                              rhs: {(true)}
                              spids: [1084]
                            )
                          ]
                        )
                      ]
                      spids: [1058 1075]
                    )
                  ]
                )
              ]
            )
        )
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (C {(test)} {(DQ ($ Id.VSub_DollarName '$re_shell_'))} 
                      {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(__current__)}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:1107)
                )
              ]
              action: [
                (command.Case
                  to_match: {($ Id.VSub_Hyphen '$-')}
                  arms: [
                    (case_arm
                      pat_list: [
                        {(Id.Lit_Star '*') (v) (Id.Lit_Star '*') (x) (Id.Lit_Star '*')}
                        {(Id.Lit_Star '*') (x) (Id.Lit_Star '*') (v) (Id.Lit_Star '*')}
                      ]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:opts_)
                              op: assign_op.Equal
                              rhs: {(-vx)}
                              spids: [1138]
                            )
                          ]
                        )
                      ]
                      spids: [1123 1136 1141 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*') (v) (Id.Lit_Star '*')}]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:opts_)
                              op: assign_op.Equal
                              rhs: {(-v)}
                              spids: [1149]
                            )
                          ]
                        )
                      ]
                      spids: [1144 1147 1152 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*') (x) (Id.Lit_Star '*')}]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:opts_)
                              op: assign_op.Equal
                              rhs: {(-x)}
                              spids: [1160]
                            )
                          ]
                        )
                      ]
                      spids: [1155 1158 1163 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*')}]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:opts_)
                              op: assign_op.Equal
                              rhs: (word.Empty)
                              spids: [1169]
                            )
                          ]
                        )
                      ]
                      spids: [1166 1167 1171 -1]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:re_shell)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_DollarName '$re_shell_')}
                      spids: [1177]
                    )
                  ]
                )
                (C {(export)} {(re_shell)})
                (C {(exec)} {(DQ ($ Id.VSub_DollarName '$re_shell_'))} {($ Id.VSub_DollarName '$opts_')} 
                  {(DQ ($ Id.VSub_Number '$0'))} {(--no-reexec)} {(DQ ($ Id.VSub_At '$@'))}
                )
                (command.Simple
                  words: [{(echo)} {(DQ ($ Id.VSub_DollarName '$ME_') (': exec failed'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:1212)
                      fd: 1
                      arg_word: {(2)}
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:1216)
                  arg_word: {(127)}
                )
              ]
              spids: [1095 1109]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$BASH_VERSION'))})
        (C {(unalias)} {(-a)})
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$EXEEXT'))})
        (C {(shopt)} {(-s)} {(expand_aliases)})
      ]
    )
    (C {(Id.Lit_Other ':')} 
      {
        (braced_var_sub
          token: (Token id:Id.VSub_Name val:MALLOC_PERTURB_ span_id:1291)
          suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{(87)})
        )
      }
    )
    (C {(export)} {(MALLOC_PERTURB_)})
    (command.ShFunction
      name: cleanup_
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: (C {(Id.Lit_Other ':')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:1318)
            )
          ]
        )
    )
    (command.ShFunction
      name: emit_diff_u_header_
      body: 
        (command.BraceGroup
          children: [
            (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:1340))} 
              {(DQ ('diff -u ') ($ Id.VSub_Star '$*'))} {(DQ ('--- ') ($ Id.VSub_Number '$1') ('\t1970-01-01'))} 
              {(DQ ('+++ ') ($ Id.VSub_Number '$2') ('\t1970-01-01'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: compare_dev_null_
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {($ Id.VSub_Pound '$#')} {(Id.Lit_Equals '=')} {(2)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:1403)
                  arg_word: {(2)}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(test)} {(DQ (x) ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} 
                          {(x/dev/null)}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1421)
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(test)} {(-s)} {(DQ ($ Id.VSub_Number '$2'))})
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Return val:return span_id:1436)
                          arg_word: {(0)}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (C {(emit_diff_u_header_)} {(DQ ($ Id.VSub_At '$@'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1446)
                    )
                    (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/+/' span_id:1451))} 
                      {(DQ ($ Id.VSub_Number '$2'))}
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:1459)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [1409 1423]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(test)} {(DQ (x) ($ Id.VSub_Number '$2'))} {(Id.Lit_Equals '=')} 
                          {(x/dev/null)}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1480)
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(test)} {(-s)} {(DQ ($ Id.VSub_Number '$1'))})
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Return val:return span_id:1495)
                          arg_word: {(0)}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (C {(emit_diff_u_header_)} {(DQ ($ Id.VSub_At '$@'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1505)
                    )
                    (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/-/' span_id:1510))} 
                      {(DQ ($ Id.VSub_Number '$1'))}
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:1518)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [1468 1482]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:1527)
              arg_word: {(2)}
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:diff_out_)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_Backtick val:'`' span_id:1537)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Sentence
                                        child: 
                                          (command.Simple
                                            words: [{(exec)}]
                                            redirects: [
                                              (redir.Redir
                                                op: (Token id:Id.Redir_Great val:'2>' span_id:1542)
                                                fd: 2
                                                arg_word: {(/dev/null)}
                                              )
                                            ]
                                          )
                                        terminator: (Token id:Id.Op_Semi val:';' span_id:1544)
                                      )
                                      (command.Simple
                                        words: [
                                          {(diff)}
                                          {(-u)}
                                          {(DQ ($ Id.VSub_Number '$0'))}
                                          {(DQ ($ Id.VSub_Number '$0'))}
                                        ]
                                        redirects: [
                                          (redir.Redir
                                            op: (Token id:Id.Redir_Less val:'<' span_id:1558)
                                            fd: -1
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [1536]
                        )
                      ]
                    )
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [{(diff)} {(-u)} {(Makefile)} {(DQ ($ Id.VSub_Number '$0'))}]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'2>' span_id:1577)
                              fd: 2
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                        (command.Simple
                          words: [{(grep)} {(SQ (Token id:Id.Lit_Chars val:'^[+]#!' span_id:1585))}]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'>' span_id:1588)
                              fd: -1
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1590)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$diff_out_'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1612)
                    )
                  ]
                  action: [
                    (command.ShFunction
                      name: compare_
                      body: 
                        (command.BraceGroup
                          children: [
                            (command.Sentence
                              child: (C {(diff)} {(-u)} {(DQ ($ Id.VSub_At '$@'))})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:1631)
                            )
                          ]
                        )
                    )
                  ]
                  spids: [1603 1614]
                )
              ]
              else_action: [
                (command.ShFunction
                  name: compare_
                  body: 
                    (command.BraceGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      words: [{(diff)} {(-u)} {(DQ ($ Id.VSub_At '$@'))}]
                                      redirects: [
                                        (redir.Redir
                                          op: (Token id:Id.Redir_Great val:'>' span_id:1658)
                                          fd: -1
                                          arg_word: {(diff.out)}
                                        )
                                      ]
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:1661)
                                )
                              ]
                              action: [(C {(rm)} {(-f)} {(diff.out)}) (C {(true)})]
                              spids: [1648 1663]
                            )
                          ]
                          else_action: [
                            (C {(cat)} {(diff.out)})
                            (C {(rm)} {(-f)} {(diff.out)})
                            (C {(false)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
          spids: [1534 1592]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:diff_out_)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:1713)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Sentence
                                    child: 
                                      (command.Simple
                                        words: [{(exec)}]
                                        redirects: [
                                          (redir.Redir
                                            op: (Token id:Id.Redir_Great val:'2>' span_id:1718)
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                    terminator: (Token id:Id.Op_Semi val:';' span_id:1720)
                                  )
                                  (command.Simple
                                    words: [
                                      {(diff)}
                                      {(-c)}
                                      {(DQ ($ Id.VSub_Number '$0'))}
                                      {(DQ ($ Id.VSub_Number '$0'))}
                                    ]
                                    redirects: [
                                      (redir.Redir
                                        op: (Token id:Id.Redir_Less val:'<' span_id:1734)
                                        fd: -1
                                        arg_word: {(/dev/null)}
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [1712]
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1738)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$diff_out_'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1752)
                    )
                  ]
                  action: [
                    (command.ShFunction
                      name: compare_
                      body: 
                        (command.BraceGroup
                          children: [
                            (command.Sentence
                              child: (C {(diff)} {(-c)} {(DQ ($ Id.VSub_At '$@'))})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:1771)
                            )
                          ]
                        )
                    )
                  ]
                  spids: [1743 1754]
                )
              ]
              else_action: [
                (command.ShFunction
                  name: compare_
                  body: 
                    (command.BraceGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      words: [{(diff)} {(-c)} {(DQ ($ Id.VSub_At '$@'))}]
                                      redirects: [
                                        (redir.Redir
                                          op: (Token id:Id.Redir_Great val:'>' span_id:1798)
                                          fd: -1
                                          arg_word: {(diff.out)}
                                        )
                                      ]
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:1801)
                                )
                              ]
                              action: [(C {(rm)} {(-f)} {(diff.out)}) (C {(true)})]
                              spids: [1788 1803]
                            )
                          ]
                          else_action: [
                            (C {(cat)} {(diff.out)})
                            (C {(rm)} {(-f)} {(diff.out)})
                            (C {(false)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
          spids: [1710 1740]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [{(cmp)} {(-s)} {(/dev/null)} {(/dev/null)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'2>' span_id:1864)
                      fd: 2
                      arg_word: {(/dev/null)}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1866)
            )
          ]
          action: [
            (command.ShFunction
              name: compare_
              body: 
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(cmp)} {(-s)} {(DQ ($ Id.VSub_At '$@'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1885)
                    )
                  ]
                )
            )
          ]
          spids: [1854 1868]
        )
      ]
      else_action: [
        (command.ShFunction
          name: compare_
          body: 
            (command.BraceGroup
              children: [
                (command.Sentence
                  child: (C {(cmp)} {(DQ ($ Id.VSub_At '$@'))})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:1904)
                )
              ]
            )
        )
      ]
    )
    (command.ShFunction
      name: compare
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(compare_dev_null_)} {(DQ ($ Id.VSub_At '$@'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1950)
                    )
                  ]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:1955)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [1943 1952]
                )
              ]
              else_action: [
                (command.Case
                  to_match: {($ Id.VSub_QMark '$?')}
                  arms: [
                    (case_arm
                      pat_list: [{(1)}]
                      action: [
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Return val:return span_id:1973)
                          arg_word: {(1)}
                        )
                      ]
                      spids: [1970 1971 1976 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*')}]
                      action: [(C {(compare_)} {(DQ ($ Id.VSub_At '$@'))})]
                      spids: [1979 1980 1987 -1]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: testdir_prefix_
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: (C {(printf)} {(gt)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:2011)
            )
          ]
        )
    )
    (command.ShFunction
      name: remove_tmp_
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:__st)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [2030]
                )
              ]
            )
            (C {(cleanup_)})
            (command.AndOr
              ops: [Id.Op_DPipe Id.Op_DPipe]
              children: [
                (C {(cd)} {(DQ ($ Id.VSub_DollarName '$initial_cwd_'))})
                (C {(cd)} {(/)})
                (C {(cd)} {(/tmp)})
              ]
            )
            (C {(chmod)} {(-R)} {(u) (Id.Lit_Other '+') (rwx)} {(DQ ($ Id.VSub_DollarName '$test_dir_'))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(rm)} {(-rf)} {(DQ ($ Id.VSub_DollarName '$test_dir_'))})
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(test)} {($ Id.VSub_DollarName '$__st')} {(Id.Lit_Equals '=')} {(0)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:__st)
                                  op: assign_op.Equal
                                  rhs: {(1)}
                                  spids: [2099]
                                )
                              ]
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2101)
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:2106)
              arg_word: {($ Id.VSub_DollarName '$__st')}
            )
          ]
        )
    )
    (command.ShFunction
      name: find_exe_basenames_
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_dir_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [2133]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_fail_)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [2137]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_result_)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [2141]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_sp_)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [2144]
                )
              ]
            )
            (command.ForEach
              iter_name: feb_file_
              iter_words: [{($ Id.VSub_DollarName '$feb_dir_') (/) (Id.Lit_Star '*') (.exe)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DAmp Id.Op_DAmp]
                      children: [
                        (C {(test)} {(DQ (x) ($ Id.VSub_DollarName '$feb_file_'))} {(Id.Lit_Equals '=')} 
                          {(DQ (x) ($ Id.VSub_DollarName '$feb_dir_') ('/*.exe'))}
                        )
                        (C {(test)} {(Id.KW_Bang '!')} {(-f)} {(DQ ($ Id.VSub_DollarName '$feb_file_'))})
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Continue val:continue span_id:2205)
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {(test)} {(DQ (x) ($ Id.VSub_DollarName '$feb_file_'))} {(Id.Lit_Equals '=')} 
                          {(DQ (x) ($ Id.VSub_DollarName '$feb_dir_') ('/[.exe'))}
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Continue val:continue span_id:2233)
                        )
                      ]
                    )
                    (command.Case
                      to_match: {($ Id.VSub_DollarName '$feb_file_')}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(Id.Lit_Star '*') (Id.Lit_LBracket '[') (Id.KW_Bang '!') (-a-zA-Z/0-9_.) 
                              (Id.Lit_Other '+') (Id.Lit_RBracket ']') (Id.Lit_Star '*')
                            }
                          ]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:feb_fail_)
                                      op: assign_op.Equal
                                      rhs: {(1)}
                                      spids: [2252]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:2254)
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:2256)
                            )
                          ]
                          spids: [2243 2250 2257 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:feb_file_)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Name val:feb_file_ span_id:2269)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_DPound
                                            arg_word: {('*') (Id.Lit_Slash /)}
                                          )
                                      )
                                    }
                                  spids: [2267]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:feb_file_)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Name val:feb_file_ span_id:2278)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Percent
                                            arg_word: {(.exe)}
                                          )
                                      )
                                    }
                                  spids: [2276]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:feb_result_)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$feb_result_') 
                                        ($ Id.VSub_DollarName '$feb_sp_') ($ Id.VSub_DollarName '$feb_file_')
                                      )
                                    }
                                  spids: [2284]
                                )
                              ]
                            )
                          ]
                          spids: [2260 2261 2290 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:feb_sp_)
                          op: assign_op.Equal
                          rhs: {(SQ (Token id:Id.Lit_Chars val:' ' span_id:2298))}
                          spids: [2296]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(test)} {($ Id.VSub_DollarName '$feb_fail_')} {(Id.Lit_Equals '=')} {(0)})
                (C {(printf)} {(Id.Lit_Other '%') (s)} {(DQ ($ Id.VSub_DollarName '$feb_result_'))})
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:2325)
              arg_word: {($ Id.VSub_DollarName '$feb_fail_')}
            )
          ]
        )
    )
    (command.ShFunction
      name: create_exe_shims_
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName '$EXEEXT')}
              arms: [
                (case_arm
                  pat_list: [{(SQ )}]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:2366)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [2362 2364 2370 -1]
                )
                (case_arm pat_list:[{(.exe)}] spids:[2373 2374 2376 -1])
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [
                            {(echo)}
                            {
                              (DQ ($ Id.VSub_Number '$0') (': unexpected ') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:2387)
                                ) ('EXEEXT value: ') ($ Id.VSub_DollarName '$EXEEXT')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:2392)
                              fd: 1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2394)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:2396)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [2379 2380 2400 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:base_names_)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:2408)
                            command_list: 
                              (command.CommandList
                                children: [(C {(find_exe_basenames_)} {($ Id.VSub_Number '$1')})]
                              )
                          )
                        }
                      spids: [2407]
                    )
                  ]
                )
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [
                            {(echo)}
                            {
                              (DQ ($ Id.VSub_Number '$0') (' (exe_shim): skipping directory: ') 
                                ($ Id.VSub_Number '$1')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:2430)
                              fd: 1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2432)
                    )
                    (command.Sentence
                      child: 
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Return val:return span_id:2434)
                          arg_word: {(0)}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2437)
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$base_names_'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2452)
                    )
                  ]
                  action: [
                    (command.ForEach
                      iter_name: base_
                      iter_words: [{($ Id.VSub_DollarName '$base_names_')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (C {(alias)} 
                              {(DQ ($ Id.VSub_DollarName '$base_')) (Id.Lit_Equals '=') 
                                (DQ ($ Id.VSub_DollarName '$base_') ($ Id.VSub_DollarName '$EXEEXT'))
                              }
                            )
                          ]
                        )
                    )
                  ]
                  spids: [2443 2454]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:2488)
              arg_word: {(0)}
            )
          ]
        )
    )
    (command.ShFunction
      name: path_prepend_
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:2509)
              cond: [
                (command.Sentence
                  child: 
                    (C {(test)} {($ Id.VSub_Pound '$#')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:2519)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:path_dir_)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [2524]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {($ Id.VSub_DollarName '$path_dir_')}
                      arms: [
                        (case_arm
                          pat_list: [{(SQ )}]
                          action: [
                            (C {(fail_)} {(DQ ("invalid path dir: '") ($ Id.VSub_Number '$1') ("'"))})
                          ]
                          spids: [2535 2537 2546 -1]
                        )
                        (case_arm
                          pat_list: [{(/) (Id.Lit_Star '*')}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:abs_path_dir_)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$path_dir_')}
                                  spids: [2553]
                                )
                              ]
                            )
                          ]
                          spids: [2549 2551 2555 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:abs_path_dir_)
                                  op: assign_op.Equal
                                  rhs: 
                                    {($ Id.VSub_DollarName '$initial_cwd_') (/) 
                                      ($ Id.VSub_DollarName '$path_dir_')
                                    }
                                  spids: [2561]
                                )
                              ]
                            )
                          ]
                          spids: [2558 2559 2565 -1]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {($ Id.VSub_DollarName '$abs_path_dir_')}
                      arms: [
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*') (Id.Lit_Other ':') (Id.Lit_Star '*')}]
                          action: [
                            (C {(fail_)} 
                              {
                                (DQ ("invalid path dir: '") ($ Id.VSub_DollarName '$abs_path_dir_') 
                                  ("'")
                                )
                              }
                            )
                          ]
                          spids: [2578 2581 2590 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:PATH)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$abs_path_dir_') (':') 
                                ($ Id.VSub_DollarName '$PATH')
                              )
                            }
                          spids: [2596]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(create_exe_shims_)} {(DQ ($ Id.VSub_DollarName '$abs_path_dir_'))})
                        (C {(fail_)} 
                          {
                            (DQ ('something failed (above): ') ($ Id.VSub_DollarName '$abs_path_dir_'))
                          }
                        )
                      ]
                    )
                    (C {(shift)})
                  ]
                )
            )
            (C {(export)} {(PATH)})
          ]
        )
    )
    (command.ShFunction
      name: setup_
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(test)} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.Lit_Equals '=')} 
                          {(yes)}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2659)
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: (C {($ Id.VSub_DollarName '$gl_set_x_corrupts_stderr_')})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:2687)
                            )
                          ]
                          action: [
                            (C {(warn_)} 
                              {
                                (DQ ('using SHELL=') ($ Id.VSub_DollarName '$SHELL') 
                                  (" with 'set -x' corrupts stderr")
                                )
                              }
                            )
                          ]
                          spids: [2684 2689]
                        )
                      ]
                      else_action: [(C {(Id.KW_Set set)} {(-x)})]
                    )
                  ]
                  spids: [2648 2661]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:initial_cwd_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$PWD')}
                  spids: [2716]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:fail)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [2720]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:pfx_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:2726)
                        command_list: (command.CommandList children:[(C {(testdir_prefix_)})])
                      )
                    }
                  spids: [2725]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:test_dir_)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:2734)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(mktempd_)} {(DQ ($ Id.VSub_DollarName '$initial_cwd_'))} 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$pfx_') (-) 
                                        ($ Id.VSub_DollarName '$ME_') (.XXXX)
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        }
                      spids: [2733]
                    )
                  ]
                )
                (C {(fail_)} 
                  {
                    (DQ ('failed to create temporary directory in ') 
                      ($ Id.VSub_DollarName '$initial_cwd_')
                    )
                  }
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(cd)} {(DQ ($ Id.VSub_DollarName '$test_dir_'))})
                (C {(fail_)} {(DQ ('failed to cd to temporary directory'))})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:gl_init_sh_nl_)
                  op: assign_op.Equal
                  rhs: {(SQ (Token id:Id.Lit_Chars val:'\n' span_id:2789))}
                  spids: [2787]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:IFS)
                  op: assign_op.Equal
                  rhs: {(DQ (' ')) (DQ ('\t') ($ Id.VSub_DollarName '$gl_init_sh_nl_'))}
                  spids: [2793]
                )
              ]
            )
            (command.ForEach
              iter_name: sig_
              iter_words: [{(1)} {(2)} {(3)} {(13)} {(15)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(eval)} 
                      {
                        (DQ ("trap 'Exit ") 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2840)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(expr)} {($ Id.VSub_DollarName '$sig_')} {(Id.Lit_Other '+')} 
                                    {(128)}
                                  )
                                ]
                              )
                          ) ("' ") ($ Id.VSub_DollarName '$sig_')
                        )
                      }
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: rand_bytes_
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:n_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [2913]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:chars_)
                  op: assign_op.Equal
                  rhs: {(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789)}
                  spids: [2927]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dev_rand_)
                  op: assign_op.Equal
                  rhs: {(/dev/urandom)}
                  spids: [2931]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {(-r)} {(DQ ($ Id.VSub_DollarName '$dev_rand_'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2944)
                    )
                  ]
                  action: [
                    (command.Pipeline
                      children: [
                        (command.Simple
                          words: [
                            {(dd)}
                            {(Id.Lit_VarLike 'ibs=') ($ Id.VSub_DollarName '$n_')}
                            {(Id.Lit_VarLike 'count=') (1)}
                            {(Id.Lit_VarLike 'if=') ($ Id.VSub_DollarName '$dev_rand_')}
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'2>' span_id:2964)
                              fd: 2
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                        (command.Simple
                          words: [
                            {(tr)}
                            {(-c)}
                            {($ Id.VSub_DollarName '$chars_')}
                            {(01234567) ($ Id.VSub_DollarName '$chars_') 
                              ($ Id.VSub_DollarName '$chars_') ($ Id.VSub_DollarName '$chars_')
                            }
                          ]
                          more_env: [(env_pair name:LC_ALL val:{(C)} spids:[2971])]
                        )
                      ]
                      negated: F
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:2986)
                    )
                  ]
                  spids: [2935 2946]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:n_plus_50_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:2994)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(expr)} {($ Id.VSub_DollarName '$n_')} {(Id.Lit_Other '+')} {(50)})
                            ]
                          )
                      )
                    }
                  spids: [2993]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cmds_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (SQ 
                        (Token
                          id: Id.Lit_Chars
                          val: 'date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
                          span_id: 3009
                        )
                      )
                    }
                  spids: [3007]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:data_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:3014)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (command.Subshell
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(eval)} {(DQ ($ Id.VSub_DollarName '$cmds_'))})]
                                      )
                                    redirects: [
                                      (redir.Redir
                                        op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:3026)
                                        fd: 2
                                        arg_word: {(1)}
                                      )
                                    ]
                                  )
                                  (C {(gzip)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3013]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:3041)
              cond: [
                (command.Sentence
                  child: (C {(Id.Lit_Other ':')})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:3044)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:len_)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_Backtick val:'`' span_id:3050)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(echo)} {(DQ ($ Id.VSub_DollarName '$data_'))})
                                          (C {(wc)} {(-c)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [3049]
                        )
                      ]
                    )
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(test)} {($ Id.VSub_DollarName '$n_plus_50_')} {(-le)} 
                              {($ Id.VSub_DollarName '$len_')}
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:3075)
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:3076)
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:data_)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_Backtick val:'`' span_id:3080)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (command.Subshell
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (command.Sentence
                                                    child: 
                                                      (C {(echo)} {(DQ ($ Id.VSub_DollarName '$data_'))})
                                                    terminator: 
                                                      (Token
                                                        id: Id.Op_Semi
                                                        val: ';'
                                                        span_id: 3090
                                                      )
                                                  )
                                                  (C {(eval)} {(DQ ($ Id.VSub_DollarName '$cmds_'))})
                                                ]
                                              )
                                            redirects: [
                                              (redir.Redir
                                                op: 
                                                  (Token
                                                    id: Id.Redir_GreatAnd
                                                    val: '2>&'
                                                    span_id: 3099
                                                  )
                                                fd: 2
                                                arg_word: {(1)}
                                              )
                                            ]
                                          )
                                          (C {(gzip)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [3079]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.Pipeline
              children: [
                (C {(echo)} {(DQ ($ Id.VSub_DollarName '$data_'))})
                (command.Simple
                  words: [
                    {(dd)}
                    {(Id.Lit_VarLike 'bs=') (1)}
                    {(Id.Lit_VarLike 'skip=') (50)}
                    {(Id.Lit_VarLike 'count=') ($ Id.VSub_DollarName '$n_')}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'2>' span_id:3134)
                      fd: 2
                      arg_word: {(/dev/null)}
                    )
                  ]
                )
                (command.Simple
                  words: [
                    {(tr)}
                    {(-c)}
                    {($ Id.VSub_DollarName '$chars_')}
                    {(01234567) ($ Id.VSub_DollarName '$chars_') ($ Id.VSub_DollarName '$chars_') 
                      ($ Id.VSub_DollarName '$chars_')
                    }
                  ]
                  more_env: [(env_pair name:LC_ALL val:{(C)} spids:[3141])]
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: mktempd_
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_Pound '$#')}
              arms: [
                (case_arm pat_list:[{(2)}] spids:[3173 3174 3175 -1])
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(fail_)} {(DQ ('Usage: mktempd_ DIR TEMPLATE'))})]
                  spids: [3178 3179 3186 -1]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:destdir_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [3193]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:template_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [3197]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MAX_TRIES_)
                  op: assign_op.Equal
                  rhs: {(4)}
                  spids: [3202]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$destdir_')}
              arms: [
                (case_arm pat_list:[{(/)}] spids:[3222 3223 3225 -1])
                (case_arm
                  pat_list: [{(Id.Lit_Star '*') (/)}]
                  action: [(C {(fail_)} {(DQ ('invalid destination dir: remove trailing slash(es)'))})]
                  spids: [3228 3230 3237 -1]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$template_')}
              arms: [
                (case_arm
                  pat_list: [{(Id.Lit_Star '*') (XXXX)}]
                  spids: [3251 3253 3255 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (C {(fail_)} 
                      {
                        (DQ ('invalid template: ') ($ Id.VSub_DollarName '$template_') 
                          (" (must have a suffix of at least 4 X's)")
                        )
                      }
                    )
                  ]
                  spids: [3258 3259 3270 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:d)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:3282)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Sentence
                                    child: (C {(unset)} {(TMPDIR)})
                                    terminator: (Token id:Id.Op_Semi val:';' span_id:3288)
                                  )
                                  (command.BraceGroup
                                    children: [
                                      (command.Sentence
                                        child: 
                                          (C {(mktemp)} {(-d)} {(-t)} {(-p)} 
                                            {(DQ ($ Id.VSub_DollarName '$destdir_'))} {(DQ ($ Id.VSub_DollarName '$template_'))}
                                          )
                                        terminator: (Token id:Id.Op_Semi val:';' span_id:3307)
                                      )
                                    ]
                                    redirects: [
                                      (redir.Redir
                                        op: (Token id:Id.Redir_Great val:'2>' span_id:3311)
                                        fd: 2
                                        arg_word: {(/dev/null)}
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [3281]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [3319]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$d')}
              arms: [
                (case_arm
                  pat_list: [{(DQ ($ Id.VSub_DollarName '$destdir_')) (Id.Lit_Star '*')}]
                  spids: [3334 3338 3339 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:fail)
                          op: assign_op.Equal
                          rhs: {(1)}
                          spids: [3344]
                        )
                      ]
                    )
                  ]
                  spids: [3341 3342 3346 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-d)} {(DQ ($ Id.VSub_DollarName '$d'))})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [3366]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:perms)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_Backtick val:'`' span_id:3376)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [{(ls)} {(-dgo)} {(DQ ($ Id.VSub_DollarName '$d'))}]
                                        redirects: [
                                          (redir.Redir
                                            op: (Token id:Id.Redir_Great val:'2>' span_id:3387)
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                      (C {(tr)} {(S)} {(-)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                      spids: [3375]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [3399]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$perms')}
              arms: [
                (case_arm
                  pat_list: [{(drwx------) (Id.Lit_Star '*')}]
                  spids: [3409 3411 3413 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:fail)
                          op: assign_op.Equal
                          rhs: {(1)}
                          spids: [3418]
                        )
                      ]
                    )
                  ]
                  spids: [3415 3416 3420 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(test)} {($ Id.VSub_DollarName '$fail')} {(Id.Lit_Equals '=')} {(0)})
                (command.BraceGroup
                  children: [
                    (C {(echo)} {(DQ ($ Id.VSub_DollarName '$d'))})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:3446)
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:base_template_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:3463)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ Id.VSub_DollarName '$template_'))})
                                  (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/XX*$//' span_id:3475))})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3462]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:template_length_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:3486)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ Id.VSub_DollarName '$template_'))})
                                  (C {(wc)} {(-c)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3485]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:nx_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:3504)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ Id.VSub_DollarName '$base_template_'))})
                                  (C {(wc)} {(-c)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3503]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:nx_)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_Backtick val:'`' span_id:3522)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(expr)} {($ Id.VSub_DollarName '$template_length_')} {(-)} 
                                {($ Id.VSub_DollarName '$nx_')}
                              )
                            ]
                          )
                      )
                    }
                  spids: [3521]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:err_)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [3536]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:i_)
                  op: assign_op.Equal
                  rhs: {(1)}
                  spids: [3539]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:3543)
              cond: [
                (command.Sentence
                  child: (C {(Id.Lit_Other ':')})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:3546)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:X_)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_Backtick val:'`' span_id:3552)
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(rand_bytes_)} {($ Id.VSub_DollarName '$nx_')})]
                                  )
                              )
                            }
                          spids: [3551]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:candidate_dir_)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$destdir_') (/) 
                                ($ Id.VSub_DollarName '$base_template_') ($ Id.VSub_DollarName '$X_')
                              )
                            }
                          spids: [3561]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:err_)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_Backtick val:'`' span_id:3571)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (command.Simple
                                            words: [
                                              {(mkdir)}
                                              {(-m)}
                                              {(0700)}
                                              {(DQ ($ Id.VSub_DollarName '$candidate_dir_'))}
                                            ]
                                            redirects: [
                                              (redir.Redir
                                                op: 
                                                  (Token
                                                    id: Id.Redir_GreatAnd
                                                    val: '2>&'
                                                    span_id: 3584
                                                  )
                                                fd: 2
                                                arg_word: {(1)}
                                              )
                                            ]
                                          )
                                        ]
                                      )
                                  )
                                }
                              spids: [3570]
                            )
                          ]
                        )
                        (command.BraceGroup
                          children: [
                            (command.Sentence
                              child: (C {(echo)} {(DQ ($ Id.VSub_DollarName '$candidate_dir_'))})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:3599)
                            )
                            (command.Sentence
                              child: 
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Return val:return span_id:3601)
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:3602)
                            )
                          ]
                        )
                      ]
                    )
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(test)} {($ Id.VSub_DollarName '$MAX_TRIES_')} {(-le)} 
                              {($ Id.VSub_DollarName '$i_')}
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:3617)
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:3618)
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:i_)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_Backtick val:'`' span_id:3622)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(expr)} {($ Id.VSub_DollarName '$i_')} {(Id.Lit_Other '+')} 
                                        {(1)}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [3621]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {(fail_)} {(DQ ($ Id.VSub_DollarName '$err_'))})
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$srcdir') (/init.cfg))})
        (C {(.)} {(DQ ($ Id.VSub_DollarName '$srcdir') (/init.cfg))})
      ]
    )
    (C {(setup_)} {(DQ ($ Id.VSub_At '$@'))})
    (C {(trap)} {(remove_tmp_)} {(0)})
  ]
)