(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-o)} {(nounset)})
    (C {(Id.KW_Set set)} {(-o)} {(pipefail)})
    (C {(Id.KW_Set set)} {(-o)} {(errexit)})
    (C {(source)} {(test/common.sh)})
    (command.ShFunction
      name: stage2
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') ($ Id.VSub_Number '$1')})
            (C {(local)} 
              {(Id.Lit_VarLike 'action=') 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:76)
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ Id.VSub_DollarName '$base_dir')})]
                    )
                )
              }
            )
            (C {(local)} {(Id.Lit_VarLike 'out=') ($ Id.VSub_DollarName '$base_dir') (/stage2)})
            (C {(mkdir)} {(-p)} {($ Id.VSub_DollarName '$out')})
            (C {(benchmarks/report.R)} {($ Id.VSub_DollarName '$action')} 
              {($ Id.VSub_DollarName '$base_dir') (/stage1)} {($ Id.VSub_DollarName '$out')}
            )
            (C {(tree)} {($ Id.VSub_DollarName '$out')})
          ]
        )
    )
    (command.ShFunction
      name: stage3
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') ($ Id.VSub_Number '$1')})
            (C {(local)} 
              {(Id.Lit_VarLike 'name=') 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:136)
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ Id.VSub_DollarName '$base_dir')})]
                    )
                )
              }
            )
            (C {(local)} 
              {(Id.Lit_VarLike 'script=') (benchmarks/) ($ Id.VSub_DollarName '$name') (.sh)}
            )
            (C {(local)} {(Id.Lit_VarLike 'out=') ($ Id.VSub_DollarName '$base_dir') (/index.html)})
            (C {(mkdir)} {(-p)} 
              {
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:163)
                  command_list: 
                    (command.CommandList
                      children: [(C {(dirname)} {($ Id.VSub_DollarName '$out')})]
                    )
                )
              }
            )
            (command.Simple
              words: [
                {($ Id.VSub_DollarName '$script')}
                {(print-report)}
                {($ Id.VSub_DollarName '$base_dir') (/stage2)}
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:178)
                  fd: -1
                  arg_word: {($ Id.VSub_DollarName '$out')}
                )
              ]
            )
            (C {(echo)} {(DQ ('Wrote ') ($ Id.VSub_DollarName '$out'))})
          ]
        )
    )
    (command.ShFunction
      name: osh-parser
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') (_tmp/osh-parser)})
            (C {(benchmarks/osh-parser.sh)} {(stage1)} {(../benchmark-data/osh-parser)})
            (C {(stage2)} {($ Id.VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ Id.VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: osh-runtime
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') (_tmp/osh-runtime)})
            (C {(benchmarks/osh-runtime.sh)} {(stage1)} {(../benchmark-data/osh-runtime)})
            (C {(stage2)} {($ Id.VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ Id.VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: vm-baseline
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') (_tmp/vm-baseline)})
            (C {(benchmarks/vm-baseline.sh)} {(stage1)} {(../benchmark-data/vm-baseline)})
            (C {(stage2)} {($ Id.VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ Id.VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: ovm-build
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') (_tmp/ovm-build)})
            (C {(benchmarks/ovm-build.sh)} {(stage1)} {(../benchmark-data/ovm-build)})
            (C {(stage2)} {($ Id.VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ Id.VSub_DollarName '$base_dir')})
          ]
        )
    )
    (command.ShFunction
      name: oheap
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Id.Lit_VarLike 'base_dir=') (_tmp/oheap)})
            (C {(benchmarks/oheap.sh)} {(stage1)})
            (C {(stage2)} {($ Id.VSub_DollarName '$base_dir')})
            (C {(stage3)} {($ Id.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)} {(Id.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: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:428)
                          ) ($ Id.VSub_DollarName '$name') (/index.html) 
                          (word_part.EscapedLiteral
                            token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:431)
                          ) ('>') ($ Id.VSub_DollarName '$name') ('</a> <br/>')
                        )
                      }
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:440)
                  fd: -1
                  arg_word: {($ Id.VSub_DollarName '$out')}
                )
              ]
            )
            (C {(log)} {(DQ ('Wrote ') ($ Id.VSub_DollarName '$out'))})
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)