(command.CommandList
  children: [
    (C {<readonly>} {<Id.Lit_VarLike 'GCS_BUCKET='> (DQ <'gs://kythe-builds'>)})
    (command.ShFunction
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'usage: '> 
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {<basename>} {(DQ ($ Id.VSub_Number '$0'))})]
                        )
                    ) <' cache-dir'>
                  )
                }
              ]
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '>&'> fd:-1 arg_word:{<2>})]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_Pound '$#')}
                      right: {<1>}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<usage>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})]
          spids: [78 91]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CACHE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {<readlink>} {<-m>} {(DQ ($ Id.VSub_Number '$1'))})]
                    )
                )
              )
            }
          spids: [104]
        )
      ]
    )
    (C {<echo>} {(DQ <'Cache Root:      '> ($ Id.VSub_DollarName '$CACHE'))})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REPO)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (C {<readlink>} {<-e>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {<dirname>} {(DQ ($ Id.VSub_Number '$0'))})]
                                  )
                              ) </..>
                            )
                          }
                        )
                      ]
                    )
                )
              )
            }
          spids: [125]
        )
      ]
    )
    (C {<echo>} {(DQ <'Repository Root: '> ($ Id.VSub_DollarName '$REPO'))})
    (C {<.>} {<tools/modules/versions.sh>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:NAME)
          op: assign_op.Equal
          rhs: {(DQ <llvm-> (${ Id.VSub_Name FULL_SHA))}
          spids: [157]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LLVM)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$CACHE') </> ($ Id.VSub_DollarName '$NAME'))}
          spids: [165]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalNot
                      child: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_d
                          child: {(DQ ($ Id.VSub_DollarName '$LLVM'))}
                        )
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TMP)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          command_list: (command.CommandList children:[(C {<mktemp>} {<-d>})])
                        )
                      )
                    }
                  spids: [191]
                )
              ]
            )
            (C {<trap>} {(DQ <"rm -rf '"> ($ Id.VSub_DollarName '$TMP') <"'">)} {<EXIT>} {<ERR>} {<INT>})
            (C {<cd>} {(DQ ($ Id.VSub_DollarName '$TMP'))})
            (C {<gsutil>} {<cp>} 
              {(DQ (${ Id.VSub_Name GCS_BUCKET) </> ($ Id.VSub_DollarName '$NAME') <.tar.gz>)} {<.>}
            )
            (C {<tar>} {<xzf>} {(DQ ($ Id.VSub_DollarName '$NAME') <.tar.gz>)})
            (C {<mkdir>} {<-p>} 
              {
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [(C {<dirname>} {(DQ ($ Id.VSub_DollarName '$LLVM'))})]
                      )
                  )
                )
              }
            )
            (C {<mv>} {<llvm>} {(DQ ($ Id.VSub_DollarName '$LLVM'))})
          ]
          spids: [173 188]
        )
      ]
      else_action: [
        (C {<echo>} {(DQ <'Reusing cached LLVM version at '> ($ Id.VSub_DollarName '$LLVM'))})
      ]
    )
    (C {<rm>} {<-rf>} {(DQ ($ Id.VSub_DollarName '$REPO')) </third_party/llvm/llvm>})
    (C {<cp>} {<-r>} {(DQ ($ Id.VSub_DollarName '$LLVM'))} 
      {(DQ ($ Id.VSub_DollarName '$REPO')) </third_party/llvm/llvm>}
    )
  ]
)