(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(2)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: -1
                  body: 
                    {
                      (DQ ('Usage: ') ($ VSub_Number '$0') (' <TARGET> <VERSION_NUMBER>\n') ('\n') 
                        ('TARGET: protoc | protoc-gen-javalite\n') ('\n') ('Example:\n') ('  ') (Lit_Other '$') (' ') ($ VSub_Number '$0') (' protoc 3.0.0\n') ('  ') 
                        (Lit_Other '$') (' ') ($ VSub_Number '$0') (' protoc-gen-javalite 3.0.0\n') ('\n') 
                        (
'This script will download pre-built protoc or protoc plugin binaries from maven\n'
                        ) ('repository and create .zip packages suitable to be included in the github\n') 
                        (
'release page. If the target is protoc, well-known type .proto files will also be\n'
                        ) ('included. Each invocation will create 5 zip packages:\n') 
                        ('  dist/<TARGET>-<VERSION_NUMBER>-win32.zip\n') ('  dist/<TARGET>-<VERSION_NUMBER>-osx-x86_32.zip\n') 
                        ('  dist/<TARGET>-<VERSION_NUMBER>-osx-x86_64.zip\n') ('  dist/<TARGET>-<VERSION_NUMBER>-linux-x86_32.zip\n') 
                        ('  dist/<TARGET>-<VERSION_NUMBER>-linux-x86_64.zip\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [22]
                )
              ]
            )
            (C {(exit)} {(1)})
          ]
          spids: [-1 17]
        )
      ]
      spids: [-1 58]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:TARGET) op:Equal rhs:{($ VSub_Number '$1')} spids:[61])]
      spids: [61]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:VERSION_NUMBER)
          op: Equal
          rhs: {($ VSub_Number '$2')}
          spids: [64]
        )
      ]
      spids: [64]
    )
    (Assignment
      keyword: Assign_Declare
      flags: ["'-a'"]
      pairs: [
        (assign_pair
          lhs: (LhsName name:FILE_NAMES)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {(win32.zip)}
                  {(windows-x86_32.exe)}
                  {(osx-x86_32.zip)}
                  {(osx-x86_32.exe)}
                  {(osx-x86_64.zip)}
                  {(osx-x86_64.exe)}
                  {(linux-x86_32.zip)}
                  {(linux-x86_32.exe)}
                  {(linux-x86_64.zip)}
                  {(linux-x86_64.exe)}
                ]
              )
            }
          spids: [75]
        )
      ]
      spids: [71]
    )
    (Assignment
      keyword: Assign_Declare
      flags: ["'-a'"]
      pairs: [
        (assign_pair
          lhs: (LhsName name:WELL_KNOWN_TYPES)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {(google/protobuf/descriptor.proto)}
                  {(google/protobuf/any.proto)}
                  {(google/protobuf/api.proto)}
                  {(google/protobuf/duration.proto)}
                  {(google/protobuf/empty.proto)}
                  {(google/protobuf/field_mask.proto)}
                  {(google/protobuf/source_context.proto)}
                  {(google/protobuf/struct.proto)}
                  {(google/protobuf/timestamp.proto)}
                  {(google/protobuf/type.proto)}
                  {(google/protobuf/wrappers.proto)}
                  {(google/protobuf/compiler/plugin.proto)}
                ]
              )
            }
          spids: [119]
        )
      ]
      spids: [115]
    )
    (C {(set)} {(-e)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:DIR)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: (CommandList children:[(C {(mktemp)} {(-d)})])
                left_token: <Left_CommandSub '$('>
                spids: [183 187]
              )
            }
          spids: [182]
        )
      ]
      spids: [182]
    )
    (C {(mkdir)} {(-p)} {(${ VSub_Name DIR) (/include/google/protobuf/compiler)})
    (ForEach
      iter_name: PROTO
      iter_words: [
        {
          (BracedVarSub
            token: <VSub_Name WELL_KNOWN_TYPES>
            bracket_op: (WholeArray op_id:Lit_At)
            spids: [208 213]
          )
        }
      ]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [
            (C {(cp)} {(-f)} {(../src/) (${ VSub_Name PROTO)} 
              {(${ VSub_Name DIR) (/include/) (${ VSub_Name PROTO)}
            )
          ]
          spids: [216 236]
        )
      spids: [207 214]
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (HereDoc
          op_id: Redir_DLess
          fd: -1
          body: 
            {
              (DQ ("Protocol Buffers - Google's data interchange format\n") 
                ('Copyright 2008 Google Inc.\n') ('https://developers.google.com/protocol-buffers/\n') ('\n') 
                ('This package contains a precompiled binary version of the protocol buffer\n') ('compiler (protoc). This binary is intended for users who want to use Protocol\n') 
                ('Buffers in languages other than C++ but do not want to compile protoc\n') ('themselves. To install, simply place this binary somewhere in your PATH.\n') ('\n') 
                ('Please refer to our official github site for more installation instructions:\n') ('  https://github.com/google/protobuf\n')
              )
            }
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [244]
        )
        (Redir
          op_id: Redir_Great
          fd: -1
          arg_word: {(${ VSub_Name DIR) (/readme.txt)}
          spids: [247]
        )
      ]
    )
    (C {(mkdir)} {(-p)} {(dist)})
    (C {(mkdir)} {(-p)} {(${ VSub_Name DIR) (/bin)})
    (ForExpr
      init: (BinaryAssign op_id:Arith_Equal left:(LhsName name:i) right:(ArithWord w:{(Lit_Digits 0)}))
      cond: 
        (ArithBinary
          op_id: Arith_Less
          left: (ArithVarRef name:i)
          right: 
            (ArithWord
              w: 
                {
                  (BracedVarSub
                    token: <VSub_Name FILE_NAMES>
                    prefix_op: VSub_Pound
                    bracket_op: (WholeArray op_id:Lit_At)
                    spids: [293 299]
                  )
                }
            )
        )
      update: 
        (BinaryAssign
          op_id: Arith_PlusEqual
          left: (LhsName name:i)
          right: (ArithWord w:{(Lit_Digits 2)})
        )
      body: 
        (DoGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ZIP_NAME)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name FILE_NAMES>
                        bracket_op: (ArrayIndex expr:(ArithWord w:{($ VSub_Name '$i')}))
                        spids: [311 316]
                      )
                    }
                  spids: [310]
                )
              ]
              spids: [310]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} 
                          {
                            (BracedVarSub
                              token: <VSub_Name ZIP_NAME>
                              suffix_op: 
                                (Slice
                                  begin: (ArithWord w:{(Lit_Digits 0)})
                                  length: (ArithWord w:{(Lit_Digits 3)})
                                )
                              spids: [323 329]
                            )
                          } {(Lit_Other '=')} {(DQ (win))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:BINARY)
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$TARGET') (.exe))}
                          spids: [343]
                        )
                      ]
                      spids: [343]
                    )
                  ]
                  spids: [-1 340]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:BINARY)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name '$TARGET'))}
                      spids: [353]
                    )
                  ]
                  spids: [353]
                )
              ]
              spids: [350 359]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BINARY_NAME)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name FILE_NAMES>
                        bracket_op: 
                          (ArrayIndex
                            expr: 
                              (ArithWord
                                w: 
                                  {
                                    (ArithSubPart
                                      anode: 
                                        (ArithBinary
                                          op_id: Arith_Plus
                                          left: (ArithWord w:{($ VSub_Name '$i')})
                                          right: (ArithWord w:{(Lit_Digits 1)})
                                        )
                                      spids: [366 371]
                                    )
                                  }
                              )
                          )
                        spids: [363 373]
                      )
                    }
                  spids: [362]
                )
              ]
              spids: [362]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BINARY_URL)
                  op: Equal
                  rhs: 
                    {(http) (Lit_Other ':') (//repo1.maven.org/maven2/com/google/protobuf/) 
                      ($ VSub_Name '$TARGET') (/) (${ VSub_Name VERSION_NUMBER) (/) ($ VSub_Name '$TARGET') (-) (${ VSub_Name VERSION_NUMBER) (-) 
                      (${ VSub_Name BINARY_NAME)
                    }
                  spids: [376]
                )
              ]
              spids: [376]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (C {(wget)} {(${ VSub_Name BINARY_URL)} {(-O)} 
                              {(${ VSub_Name DIR) (/bin/) ($ VSub_Name '$BINARY')}
                            )
                          ]
                          negated: True
                        )
                      terminator: <Op_Amp '&'>
                    )
                    (Sentence
                      child: 
                        (SimpleCommand
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(/dev/null)}
                              spids: [416]
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ('[ERROR] Failed to download ') (${ VSub_Name BINARY_URL))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[433])]
                    )
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('[ERROR] Skipped ') ($ VSub_Name '$TARGET') (-) 
                            (${ VSub_Name VERSION_NAME) (-) (${ VSub_Name ZIP_NAME)
                          )
                        }
                      ]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[452])]
                    )
                    (ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                  spids: [-1 421]
                )
              ]
              spids: [-1 459]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TARGET_ZIP_FILE)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(pwd)})])
                        left_token: <Left_Backtick '`'>
                        spids: [463 465]
                      ) (/dist/) ($ VSub_Name '$TARGET') (-) (${ VSub_Name VERSION_NUMBER) (-) (${ VSub_Name ZIP_NAME)
                    }
                  spids: [462]
                )
              ]
              spids: [462]
            )
            (Sentence child:(C {(pushd)} {($ VSub_Name '$DIR')}) terminator:<Op_Amp '&'>)
            (SimpleCommand
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[483])]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} {(bin/) ($ VSub_Name '$BINARY')})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$TARGET'))} {(Lit_Other '=')} 
                          {(DQ (protoc))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Sentence
                      child: 
                        (C {(zip)} {(-r)} {(${ VSub_Name TARGET_ZIP_FILE)} {(include)} {(bin)} 
                          {(readme.txt)}
                        )
                      terminator: <Op_Amp '&'>
                    )
                    (SimpleCommand
                      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[532])]
                    )
                  ]
                  spids: [-1 514]
                )
              ]
              else_action: [
                (Sentence
                  child: (C {(zip)} {(-r)} {(${ VSub_Name TARGET_ZIP_FILE)} {(bin)})
                  terminator: <Op_Amp '&'>
                )
                (SimpleCommand
                  redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[551])]
                )
              ]
              spids: [537 556]
            )
            (C {(rm)} {(bin/) ($ VSub_Name '$BINARY')})
            (Sentence child:(C {(popd)}) terminator:<Op_Amp '&'>)
            (SimpleCommand
              redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[568])]
            )
            (C {(echo)} {(DQ ('[INFO] Successfully created ') (${ VSub_Name TARGET_ZIP_FILE))})
          ]
          spids: [307 582]
        )
    )
  ]
)