(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
      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: [79]
        )
      ]
      spids: [75]
    )
    (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: [103]
                )
              ]
            )
          ]
          spids: [98]
        )
      spids: [94 97]
    )
    (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: [117]
        )
      spids: [113 116]
    )
    (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: [187 204]
                    )
                  spids: [175 185]
                )
            )
            (C {(ls)} {(-l)} {($ VSub_Name '$TAR_DIR')})
          ]
          spids: [165]
        )
      spids: [161 164]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:PY27_DIR)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/Python-2.7.13)}
          spids: [228]
        )
      ]
      spids: [226]
    )
    (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: [243 247]
                      )
                    }
                  spids: [242]
                )
              ]
              spids: [240]
            )
            (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: [253 262]
                      )
                    }
                  spids: [252]
                )
              ]
              spids: [250]
            )
            (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: [237]
        )
      spids: [233 236]
    )
    (FuncDef
      name: osh-cpython-configure
      body: 
        (BraceGroup
          children: [
            (C {(cpython-configure)} {($ VSub_Name '$OSH_OVM')} 
              {($ VSub_Name '$BASE_DIR') (/osh-cpython-configure)}
            )
          ]
          spids: [308]
        )
      spids: [304 307]
    )
    (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: [330]
                )
              ]
              spids: [328]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:job_id)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [339]
                )
              ]
              spids: [337]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:host)
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [345]
                )
              ]
              spids: [343]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:host_hash)
                  op: Equal
                  rhs: {($ VSub_Number '$4')}
                  spids: [351]
                )
              ]
              spids: [349]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:sh_path)
                  op: Equal
                  rhs: {($ VSub_Number '$5')}
                  spids: [357]
                )
              ]
              spids: [355]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:shell_hash)
                  op: Equal
                  rhs: {($ VSub_Number '$6')}
                  spids: [363]
                )
              ]
              spids: [361]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:task_type)
                  op: Equal
                  rhs: {($ VSub_Number '$7')}
                  spids: [369]
                )
              ]
              spids: [367]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:task_arg)
                  op: Equal
                  rhs: {($ VSub_Number '$8')}
                  spids: [375]
                )
              ]
              spids: [373]
            )
            (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: [383 387]
                      )
                    }
                  spids: [382]
                )
              ]
              spids: [380]
            )
            (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: [398 402]
                      )
                    }
                  spids: [397]
                )
              ]
              spids: [395]
            )
            (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: [407]
                )
              ]
              spids: [405]
            )
            (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: [426]
                )
              ]
              spids: [424]
            )
            (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: [441]
                )
              ]
              spids: [439]
            )
            (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: [456]
                )
              ]
              spids: [454]
            )
            (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: [484]
                )
              ]
              spids: [480]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:extra_args) op:Equal rhs:{(SQ )} spids:[548])]
              spids: [548]
            )
            (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: [573]
                        )
                      ]
                      spids: [571]
                    )
                    (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: [588]
                        )
                      ]
                      spids: [586]
                    )
                    (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: [601]
                        )
                      ]
                      spids: [601]
                    )
                  ]
                  spids: [16777215 568]
                )
              ]
              spids: [16777215 615]
            )
            (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: [657 662]
                            )
                          )
                        }
                        {(--)}
                        {(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: [681]
                        )
                      ]
                    )
                  ]
                  spids: [646 647 687 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: [717]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name TIME_PREFIX>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [723 728]
                            )
                          )
                        }
                        {(--)}
                        {(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: [746]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [{(popd)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [755]
                        )
                      ]
                    )
                  ]
                  spids: [691 692 759 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: [769]
                        )
                      ]
                      spids: [767]
                    )
                    (SimpleCommand
                      words: [{(pushd)} {($ VSub_Name '$conf_dir')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(/dev/null)}
                          spids: [778]
                        )
                      ]
                    )
                    (C {(touch)} {(__TIMESTAMP)})
                    (SimpleCommand
                      words: [
                        {
                          (DQ 
                            (BracedVarSub
                              token: <VSub_Name TIME_PREFIX>
                              bracket_op: (WholeArray op_id:Lit_At)
                              spids: [789 794]
                            )
                          )
                        }
                        {(--)}
                        {(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: [809]
                        )
                      ]
                    )
                    (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: [853]
                        )
                      ]
                    )
                  ]
                  spids: [763 764 857 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [(C {(die)} {(DQ ('Invalid task type ') ($ VSub_Name '$task_type'))})]
                  spids: [861 862 873 16777215]
                )
              ]
              spids: [639 643 876]
            )
          ]
          spids: [325]
        )
      spids: [321 324]
    )
    (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: [960]
                )
              ]
              spids: [958]
            )
            (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: [1003 1008 1022 16777215]
                            )
                          ]
                          spids: [996 1000 1025]
                        )
                        (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: [1045]
                                    )
                                  ]
                                  spids: [1045]
                                )
                              ]
                              spids: [1040 1042 1051 16777215]
                            )
                          ]
                          spids: [1033 1037 1054]
                        )
                        (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: [1059]
                            )
                          ]
                          spids: [1057]
                        )
                        (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: [1108 1113]
                                )
                              )
                            }
                          ]
                          do_arg_iter: F
                          body: 
                            (DoGroup
                              children: [
                                (C {(echo)} {(DQ ($ VSub_Name '$prefix'))} {(configure)} 
                                  {($ VSub_Name '$TAR_DIR') (/) ($ VSub_Name '$dir')}
                                )
                              ]
                              spids: [1117 1133]
                            )
                          spids: [1106 1115]
                        )
                      ]
                      spids: [992 1136]
                    )
                )
              ]
              negated: F
            )
          ]
          spids: [955]
        )
      spids: [951 954]
    )
    (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: [1143]
        )
      ]
      spids: [1141]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [(assign_pair lhs:(LhsName name:NUM_COLUMNS) op:Equal rhs:{(7)} spids:[1150])]
      spids: [1148]
    )
    (FuncDef
      name: measure
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:provenance)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [1166]
                )
              ]
              spids: [1164]
            )
            (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: [1173 1179]
                      )
                    }
                  spids: [1172]
                )
              ]
              spids: [1170]
            )
            (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: [1185 1188]
                      )
                    }
                  spids: [1184]
                )
              ]
              spids: [1182]
            )
            (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: [1204 1208]
                      )
                    }
                  spids: [1203]
                )
              ]
              spids: [1201]
            )
            (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: [1214 1218]
                      )
                    }
                  spids: [1213]
                )
              ]
              spids: [1211]
            )
            (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: [1227]
                )
              ]
              spids: [1225]
            )
            (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: [1260]
                )
              ]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tasks)
                  op: Equal
                  rhs: {($ VSub_Name '$BASE_DIR') (/tasks.txt)}
                  spids: [1268]
                )
              ]
              spids: [1266]
            )
            (SimpleCommand
              words: [{(print-tasks)} {($ VSub_Name '$provenance')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$tasks')}
                  spids: [1277]
                )
              ]
            )
            (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: [1161]
        )
      spids: [1157 1160]
    )
    (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: [1346 1352]
                      )
                    }
                  spids: [1345]
                )
              ]
              spids: [1343]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_dir)
                  op: Equal
                  rhs: {($ VSub_Name '$BASE_DIR') (/stage1)}
                  spids: [1357]
                )
              ]
              spids: [1355]
            )
            (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: [1373]
                )
              ]
              spids: [1371]
            )
            (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: [1386]
                )
              ]
              spids: [1382]
            )
            (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: [1399]
                )
              ]
              spids: [1395]
            )
            (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: [1410 1416]
                  )
                }
                {
                  (BracedVarSub
                    token: <VSub_Name b>
                    bracket_op: 
                      (ArrayIndex
                        expr: (ArithUnary op_id:Node_UnaryMinus child:(ArithWord w:{(Lit_Digits 1)}))
                      )
                    spids: [1418 1424]
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$times_csv')}
                  spids: [1426]
                )
              ]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:vm_csv)
                  op: Equal
                  rhs: {($ VSub_Name '$out_dir') (/virtual-memory.csv)}
                  spids: [1434]
                )
              ]
              spids: [1432]
            )
            (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: [1444]
                )
              ]
              spids: [1440]
            )
            (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: [1457]
                )
              ]
              spids: [1453]
            )
            (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: [1470 1476]
                  )
                }
                {
                  (BracedVarSub
                    token: <VSub_Name d>
                    bracket_op: 
                      (ArrayIndex
                        expr: (ArithUnary op_id:Node_UnaryMinus child:(ArithWord w:{(Lit_Digits 1)}))
                      )
                    spids: [1478 1484]
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$vm_csv')}
                  spids: [1486]
                )
              ]
            )
          ]
          spids: [1340]
        )
      spids: [1336 1339]
    )
    (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: [1507]
                )
              ]
              spids: [1505]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:base_url)
                  op: Equal
                  rhs: {(SQ <../../web>)}
                  spids: [1513]
                )
              ]
              spids: [1511]
            )
            (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: [1522]
                )
              ]
            )
            (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: [1598]
                )
              ]
            )
            (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: [1617]
                )
              ]
            )
            (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: [1639]
                )
              ]
            )
          ]
          spids: [1502]
        )
      spids: [1498 1501]
    )
    (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: [1667]
                )
              ]
              spids: [1665]
            )
            (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: [1685]
                )
              ]
              spids: [1683]
            )
            (SimpleCommand
              words: [{(echo)} {(SQ <'status,elapsed_secs,sh_path'>)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out')}
                  spids: [1697]
                )
              ]
            )
            (ForEach
              iter_name: sh_path
              iter_words: [{(bash)} {(dash)} {(mksh)} {(zsh)} {($ VSub_Name '$OSH_OVM')}]
              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: [1719 1745]
                )
              spids: [1707 1717]
            )
          ]
          spids: [1662]
        )
      spids: [1658 1661]
    )
    (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: [1772]
                )
              ]
              spids: [1770]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (C {(configure-and-copy)} {(TildeSubPart prefix:'') (/src/qemu-1.6.0)} 
              {($ VSub_Name '$OSH_OVM')} {($ VSub_Name '$out_dir')}
            )
          ]
          spids: [1767]
        )
      spids: [1763 1766]
    )
    (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: [1819]
                )
              ]
            )
            (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: [1831]
                )
              ]
            )
            (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: [1840]
                )
              ]
            )
          ]
          spids: [1806]
        )
      spids: [1802 1805]
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)