(command.CommandList
  children: [
    (C {(KW_Set set)} {(-o)} {(nounset)})
    (C {(KW_Set set)} {(-o)} {(pipefail)})
    (C {(KW_Set set)} {(-o)} {(errexit)})
    (C {(source)} {(test/common.sh)})
    (command.ShFunction
      name: stage2
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') ($ VSub_Number '$1')})
            (C {(local)} 
              {(Lit_VarLike 'action=') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ VSub_DollarName '$base_dir')})]
                    )
                )
              }
            )
            (C {(local)} {(Lit_VarLike 'out=') ($ VSub_DollarName '$base_dir') (/stage2)})
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$out')})
            (C {(benchmarks/report.R)} {($ VSub_DollarName '$action')} 
              {($ VSub_DollarName '$base_dir') (/stage1)} {($ VSub_DollarName '$out')}
            )
            (C {(tree)} {($ VSub_DollarName '$out')})
          ]
        )
    )
    (command.ShFunction
      name: stage3
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') ($ VSub_Number '$1')})
            (C {(local)} 
              {(Lit_VarLike 'name=') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ VSub_DollarName '$base_dir')})]
                    )
                )
              }
            )
            (C {(local)} {(Lit_VarLike 'script=') (benchmarks/) ($ VSub_DollarName '$name') (.sh)})
            (C {(local)} {(Lit_VarLike 'out=') ($ VSub_DollarName '$base_dir') (/index.html)})
            (C {(mkdir)} {(-p)} 
              {
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(dirname)} {($ VSub_DollarName '$out')})]
                    )
                )
              }
            )
            (command.Simple
              words: [
                {($ VSub_DollarName '$script')}
                {(print-report)}
                {($ VSub_DollarName '$base_dir') (/stage2)}
              ]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out')}
                )
              ]
            )
            (C {(echo)} {(DQ ('Wrote ') ($ VSub_DollarName '$out'))})
          ]
        )
    )
    (command.ShFunction
      name: osh-parser
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') (_tmp/osh-parser)})
            (C {(benchmarks/osh-parser.sh)} {(stage1)} {(../benchmark-data/osh-parser)})
            (C {(stage2)} {($ VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: osh-runtime
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') (_tmp/osh-runtime)})
            (C {(benchmarks/osh-runtime.sh)} {(stage1)} {(../benchmark-data/osh-runtime)})
            (C {(stage2)} {($ VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: vm-baseline
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') (_tmp/vm-baseline)})
            (C {(benchmarks/vm-baseline.sh)} {(stage1)} {(../benchmark-data/vm-baseline)})
            (C {(stage2)} {($ VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: ovm-build
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') (_tmp/ovm-build)})
            (C {(benchmarks/ovm-build.sh)} {(stage1)} {(../benchmark-data/ovm-build)})
            (C {(stage2)} {($ VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: oheap
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'base_dir=') (_tmp/oheap)})
            (C {(benchmarks/oheap.sh)} {(stage1)})
            (C {(stage2)} {($ VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: all
      body: 
        (command.BraceGroup
          children: [
            (C {(osh-parser)})
            (C {(osh-runtime)})
            (C {(vm-baseline)})
            (C {(ovm-build)})
            (C {(oheap)})
          ]
        )
    )
    (command.ShFunction
      name: dev-index
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'out=') (_tmp/benchmarks.html)})
            (command.ForEach
              iter_name: name
              iter_words: [{(osh-parser)} {(osh-runtime)} {(vm-baseline)} {(ovm-build)} {(oheap)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(echo)} 
                      {
                        (DQ ('<a href=') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) 
                          ($ VSub_DollarName '$name') (/index.html) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) ('>') ($ VSub_DollarName '$name') 
                          ('</a> <br/>')
                        )
                      }
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out')}
                )
              ]
            )
            (C {(log)} {(DQ ('Wrote ') ($ VSub_DollarName '$out'))})
          ]
        )
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)