(CommandList
  children: [
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (C {(set)} {(-o)} {(errexit)})
    (C {(source)} {(test/common.sh)})
    (C {(source)} {(benchmarks/common.sh)})
    (Assignment
      keyword: Assign_Readonly
      pairs: [(assign_pair lhs:(LhsName name:BASE_DIR) op:Equal rhs:{(_tmp/osh-runtime)} spids:[52])]
      spids: [50]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:TAR_DIR)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/_deps/osh-runtime)}
          spids: [57]
        )
      ]
      spids: [55]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:OSH)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/_bin/osh)}
          spids: [73]
        )
      ]
      spids: [71]
    )
    (Assignment
      keyword: Assign_Readonly
      flags: [-a]
      pairs: [
        (assign_pair
          lhs: (LhsName name:TAR_SUBDIRS)
          op: Equal
          rhs: {(ArrayLiteralPart words:[{(ocaml-4.06.0)} {(tcc-0.9.26)} {(yash-2.46)}])}
          spids: [92]
        )
      ]
      spids: [88]
    )
    (FuncDef
      name: tarballs
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {(DQ ('tcc-0.9.26.tar.bz2\n') ('yash-2.46.tar.xz\n') ('ocaml-4.06.0.tar.xz\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [116]
                )
              ]
            )
          ]
          spids: [111]
        )
      spids: [107 110]
    )
    (FuncDef
      name: download
      body: 
        (BraceGroup
          children: [
            (C {(mkdir)} {(-p)} {($ VSub_Name '$TAR_DIR')})
            (Pipeline
              children: [
                (C {(tarballs)})
                (C {(xargs)} {(-n)} {(1)} {(-I)} {(Lit_LBrace '{') (Lit_RBrace '}')} {(--verbose)} {(--)} 
                  {(wget)} {(--directory)} {($ VSub_Name '$TAR_DIR')} {(SQ <'https://www.oilshell.org/blob/testdata/{}'>)}
                )
              ]
              negated: F
            )
          ]
          spids: [130]
        )
      spids: [126 129]
    )
    (FuncDef
      name: extract
      body: 
        (BraceGroup
          children: [
            (TimeBlock
              pipeline: 
                (ForEach
                  iter_name: f
                  iter_words: [
                    (BracedWordTree
                      parts: [
                        ($ VSub_Name '$TAR_DIR')
                        (/)
                        (Lit_Other '*')
                        (.)
                        (BracedAltPart words:[{(bz2)} {(xz)}])
                      ]
                    )
                  ]
                  do_arg_iter: F
                  body: 
                    (DoGroup
                      children: [
                        (C {(tar)} {(-x)} {(--directory)} {($ VSub_Name '$TAR_DIR')} {(--file)} 
                          {($ VSub_Name '$f')}
                        )
                      ]
                      spids: [200 217]
                    )
                  spids: [188 198]
                )
            )
            (C {(ls)} {(-l)} {($ VSub_Name '$TAR_DIR')})
          ]
          spids: [178]
        )
      spids: [174 177]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:PY27_DIR)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/Python-2.7.13)}
          spids: [241]
        )
      ]
      spids: [239]
    )
    (FuncDef
      name: cpython-configure
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:sh_path)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(bash)})
                        spids: [256 260]
                      )
                    }
                  spids: [255]
                )
              ]
              spids: [253]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_dir)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: 
                              {($ VSub_Name '$BASE_DIR') (Lit_Slash /) (${ VSub_Name sh_path) 
                                (-cpython-configure)
                              }
                          )
                        spids: [266 275]
                      )
                    }
                  spids: [265]
                )
              ]
              spids: [263]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (C {(pushd)} {($ VSub_Name '$out_dir')})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (TimeBlock
                  pipeline: (C {($ VSub_Name '$sh_path')} {($ VSub_Name '$PY27_DIR') (/configure)})
                )
                (C {(true)})
              ]
            )
            (C {(popd)})
            (C {(tree)} {($ VSub_Name '$out_dir')})
          ]
          spids: [250]
        )
      spids: [246 249]
    )
    (FuncDef
      name: osh-cpython-configure
      body: 
        (BraceGroup
          children: [
            (C {(cpython-configure)} {($ VSub_Name '$PWD') (/_bin/osh)} 
              {($ VSub_Name '$BASE_DIR') (/osh-cpython-configure)}
            )
          ]
          spids: [321]
        )
      spids: [317 320]
    )
    (FuncDef
      name: runtime-task
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:raw_dir)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [344]
                )
              ]
              spids: [342]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:job_id)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [353]
                )
              ]
              spids: [351]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:host)
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [359]
                )
              ]
              spids: [357]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:host_hash)
                  op: Equal
                  rhs: {($ VSub_Number '$4')}
                  spids: [365]
                )
              ]
              spids: [363]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:sh_path)
                  op: Equal
                  rhs: {($ VSub_Number '$5')}
                  spids: [371]
                )
              ]
              spids: [369]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:shell_hash)
                  op: Equal
                  rhs: {($ VSub_Number '$6')}
                  spids: [377]
                )
              ]
              spids: [375]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:task_type)
                  op: Equal
                  rhs: {($ VSub_Number '$7')}
                  spids: [383]
                )
              ]
              spids: [381]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:task_arg)
                  op: Equal
                  rhs: {($ VSub_Number '$8')}
                  spids: [389]
                )
              ]
              spids: [387]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:shell_name)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Name '$sh_path')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [397 401]
                      )
                    }
                  spids: [396]
                )
              ]
              spids: [394]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:x)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Name '$task_arg')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [412 416]
                      )
                    }
                  spids: [411]
                )
              ]
              spids: [409]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:task_label)
                  op: Equal
                  rhs: 
                    {
                      (DQ (${ VSub_Name shell_name) (-) (${ VSub_Name shell_hash) (__) (${ VSub_Name x))
                    }
                  spids: [421]
                )
              ]
              spids: [419]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:times_out)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$PWD') (/) ($ VSub_Name '$raw_dir') (/) ($ VSub_Name '$host') (.) 
                        ($ VSub_Name '$job_id') (.times.csv)
                      )
                    }
                  spids: [440]
                )
              ]
              spids: [438]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_out_dir)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$PWD') (/) ($ VSub_Name '$raw_dir') (/) ($ VSub_Name '$host') (.) 
                        ($ VSub_Name '$job_id') (.virtual-memory)
                      )
                    }
                  spids: [455]
                )
              ]
              spids: [453]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:files_out_dir)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$PWD') (/) ($ VSub_Name '$raw_dir') (/) ($ VSub_Name '$host') (.) 
                        ($ VSub_Name '$job_id') (.files/) ($ VSub_Name '$task_label')
                      )
                    }
                  spids: [470]
                )
              ]
              spids: [468]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$vm_out_dir')} {($ VSub_Name '$files_out_dir')})
            (Assignment
              keyword: Assign_Local
              flags: [-a]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TIME_PREFIX)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {($ VSub_Name '$PWD') (/benchmarks/time.py)}
                          {(--output)}
                          {($ VSub_Name '$times_out')}
                          {(--field)}
                          {(DQ ($ VSub_Name '$host'))}
                          {(--field)}
                          {(DQ ($ VSub_Name '$host_hash'))}
                          {(--field)}
                          {(DQ ($ VSub_Name '$shell_name'))}
                          {(--field)}
                          {(DQ ($ VSub_Name '$shell_hash'))}
                          {(--field)}
                          {(DQ ($ VSub_Name '$task_type'))}
                          {(--field)}
                          {(DQ ($ VSub_Name '$task_arg'))}
                        ]
                      )
                    }
                  spids: [498]
                )
              ]
              spids: [494]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:extra_args) op:Equal rhs:{(SQ )} spids:[562])]
              spids: [562]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(test)} {(DQ ($ VSub_Name '$shell_name'))} {(Lit_Other '=')} {(SQ <osh>)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:pdump)
                          op: Equal
                          rhs: 
                            {
                              (DQ (${ VSub_Name vm_out_dir) (/) (${ VSub_Name task_label) (__parser.txt))
                            }
                          spids: [587]
                        )
                      ]
                      spids: [585]
                    )
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:rdump)
                          op: Equal
                          rhs: 
                            {
                              (DQ (${ VSub_Name vm_out_dir) (/) (${ VSub_Name task_label) 
                                (__runtime.txt)
                              )
                            }
                          spids: [602]
                        )
                      ]
                      spids: [600]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:extra_args)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('--parser-mem-dump ') ($ VSub_Name '$pdump') 
                                (' --runtime-mem-dump ') ($ VSub_Name '$rdump')
                              )
                            }
                          spids: [615]
                        )
                      ]
                      spids: [615]
                    )
                  ]
                  spids: [16777215 582]
                )
              ]
              spids: [16777215 629]
            )
            (C {(echo)})
            (C {(echo)} 
              {
                (DQ ('--- ') ($ VSub_Name '$sh_path') (' ') ($ VSub_Name '$task_type') (' ') 
                  ($ VSub_Name '$task_arg') (' ---')
                )
              }
            )
            (C {(echo)})
            (Case
              to_match: {($ VSub_Name '$task_type')}
              arms: [
                (case_arm
                  pat_list: [{(abuild)}]
                  action: [
                    (SimpleCommand
                      words: [
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name TIME_PREFIX>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [671 676]
                            )
                          )
                        }
                        {(--)}
                        {(DQ ($ VSub_Name '$sh_path'))}
                        {($ VSub_Name '$extra_args')}
                        {(testdata/osh-runtime/abuild)}
                        {(-h)}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$files_out_dir') (/STDOUT.txt)}
                          spids: [695]
                        )
                      ]
                    )
                  ]
                  spids: [660 661 701 16777215]
                )
                (case_arm
                  pat_list: [{(cpython)}]
                  action: [
                    (SimpleCommand
                      words: [{(pushd)} {($ VSub_Name '$files_out_dir')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [731]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name TIME_PREFIX>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [737 742]
                            )
                          )
                        }
                        {(--)}
                        {(DQ ($ VSub_Name '$sh_path'))}
                        {($ VSub_Name '$extra_args')}
                        {($ VSub_Name '$PY27_DIR') (/configure)}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$files_out_dir') (/STDOUT.txt)}
                          spids: [760]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [{(popd)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [769]
                        )
                      ]
                    )
                  ]
                  spids: [705 706 773 16777215]
                )
                (case_arm
                  pat_list: [{(configure)}]
                  action: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:conf_dir)
                          op: Equal
                          rhs: {($ VSub_Name '$task_arg')}
                          spids: [783]
                        )
                      ]
                      spids: [781]
                    )
                    (SimpleCommand
                      words: [{(pushd)} {($ VSub_Name '$conf_dir')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [792]
                        )
                      ]
                    )
                    (C {(touch)} {(__TIMESTAMP)})
                    (SimpleCommand
                      words: [
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name TIME_PREFIX>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [803 808]
                            )
                          )
                        }
                        {(--)}
                        {(DQ ($ VSub_Name '$sh_path'))}
                        {($ VSub_Name '$extra_args')}
                        {(./configure)}
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$files_out_dir') (/STDOUT.txt)}
                          spids: [823]
                        )
                      ]
                    )
                    (Pipeline
                      children: [
                        (C {(find)} {(.)} {(-type)} {(f)} {(-newer)} {(__TIMESTAMP)})
                        (C {(xargs)} {(-I)} {(Lit_LBrace '{') (Lit_RBrace '}')} {(--)} {(cp)} {(--verbose)} 
                          {(Lit_LBrace '{') (Lit_RBrace '}')} {($ VSub_Name '$files_out_dir')}
                        )
                      ]
                      negated: F
                    )
                    (SimpleCommand
                      words: [{(popd)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [867]
                        )
                      ]
                    )
                  ]
                  spids: [777 778 871 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [(C {(die)} {(DQ ('Invalid task type ') ($ VSub_Name '$task_type'))})]
                  spids: [875 876 887 16777215]
                )
              ]
              spids: [653 657 890]
            )
          ]
          spids: [339]
        )
      spids: [335 338]
    )
    (FuncDef
      name: print-tasks
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:provenance)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [974]
                )
              ]
              spids: [972]
            )
            (Pipeline
              children: [
                (C {(cat)} {($ VSub_Name '$provenance')})
                (While
                  cond: [
                    (Sentence
                      child: 
                        (C {(read)} {(job_id)} {(host_name)} {(host_hash)} {(sh_path)} {(shell_hash)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  body: 
                    (DoGroup
                      children: [
                        (Case
                          to_match: {($ VSub_Name '$sh_path')}
                          arms: [
                            (case_arm
                              pat_list: [{(mksh)} {(zsh)} {(bin/osh)}]
                              action: [
                                (C {(log)} {(DQ ('--- Skipping ') ($ VSub_Name '$sh_path'))})
                                (ControlFlow
                                  token: <ControlFlow_Continue continue>
                                )
                              ]
                              spids: [1017 1022 1036 16777215]
                            )
                          ]
                          spids: [1010 1014 1039]
                        )
                        (Case
                          to_match: {($ VSub_Name '$sh_path')}
                          arms: [
                            (case_arm
                              pat_list: [{(Lit_Other '*') (/osh)}]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:sh_path)
                                      op: Equal
                                      rhs: {($ VSub_Name '$PWD') (/) ($ VSub_Name '$sh_path')}
                                      spids: [1059]
                                    )
                                  ]
                                  spids: [1059]
                                )
                              ]
                              spids: [1054 1056 1065 16777215]
                            )
                          ]
                          spids: [1047 1051 1068]
                        )
                        (Assignment
                          keyword: Assign_Local
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:prefix)
                              op: Equal
                              rhs: 
                                {
                                  (DQ ($ VSub_Name '$job_id') (' ') ($ VSub_Name '$host_name') (' ') 
                                    ($ VSub_Name '$host_hash') (' ') ($ VSub_Name '$sh_path') (' ') ($ VSub_Name '$shell_hash')
                                  )
                                }
                              spids: [1073]
                            )
                          ]
                          spids: [1071]
                        )
                        (C {(echo)} {(DQ ($ VSub_Name '$prefix'))} {(abuild)} {(abuild-help)})
                        (C {(echo)} {(DQ ($ VSub_Name '$prefix'))} {(cpython)} {(cpython-configure)})
                        (ForEach
                          iter_name: dir
                          iter_words: [
                            {
                              (DQ 
                                (BracedVarSub
                                  token: <VSub_Name TAR_SUBDIRS>
                                  bracket_op: (WholeArray op_id:Lit_At)
                                  spids: [1122 1127]
                                )
                              )
                            }
                          ]
                          do_arg_iter: F
                          body: 
                            (DoGroup
                              children: [
                                (C {(echo)} {(DQ ($ VSub_Name '$prefix'))} {(configure)} 
                                  {($ VSub_Name '$TAR_DIR') (/) ($ VSub_Name '$dir')}
                                )
                              ]
                              spids: [1131 1147]
                            )
                          spids: [1120 1129]
                        )
                      ]
                      spids: [1006 1150]
                    )
                )
              ]
              negated: F
            )
          ]
          spids: [969]
        )
      spids: [965 968]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:HEADER)
          op: Equal
          rhs: 
            {
              (SQ 
                <
'status,elapsed_secs,host_name,host_hash,shell_name,shell_hash,task_type,task_arg'
                >
              )
            }
          spids: [1157]
        )
      ]
      spids: [1155]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [(assign_pair lhs:(LhsName name:NUM_COLUMNS) op:Equal rhs:{(7)} spids:[1164])]
      spids: [1162]
    )
    (FuncDef
      name: measure
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:provenance)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [1180]
                )
              ]
              spids: [1178]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:raw_dir)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {($ VSub_Name '$BASE_DIR') (Lit_Slash /) (raw)}
                          )
                        spids: [1187 1193]
                      )
                    }
                  spids: [1186]
                )
              ]
              spids: [1184]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:pattern)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 3>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{})
                        spids: [1199 1202]
                      )
                    }
                  spids: [1198]
                )
              ]
              spids: [1196]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:name)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Name '$provenance')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [1218 1222]
                      )
                    }
                  spids: [1217]
                )
              ]
              spids: [1215]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:prefix)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name name>
                        suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(.provenance.txt)})
                        spids: [1228 1232]
                      )
                    }
                  spids: [1227]
                )
              ]
              spids: [1225]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:times_out)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name '$raw_dir') (/) ($ VSub_Name '$prefix') (.times.csv))}
                  spids: [1241]
                )
              ]
              spids: [1239]
            )
            (C {(mkdir)} {(-p)} 
              (BracedWordTree
                parts: [($ VSub_Name '$BASE_DIR') (/) (BracedAltPart words:[{(raw)} {(stage1)}])]
              ) {($ VSub_Name '$raw_dir')}
            )
            (SimpleCommand
              words: [{(echo)} {($ VSub_Name '$HEADER')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$times_out')}
                  spids: [1274]
                )
              ]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tasks)
                  op: Equal
                  rhs: {($ VSub_Name '$BASE_DIR') (/tasks.txt)}
                  spids: [1282]
                )
              ]
              spids: [1280]
            )
            (SimpleCommand
              words: [{(print-tasks)} {($ VSub_Name '$provenance')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$tasks')}
                  spids: [1291]
                )
              ]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [
                (TimeBlock
                  pipeline: 
                    (Pipeline
                      children: [
                        (C {(egrep)} {(DQ ($ VSub_Name '$pattern'))} {($ VSub_Name '$tasks')})
                        (C {(xargs)} {(-n)} {($ VSub_Name '$NUM_COLUMNS')} {(--)} {($ VSub_Number '$0')} 
                          {(runtime-task)} {($ VSub_Name '$raw_dir')}
                        )
                      ]
                      negated: F
                    )
                )
                (C {(die)} {(DQ ('*** Some tasks failed. ***'))})
              ]
            )
            (C {(cp)} {(-v)} {($ VSub_Name '$provenance')} {($ VSub_Name '$raw_dir')})
          ]
          spids: [1175]
        )
      spids: [1171 1174]
    )
    (FuncDef
      name: stage1
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:raw_dir)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {($ VSub_Name '$BASE_DIR') (Lit_Slash /) (raw)}
                          )
                        spids: [1360 1366]
                      )
                    }
                  spids: [1359]
                )
              ]
              spids: [1357]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_dir)
                  op: Equal
                  rhs: {($ VSub_Name '$BASE_DIR') (/stage1)}
                  spids: [1371]
                )
              ]
              spids: [1369]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:times_csv)
                  op: Equal
                  rhs: {($ VSub_Name '$out_dir') (/times.csv)}
                  spids: [1387]
                )
              ]
              spids: [1385]
            )
            (Assignment
              keyword: Assign_Local
              flags: [-a]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:a)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [{($ VSub_Name '$raw_dir') (/flanders.) (Lit_Other '*') (.times.csv)}]
                      )
                    }
                  spids: [1400]
                )
              ]
              spids: [1396]
            )
            (Assignment
              keyword: Assign_Local
              flags: [-a]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:b)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [{($ VSub_Name '$raw_dir') (/lisa.) (Lit_Other '*') (.times.csv)}]
                      )
                    }
                  spids: [1413]
                )
              ]
              spids: [1409]
            )
            (SimpleCommand
              words: [
                {(csv-concat)}
                {
                  (BracedVarSub
                    token: <VSub_Name a>
                    bracket_op: 
                      (ArrayIndex
                        expr: (ArithUnary op_id:Node_UnaryMinus child:(ArithWord w:{(Lit_Digits 1)}))
                      )
                    spids: [1424 1430]
                  )
                }
                {
                  (BracedVarSub
                    token: <VSub_Name b>
                    bracket_op: 
                      (ArrayIndex
                        expr: (ArithUnary op_id:Node_UnaryMinus child:(ArithWord w:{(Lit_Digits 1)}))
                      )
                    spids: [1432 1438]
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$times_csv')}
                  spids: [1440]
                )
              ]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_csv)
                  op: Equal
                  rhs: {($ VSub_Name '$out_dir') (/virtual-memory.csv)}
                  spids: [1448]
                )
              ]
              spids: [1446]
            )
            (Assignment
              keyword: Assign_Local
              flags: [-a]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:c)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [
                          {($ VSub_Name '$raw_dir') (/flanders.) (Lit_Other '*') (.virtual-memory)}
                        ]
                      )
                    }
                  spids: [1458]
                )
              ]
              spids: [1454]
            )
            (Assignment
              keyword: Assign_Local
              flags: [-a]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:d)
                  op: Equal
                  rhs: 
                    {
                      (ArrayLiteralPart
                        words: [{($ VSub_Name '$raw_dir') (/lisa.) (Lit_Other '*') (.virtual-memory)}]
                      )
                    }
                  spids: [1471]
                )
              ]
              spids: [1467]
            )
            (SimpleCommand
              words: [
                {(benchmarks/virtual_memory.py)}
                {(osh-runtime)}
                {
                  (BracedVarSub
                    token: <VSub_Name c>
                    bracket_op: 
                      (ArrayIndex
                        expr: (ArithUnary op_id:Node_UnaryMinus child:(ArithWord w:{(Lit_Digits 1)}))
                      )
                    spids: [1484 1490]
                  )
                }
                {
                  (BracedVarSub
                    token: <VSub_Name d>
                    bracket_op: 
                      (ArrayIndex
                        expr: (ArithUnary op_id:Node_UnaryMinus child:(ArithWord w:{(Lit_Digits 1)}))
                      )
                    spids: [1492 1498]
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$vm_csv')}
                  spids: [1500]
                )
              ]
            )
          ]
          spids: [1354]
        )
      spids: [1350 1353]
    )
    (FuncDef
      name: print-report
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:in_dir)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [1521]
                )
              ]
              spids: [1519]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:base_url)
                  op: Equal
                  rhs: {(SQ <../../web>)}
                  spids: [1527]
                )
              ]
              spids: [1525]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('<!DOCTYPE html>\n') ('<html>\n') ('  <head>\n') 
                        ('    <title>OSH Runtime Performance</title>\n') ('    <script type=') (Right_DoubleQuote '"') (text/javascript) (Right_DoubleQuote '"') (' src=') 
                        (Right_DoubleQuote '"') ($ VSub_Name '$base_url') (/table/table-sort.js) (Right_DoubleQuote '"') ('></script>\n') 
                        ('    <link rel=') (Right_DoubleQuote '"') (stylesheet) (Right_DoubleQuote '"') (' type=') (Right_DoubleQuote '"') (text/css) 
                        (Right_DoubleQuote '"') (' href=') (Right_DoubleQuote '"') ($ VSub_Name '$base_url') (/table/table-sort.css) 
                        (Right_DoubleQuote '"') (' />\n') ('    <link rel=') (Right_DoubleQuote '"') (stylesheet) (Right_DoubleQuote '"') (' type=') 
                        (Right_DoubleQuote '"') (text/css) (Right_DoubleQuote '"') (' href=') (Right_DoubleQuote '"') ($ VSub_Name '$base_url') 
                        (/benchmarks.css) (Right_DoubleQuote '"') (' />\n') ('\n') ('  </head>\n') ('  <body>\n') ('    <p id=') 
                        (Right_DoubleQuote '"') (home-link) (Right_DoubleQuote '"') ('>\n') ('      <a href=') (Right_DoubleQuote '"') (/) 
                        (Right_DoubleQuote '"') ('>oilshell.org</a>\n') ('    </p>\n') ('    <h2>OSH Runtime Performance</h2>\n') ('\n') 
                        ('    <h3>Elapsed Time by Shell (milliseconds)</h3>\n') ('\n') ('    <p>Some benchmarks call many external tools, while some exercise the shell\n') 
                        ('    interpreter itself.  Parse time is included.</p>\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1536]
                )
              ]
            )
            (C {(csv2html)} {($ VSub_Name '$in_dir') (/times.csv)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('    <h3>Memory Used to Run</h3>\n') ('\n') 
                        (
'    <p>Running under <code>osh-ovm</code>.  Memory usage is measured in MB\n'
                        ) ('    (powers of 10), not MiB (powers of 2).</p>\n') ('\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1612]
                )
              ]
            )
            (C {(csv2html)} {($ VSub_Name '$in_dir') (/virtual-memory.csv)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('\n') ('    <h3>Shell and Host Details</h3>\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1631]
                )
              ]
            )
            (C {(csv2html)} {($ VSub_Name '$in_dir') (/shells.csv)})
            (C {(csv2html)} {($ VSub_Name '$in_dir') (/hosts.csv)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('  </body>\n') ('</html>\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1653]
                )
              ]
            )
          ]
          spids: [1516]
        )
      spids: [1512 1515]
    )
    (FuncDef
      name: abuild-h
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_dir)
                  op: Equal
                  rhs: {(_tmp/osh-runtime)}
                  spids: [1681]
                )
              ]
              spids: [1679]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out)
                  op: Equal
                  rhs: {($ VSub_Name '$out_dir') (/abuild-h-times.csv)}
                  spids: [1699]
                )
              ]
              spids: [1697]
            )
            (SimpleCommand
              words: [{(echo)} {(SQ <'status,elapsed_secs,sh_path'>)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out')}
                  spids: [1711]
                )
              ]
            )
            (ForEach
              iter_name: sh_path
              iter_words: [{(bash)} {(dash)} {(mksh)} {(zsh)} {($ VSub_Name '$OSH')}]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (C {(benchmarks/time.py)} {(--output)} {($ VSub_Name '$out')} {(--field)} 
                      {(DQ ($ VSub_Name '$sh_path'))} {(--)} {($ VSub_Name '$sh_path')} {(benchmarks/testdata/abuild)} {(-h)}
                    )
                  ]
                  spids: [1733 1759]
                )
              spids: [1721 1731]
            )
          ]
          spids: [1676]
        )
      spids: [1672 1675]
    )
    (FuncDef
      name: qemu-old
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_dir)
                  op: Equal
                  rhs: {($ VSub_Name '$PWD') (/_tmp/qemu-old)}
                  spids: [1786]
                )
              ]
              spids: [1784]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (C {(configure-and-copy)} {(TildeSubPart prefix:'') (/src/qemu-1.6.0)} 
              {($ VSub_Name '$OSH')} {($ VSub_Name '$out_dir')}
            )
          ]
          spids: [1781]
        )
      spids: [1777 1780]
    )
    (FuncDef
      name: self-exe
      body: 
        (BraceGroup
          children: [
            (C {(set)} {(Lit_Other '+') (o)} {(errexit)})
            (SimpleCommand
              words: [{(dash)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('/proc/self/exe -V\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1833]
                )
              ]
            )
            (C {(echo)})
            (SimpleCommand
              words: [{(_bin/osh)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('/proc/self/exe -V\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1845]
                )
              ]
            )
            (SimpleCommand
              words: [{(_tmp/shells/ash)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('/proc/self/exe -V\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [1854]
                )
              ]
            )
          ]
          spids: [1820]
        )
      spids: [1816 1819]
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)