(CommandList
  children: [
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (C {(set)} {(-o)} {(errexit)})
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('FATAL: ') ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[169])]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [159]
        )
      spids: [155 158]
    )
    (FuncDef
      name: log
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[193])]
            )
          ]
          spids: [184]
        )
      spids: [180 183]
    )
    (FuncDef
      name: _dump-if-exists
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:path)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [208]
                )
              ]
              spids: [206]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [214]
                )
              ]
              spids: [212]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(-f)} {($ VSub_Name '$path')})
                (ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (SimpleCommand
              words: [{(cat)} {($ VSub_Name '$path')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out')}
                  spids: [233]
                )
              ]
            )
          ]
          spids: [203]
        )
      spids: [199 202]
    )
    (FuncDef
      name: dump-shell-id
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:sh)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [259]
                )
              ]
              spids: [257]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:name) op:Equal spids:[269])]
              spids: [267]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:name)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(basename)} {($ VSub_Name '$sh')})])
                        left_token: <Left_CommandSub '$('>
                        spids: [273 277]
                      )
                    }
                  spids: [272]
                )
              ]
              spids: [272]
            )
            (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: 
                              {(_tmp) (Lit_Slash /) (shell-id) (Lit_Slash /) ($ VSub_Name '$name')}
                          )
                        spids: [284 292]
                      )
                    }
                  spids: [283]
                )
              ]
              spids: [281]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (Case
              to_match: {($ VSub_Name '$sh')}
              arms: [
                (case_arm
                  pat_list: [{(bin/osh)} {(_bin/osh)}]
                  action: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [(assign_pair lhs:(LhsName name:branch) op:Equal spids:[322])]
                      spids: [320]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:branch)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(git)} {(rev-parse)} {(--abbrev-ref)} {(HEAD)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [326 334]
                              )
                            }
                          spids: [325]
                        )
                      ]
                      spids: [325]
                    )
                    (SimpleCommand
                      words: [{(echo)} {($ VSub_Name '$branch')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$out_dir') (/git-branch.txt)}
                          spids: [341]
                        )
                      ]
                    )
                    (SimpleCommand
                      words: [{(git)} {(rev-parse)} {($ VSub_Name '$branch')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$out_dir') (/git-commit-hash.txt)}
                          spids: [353]
                        )
                      ]
                    )
                  ]
                  spids: [314 317 359 16777215]
                )
              ]
              spids: [307 311 362]
            )
            (Case
              to_match: {($ VSub_Name '$name')}
              arms: [
                (case_arm
                  pat_list: [{(bash)} {(zsh)}]
                  action: [
                    (SimpleCommand
                      words: [{($ VSub_Name '$sh')} {(--version)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$out_dir') (/version.txt)}
                          spids: [383]
                        )
                      ]
                    )
                  ]
                  spids: [373 376 389 16777215]
                )
                (case_arm
                  pat_list: [{(osh)}]
                  action: [
                    (SimpleCommand
                      words: [{($ VSub_Name '$sh')} {(--version)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$out_dir') (/osh-version.txt)}
                          spids: [400]
                        )
                      ]
                    )
                  ]
                  spids: [392 393 406 16777215]
                )
                (case_arm
                  pat_list: [{(dash)} {(mksh)}]
                  action: [
                    (SimpleCommand
                      words: [{(dpkg)} {(-s)} {($ VSub_Name '$name')}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {($ VSub_Name '$out_dir') (/dpkg-version.txt)}
                          spids: [425]
                        )
                      ]
                    )
                  ]
                  spids: [409 412 431 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [(C {(die)} {(DQ ("Invalid shell '") ($ VSub_Name '$name') ("'"))})]
                  spids: [434 435 447 16777215]
                )
              ]
              spids: [366 370 450]
            )
          ]
          spids: [254]
        )
      spids: [250 253]
    )
    (FuncDef
      name: _shell-id-hash
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:src)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [464]
                )
              ]
              spids: [462]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:file) op:Equal spids:[471])]
              spids: [469]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {($ VSub_Name '$src') (/version.txt)}
                  spids: [475]
                )
              ]
              spids: [475]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [(C {(test)} {(-f)} {($ VSub_Name '$file')}) (C {(cat)} {($ VSub_Name '$file')})]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {($ VSub_Name '$src') (/dpkg-version.txt)}
                  spids: [498]
                )
              ]
              spids: [498]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_Name '$file')})
                (C {(egrep)} {(SQ <'^Version'>)} {($ VSub_Name '$file')})
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {($ VSub_Name '$src') (/osh-version.txt)}
                  spids: [525]
                )
              ]
              spids: [525]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_Name '$file')})
                (C {(egrep)} {(SQ <'^Oil version|^Interpreter'>)} {($ VSub_Name '$file')})
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {($ VSub_Name '$src') (/git-commit-hash.txt)}
                  spids: [552]
                )
              ]
              spids: [552]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [(C {(test)} {(-f)} {($ VSub_Name '$file')}) (C {(cat)} {($ VSub_Name '$file')})]
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [459]
        )
      spids: [455 458]
    )
    (FuncDef
      name: publish-shell-id
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:src)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [590]
                )
              ]
              spids: [588]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest_base)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {(..) (Lit_Slash /) (benchmark-data) (Lit_Slash /) (shell-id)}
                          )
                        spids: [600 608]
                      )
                    }
                  spids: [599]
                )
              ]
              spids: [597]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:name)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Name '$src')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [615 619]
                      )
                    }
                  spids: [614]
                )
              ]
              spids: [612]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:hash) op:Equal spids:[624])]
              spids: [622]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:hash)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [(C {(_shell-id-hash)} {($ VSub_Name '$src')}) (C {(md5sum)})]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [637 645]
                      )
                    }
                  spids: [636]
                )
              ]
              spids: [636]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:id)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Name hash>
                          suffix_op: 
                            (Slice
                              begin: (ArithWord w:{(Lit_Digits 0)})
                              length: (ArithWord w:{(Lit_Digits 8)})
                            )
                          spids: [656 662]
                        )
                      )
                    }
                  spids: [654]
                )
              ]
              spids: [652]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$dest_base') (/) ($ VSub_Name '$name') (-) ($ VSub_Name '$id'))
                    }
                  spids: [668]
                )
              ]
              spids: [666]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$dest')})
            (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ VSub_Name '$src') (/)} 
              {($ VSub_Name '$dest') (/)}
            )
            (SimpleCommand
              words: [{(echo)} {($ VSub_Name '$hash')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$dest') (/HASH.txt)}
                  spids: [704]
                )
              ]
            )
            (C {(log)} {(DQ ('Published shell ID to ') ($ VSub_Name '$dest'))})
            (C {(echo)} {($ VSub_Name '$id')})
          ]
          spids: [585]
        )
      spids: [581 584]
    )
    (FuncDef
      name: dump-host-id
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_dir)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: 
                              {(_tmp) (Lit_Slash /) (host-id) (Lit_Slash /) 
                                (CommandSubPart
                                  command_list: (CommandList children:[(C {(hostname)})])
                                  left_token: <Left_CommandSub '$('>
                                  spids: [775 777]
                                )
                              }
                          )
                        spids: [768 778]
                      )
                    }
                  spids: [767]
                )
              ]
              spids: [765]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (SimpleCommand
              words: [{(hostname)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out_dir') (/hostname.txt)}
                  spids: [792]
                )
              ]
            )
            (SimpleCommand
              words: [{(uname)} {(-m)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out_dir') (/machine.txt)}
                  spids: [819]
                )
              ]
            )
            (BraceGroup
              children: [(C {(uname)} {(--kernel-release)}) (C {(uname)} {(--kernel-version)})]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out_dir') (/kernel.txt)}
                  spids: [844]
                )
              ]
              spids: [829]
            )
            (C {(_dump-if-exists)} {(/etc/lsb-release)} {($ VSub_Name '$out_dir') (/lsb-release.txt)})
            (SimpleCommand
              words: [{(cat)} {(/proc/cpuinfo)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out_dir') (/cpuinfo.txt)}
                  spids: [864]
                )
              ]
            )
            (SimpleCommand
              words: [{(cat)} {(/proc/meminfo)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out_dir') (/meminfo.txt)}
                  spids: [882]
                )
              ]
            )
          ]
          spids: [762]
        )
      spids: [758 761]
    )
    (FuncDef
      name: _host-id-hash
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:src)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [914]
                )
              ]
              spids: [912]
            )
            (C {(cat)} {($ VSub_Name '$src') (/machine.txt)})
            (C {(cat)} {($ VSub_Name '$src') (/kernel.txt)})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:file)
                  op: Equal
                  rhs: {($ VSub_Name '$src') (/lsb-release.txt)}
                  spids: [954]
                )
              ]
              spids: [952]
            )
            (AndOr
              ops: [Op_DAmp]
              children: [(C {(test)} {(-f)} {($ VSub_Name '$file')}) (C {(cat)} {($ VSub_Name '$file')})]
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
          spids: [909]
        )
      spids: [905 908]
    )
    (FuncDef
      name: publish-host-id
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:src)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [992]
                )
              ]
              spids: [990]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest_base)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {(..) (Lit_Slash /) (benchmark-data) (Lit_Slash /) (host-id)}
                          )
                        spids: [1002 1010]
                      )
                    }
                  spids: [1001]
                )
              ]
              spids: [999]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:name)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Name '$src')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [1017 1021]
                      )
                    }
                  spids: [1016]
                )
              ]
              spids: [1014]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:hash) op:Equal spids:[1026])]
              spids: [1024]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:hash)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [(C {(_host-id-hash)} {($ VSub_Name '$src')}) (C {(md5sum)})]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [1030 1038]
                      )
                    }
                  spids: [1029]
                )
              ]
              spids: [1029]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:id)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Name hash>
                          suffix_op: 
                            (Slice
                              begin: (ArithWord w:{(Lit_Digits 0)})
                              length: (ArithWord w:{(Lit_Digits 8)})
                            )
                          spids: [1049 1055]
                        )
                      )
                    }
                  spids: [1047]
                )
              ]
              spids: [1045]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$dest_base') (/) ($ VSub_Name '$name') (-) ($ VSub_Name '$id'))
                    }
                  spids: [1061]
                )
              ]
              spids: [1059]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$dest')})
            (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ VSub_Name '$src') (/)} 
              {($ VSub_Name '$dest') (/)}
            )
            (SimpleCommand
              words: [{(echo)} {($ VSub_Name '$hash')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$dest') (/HASH.txt)}
                  spids: [1097]
                )
              ]
            )
            (C {(log)} {(DQ ('Published host ID to ') ($ VSub_Name '$dest'))})
            (C {(echo)} {($ VSub_Name '$id')})
          ]
          spids: [987]
        )
      spids: [983 986]
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)