(command.CommandList
  children: [
    (C {<set>} {<-C>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: {(DQ <'/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin'>)}
          spids: [99]
        )
      ]
    )
    (C {<export>} {<PATH>})
    (command.ShFunction
      name: usage
      body: 
        (BraceGroup
          children: [
            (C {<echo>} {(DQ <'Usage:'>)})
            (C {<echo>} {<-n>} 
              {
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: (C {<basename>} {(${ Id.VSub_Number 0)})
                  ) <' [-rNNNNNN]'>
                )
              }
            )
            (C {<echo>} {(DQ <' [-l /path/for/output] /path/to/branch'>)})
            (C {<echo>} {(DQ <' -r: The oldest commit to include in the search'>)})
            (C {<echo>} {(DQ )})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: main
      body: 
        (BraceGroup
          children: [
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: (C {<getopts>} {(DQ <'l:r:'>)} {<arg>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(${ Id.VSub_Name arg)}
                      arms: [
                        (case_arm
                          pat_list: [{<l>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:where)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name OPTARG>
                                          suffix_op: 
                                            (suffix_op.Unary
                                              tok: <Id.VOp1_DPound '##'>
                                              arg_word: {<-r> <Id.Lit_Other '*'>}
                                            )
                                        )
                                      )
                                    }
                                  spids: [213]
                                )
                              ]
                            )
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name where))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                                (C {<usage>})
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                                              {(DQ (${ Id.VSub_Name where))} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} {(DQ <'Log file already exists:'>)})
                                    (C {<echo>} {(DQ <'  ('> (${ Id.VSub_Name where) <')'>)})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<2>}
                                    )
                                  ]
                                  spids: [241 256]
                                )
                              ]
                            )
                          ]
                          spids: [197 198 285 -1]
                        )
                        (case_arm
                          pat_list: [{<r>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:rev)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name OPTARG>
                                          suffix_op: 
                                            (suffix_op.Unary
                                              tok: <Id.VOp1_DPound '##'>
                                              arg_word: {<-r>}
                                            )
                                        )
                                      )
                                    }
                                  spids: [292]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:c)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_DollarParen '$('>
                                        child: 
                                          (command.Pipeline
                                            children: [
                                              (C {<echo>} {<-n>} {(${ Id.VSub_Name rev)})
                                              (C {<tr>} {<-d>} {(SQ <0-9>)})
                                              (C {<wc>} {<-c>})
                                            ]
                                            negated: F
                                          )
                                      )
                                    }
                                  spids: [302]
                                )
                              ]
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name c)} {<-ne>} 
                                              {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} {(DQ <'Revision number must be numeric.'>)})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<2>}
                                    )
                                  ]
                                  spids: [330 345]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:rev)
                                  op: assign_op.Equal
                                  rhs: {(DQ <-r> (${ Id.VSub_Name rev) <':rHEAD'>)}
                                  spids: [375]
                                )
                              ]
                            )
                          ]
                          spids: [288 289 385 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [(C {<usage>})]
                          spids: [388 389 395 -1]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {<shift>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Minus
                      left: {(${ Id.VSub_Name OPTIND)}
                      right: {<Id.Lit_Digits 1>}
                    )
                )
              }
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Pound '$#'))} {<-ne>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
                (C {<usage>})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name where))} {<Id.Lit_RBracket ']'>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:where)
                      op: assign_op.Equal
                      rhs: {<'/dev/stdout'>}
                      spids: [469]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:svn)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [474]
                )
              ]
            )
            (command.ForEach
              iter_name: s
              iter_words: [{<'/usr/bin'>} {<'/usr/local/bin'>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-x>} {(${ Id.VSub_Name s) <'/svn'>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:svn)
                                  op: assign_op.Equal
                                  rhs: {(${ Id.VSub_Name s) <'/svn'>}
                                  spids: [512]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Break break>
                            )
                          ]
                          spids: [495 509]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<-x>} {(${ Id.VSub_Name s) <'/svnlite'>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:svn)
                                  op: assign_op.Equal
                                  rhs: {(${ Id.VSub_Name s) <'/svnlite'>}
                                  spids: [542]
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Break break>
                            )
                          ]
                          spids: [525 539]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name svn))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'svn(1) binary not found.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<2>}
                    )
                  ]
                  spids: [562 577]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<1>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Cannot specify more than one working path.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<2>}
                    )
                  ]
                  spids: [607 620]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} 
                              {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Specified path ('> (${ Id.VSub_Number 1) <') is not a directory.'>)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<2>}
                    )
                  ]
                  spids: [642 659]
                )
              ]
            )
            (command.Simple
              words: [{(${ Id.VSub_Name svn)} {<info>} {(${ Id.VSub_Number 1)}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'/dev/null'>}
                )
                (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_QMark '$?'))} {<-ne>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {
                        (DQ <'Cannot determine svn repository information for '> (${ Id.VSub_Number 1))
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<2>}
                    )
                  ]
                  spids: [702 717]
                )
              ]
            )
            (command.Simple
              words: [
                {(${ Id.VSub_Name svn)}
                {<log>}
                {(${ Id.VSub_Name rev)}
                {<--search>}
                {(SQ <'Relnotes:*[A-Za-z0-9]*'>)}
                {(${ Id.VSub_Number 1)}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name where)}
                )
              ]
              do_fork: T
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {($ Id.VSub_QMark '$?')}
            )
          ]
        )
    )
    (C {<main>} {(DQ (${ Id.VSub_At '@'))})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{($ Id.VSub_QMark '$?')})
  ]
)