(command.CommandList
  children: [
    (C {<set>} {<-eu>})
    (C {<readonly>} 
      {<Id.Lit_VarLike 'ScriptDir='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: 
            (C {<dirname>} 
              {
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (C {<echo>} {($ Id.VSub_Number '$0')})
                          (C {<sed>} {<-e>} 
                            {
                              (DQ <'s,^'> <Id.Lit_BadBackslash '\\'> <'([^/]'> 
                                <Id.Lit_BadBackslash '\\'> <'),'> (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>})) <'/'> 
                                <Id.Lit_BadBackslash '\\'> <'1,'>
                              )
                            }
                          )
                        ]
                        negated: F
                      )
                  )
                )
              }
            )
        )
      }
    )
    (C {<readonly>} {<Id.Lit_VarLike 'ProtoRootDir='> (DQ (${ Id.VSub_Name ScriptDir) <'/../..'>)})
    (command.ShFunction
      name: printUsage
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<basename>} {(DQ (${ Id.VSub_Number 0))})
                      )
                    }
                  spids: [72]
                )
              ]
            )
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_span_id: 129
                      stdin_parts: [
                        <'usage: '>
                        (${ Id.VSub_Name NAME)
                        <' [OPTIONS]\n'>
                        <'\n'>
                        <'This script does the common build steps needed.\n'>
                        <'\n'>
                        <'OPTIONS:\n'>
                        <'\n'>
                        <' General:\n'>
                        <'\n'>
                        <'   -h, --help\n'>
                        <'         Show this message\n'>
                        <'   -c, --clean\n'>
                        <'         Issue a clean before the normal build.\n'>
                        <'   -a, --autogen\n'>
                        <'         Start by rerunning autogen & configure.\n'>
                        <'   -r, --regenerate-descriptors\n'>
                        <
'         Run generate_descriptor_proto.sh to regenerate all the checked in\n'
                        >
                        <'         proto sources.\n'>
                        <'   -j #, --jobs #\n'>
                        <
'         Force the number of parallel jobs (useful for debugging build issues).\n'
                        >
                        <'   --core-only\n'>
                        <
'         Skip some of the core protobuf build/checks to shorten the build time.\n'
                        >
                        <'   --skip-xcode\n'>
                        <
'         Skip the invoke of Xcode to test the runtime on both iOS and OS X.\n'
                        >
                        <'   --skip-xcode-ios\n'>
                        <'         Skip the invoke of Xcode to test the runtime on iOS.\n'>
                        <'   --skip-xcode-debug\n'>
                        <'         Skip the Xcode Debug configuration.\n'>
                        <'   --skip-xcode-release\n'>
                        <'         Skip the Xcode Release configuration.\n'>
                        <'   --skip-xcode-osx\n'>
                        <'         Skip the invoke of Xcode to test the runtime on OS X.\n'>
                        <'   --skip-objc-conformance\n'>
                        <'         Skip the Objective C conformance tests (run on OS X).\n'>
                        <'\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: header
      body: 
        (BraceGroup
          children: [
            (C {<echo>} {(DQ )})
            (C {<echo>} 
              {(DQ <'========================================================================'>)}
            )
            (C {<echo>} {(DQ <'    '> (${ Id.VSub_At '@'))})
            (C {<echo>} 
              {(DQ <'========================================================================'>)}
            )
          ]
        )
    )
    (command.ShFunction
      name: wrapped_make
      body: 
        (BraceGroup
          children: [
            (C {<set>} {<Id.Lit_Other '+'> <e>})
            (C {<make>} {($ Id.VSub_Star '$*')})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:MAKE_EXIT_STATUS)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [199]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name MAKE_EXIT_STATUS)} {<-ne>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'Error: \'make '> ($ Id.VSub_Star '$*') <'\' exited with status '> 
                          (${ Id.VSub_Name MAKE_EXIT_STATUS)
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {(${ Id.VSub_Name MAKE_EXIT_STATUS)}
                    )
                  ]
                  spids: [203 218]
                )
              ]
            )
            (C {<set>} {<-e>})
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:NUM_MAKE_JOBS)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: (C {<'/usr/sbin/sysctl'>} {<-n>} {<hw.ncpu>})
              )
            }
          spids: [250]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_lt
                          left: {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))}
                          right: {<2>}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:NUM_MAKE_JOBS)
                  op: assign_op.Equal
                  rhs: {<2>}
                  spids: [280]
                )
              ]
            )
          ]
          spids: [259 277]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_AUTOGEN)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [286]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_CLEAN)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [289]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REGEN_DESCRIPTORS)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [292]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CORE_ONLY)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [295]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_XCODE_IOS_TESTS)
          op: assign_op.Equal
          rhs: {<yes>}
          spids: [298]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_XCODE_OSX_TESTS)
          op: assign_op.Equal
          rhs: {<yes>}
          spids: [301]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_XCODE_DEBUG)
          op: assign_op.Equal
          rhs: {<yes>}
          spids: [304]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_XCODE_RELEASE)
          op: assign_op.Equal
          rhs: {<yes>}
          spids: [307]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:DO_OBJC_CONFORMANCE_TESTS)
          op: assign_op.Equal
          rhs: {<yes>}
          spids: [310]
        )
      ]
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_GlobNEqual
                      left: {($ Id.VSub_Pound '$#')}
                      right: {<0>}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ (${ Id.VSub_Number 1))}
              arms: [
                (case_arm
                  pat_list: [{<-h>} {<--help>}]
                  action: [
                    (C {<printUsage>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [340 346 357 -1]
                )
                (case_arm
                  pat_list: [{<-c>} {<--clean>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_CLEAN)
                          op: assign_op.Equal
                          rhs: {<yes>}
                          spids: [369]
                        )
                      ]
                    )
                  ]
                  spids: [360 366 373 -1]
                )
                (case_arm
                  pat_list: [{<-a>} {<--autogen>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_AUTOGEN)
                          op: assign_op.Equal
                          rhs: {<yes>}
                          spids: [385]
                        )
                      ]
                    )
                  ]
                  spids: [376 382 389 -1]
                )
                (case_arm
                  pat_list: [{<-r>} {<--regenerate-descriptors>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:REGEN_DESCRIPTORS)
                          op: assign_op.Equal
                          rhs: {<yes>}
                          spids: [401]
                        )
                      ]
                    )
                  ]
                  spids: [392 398 405 -1]
                )
                (case_arm
                  pat_list: [{<-j>} {<--jobs>}]
                  action: [
                    (C {<shift>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NUM_MAKE_JOBS)
                          op: assign_op.Equal
                          rhs: {(DQ (${ Id.VSub_Number 1))}
                          spids: [420]
                        )
                      ]
                    )
                  ]
                  spids: [408 414 428 -1]
                )
                (case_arm
                  pat_list: [{<--core-only>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:CORE_ONLY)
                          op: assign_op.Equal
                          rhs: {<yes>}
                          spids: [436]
                        )
                      ]
                    )
                  ]
                  spids: [431 433 440 -1]
                )
                (case_arm
                  pat_list: [{<--skip-xcode>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_XCODE_IOS_TESTS)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [448]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_XCODE_OSX_TESTS)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [452]
                        )
                      ]
                    )
                  ]
                  spids: [443 445 456 -1]
                )
                (case_arm
                  pat_list: [{<--skip-xcode-ios>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_XCODE_IOS_TESTS)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [464]
                        )
                      ]
                    )
                  ]
                  spids: [459 461 468 -1]
                )
                (case_arm
                  pat_list: [{<--skip-xcode-osx>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_XCODE_OSX_TESTS)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [476]
                        )
                      ]
                    )
                  ]
                  spids: [471 473 480 -1]
                )
                (case_arm
                  pat_list: [{<--skip-xcode-debug>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_XCODE_DEBUG)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [488]
                        )
                      ]
                    )
                  ]
                  spids: [483 485 492 -1]
                )
                (case_arm
                  pat_list: [{<--skip-xcode-release>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_XCODE_RELEASE)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [500]
                        )
                      ]
                    )
                  ]
                  spids: [495 497 504 -1]
                )
                (case_arm
                  pat_list: [{<--skip-objc-conformance>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DO_OBJC_CONFORMANCE_TESTS)
                          op: assign_op.Equal
                          rhs: {<no>}
                          spids: [512]
                        )
                      ]
                    )
                  ]
                  spids: [507 509 516 -1]
                )
                (case_arm
                  pat_list: [{<-> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'ERROR: Unknown option: '> (${ Id.VSub_Number 1))}]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<printUsage>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [519 521 545 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'ERROR: Unknown argument: '> (${ Id.VSub_Number 1))}]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (C {<printUsage>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [548 549 573 -1]
                )
              ]
            )
            (C {<shift>})
          ]
        )
    )
    (C {<cd>} {(DQ (${ Id.VSub_Name ProtoRootDir))})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.LogicalNot
                          child: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<Makefile>})
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:DO_AUTOGEN)
                  op: assign_op.Equal
                  rhs: {<yes>}
                  spids: [616]
                )
              ]
            )
          ]
          spids: [599 613]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name DO_AUTOGEN))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<header>} {(DQ <'Running autogen & configure'>)})
            (C {<'./autogen.sh'>})
            (C {<'./configure'>} 
              {<Id.Lit_VarLike 'CPPFLAGS='> 
                (DQ <'-mmacosx-version-min=10.9 -Wunused-const-variable -Wunused-function'>)
              } {<Id.Lit_VarLike 'CXXFLAGS='> (DQ <'-Wnon-virtual-dtor -Woverloaded-virtual'>)}
            )
          ]
          spids: [622 642]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name DO_CLEAN))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<header>} {(DQ <Cleaning>)})
            (C {<wrapped_make>} {<clean>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ (${ Id.VSub_Name DO_XCODE_IOS_TESTS))}
                                  right: {(DQ <yes>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:XCODEBUILD_CLEAN_BASE_IOS)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {<xcodebuild>}
                                  {<-project>}
                                  {<'objectivec/ProtocolBuffers_iOS.xcodeproj'>}
                                  {<-scheme>}
                                  {<ProtocolBuffers>}
                                ]
                              )
                            }
                          spids: [732]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {(DQ (${ Id.VSub_Name DO_XCODE_DEBUG))}
                                          right: {(DQ <yes>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name XCODEBUILD_CLEAN_BASE_IOS>
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                  )
                                )
                              } {<-configuration>} {<Debug>} {<clean>}
                            )
                          ]
                          spids: [752 772]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {(DQ (${ Id.VSub_Name DO_XCODE_RELEASE))}
                                          right: {(DQ <yes>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name XCODEBUILD_CLEAN_BASE_IOS>
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                  )
                                )
                              } {<-configuration>} {<Release>} {<clean>}
                            )
                          ]
                          spids: [794 814]
                        )
                      ]
                    )
                  ]
                  spids: [709 729]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ (${ Id.VSub_Name DO_XCODE_OSX_TESTS))}
                                  right: {(DQ <yes>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:XCODEBUILD_CLEAN_BASE_OSX)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {<xcodebuild>}
                                  {<-project>}
                                  {<'objectivec/ProtocolBuffers_OSX.xcodeproj'>}
                                  {<-scheme>}
                                  {<ProtocolBuffers>}
                                ]
                              )
                            }
                          spids: [862]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {(DQ (${ Id.VSub_Name DO_XCODE_DEBUG))}
                                          right: {(DQ <yes>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name XCODEBUILD_CLEAN_BASE_OSX>
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                  )
                                )
                              } {<-configuration>} {<Debug>} {<clean>}
                            )
                          ]
                          spids: [882 902]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.DBracket
                                      expr: 
                                        (bool_expr.Binary
                                          op_id: Id.BoolBinary_GlobDEqual
                                          left: {(DQ (${ Id.VSub_Name DO_XCODE_RELEASE))}
                                          right: {(DQ <yes>)}
                                        )
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name XCODEBUILD_CLEAN_BASE_OSX>
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                  )
                                )
                              } {<-configuration>} {<Release>} {<clean>}
                            )
                          ]
                          spids: [924 944]
                        )
                      ]
                    )
                  ]
                  spids: [839 859]
                )
              ]
            )
          ]
          spids: [674 694]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name REGEN_DESCRIPTORS))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<header>} {(DQ <'Regenerating the descriptor sources.'>)})
            (C {<'./generate_descriptor_proto.sh'>} {<-j>} {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))})
          ]
          spids: [971 991]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name CORE_ONLY))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<header>} {(DQ <'Building core Only'>)})
            (C {<wrapped_make>} {<-j>} {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))})
          ]
          spids: [1014 1034]
        )
      ]
      else_action: [
        (C {<header>} {(DQ <Building>)})
        (C {<wrapped_make>} {<-j>} {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))} {<all>})
        (C {<wrapped_make>} {<-j>} {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))} {<check>})
        (C {<cd>} {<conformance>})
        (C {<wrapped_make>} {<-j>} {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))} {<test_cpp>})
        (C {<cd>} {<..>})
      ]
    )
    (C {<'objectivec/generate_well_known_types.sh'>} {<--check-only>} {<-j>} 
      {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))}
    )
    (C {<header>} {(DQ <'Checking on the ObjC Runtime Code'>)})
    (C {<'objectivec/DevTools/pddm_tests.py'>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      children: [
                        (C {<'objectivec/DevTools/pddm.py'>} {<--dry-run>} 
                          {<'objectivec/'> <Id.Lit_Star '*'> <.> <Id.Lit_LBracket '['> <hm> 
                            <Id.Lit_RBracket ']'>
                          } {<'objectivec/Tests/'> <Id.Lit_Star '*'> <.> <Id.Lit_LBracket '['> <hm> <Id.Lit_RBracket ']'>}
                        )
                      ]
                      negated: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ )})
            (C {<echo>} {(DQ <'Update by running:'>)})
            (C {<echo>} 
              {(DQ <'   objectivec/DevTools/pddm.py objectivec/*.[hm] objectivec/Tests/*.[hm]'>)}
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [1151 1175]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name DO_XCODE_IOS_TESTS))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:XCODEBUILD_TEST_BASE_IOS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {<xcodebuild>}
                          {<-project>}
                          {<'objectivec/ProtocolBuffers_iOS.xcodeproj'>}
                          {<-scheme>}
                          {<ProtocolBuffers>}
                        ]
                      )
                    }
                  spids: [1228]
                )
              ]
            )
            (C {<readonly>} 
              {<Id.Lit_VarLike 'XCODE_VERSION_LINE='> 
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (C {<xcodebuild>} {<-version>})
                          (C {<grep>} 
                            {<Xcode> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\ '>)}
                          )
                        ]
                        negated: F
                      )
                  )
                )
              }
            )
            (C {<readonly>} 
              {<Id.Lit_VarLike 'XCODE_VERSION='> 
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name XCODE_VERSION_LINE>
                    suffix_op: 
                      (suffix_op.PatSub
                        pat: {<'Xcode '>}
                        replace: {}
                        replace_mode: Id.Undefined_Tok
                      )
                  )
                )
              }
            )
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name XCODE_VERSION))}
              arms: [
                (case_arm
                  pat_list: [{<6.> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ 
                            <
'ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher.'
                            >
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<10>}
                    )
                  ]
                  spids: [1307 1310 1328 -1]
                )
                (case_arm
                  pat_list: [{<7.> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'ERROR: The unittests include Swift code that is now Swift 3.0.'>)}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ 
                            <
'ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x.'
                            >
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<11>}
                    )
                  ]
                  spids: [1331 1334 1362 -1]
                )
                (case_arm
                  pat_list: [{<8.0> <Id.Lit_Star '*'>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:XCODEBUILD_TEST_BASE_IOS)
                          op: assign_op.PlusEqual
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [
                                  {<-destination>}
                                  {(DQ <'platform=iOS Simulator,name=iPhone 4s,OS=9.0'>)}
                                  {<-destination>}
                                  {(DQ <'platform=iOS Simulator,name=iPhone 7,OS=10.0'>)}
                                  {<-destination>}
                                  {(DQ <'platform=iOS Simulator,name=iPad 2,OS=9.0'>)}
                                  {<-destination>}
                                  {(DQ <'platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0'>)}
                                ]
                              )
                            }
                          spids: [1375]
                        )
                      ]
                    )
                  ]
                  spids: [1365 1368 1422 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'Time to update the simulator targets for Xcode '> 
                          (${ Id.VSub_Name XCODE_VERSION)
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<2>}
                    )
                  ]
                  spids: [1425 1427 1445 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ (${ Id.VSub_Name DO_XCODE_DEBUG))}
                                  right: {(DQ <yes>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<header>} {(DQ <'Doing Xcode iOS build/tests - Debug'>)})
                    (C 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name XCODEBUILD_TEST_BASE_IOS>
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                          )
                        )
                      } {<-configuration>} {<Debug>} {<test>}
                    )
                  ]
                  spids: [1451 1471]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ (${ Id.VSub_Name DO_XCODE_RELEASE))}
                                  right: {(DQ <yes>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<header>} {(DQ <'Doing Xcode iOS build/tests - Release'>)})
                    (C 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name XCODEBUILD_TEST_BASE_IOS>
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                          )
                        )
                      } {<-configuration>} {<Release>} {<test>}
                    )
                  ]
                  spids: [1500 1520]
                )
              ]
            )
            (C {<killall>} {<Simulator>})
          ]
          spids: [1205 1225]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name DO_XCODE_OSX_TESTS))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:XCODEBUILD_TEST_BASE_OSX)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {<xcodebuild>}
                          {<-project>}
                          {<'objectivec/ProtocolBuffers_OSX.xcodeproj'>}
                          {<-scheme>}
                          {<ProtocolBuffers>}
                          {<-destination>}
                          {(DQ <'platform=OS X,arch=x86_64'>)}
                        ]
                      )
                    }
                  spids: [1582]
                )
              ]
            )
            (C {<readonly>} 
              {<Id.Lit_VarLike 'XCODE_VERSION_LINE='> 
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (C {<xcodebuild>} {<-version>})
                          (C {<grep>} 
                            {<Xcode> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\ '>)}
                          )
                        ]
                        negated: F
                      )
                  )
                )
              }
            )
            (C {<readonly>} 
              {<Id.Lit_VarLike 'XCODE_VERSION='> 
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name XCODE_VERSION_LINE>
                    suffix_op: 
                      (suffix_op.PatSub
                        pat: {<'Xcode '>}
                        replace: {}
                        replace_mode: Id.Undefined_Tok
                      )
                  )
                )
              }
            )
            (command.Case
              to_match: {(DQ (${ Id.VSub_Name XCODE_VERSION))}
              arms: [
                (case_arm
                  pat_list: [{<6.> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ 
                            <
'ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher.'
                            >
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<10>}
                    )
                  ]
                  spids: [1663 1666 1684 -1]
                )
                (case_arm
                  pat_list: [{<7.> <Id.Lit_Star '*'>}]
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'ERROR: The unittests include Swift code that is now Swift 3.0.'>)}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ 
                            <
'ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x.'
                            >
                          )
                        }
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_GreatAnd '1>&'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<2>}
                        )
                      ]
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<11>}
                    )
                  ]
                  spids: [1687 1690 1718 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ (${ Id.VSub_Name DO_XCODE_DEBUG))}
                                  right: {(DQ <yes>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<header>} {(DQ <'Doing Xcode OS X build/tests - Debug'>)})
                    (C 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name XCODEBUILD_TEST_BASE_OSX>
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                          )
                        )
                      } {<-configuration>} {<Debug>} {<test>}
                    )
                  ]
                  spids: [1724 1744]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ (${ Id.VSub_Name DO_XCODE_RELEASE))}
                                  right: {(DQ <yes>)}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<header>} {(DQ <'Doing Xcode OS X build/tests - Release'>)})
                    (C 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name XCODEBUILD_TEST_BASE_OSX>
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                          )
                        )
                      } {<-configuration>} {<Release>} {<test>}
                    )
                  ]
                  spids: [1773 1793]
                )
              ]
            )
          ]
          spids: [1559 1579]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobDEqual
                          left: {(DQ (${ Id.VSub_Name DO_OBJC_CONFORMANCE_TESTS))}
                          right: {(DQ <yes>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<header>} {(DQ <'Running ObjC Conformance Tests'>)})
            (C {<cd>} {<conformance>})
            (C {<wrapped_make>} {<-j>} {(DQ (${ Id.VSub_Name NUM_MAKE_JOBS))} {<test_objc>})
            (C {<cd>} {<..>})
          ]
          spids: [1824 1844]
        )
      ]
    )
  ]
)