(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(test)} {(Id.KW_Bang '!')} {(-e)} {(src/google/protobuf/stubs/common.h)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:41)
            )
          ]
          action: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:48)
                  fd: -1
                  arg_word: {(2)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:51)
                  fd: -1
                  here_begin: {(__EOF__)}
                  here_end_span_id: 58
                  stdin_parts: [
                    (
'Could not find source code.  Make sure you are running this script from the\n'
                    )
                    ('root of the distribution tree.\n')
                  ]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:60)
              arg_word: {(1)}
            )
          ]
          spids: [32 43]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(test)} {(Id.KW_Bang '!')} {(-e)} {(src/Makefile)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:76)
            )
          ]
          action: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:83)
                  fd: -1
                  arg_word: {(2)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:86)
                  fd: -1
                  here_begin: {(__EOF__)}
                  here_end_span_id: 93
                  stdin_parts: [
                    ('Could not find src/Makefile.  You must run ./configure (and perhaps\n')
                    ('./autogen.sh) first.\n')
                  ]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:95)
              arg_word: {(1)}
            )
          ]
          spids: [67 78]
        )
      ]
    )
    (C {(cd)} {(src)})
    (C {(declare)} {(-a)} 
      {(Id.Lit_VarLike 'RUNTIME_PROTO_FILES=') 
        (sh_array_literal
          left: (Token id:Id.Op_LParen val:'(' span_id:112)
          words: [
            {(google/protobuf/any.proto)}
            {(google/protobuf/api.proto)}
            {(google/protobuf/descriptor.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)}
          ]
        )
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CORE_PROTO_IS_CORRECT)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [159]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PROCESS_ROUND)
          op: assign_op.Equal
          rhs: {(1)}
          spids: [162]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TMP)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:166)
                command_list: (command.CommandList children:[(C {(mktemp)} {(-d)})])
              )
            }
          spids: [165]
        )
      ]
    )
    (C {(echo)} {(DQ ('Updating descriptor protos...'))})
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:178)
      cond: [
        (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$CORE_PROTO_IS_CORRECT')} {(-ne)} {(1)} 
          {(Id.Lit_RBracket ']')}
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (C {(echo)} {(DQ ('Round ') ($ Id.VSub_DollarName '$PROCESS_ROUND'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CORE_PROTO_IS_CORRECT)
                  op: assign_op.Equal
                  rhs: {(1)}
                  spids: [201]
                )
              ]
            )
            (C {(make)} {($ Id.VSub_At '$@')} {(protoc)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:222)
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('Failed to build protoc.'))})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:234)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [213 224]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(./protoc)} 
                  {(--cpp_out) (Id.Lit_Equals '=') (Id.Lit_VarLike 'dllexport_decl=') 
                    (LIBPROTOBUF_EXPORT) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$TMP')
                  } 
                  {
                    (braced_var_sub
                      token: (Token id:Id.VSub_Name val:RUNTIME_PROTO_FILES span_id:253)
                      bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                    )
                  }
                )
                (C {(./protoc)} 
                  {(--cpp_out) (Id.Lit_Equals '=') (Id.Lit_VarLike 'dllexport_decl=') 
                    (LIBPROTOC_EXPORT) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$TMP')
                  } {(google/protobuf/compiler/plugin.proto)}
                )
              ]
            )
            (command.ForEach
              iter_name: PROTO_FILE
              iter_words: [
                {
                  (braced_var_sub
                    token: (Token id:Id.VSub_Name val:RUNTIME_PROTO_FILES span_id:283)
                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:BASE_NAME)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: (Token id:Id.VSub_Name val:PROTO_FILE span_id:295)
                                suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{('.*')})
                              )
                            }
                          spids: [293]
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {(diff)}
                        {(${ Id.VSub_Name BASE_NAME) (.pb.h)}
                        {($ Id.VSub_DollarName '$TMP') (/) (${ Id.VSub_Name BASE_NAME) (.pb.h)}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:315)
                          fd: -1
                          arg_word: {(/dev/null)}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: (C {(test)} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:329)
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:CORE_PROTO_IS_CORRECT)
                                  op: assign_op.Equal
                                  rhs: {(0)}
                                  spids: [334]
                                )
                              ]
                            )
                          ]
                          spids: [320 331]
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {(diff)}
                        {(${ Id.VSub_Name BASE_NAME) (.pb.cc)}
                        {($ Id.VSub_DollarName '$TMP') (/) (${ Id.VSub_Name BASE_NAME) (.pb.cc)}
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'>' span_id:355)
                          fd: -1
                          arg_word: {(/dev/null)}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: (C {(test)} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)})
                              terminator: (Token id:Id.Op_Semi val:';' span_id:369)
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:CORE_PROTO_IS_CORRECT)
                                  op: assign_op.Equal
                                  rhs: {(0)}
                                  spids: [374]
                                )
                              ]
                            )
                          ]
                          spids: [360 371]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.Simple
              words: [
                {(diff)}
                {(google/protobuf/compiler/plugin.pb.h)}
                {($ Id.VSub_DollarName '$TMP') (/google/protobuf/compiler/plugin.pb.h)}
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:392)
                  fd: -1
                  arg_word: {(/dev/null)}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:406)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CORE_PROTO_IS_CORRECT)
                          op: assign_op.Equal
                          rhs: {(0)}
                          spids: [411]
                        )
                      ]
                    )
                  ]
                  spids: [397 408]
                )
              ]
            )
            (command.Simple
              words: [
                {(diff)}
                {(google/protobuf/compiler/plugin.pb.cc)}
                {($ Id.VSub_DollarName '$TMP') (/google/protobuf/compiler/plugin.pb.cc)}
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:425)
                  fd: -1
                  arg_word: {(/dev/null)}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:439)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CORE_PROTO_IS_CORRECT)
                          op: assign_op.Equal
                          rhs: {(0)}
                          spids: [444]
                        )
                      ]
                    )
                  ]
                  spids: [430 441]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$CORE_PROTO_IS_CORRECT')} 
                          {(-ne)} {(1)} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:471)
                    )
                  ]
                  action: [
                    (command.ForEach
                      iter_name: PROTO_FILE
                      iter_words: [
                        {
                          (braced_var_sub
                            token: (Token id:Id.VSub_Name val:RUNTIME_PROTO_FILES span_id:483)
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                          )
                        }
                      ]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:BASE_NAME)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Name val:PROTO_FILE span_id:495)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Percent
                                            arg_word: {('.*')}
                                          )
                                      )
                                    }
                                  spids: [493]
                                )
                              ]
                            )
                            (C {(mv)} 
                              {($ Id.VSub_DollarName '$TMP') (/) (${ Id.VSub_Name BASE_NAME) (.pb.h)} {(${ Id.VSub_Name BASE_NAME) (.pb.h)}
                            )
                            (C {(mv)} 
                              {($ Id.VSub_DollarName '$TMP') (/) (${ Id.VSub_Name BASE_NAME) (.pb.cc)} {(${ Id.VSub_Name BASE_NAME) (.pb.cc)}
                            )
                          ]
                        )
                    )
                    (C {(mv)} 
                      {($ Id.VSub_DollarName '$TMP') (/google/protobuf/compiler/plugin.pb.) 
                        (Id.Lit_Star '*')
                      } {(google/protobuf/compiler/)}
                    )
                  ]
                  spids: [460 473]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:PROCESS_ROUND)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: 
                              (arith_expr.VarRef
                                token: (Token id:Id.Lit_ArithVarLike val:PROCESS_ROUND span_id:549)
                              )
                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                          )
                      )
                    }
                  spids: [547]
                )
              ]
            )
          ]
        )
    )
    (C {(cd)} {(..)})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(test)} {(-x)} {(objectivec/generate_well_known_types.sh)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:571)
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Generating messages for objc.'))})
            (C {(objectivec/generate_well_known_types.sh)} {($ Id.VSub_At '$@')})
          ]
          spids: [564 573]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(test)} {(-x)} {(csharp/generate_protos.sh)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:597)
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Generating messages for C#.'))})
            (C {(csharp/generate_protos.sh)} {($ Id.VSub_At '$@')})
          ]
          spids: [590 599]
        )
      ]
    )
  ]
)