(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:curlhdr)
          op: assign_op.Equal
          rhs: {(DQ <'Accept: application/vnd.travis-ci.2+json'>)}
          spids: [7]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:endpoint)
          op: assign_op.Equal
          rhs: {(DQ <'https://api.travis-ci.org/repos/'> ($ Id.VSub_DollarName '$TRAVIS_REPO_SLUG'))}
          spids: [12]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$TRAVIS_PULL_REQUEST'))} 
                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <false>)} {<Id.Lit_RBracket ']'>}
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:newestbuildforthisPR)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<curl>} {<-H>} {(DQ ($ Id.VSub_DollarName '$curlhdr'))} 
                                {($ Id.VSub_DollarName '$endpoint') <'/builds'> <Id.Lit_QMark '?'> 
                                  <Id.Lit_VarLike 'event_type='> <pull_request>
                                }
                              )
                              (C {<jq>} 
                                {
                                  (DQ <'.builds | map(select(.pull_request_number == '> 
                                    ($ Id.VSub_DollarName '$TRAVIS_PULL_REQUEST') <'))[0].number'>
                                  )
                                }
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [43]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$newestbuildforthisPR')} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<null>} {<-a>} {($ Id.VSub_DollarName '$newestbuildforthisPR')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                          {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                            ($ Id.VSub_DollarName '$TRAVIS_BUILD_NUMBER') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                          } {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} 
                      {(DQ <'There are newer queued builds for this pull request, failing early.'>)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [73 98]
                )
              ]
            )
          ]
          spids: [22 40]
        )
      ]
      else_action: [
        (command.Case
          to_match: {($ Id.VSub_DollarName '$TRAVIS_BRANCH')}
          arms: [
            (case_arm
              pat_list: [{<master>} {<release> <Id.Lit_Star '*'>}]
              spids: [129 135 138 -1]
            )
            (case_arm
              pat_list: [{<Id.Lit_Star '*'>}]
              action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} 
                              {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                                ($ Id.VSub_DollarName '$TRAVIS_BUILD_NUMBER') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                              } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} 
                              {
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {<curl>} {<-H>} {(DQ ($ Id.VSub_DollarName '$curlhdr'))} 
                                          {($ Id.VSub_DollarName '$endpoint') <'/branches/'> 
                                            ($ Id.VSub_DollarName '$TRAVIS_BRANCH')
                                          }
                                        )
                                        (C {<jq>} {(DQ <.branch.number>)})
                                      ]
                                      negated: F
                                    )
                                )
                              } {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (C {<echo>} 
                          {(DQ <'There are newer queued builds for this branch, failing early.'>)}
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [145 183]
                    )
                  ]
                )
              ]
              spids: [141 142 201 -1]
            )
          ]
        )
      ]
    )
  ]
)