(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.CommandList
      children: [
        (command.Sentence
          child: 
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:DUALCASE)
                  op: assign_op.Equal
                  rhs: {(1)}
                  spids: [466]
                )
              ]
            )
          terminator: (Token id:Id.Op_Semi val:';' span_id:468)
        )
        (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:482)
                            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:496)
                          fd: -1
                          arg_word: {(/dev/null)}
                        )
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:499)
                          fd: 2
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:501)
            )
          ]
          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: [511]
                )
              ]
            )
            (C {(alias)} {(-g)} 
              {(SQ (Token id:Id.Lit_Chars val:'${1+"$@"}' span_id:520)) (Id.Lit_Equals '=') 
                (SQ (Token id:Id.Lit_Chars val:'"$@"' span_id:524))
              }
            )
            (C {(setopt)} {(NO_GLOB_SUBST)})
          ]
          spids: [474 503]
        )
      ]
      else_action: [
        (command.Case
          to_match: 
            {
              (command_sub
                left_token: (Token id:Id.Left_Backtick val:'`' span_id:537)
                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:546)
                            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: [553 556 564 -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:635) 
                (Token
                  id: Id.Lit_Chars
                  val: 'test $(echo y) = y || exit 1\n'
                  span_id: 636
                ) (Token id:Id.Lit_Chars val:'score_=10\n' span_id:637) 
                (Token
                  id: Id.Lit_Chars
                  val: 'if test "$VERBOSE" = yes; then\n'
                  span_id: 638
                ) 
                (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: 639
                ) (Token id:Id.Lit_Chars val:'fi\n' span_id:640) 
                (Token
                  id: Id.Lit_Chars
                  val: 'test -z "$EXEEXT" && exit $score_\n'
                  span_id: 641
                ) (Token id:Id.Lit_Chars val:'shopt -s expand_aliases\n' span_id:642) 
                (Token id:Id.Lit_Chars val:'alias a-b="echo zoo"\n' span_id:643) (Token id:Id.Lit_Chars val:'v=abx\n' span_id:644) 
                (Token id:Id.Lit_Chars val:'     test ${v%x} = ab \\\n' span_id:645) (Token id:Id.Lit_Chars val:'  && test ${v#a} = bx \\\n' span_id:646) 
                (Token id:Id.Lit_Chars val:'  && test $(a-b) = zoo \\\n' span_id:647) (Token id:Id.Lit_Chars val:'  && exit $score_\n' span_id:648)
              )
            }
          spids: [633]
        )
      ]
    )
    (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:666)
            )
          ]
          action: [(C {(shift)})]
          spids: [652 668]
        )
      ]
      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: [680]
            )
          ]
        )
        (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: [694]
            )
          ]
        )
        (command.ForEach
          iter_name: re_shell_
          iter_words: [
            {(__current__)}
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Name val:CONFIG_SHELL span_id:712)
                  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:748)
                    )
                  ]
                )
                (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:771)
                        )
                      ]
                      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: [801]
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Break val:break span_id:805)
                        )
                      ]
                      spids: [760 773]
                    )
                  ]
                )
                (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:831)
                        )
                      ]
                      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:858)
                              fd: -1
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:862)
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                      spids: [820 833]
                    )
                  ]
                  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:879)
                          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: [887]
                    )
                  ]
                )
                (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:905)
                        )
                      ]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:gl_set_x_corrupts_stderr_)
                              op: assign_op.Equal
                              rhs: {(false)}
                              spids: [910]
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Break val:break span_id:914)
                        )
                      ]
                      spids: [896 907]
                    )
                  ]
                )
                (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:940)
                        )
                      ]
                      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: [945]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:gl_set_x_corrupts_stderr_)
                              op: assign_op.Equal
                              rhs: {(true)}
                              spids: [951]
                            )
                          ]
                        )
                      ]
                      spids: [925 942]
                    )
                  ]
                )
              ]
            )
        )
        (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:974)
                )
              ]
              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: [1005]
                            )
                          ]
                        )
                      ]
                      spids: [990 1003 1008 -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: [1016]
                            )
                          ]
                        )
                      ]
                      spids: [1011 1014 1019 -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: [1027]
                            )
                          ]
                        )
                      ]
                      spids: [1022 1025 1030 -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: [1036]
                            )
                          ]
                        )
                      ]
                      spids: [1033 1034 1038 -1]
                    )
                  ]
                )
                (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:1070)
                      fd: 1
                      arg_word: {(2)}
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:1074)
                  arg_word: {(127)}
                )
              ]
              spids: [962 976]
            )
          ]
        )
      ]
    )
    (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:1149)
          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:1176)
            )
          ]
        )
    )
    (command.ShFunction
      name: emit_diff_u_header_
      body: 
        (command.BraceGroup
          children: [
            (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:1198))} 
              {(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:1261)
                  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:1279)
                    )
                  ]
                  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:1294)
                          arg_word: {(0)}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (C {(emit_diff_u_header_)} {(DQ ($ Id.VSub_At '$@'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1304)
                    )
                    (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/+/' span_id:1309))} 
                      {(DQ ($ Id.VSub_Number '$2'))}
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:1317)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [1267 1281]
                )
              ]
            )
            (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:1338)
                    )
                  ]
                  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:1353)
                          arg_word: {(0)}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (C {(emit_diff_u_header_)} {(DQ ($ Id.VSub_At '$@'))})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1363)
                    )
                    (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s/^/-/' span_id:1368))} 
                      {(DQ ($ Id.VSub_Number '$1'))}
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:1376)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [1326 1340]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:1385)
              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:1395)
                                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:1400)
                                                fd: 2
                                                arg_word: {(/dev/null)}
                                              )
                                            ]
                                          )
                                        terminator: (Token id:Id.Op_Semi val:';' span_id:1402)
                                      )
                                      (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:1416)
                                            fd: -1
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [1394]
                        )
                      ]
                    )
                    (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:1435)
                              fd: 2
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                        (command.Simple
                          words: [{(grep)} {(SQ (Token id:Id.Lit_Chars val:'^[+]#!' span_id:1443))}]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'>' span_id:1446)
                              fd: -1
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1448)
            )
          ]
          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:1470)
                    )
                  ]
                  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:1489)
                            )
                          ]
                        )
                    )
                  ]
                  spids: [1461 1472]
                )
              ]
              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:1516)
                                          fd: -1
                                          arg_word: {(diff.out)}
                                        )
                                      ]
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:1519)
                                )
                              ]
                              action: [(C {(rm)} {(-f)} {(diff.out)}) (C {(true)})]
                              spids: [1506 1521]
                            )
                          ]
                          else_action: [
                            (C {(cat)} {(diff.out)})
                            (C {(rm)} {(-f)} {(diff.out)})
                            (C {(false)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
          spids: [1392 1450]
        )
        (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:1571)
                            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:1576)
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                    terminator: (Token id:Id.Op_Semi val:';' span_id:1578)
                                  )
                                  (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:1592)
                                        fd: -1
                                        arg_word: {(/dev/null)}
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [1570]
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1596)
            )
          ]
          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:1610)
                    )
                  ]
                  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:1629)
                            )
                          ]
                        )
                    )
                  ]
                  spids: [1601 1612]
                )
              ]
              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:1656)
                                          fd: -1
                                          arg_word: {(diff.out)}
                                        )
                                      ]
                                    )
                                  terminator: (Token id:Id.Op_Semi val:';' span_id:1659)
                                )
                              ]
                              action: [(C {(rm)} {(-f)} {(diff.out)}) (C {(true)})]
                              spids: [1646 1661]
                            )
                          ]
                          else_action: [
                            (C {(cat)} {(diff.out)})
                            (C {(rm)} {(-f)} {(diff.out)})
                            (C {(false)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
          spids: [1568 1598]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (command.Simple
                              words: [{(cmp)} {(--version)}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Less val:'<' span_id:1720)
                                  fd: -1
                                  arg_word: {(/dev/null)}
                                )
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:1724)
                                  fd: 2
                                  arg_word: {(1)}
                                )
                              ]
                            )
                            (C {(grep)} {(GNU)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:1735)
                      fd: -1
                      arg_word: {(/dev/null)}
                    )
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:1739)
                      fd: 2
                      arg_word: {(1)}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:1741)
            )
          ]
          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:1760)
                    )
                  ]
                )
            )
          ]
          spids: [1712 1743]
        )
      ]
      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:1779)
                )
              ]
            )
        )
      ]
    )
    (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:1825)
                    )
                  ]
                  action: [
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:1830)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [1818 1827]
                )
              ]
              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:1848)
                          arg_word: {(1)}
                        )
                      ]
                      spids: [1845 1846 1851 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*')}]
                      action: [(C {(compare_)} {(DQ ($ Id.VSub_At '$@'))})]
                      spids: [1854 1855 1862 -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:1886)
            )
          ]
        )
    )
    (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: [1905]
                )
              ]
            )
            (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: [1974]
                                )
                              ]
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:1976)
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:1981)
              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: [2008]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_fail_)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [2012]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_result_)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [2016]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:feb_sp_)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [2019]
                )
              ]
            )
            (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:2080)
                        )
                      ]
                    )
                    (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:2108)
                        )
                      ]
                    )
                    (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: [2127]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:2129)
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:2131)
                            )
                          ]
                          spids: [2118 2125 2132 -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:2144)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_DPound
                                            arg_word: {('*') (Id.Lit_Slash /)}
                                          )
                                      )
                                    }
                                  spids: [2142]
                                )
                              ]
                            )
                            (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:2153)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Percent
                                            arg_word: {(.exe)}
                                          )
                                      )
                                    }
                                  spids: [2151]
                                )
                              ]
                            )
                            (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: [2159]
                                )
                              ]
                            )
                          ]
                          spids: [2135 2136 2165 -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:2173))}
                          spids: [2171]
                        )
                      ]
                    )
                  ]
                )
            )
            (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:2200)
              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:2241)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [2237 2239 2245 -1]
                )
                (case_arm pat_list:[{(.exe)}] spids:[2248 2249 2251 -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:2262)
                                ) ('EXEEXT value: ') ($ Id.VSub_DollarName '$EXEEXT')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:2267)
                              fd: 1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2269)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:2271)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [2254 2255 2275 -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:2283)
                            command_list: 
                              (command.CommandList
                                children: [(C {(find_exe_basenames_)} {($ Id.VSub_Number '$1')})]
                              )
                          )
                        }
                      spids: [2282]
                    )
                  ]
                )
                (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:2305)
                              fd: 1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2307)
                    )
                    (command.Sentence
                      child: 
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Return val:return span_id:2309)
                          arg_word: {(0)}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2312)
                    )
                  ]
                )
              ]
            )
            (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:2327)
                    )
                  ]
                  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: [2318 2329]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:2363)
              arg_word: {(0)}
            )
          ]
        )
    )
    (command.ShFunction
      name: path_prepend_
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:2384)
              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:2394)
                )
              ]
              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: [2399]
                        )
                      ]
                    )
                    (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: [2410 2412 2421 -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: [2428]
                                )
                              ]
                            )
                          ]
                          spids: [2424 2426 2430 -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: [2436]
                                )
                              ]
                            )
                          ]
                          spids: [2433 2434 2440 -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: [2453 2456 2465 -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: [2471]
                        )
                      ]
                    )
                    (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:2534)
                    )
                  ]
                  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:2562)
                            )
                          ]
                          action: [
                            (C {(warn_)} 
                              {
                                (DQ ('using SHELL=') ($ Id.VSub_DollarName '$SHELL') 
                                  (" with 'set -x' corrupts stderr")
                                )
                              }
                            )
                          ]
                          spids: [2559 2564]
                        )
                      ]
                      else_action: [(C {(Id.KW_Set set)} {(-x)})]
                    )
                  ]
                  spids: [2523 2536]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:initial_cwd_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$PWD')}
                  spids: [2591]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:fail)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [2595]
                )
              ]
            )
            (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:2601)
                        command_list: (command.CommandList children:[(C {(testdir_prefix_)})])
                      )
                    }
                  spids: [2600]
                )
              ]
            )
            (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:2609)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(mktempd_)} {(DQ ($ Id.VSub_DollarName '$initial_cwd_'))} 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$pfx_') (-) 
                                        ($ Id.VSub_DollarName '$ME_') (.XXXX)
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        }
                      spids: [2608]
                    )
                  ]
                )
                (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:2664))}
                  spids: [2662]
                )
              ]
            )
            (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: [2668]
                )
              ]
            )
            (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:2715)
                            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: [2788]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:chars_)
                  op: assign_op.Equal
                  rhs: {(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789)}
                  spids: [2802]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dev_rand_)
                  op: assign_op.Equal
                  rhs: {(/dev/urandom)}
                  spids: [2806]
                )
              ]
            )
            (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:2819)
                    )
                  ]
                  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:2839)
                              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:[2846])]
                        )
                      ]
                      negated: F
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:2861)
                    )
                  ]
                  spids: [2810 2821]
                )
              ]
            )
            (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:2869)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(expr)} {($ Id.VSub_DollarName '$n_')} {(Id.Lit_Other '+')} {(50)})
                            ]
                          )
                      )
                    }
                  spids: [2868]
                )
              ]
            )
            (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: 2884
                        )
                      )
                    }
                  spids: [2882]
                )
              ]
            )
            (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:2889)
                        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:2901)
                                        fd: 2
                                        arg_word: {(1)}
                                      )
                                    ]
                                  )
                                  (C {(gzip)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [2888]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:2916)
              cond: [
                (command.Sentence
                  child: (C {(Id.Lit_Other ':')})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:2919)
                )
              ]
              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:2925)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Pipeline
                                        children: [
                                          (C {(echo)} {(DQ ($ Id.VSub_DollarName '$data_'))})
                                          (C {(wc)} {(-c)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2924]
                        )
                      ]
                    )
                    (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:2950)
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:2951)
                    )
                    (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:2955)
                                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: 2965
                                                      )
                                                  )
                                                  (C {(eval)} {(DQ ($ Id.VSub_DollarName '$cmds_'))})
                                                ]
                                              )
                                            redirects: [
                                              (redir.Redir
                                                op: 
                                                  (Token
                                                    id: Id.Redir_GreatAnd
                                                    val: '2>&'
                                                    span_id: 2974
                                                  )
                                                fd: 2
                                                arg_word: {(1)}
                                              )
                                            ]
                                          )
                                          (C {(gzip)})
                                        ]
                                        negated: F
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2954]
                        )
                      ]
                    )
                  ]
                )
            )
            (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:3009)
                      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:[3016])]
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: mktempd_
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_Pound '$#')}
              arms: [
                (case_arm pat_list:[{(2)}] spids:[3048 3049 3050 -1])
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(fail_)} {(DQ ('Usage: mktempd_ DIR TEMPLATE'))})]
                  spids: [3053 3054 3061 -1]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:destdir_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [3068]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:template_)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [3072]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MAX_TRIES_)
                  op: assign_op.Equal
                  rhs: {(4)}
                  spids: [3077]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$destdir_')}
              arms: [
                (case_arm pat_list:[{(/)}] spids:[3097 3098 3100 -1])
                (case_arm
                  pat_list: [{(Id.Lit_Star '*') (/)}]
                  action: [(C {(fail_)} {(DQ ('invalid destination dir: remove trailing slash(es)'))})]
                  spids: [3103 3105 3112 -1]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$template_')}
              arms: [
                (case_arm
                  pat_list: [{(Id.Lit_Star '*') (XXXX)}]
                  spids: [3126 3128 3130 -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: [3133 3134 3145 -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:3157)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Sentence
                                    child: (C {(unset)} {(TMPDIR)})
                                    terminator: (Token id:Id.Op_Semi val:';' span_id:3163)
                                  )
                                  (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:3182)
                                      )
                                    ]
                                    redirects: [
                                      (redir.Redir
                                        op: (Token id:Id.Redir_Great val:'2>' span_id:3186)
                                        fd: 2
                                        arg_word: {(/dev/null)}
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [3156]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [3194]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$d')}
              arms: [
                (case_arm
                  pat_list: [{(DQ ($ Id.VSub_DollarName '$destdir_')) (Id.Lit_Star '*')}]
                  spids: [3209 3213 3214 -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: [3219]
                        )
                      ]
                    )
                  ]
                  spids: [3216 3217 3221 -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: [3241]
                    )
                  ]
                )
              ]
            )
            (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:3251)
                            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:3262)
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                      (C {(tr)} {(S)} {(-)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                      spids: [3250]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [3274]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName '$perms')}
              arms: [
                (case_arm
                  pat_list: [{(drwx------) (Id.Lit_Star '*')}]
                  spids: [3284 3286 3288 -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: [3293]
                        )
                      ]
                    )
                  ]
                  spids: [3290 3291 3295 -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:3321)
                    )
                  ]
                )
              ]
            )
            (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:3338)
                        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:3350))})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3337]
                )
              ]
            )
            (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:3361)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ Id.VSub_DollarName '$template_'))})
                                  (C {(wc)} {(-c)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3360]
                )
              ]
            )
            (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:3379)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ Id.VSub_DollarName '$base_template_'))})
                                  (C {(wc)} {(-c)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [3378]
                )
              ]
            )
            (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:3397)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(expr)} {($ Id.VSub_DollarName '$template_length_')} {(-)} 
                                {($ Id.VSub_DollarName '$nx_')}
                              )
                            ]
                          )
                      )
                    }
                  spids: [3396]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:err_)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [3411]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:i_)
                  op: assign_op.Equal
                  rhs: {(1)}
                  spids: [3414]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:3418)
              cond: [
                (command.Sentence
                  child: (C {(Id.Lit_Other ':')})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:3421)
                )
              ]
              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:3427)
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(rand_bytes_)} {($ Id.VSub_DollarName '$nx_')})]
                                  )
                              )
                            }
                          spids: [3426]
                        )
                      ]
                    )
                    (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: [3436]
                        )
                      ]
                    )
                    (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:3446)
                                    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: 3459
                                                  )
                                                fd: 2
                                                arg_word: {(1)}
                                              )
                                            ]
                                          )
                                        ]
                                      )
                                  )
                                }
                              spids: [3445]
                            )
                          ]
                        )
                        (command.BraceGroup
                          children: [
                            (command.Sentence
                              child: (C {(echo)} {(DQ ($ Id.VSub_DollarName '$candidate_dir_'))})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:3474)
                            )
                            (command.Sentence
                              child: 
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Return val:return span_id:3476)
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:3477)
                            )
                          ]
                        )
                      ]
                    )
                    (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:3492)
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:3493)
                    )
                    (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:3497)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(expr)} {($ Id.VSub_DollarName '$i_')} {(Id.Lit_Other '+')} 
                                        {(1)}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [3496]
                        )
                      ]
                    )
                  ]
                )
            )
            (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)})
  ]
)