(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:progname)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: (CommandList children:[(C {(basename)} {(DQ ($ VSub_Number '$0'))})])
                  left_token: <Left_CommandSub '$('>
                  spids: [52 58]
                )
              )
            }
          spids: [50]
        )
      ]
      spids: [50]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:usage)
          op: Equal
          rhs: {(DQ ('usage: ') (${ VSub_Name progname) (' --arch=ARCH [VAR=VAL...] COMMAND ...'))}
          spids: [62]
        )
      ]
      spids: [62]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:help) op:Equal rhs:{(DQ ('\n'))} spids:[71])]
      spids: [71]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:use_bootstrap) op:Equal rhs:{(true)} spids:[77])]
      spids: [77]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(EmptyPart)} spids:[80])]
      spids: [80]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:env) op:Equal rhs:{(ArrayLiteralPart)} spids:[82])]
      spids: [82]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:envi) op:Equal rhs:{(0)} spids:[86])]
      spids: [86]
    )
    (While
      cond: [
        (Sentence
          child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(Lit_Other ']')})
          terminator: <Op_Semi ';'>
        )
      ]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(--help)}]
                  action: [
                    (C {(echo)} {(DQ ($ VSub_Name '$usage'))})
                    (C {(echo)} {(DQ ($ VSub_Name '$help'))})
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
                  ]
                  spids: [115 116 138 16777215]
                )
                (case_arm
                  pat_list: [{(--arch) (Lit_Other '=') (Lit_Other '*')}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:arch)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (BracedVarSub
                                  token: <VSub_Number 1>
                                  suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('--arch=')})
                                  spids: [150 154]
                                )
                              )
                            }
                          spids: [148]
                        )
                      ]
                      spids: [148]
                    )
                    (C {(shift)})
                  ]
                  spids: [142 145 161 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*') (Lit_Other '=') (Lit_Other '*')}]
                  action: [
                    (C 
                      {(env) (Lit_Other '[') (envi) (Lit_Other '+') (Lit_Other '+') (Lit_Other ']') 
                        (Lit_Other '=') (SQ <-E>)
                      }
                    )
                    (C 
                      {(env) (Lit_Other '[') (envi) (Lit_Other '+') (Lit_Other '+') (Lit_Other ']') 
                        (Lit_Other '=') (DQ ($ VSub_Number '$1'))
                      }
                    )
                    (C {(shift)})
                  ]
                  spids: [165 168 198 16777215]
                )
                (case_arm
                  pat_list: [{(--)}]
                  action: [(C {(shift)}) (ControlFlow token:<ControlFlow_Break break>)]
                  spids: [202 203 212 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [(ControlFlow token:<ControlFlow_Break break>)]
                  spids: [216 217 223 16777215]
                )
              ]
              spids: [105 111 226]
            )
          ]
          spids: [102 228]
        )
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-lt)} {(1)} {(-o)} {(-z)} 
                  {(DQ ($ VSub_Name '$arch'))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Name '$usage'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[261])]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ("Type '") (${ VSub_Name progname) (" --help' for more detailed help."))}
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[275])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 252]
        )
      ]
      spids: [16777215 283]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_args)
          op: Equal
          rhs: {(ArrayLiteralPart words:[{(DQ ($ VSub_At '$@'))}])}
          spids: [286]
        )
      ]
      spids: [286]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$NACL_SDK_ROOT'))} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ($ VSub_Number '$0') (': NACL_SDK_ROOT must be set in the environment'))}
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[312])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(77)})
          ]
          spids: [16777215 307]
        )
      ]
      spids: [16777215 325]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:sdk_tools)
          op: Equal
          rhs: {(DQ (${ VSub_Name NACL_SDK_ROOT) (/tools))}
          spids: [334]
        )
      ]
      spids: [334]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:NACL_BOOTSTRAP)
          op: Equal
          rhs: {(DQ (${ VSub_Name sdk_tools) (/nacl_helper_bootstrap_) (${ VSub_Name arch))}
          spids: [343]
        )
      ]
      spids: [343]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:NACL_SEL_LDR)
          op: Equal
          rhs: {(DQ (${ VSub_Name sdk_tools) (/sel_ldr_) (${ VSub_Name arch))}
          spids: [354]
        )
      ]
      spids: [354]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:NACL_IRT)
          op: Equal
          rhs: {(DQ (${ VSub_Name sdk_tools) (/irt_core_) (${ VSub_Name arch) (.nexe))}
          spids: [365]
        )
      ]
      spids: [365]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:NACL_LOADER)
          op: Equal
          rhs: {(DQ (${ VSub_Name sdk_tools) (/elf_loader_) (${ VSub_Name arch) (.nexe))}
          spids: [377]
        )
      ]
      spids: [377]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-x)} {(DQ ($ VSub_Name '$NACL_BOOTSTRAP'))} {(-o)} 
                  {(KW_Bang '!')} {(-x)} {(DQ ($ VSub_Name '$NACL_SEL_LDR'))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ($ VSub_Number '$0') (': sel_ldr_') (${ VSub_Name arch) 
                    (' and/or nacl_helper_bootstrap_') (${ VSub_Name arch) (' missing')
                  )
                }
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[420])]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ($ VSub_Number '$0') (': from directory ') ($ VSub_Name '$sdk_tools'))}
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[439])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(77)})
          ]
          spids: [16777215 415]
        )
      ]
      spids: [16777215 453]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other '[')} {(KW_Bang '!')} {(-r)} {(DQ ($ VSub_Name '$NACL_IRT'))} {(-o)} 
                  {(KW_Bang '!')} {(-r)} {(DQ ($ VSub_Name '$NACL_LOADER'))} {(Lit_Other ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ($ VSub_Number '$0') (': irt_core_') (${ VSub_Name arch) ('.nexe and/or loader_') 
                    (${ VSub_Name arch) ('.nexe missing')
                  )
                }
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[486])]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {(DQ ($ VSub_Number '$0') (': from directory ') ($ VSub_Name '$sdk_tools'))}
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[505])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(77)})
          ]
          spids: [16777215 481]
        )
      ]
      spids: [16777215 519]
    )
    (FuncDef
      name: decide_use_emulator
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:arg) op:Equal spids:[537])]
              spids: [535]
            )
            (ForEach
              iter_name: arg
              do_arg_iter: T
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_GlobEqual
                                      left: 
                                        {
                                          (DQ 
                                            (CommandSubPart
                                              command_list: 
                                                (CommandList
                                                  children: [(C {(uname)} {(-m)})]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [553 557]
                                            )
                                          )
                                        }
                                      right: {(DQ ($ VSub_Number '$1'))}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [(ControlFlow token:<ControlFlow_Return return>)]
                          spids: [16777215 569]
                        )
                      ]
                      spids: [16777215 575]
                    )
                  ]
                  spids: [545 578]
                )
              spids: [16777215 16777215]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:use_emulator) op:Equal rhs:{(true)} spids:[581])]
              spids: [581]
            )
          ]
          spids: [532]
        )
      spids: [528 531]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:use_emulator) op:Equal rhs:{(false)} spids:[587])]
      spids: [587]
    )
    (Case
      to_match: {(DQ ($ VSub_Name '$arch'))}
      arms: [
        (case_arm
          pat_list: [{(arm)}]
          action: [
            (C {(decide_use_emulator)} {(SQ <'arm*'>)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:emulator)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {(qemu-arm)}
                          {(-cpu)}
                          {(cortex-a15)}
                          {(-L)}
                          {(DQ (${ VSub_Name sdk_tools) (/arm_trusted))}
                        ]
                      )
                    }
                  spids: [609]
                )
              ]
              spids: [609]
            )
          ]
          spids: [598 599 628 16777215]
        )
        (case_arm
          pat_list: [{(x86_32)}]
          action: [
            (C {(decide_use_emulator)} {(SQ <'i?86'>)} {(SQ <'x86_64*'>)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:emulator)
                  op: Equal
                  rhs: {(ArrayLiteralPart words:[{(qemu-i386)}])}
                  spids: [645]
                )
              ]
              spids: [645]
            )
          ]
          spids: [630 631 651 16777215]
        )
        (case_arm
          pat_list: [{(x86_64)}]
          action: [
            (C {(decide_use_emulator)} {(SQ <'x86_64*'>)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:emulator)
                  op: Equal
                  rhs: {(ArrayLiteralPart words:[{(qemu-x86_64)}])}
                  spids: [664]
                )
              ]
              spids: [664]
            )
          ]
          spids: [653 654 670 16777215]
        )
      ]
      spids: [590 596 672]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {($ VSub_Name '$use_emulator')}) terminator:<Op_Semi ';'>)]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ldr_args)
                  op: Equal
                  rhs: {(ArrayLiteralPart words:[{(SQ <-Q>)}])}
                  spids: [683]
                )
              ]
              spids: [683]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:emulator_factor)
                  op: Equal
                  rhs: {(10)}
                  spids: [691]
                )
              ]
              spids: [691]
            )
          ]
          spids: [16777215 680]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:emulator)
              op: Equal
              rhs: {(ArrayLiteralPart)}
              spids: [697]
            )
          ]
          spids: [697]
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:ldr_args)
              op: Equal
              rhs: {(ArrayLiteralPart)}
              spids: [702]
            )
          ]
          spids: [702]
        )
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:emulator_factor) op:Equal rhs:{(1)} spids:[707])]
          spids: [707]
        )
      ]
      spids: [694 710]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {($ VSub_Name '$use_bootstrap')}) terminator:<Op_Semi ';'>)]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ldr)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {(DQ (${ VSub_Name NACL_BOOTSTRAP))}
                          {(DQ (${ VSub_Name NACL_SEL_LDR))}
                          {(SQ <'--r_debug=0xXXXXXXXXXXXXXXXX'>)}
                          {(SQ <'--reserved_at_zero=0xXXXXXXXXXXXXXXXX'>)}
                        ]
                      )
                    }
                  spids: [721]
                )
              ]
              spids: [721]
            )
          ]
          spids: [16777215 718]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:ldr)
              op: Equal
              rhs: {(ArrayLiteralPart words:[{(DQ (${ VSub_Name NACL_SEL_LDR))}])}
              spids: [754]
            )
          ]
          spids: [754]
        )
      ]
      spids: [751 763]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:static) op:Equal rhs:{(true)} spids:[766])]
      spids: [766]
    )
    (Case
      to_match: {(DQ ($ VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{(Lit_Other '*') (/ld-nacl) (Lit_Other '*')}]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:static) op:Equal rhs:{(false)} spids:[782])]
              spids: [782]
            )
          ]
          spids: [777 780 785 16777215]
        )
      ]
      spids: [769 775 787]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {($ VSub_Name '$static')}) terminator:<Op_Semi ';'>)]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:loader)
                  op: Equal
                  rhs: {(ArrayLiteralPart)}
                  spids: [798]
                )
              ]
              spids: [798]
            )
          ]
          spids: [16777215 795]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:loader)
              op: Equal
              rhs: {(ArrayLiteralPart words:[{(-f)} {(DQ (${ VSub_Name NACL_LOADER))}])}
              spids: [805]
            )
          ]
          spids: [805]
        )
      ]
      spids: [802 816]
    )
    (FuncDef
      name: run_test
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:test_fifo)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                  spids: [828]
                )
              ]
              spids: [826]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmd)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name emulator>
                                bracket_op: (WholeArray op_id:Lit_At)
                                spids: [841 846]
                              )
                            )
                          }
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name ldr>
                                bracket_op: (WholeArray op_id:Lit_At)
                                spids: [850 855]
                              )
                            )
                          }
                          {(-q)}
                          {(-S)}
                          {(-a)}
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name ldr_args>
                                bracket_op: (WholeArray op_id:Lit_At)
                                spids: [865 870]
                              )
                            )
                          }
                          {(-B)}
                          {(DQ (${ VSub_Name NACL_IRT))}
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name loader>
                                bracket_op: (WholeArray op_id:Lit_At)
                                spids: [883 888]
                              )
                            )
                          }
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name env>
                                bracket_op: (WholeArray op_id:Lit_At)
                                spids: [892 897]
                              )
                            )
                          }
                          {(-E)}
                          {(Lit_VarLike 'TEST_DIRECT=') (DQ ($ VSub_Name '$test_fifo'))}
                          {(--)}
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name test_args>
                                bracket_op: (WholeArray op_id:Lit_At)
                                spids: [910 915]
                              )
                            )
                          }
                        ]
                      )
                    }
                  spids: [836]
                )
              ]
              spids: [834]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name NACLVERBOSITY>
                                suffix_op: (StringUnary op_id:VTest_ColonPlus arg_word:{(set)})
                                spids: [927 931]
                              )
                            )
                          } {(Lit_Other '=')} {(set)} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C 
                      {
                        (DQ 
                          (BracedVarSub
                            token: <VSub_Name cmd>
                            bracket_op: (WholeArray op_id:Lit_At)
                            spids: [945 950]
                          )
                        )
                      }
                    )
                  ]
                  spids: [16777215 941]
                )
              ]
              else_action: [
                (SimpleCommand
                  words: [
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Name cmd>
                          bracket_op: (WholeArray op_id:Lit_At)
                          spids: [961 966]
                        )
                      )
                    }
                  ]
                  more_env: [(env_pair name:NACLLOG val:{(/dev/null)} spids:[957])]
                )
              ]
              spids: [954 970]
            )
          ]
          spids: [823]
        )
      spids: [819 822]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:temp_files)
          op: Equal
          rhs: {(ArrayLiteralPart)}
          spids: [975]
        )
      ]
      spids: [975]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:test_fifo) op:Equal rhs:{(EmptyPart)} spids:[979])]
      spids: [979]
    )
    (FuncDef
      name: do_cleanup
      body: 
        (BraceGroup
          children: [
            (C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$test_fifo'))} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name temp_files>
                    bracket_op: (WholeArray op_id:Lit_At)
                    spids: [997 1002]
                  )
                )
              }
            )
          ]
          spids: [985]
        )
      spids: [981 984]
    )
    (C {(trap)} {(do_cleanup)} {(EXIT)} {(HUP)} {(INT)} {(TERM)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_fifo)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Name TMPDIR>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)})
                spids: [1027 1032]
              ) (/libc-test-fifo.) ($ VSub_Dollar '$$')
            }
          spids: [1026]
        )
      ]
      spids: [1026]
    )
    (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$test_fifo'))})
    (AndOr
      ops: [Op_DPipe]
      children: [
        (C {(mkfifo)} {(DQ ($ VSub_Name '$test_fifo'))})
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ("Cannot create test FIFO '") ($ VSub_Name '$test_fifo') ("'"))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [1052]
        )
      ]
    )
    (Sentence
      child: 
        (SimpleCommand
          words: [{(run_test)} {(DQ ($ VSub_Name '$test_fifo'))}]
          redirects: [(Redir op_id:Redir_LessAnd fd:16777215 arg_word:{(0)} spids:[1086])]
        )
      terminator: <Op_Amp '&'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_pid)
          op: Equal
          rhs: {($ VSub_Bang '$!')}
          spids: [1091]
        )
      ]
      spids: [1091]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:no_skeleton) op:Equal rhs:{(false)} spids:[1104])]
      spids: [1104]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:script_pid)
          op: Equal
          rhs: {($ VSub_Dollar '$$')}
          spids: [1107]
        )
      ]
      spids: [1107]
    )
    (C {(trap)} {(SQ <'no_skeleton=true'>)} {(USR1)})
    (Sentence
      child: 
        (Subshell
          child: 
            (CommandList
              children: [
                (Sentence child:(C {(sleep)} {(2)}) terminator:<Op_Semi ';'>)
                (C {(kill)} {(-USR1)} {($ VSub_Name '$script_pid')})
              ]
            )
          redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1131])]
          spids: [1118 1129]
        )
      terminator: <Op_Amp '&'>
    )
    (C {(unset)} {(ControlFlow_Exit exit)} {(signal)})
    (SimpleCommand
      words: [{(.)} {(DQ ($ VSub_Name '$test_fifo'))}]
      redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1177])]
    )
    (C {(trap)} {(SQ )} {(USR1)})
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {($ VSub_Name '$no_skeleton')}) terminator:<Op_Semi ';'>)]
          action: [(C {(unset)} {(ControlFlow_Exit exit)} {(signal)})]
          spids: [16777215 1201]
        )
      ]
      else_action: [
        (DParen
          child: 
            (BinaryAssign
              op_id: Arith_Equal
              left: (LhsName name:sleep_time)
              right: 
                (ArithBinary
                  op_id: Arith_Star
                  left: 
                    (ArithBinary
                      op_id: Arith_Star
                      left: (ArithVarRef name:timeout)
                      right: (ArithVarRef name:timeoutfactor)
                    )
                  right: (ArithVarRef name:emulator_factor)
                )
            )
        )
        (Sentence
          child: 
            (Subshell
              child: 
                (CommandList
                  children: [
                    (Sentence
                      child: (C {(sleep)} {(DQ ($ VSub_Name '$sleep_time'))})
                      terminator: <Op_Semi ';'>
                    )
                    (C {(kill)} {(-ALRM)} {($ VSub_Name '$test_pid')})
                  ]
                )
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1263])]
              spids: [1248 1261]
            )
          terminator: <Op_Amp '&'>
        )
      ]
      spids: [1218 1269]
    )
    (FuncDef
      name: expected_status
      body: 
        (BraceGroup
          children: [
            (C {(test)} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name exit>
                    suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(yes)})
                    spids: [1285 1289]
                  )
                )
              } {(Lit_Other '=')} {(yes)}
            )
          ]
          spids: [1279]
        )
      spids: [1275 1278]
    )
    (FuncDef
      name: expected_signal
      body: 
        (BraceGroup
          children: [
            (C {(test)} 
              {
                (DQ 
                  (BracedVarSub
                    token: <VSub_Name signal>
                    suffix_op: (StringUnary op_id:VTest_Plus arg_word:{(yes)})
                    spids: [1311 1315]
                  )
                )
              } {(Lit_Other '=')} {(yes)}
            )
          ]
          spids: [1305]
        )
      spids: [1301 1304]
    )
    (FuncDef
      name: wifexited
      body: 
        (BraceGroup
          children: [(C {(test)} {($ VSub_Name '$test_rc')} {(-lt)} {(128)})]
          spids: [1331]
        )
      spids: [1327 1330]
    )
    (C {(wait)} {($ VSub_Name '$test_pid')})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_rc)
          op: Equal
          rhs: {($ VSub_QMark '$?')}
          spids: [1352]
        )
      ]
      spids: [1352]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(C {(wifexited)}) terminator:<Op_Semi ';'>)]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (Pipeline children:[(C {(expected_status)})] negated:T)
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: (Pipeline children:[(C {(expected_signal)})] negated:T)
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {($ VSub_Name '$test_rc')}
                            )
                          ]
                          spids: [16777215 1384]
                        )
                      ]
                      else_action: [
                        (C {(echo)} 
                          {
                            (DQ ("Expected signal '") (${ VSub_Name signal) ("' from child, got none"))
                          }
                        )
                        (ControlFlow
                          token: <ControlFlow_Exit exit>
                          arg_word: {(1)}
                        )
                      ]
                      spids: [1396 1415]
                    )
                  ]
                  spids: [16777215 1374]
                )
              ]
              else_action: [
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (C {(Lit_Other '[')} {($ VSub_Name '$test_rc')} {(-ne)} 
                              {($ VSub_Name '$exit')} {(Lit_Other ']')}
                            )
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (C {(echo)} 
                          {
                            (DQ ('Expected status ') ($ VSub_Name '$exit') (', got ') 
                              ($ VSub_Name '$test_rc')
                            )
                          }
                        )
                        (ControlFlow
                          token: <ControlFlow_Exit exit>
                          arg_word: {(1)}
                        )
                      ]
                      spids: [16777215 1434]
                    )
                  ]
                  spids: [16777215 1452]
                )
                (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
              ]
              spids: [1418 1460]
            )
          ]
          spids: [16777215 1364]
        )
      ]
      else_action: [
        (DParen
          child: 
            (BinaryAssign
              op_id: Arith_Equal
              left: (LhsName name:test_signal)
              right: 
                (TernaryOp
                  cond: 
                    (ArithBinary
                      op_id: Arith_Great
                      left: (ArithVarRef name:test_rc)
                      right: (ArithWord w:{(Lit_Digits 192)})
                    )
                  true_expr: 
                    (ArithBinary
                      op_id: Arith_Minus
                      left: (ArithWord w:{(Lit_Digits 256)})
                      right: (ArithVarRef name:test_rc)
                    )
                  false_expr: 
                    (ArithBinary
                      op_id: Arith_Minus
                      left: (ArithVarRef name:test_rc)
                      right: (ArithWord w:{(Lit_Digits 128)})
                    )
                )
            )
        )
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:test_signame)
              op: Equal
              rhs: 
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [(C {(kill)} {(-l)} {(DQ ($ VSub_Name '$test_signal'))})]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [1501 1509]
                  )
                }
              spids: [1500]
            )
          ]
          spids: [1500]
        )
        (If
          arms: [
            (if_arm
              cond: [
                (Sentence
                  child: (Pipeline children:[(C {(expected_signal)})] negated:T)
                  terminator: <Op_Semi ';'>
                )
              ]
              action: [
                (C {(echo)} 
                  {(DQ ("Didn't expect signal from child; got '") (${ VSub_Name test_signame) ("'"))}
                )
                (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
              ]
              spids: [16777215 1519]
            )
          ]
          else_action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$test_signame'))} 
                          {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Name '$signal'))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ("Incorrect signal from child: got '") (${ VSub_Name test_signame) 
                          ("', need '") (${ VSub_Name signal) ("'")
                        )
                      }
                    )
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [16777215 1559]
                )
              ]
              spids: [16777215 1583]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
          spids: [1538 1591]
        )
      ]
      spids: [1462 1593]
    )
  ]
)