(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(1)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 40
                  stdin_parts: [
                    ('Usage: ')
                    ($ VSub_Number '$0')
                    (' <VERSION_NUMBER>\n')
                    ('\n')
                    ('Example:\n')
                    ('  ')
                    (Lit_Other '$')
                    (' ')
                    ($ VSub_Number '$0')
                    (' 3.0.0\n')
                    ('\n')
                    (
'This script will download pre-built protoc binaries from maven repository and\n'
                    )
                    (
'create the Google.Protobuf.Tools package. Well-known type .proto files will also\n'
                    )
                    ('be included.\n')
                  ]
                )
              ]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 17]
        )
      ]
      spids: [16777215 46]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:VERSION_NUMBER)
          op: Equal
          rhs: {($ VSub_Number '$1')}
          spids: [49]
        )
      ]
      spids: [49]
    )
    (Assignment
      keyword: Assign_Declare
      flags: [-a]
      pairs: [
        (assign_pair
          lhs: (LhsName name:FILE_NAMES)
          op: Equal
          rhs: 
            {
              (ArrayLiteralPart
                words: [
                  {(windows_x86)}
                  {(windows-x86_32.exe)}
                  {(windows_x64)}
                  {(windows-x86_64.exe)}
                  {(macosx_x86)}
                  {(osx-x86_32.exe)}
                  {(macosx_x64)}
                  {(osx-x86_64.exe)}
                  {(linux_x86)}
                  {(linux-x86_32.exe)}
                  {(linux_x64)}
                  {(linux-x86_64.exe)}
                ]
              )
            }
          spids: [59]
        )
      ]
      spids: [55]
    )
    (C {(set)} {(-e)})
    (C {(mkdir)} {(-p)} {(protoc)})
    (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: [124 130]
                  )
                }
            )
        )
      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:DIR_NAME)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name FILE_NAMES>
                        bracket_op: (ArrayIndex expr:(ArithWord w:{($ VSub_Name '$i')}))
                        spids: [142 147]
                      )
                    }
                  spids: [141]
                )
              ]
              spids: [141]
            )
            (C {(mkdir)} {(-p)} {(protoc/) ($ VSub_Name '$DIR_NAME')})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} 
                          {
                            (BracedVarSub
                              token: <VSub_Name DIR_NAME>
                              suffix_op: 
                                (Slice
                                  begin: (ArithWord w:{(Lit_Digits 0)})
                                  length: (ArithWord w:{(Lit_Digits 3)})
                                )
                              spids: [163 169]
                            )
                          } {(Lit_Other '=')} {(DQ (win))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:TARGET_BINARY)
                          op: Equal
                          rhs: {(DQ (protoc.exe))}
                          spids: [183]
                        )
                      ]
                      spids: [183]
                    )
                  ]
                  spids: [16777215 180]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:TARGET_BINARY)
                      op: Equal
                      rhs: {(DQ (protoc))}
                      spids: [192]
                    )
                  ]
                  spids: [192]
                )
              ]
              spids: [189 198]
            )
            (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: [206 211]
                                    )
                                  }
                              )
                          )
                        spids: [203 213]
                      )
                    }
                  spids: [202]
                )
              ]
              spids: [202]
            )
            (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/protoc/) 
                      (${ VSub_Name VERSION_NUMBER) (/protoc-) (${ VSub_Name VERSION_NUMBER) (-) (${ VSub_Name BINARY_NAME)
                    }
                  spids: [216]
                )
              ]
              spids: [216]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [
                                {(wget)}
                                {(${ VSub_Name BINARY_URL)}
                                {(-O)}
                                {(protoc/) ($ VSub_Name '$DIR_NAME') (/) 
                                  ($ VSub_Name '$TARGET_BINARY')
                                }
                              ]
                              redirects: [
                                (Redir
                                  op: <Redir_AndGreat '&>'>
                                  fd: 16777215
                                  arg_word: {(/dev/null)}
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(DQ ('[ERROR] Failed to download ') (${ VSub_Name BINARY_URL))}]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('[ERROR] Skipped ') ($ VSub_Name '$protoc') (-) 
                            (${ VSub_Name VERSION_NAME) (-) (${ VSub_Name DIR_NAME)
                          )
                        }
                      ]
                      redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                  spids: [16777215 256]
                )
              ]
              spids: [16777215 294]
            )
          ]
          spids: [138 296]
        )
    )
    (C {(nuget)} {(pack)} {(Google.Protobuf.Tools.nuspec)})
  ]
)