(command.CommandList
  children: [
    (C {(KW_Set set)} {(-o)} {(nounset)})
    (C {(KW_Set set)} {(-o)} {(pipefail)})
    (C {(KW_Set set)} {(-o)} {(errexit)})
    (C {(source)} {(build/common.sh)})
    (C {(source)} {(benchmarks/common.sh)})
    (command.ShFunction
      name: _dump-if-exists
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'path=') ($ VSub_Number '$1')})
            (C {(local)} {(Lit_VarLike 'out=') ($ VSub_Number '$2')})
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$path')})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Simple
              words: [{(cat)} {($ VSub_DollarName '$path')}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out')}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: dump-shell-id
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'sh=') ($ VSub_Number '$1')})
            (C {(local)} {(name)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:name)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(basename)} {($ VSub_DollarName '$sh')})]
                          )
                      )
                    }
                )
              ]
            )
            (C {(local)} 
              {(Lit_VarLike 'out_dir=') 
                (braced_var_sub
                  token: <VSub_Number 2>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: VTest_ColonHyphen
                      arg_word: 
                        {(_tmp) (Lit_Slash /) (shell-id) (Lit_Slash /) ($ VSub_DollarName '$name')}
                    )
                )
              }
            )
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$out_dir')})
            (command.Case
              to_match: {($ VSub_DollarName '$sh')}
              arms: [
                (case_arm
                  pat_list: [{(Lit_Star '*') (/osh)}]
                  action: [
                    (C {(local)} {(branch)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:branch)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(rev-parse)} {(--abbrev-ref)} {(HEAD)})]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (command.Simple
                      words: [{(echo)} {($ VSub_DollarName '$branch')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$out_dir') (/git-branch.txt)}
                        )
                      ]
                    )
                    (command.Simple
                      words: [{(git)} {(rev-parse)} {($ VSub_DollarName '$branch')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$out_dir') (/git-commit-hash.txt)}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$name')}
              arms: [
                (case_arm
                  pat_list: [{(bash)} {(zsh)}]
                  action: [
                    (command.Simple
                      words: [{($ VSub_DollarName '$sh')} {(--version)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$out_dir') (/version.txt)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(osh)}]
                  action: [
                    (command.Simple
                      words: [{($ VSub_DollarName '$sh')} {(--version)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$out_dir') (/osh-version.txt)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(dash)} {(mksh)}]
                  action: [
                    (command.Simple
                      words: [{(dpkg)} {(-s)} {($ VSub_DollarName '$name')}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {($ VSub_DollarName '$out_dir') (/dpkg-version.txt)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [(C {(die)} {(DQ ("Invalid shell '") ($ VSub_DollarName '$name') ("'"))})]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _shell-id-hash
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'src=') ($ VSub_Number '$1')})
            (C {(local)} {(file)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: Equal
                  rhs: {($ VSub_DollarName '$src') (/version.txt)}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$file')})
                (C {(cat)} {($ VSub_DollarName '$file')})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: Equal
                  rhs: {($ VSub_DollarName '$src') (/dpkg-version.txt)}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$file')})
                (C {(egrep)} {(SQ <'^Version'>)} {($ VSub_DollarName '$file')})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: Equal
                  rhs: {($ VSub_DollarName '$src') (/osh-version.txt)}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$file')})
                (C {(egrep)} {(SQ <'^Oil version|^Interpreter'>)} {($ VSub_DollarName '$file')})
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: Equal
                  rhs: {($ VSub_DollarName '$src') (/git-commit-hash.txt)}
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$file')})
                (C {(cat)} {($ VSub_DollarName '$file')})
              ]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (command.ShFunction
      name: publish-shell-id
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'src=') ($ VSub_Number '$1')})
            (C {(local)} 
              {(Lit_VarLike 'dest_base=') 
                (braced_var_sub
                  token: <VSub_Number 2>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: VTest_ColonHyphen
                      arg_word: {(..) (Lit_Slash /) (benchmark-data) (Lit_Slash /) (shell-id)}
                    )
                )
              }
            )
            (C {(local)} 
              {(Lit_VarLike 'name=') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ VSub_DollarName '$src')})]
                    )
                )
              }
            )
            (C {(local)} {(hash)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:hash)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(_shell-id-hash)} {($ VSub_DollarName '$src')})
                                  (C {(md5sum)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (C {(local)} 
              {(Lit_VarLike 'id=') 
                (DQ 
                  (braced_var_sub
                    token: <VSub_Name hash>
                    suffix_op: 
                      (suffix_op.Slice
                        begin: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                        length: (arith_expr.ArithWord w:{(Lit_Digits 8)})
                      )
                  )
                )
              }
            )
            (C {(local)} 
              {(Lit_VarLike 'dest=') 
                (DQ ($ VSub_DollarName '$dest_base') (/) ($ VSub_DollarName '$name') (-) 
                  ($ VSub_DollarName '$id')
                )
              }
            )
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')})
            (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ VSub_DollarName '$src') (/)} 
              {($ VSub_DollarName '$dest') (/)}
            )
            (command.Simple
              words: [{(echo)} {($ VSub_DollarName '$hash')}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$dest') (/HASH.txt)}
                )
              ]
            )
            (C {(log)} {(DQ ('Published shell ID to ') ($ VSub_DollarName '$dest'))})
            (C {(echo)} {($ VSub_DollarName '$id')})
          ]
        )
    )
    (command.ShFunction
      name: dump-host-id
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} 
              {(Lit_VarLike 'out_dir=') 
                (braced_var_sub
                  token: <VSub_Number 1>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: VTest_ColonHyphen
                      arg_word: 
                        {(_tmp) (Lit_Slash /) (host-id) (Lit_Slash /) 
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: (command.CommandList children:[(C {(hostname)})])
                          )
                        }
                    )
                )
              }
            )
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$out_dir')})
            (command.Simple
              words: [{(hostname)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out_dir') (/hostname.txt)}
                )
              ]
            )
            (command.Simple
              words: [{(uname)} {(-m)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out_dir') (/machine.txt)}
                )
              ]
            )
            (command.BraceGroup
              children: [(C {(uname)} {(--kernel-release)}) (C {(uname)} {(--kernel-version)})]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out_dir') (/kernel.txt)}
                )
              ]
            )
            (C {(_dump-if-exists)} {(/etc/lsb-release)} 
              {($ VSub_DollarName '$out_dir') (/lsb-release.txt)}
            )
            (command.Simple
              words: [{(cat)} {(/proc/cpuinfo)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out_dir') (/cpuinfo.txt)}
                )
              ]
            )
            (command.Simple
              words: [{(cat)} {(/proc/meminfo)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out_dir') (/meminfo.txt)}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _host-id-hash
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'src=') ($ VSub_Number '$1')})
            (C {(cat)} {($ VSub_DollarName '$src') (/machine.txt)})
            (C {(cat)} {($ VSub_DollarName '$src') (/kernel.txt)})
            (C {(local)} {(Lit_VarLike 'file=') ($ VSub_DollarName '$src') (/lsb-release.txt)})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {($ VSub_DollarName '$file')})
                (C {(cat)} {($ VSub_DollarName '$file')})
              ]
            )
            (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
          ]
        )
    )
    (command.ShFunction
      name: publish-host-id
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'src=') ($ VSub_Number '$1')})
            (C {(local)} 
              {(Lit_VarLike 'dest_base=') 
                (braced_var_sub
                  token: <VSub_Number 2>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: VTest_ColonHyphen
                      arg_word: {(..) (Lit_Slash /) (benchmark-data) (Lit_Slash /) (host-id)}
                    )
                )
              }
            )
            (C {(local)} 
              {(Lit_VarLike 'name=') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ VSub_DollarName '$src')})]
                    )
                )
              }
            )
            (C {(local)} {(hash)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:hash)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(_host-id-hash)} {($ VSub_DollarName '$src')})
                                  (C {(md5sum)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (C {(local)} 
              {(Lit_VarLike 'id=') 
                (DQ 
                  (braced_var_sub
                    token: <VSub_Name hash>
                    suffix_op: 
                      (suffix_op.Slice
                        begin: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                        length: (arith_expr.ArithWord w:{(Lit_Digits 8)})
                      )
                  )
                )
              }
            )
            (C {(local)} 
              {(Lit_VarLike 'dest=') 
                (DQ ($ VSub_DollarName '$dest_base') (/) ($ VSub_DollarName '$name') (-) 
                  ($ VSub_DollarName '$id')
                )
              }
            )
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')})
            (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ VSub_DollarName '$src') (/)} 
              {($ VSub_DollarName '$dest') (/)}
            )
            (command.Simple
              words: [{(echo)} {($ VSub_DollarName '$hash')}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$dest') (/HASH.txt)}
                )
              ]
            )
            (C {(log)} {(DQ ('Published host ID to ') ($ VSub_DollarName '$dest'))})
            (C {(echo)} {($ VSub_DollarName '$id')})
          ]
        )
    )
    (command.ShFunction
      name: dump-compiler-id
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'cc=') ($ VSub_Number '$1')})
            (C {(local)} 
              {(Lit_VarLike 'out_dir=') 
                (braced_var_sub
                  token: <VSub_Number 2>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: VTest_ColonHyphen
                      arg_word: 
                        {(_tmp) (Lit_Slash /) (compiler-id) (Lit_Slash /) 
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(basename)} {($ VSub_DollarName '$cc')})]
                              )
                          )
                        }
                    )
                )
              }
            )
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$out_dir')})
            (command.Case
              to_match: {($ VSub_DollarName '$cc')}
              arms: [
                (case_arm
                  pat_list: [{(Lit_Star '*') (/gcc)}]
                  action: [(C {($ VSub_DollarName '$cc')} {(--version)})]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*') (/clang)}]
                  action: [(C {($ VSub_DollarName '$cc')} {(--version)})]
                )
              ]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out_dir') (/version.txt)}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: test-compiler-id
      body: 
        (command.BraceGroup
          children: [
            (C {(dump-compiler-id)} {(gcc)})
            (C {(dump-compiler-id)} {($ VSub_DollarName '$CLANG')})
            (C {(head)} {(_tmp/compiler-id/) (Lit_Star '*') (/version.txt)})
          ]
        )
    )
    (command.ShFunction
      name: _compiler-id-hash
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'src=') ($ VSub_Number '$1')})
            (command.Pipeline
              children: [
                (C {(cat)} {($ VSub_DollarName '$src') (/version.txt)})
                (C {(grep)} {(-v)} {(InstalledDir)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: publish-compiler-id
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'src=') ($ VSub_Number '$1')})
            (C {(local)} 
              {(Lit_VarLike 'dest_base=') 
                (braced_var_sub
                  token: <VSub_Number 2>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: VTest_ColonHyphen
                      arg_word: {(..) (Lit_Slash /) (benchmark-data) (Lit_Slash /) (compiler-id)}
                    )
                )
              }
            )
            (C {(local)} 
              {(Lit_VarLike 'name=') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(basename)} {($ VSub_DollarName '$src')})]
                    )
                )
              }
            )
            (C {(local)} {(hash)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:hash)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(_compiler-id-hash)} {($ VSub_DollarName '$src')})
                                  (C {(md5sum)})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (C {(local)} 
              {(Lit_VarLike 'id=') 
                (DQ 
                  (braced_var_sub
                    token: <VSub_Name hash>
                    suffix_op: 
                      (suffix_op.Slice
                        begin: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                        length: (arith_expr.ArithWord w:{(Lit_Digits 8)})
                      )
                  )
                )
              }
            )
            (C {(local)} 
              {(Lit_VarLike 'dest=') 
                (DQ ($ VSub_DollarName '$dest_base') (/) ($ VSub_DollarName '$name') (-) 
                  ($ VSub_DollarName '$id')
                )
              }
            )
            (C {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')})
            (C {(cp)} {(--no-target-directory)} {(--recursive)} {($ VSub_DollarName '$src') (/)} 
              {($ VSub_DollarName '$dest') (/)}
            )
            (command.Simple
              words: [{(echo)} {($ VSub_DollarName '$hash')}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$dest') (/HASH.txt)}
                )
              ]
            )
            (C {(log)} {(DQ ('Published compiler ID to ') ($ VSub_DollarName '$dest'))})
            (C {(echo)} {($ VSub_DollarName '$id')})
          ]
        )
    )
    (command.ShFunction
      name: shell-provenance
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(job_id)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:job_id)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(date)} 
                                  {(Lit_Other '+') (Lit_Other '%') (Y-) (Lit_Other '%') (m-) 
                                    (Lit_Other '%') (d__) (Lit_Other '%') (H-) (Lit_Other '%') (M-) (Lit_Other '%') (S)
                                  }
                                )
                              ]
                            )
                        )
                      )
                    }
                )
              ]
            )
            (C {(local)} {(host)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:host)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: (command.CommandList children:[(C {(hostname)})])
                      )
                    }
                )
              ]
            )
            (C {(local)} 
              {(Lit_VarLike 'out=') (_tmp/) (${ VSub_Name host) (.) (${ VSub_Name job_id) 
                (.provenance.txt)
              }
            )
            (C {(local)} {(Lit_VarLike 'tmp_dir=') (_tmp/host-id/) ($ VSub_DollarName '$host')})
            (C {(dump-host-id)} {($ VSub_DollarName '$tmp_dir')})
            (C {(local)} {(host_hash)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:host_hash)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(publish-host-id)} {($ VSub_DollarName '$tmp_dir')})]
                          )
                      )
                    }
                )
              ]
            )
            (C {(local)} {(shell_hash)})
            (command.ForEach
              iter_name: sh_path
              iter_words: [{(bash)} {(dash)} {(mksh)} {(zsh)} {(bin/osh)} {($ VSub_DollarName '$OSH_OVM')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(local)} 
                      {(Lit_VarLike 'name=') 
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [(C {(basename)} {($ VSub_DollarName '$sh_path')})]
                            )
                        )
                      }
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:tmp_dir)
                          op: Equal
                          rhs: {(_tmp/shell-id/) ($ VSub_DollarName '$name')}
                        )
                      ]
                    )
                    (C {(dump-shell-id)} {($ VSub_DollarName '$sh_path')} 
                      {($ VSub_DollarName '$tmp_dir')}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:shell_hash)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(publish-shell-id)} {($ VSub_DollarName '$tmp_dir')})
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (C {(echo)} 
                      {
                        (DQ ($ VSub_DollarName '$job_id') (' ') ($ VSub_DollarName '$host') (' ') 
                          ($ VSub_DollarName '$host_hash') (' ') ($ VSub_DollarName '$sh_path') (' ') ($ VSub_DollarName '$shell_hash')
                        )
                      }
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out')}
                )
              ]
            )
            (C {(log)} {(DQ ('Wrote ') ($ VSub_DollarName '$out'))})
            (C {(echo)} {($ VSub_DollarName '$out')})
          ]
        )
    )
    (command.ShFunction
      name: compiler-provenance
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(job_id)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:job_id)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(date)} 
                                  {(Lit_Other '+') (Lit_Other '%') (Y-) (Lit_Other '%') (m-) 
                                    (Lit_Other '%') (d__) (Lit_Other '%') (H-) (Lit_Other '%') (M-) (Lit_Other '%') (S)
                                  }
                                )
                              ]
                            )
                        )
                      )
                    }
                )
              ]
            )
            (C {(local)} {(host)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:host)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: (command.CommandList children:[(C {(hostname)})])
                      )
                    }
                )
              ]
            )
            (C {(local)} 
              {(Lit_VarLike 'out=') (_tmp/) (${ VSub_Name host) (.) (${ VSub_Name job_id) 
                (.compiler-provenance.txt)
              }
            )
            (C {(local)} {(Lit_VarLike 'tmp_dir=') (_tmp/host-id/) ($ VSub_DollarName '$host')})
            (C {(dump-host-id)} {($ VSub_DollarName '$tmp_dir')})
            (C {(local)} {(host_hash)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:host_hash)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(publish-host-id)} {($ VSub_DollarName '$tmp_dir')})]
                          )
                      )
                    }
                )
              ]
            )
            (C {(local)} {(compiler_hash)})
            (command.ForEach
              iter_name: compiler_path
              iter_words: [
                {
                  (command_sub
                    left_token: <Left_DollarParen '$('>
                    command_list: (command.CommandList children:[(C {(which)} {(gcc)})])
                  )
                }
                {($ VSub_DollarName '$CLANG')}
              ]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {(local)} 
                      {(Lit_VarLike 'name=') 
                        (command_sub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [(C {(basename)} {($ VSub_DollarName '$compiler_path')})]
                            )
                        )
                      }
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:tmp_dir)
                          op: Equal
                          rhs: {(_tmp/compiler-id/) ($ VSub_DollarName '$name')}
                        )
                      ]
                    )
                    (C {(dump-compiler-id)} {($ VSub_DollarName '$compiler_path')} 
                      {($ VSub_DollarName '$tmp_dir')}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:compiler_hash)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(publish-compiler-id)} {($ VSub_DollarName '$tmp_dir')})
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (C {(echo)} 
                      {
                        (DQ ($ VSub_DollarName '$job_id') (' ') ($ VSub_DollarName '$host') (' ') 
                          ($ VSub_DollarName '$host_hash') (' ') ($ VSub_DollarName '$compiler_path') (' ') ($ VSub_DollarName '$compiler_hash')
                        )
                      }
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {($ VSub_DollarName '$out')}
                )
              ]
            )
            (C {(log)} {(DQ ('Wrote ') ($ VSub_DollarName '$out'))})
            (C {(echo)} {($ VSub_DollarName '$out')})
          ]
        )
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)