(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:locatedb)
          op: assign_op.Equal
          rhs: {(DQ <'/var/locate.db'>)}
          spids: [17]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:slocatedb)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$HOME') <'/.slocatedb'>)}
          spids: [22]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} 
                      {($ Id.VSub_DollarName '$slocatedb')} {<-o>} {(DQ ($ Id.VSub_Number '$1'))} {<Id.Lit_Equals '='>} {(DQ <--explain>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {(DQ <EOF>)}
                      here_end_span_id: 74
                      stdin_parts: [
                        <
'Warning: Secure locate keeps a private database for each user, and your\n'
                        >
                        <
'database hasn\'t yet been created. Until it is (probably late tonight),\n'
                        >
                        <'I\'ll just use the public locate database, which will show you all\n'>
                        <'publicly accessible matches rather than those explicitly available to\n'>
                        <'account ${USER:-$LOGNAME}.\n'>
                      ]
                    )
                )
                (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})
              ]
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number '$1'))} 
                              {<Id.Lit_Equals '='>} {(DQ <--explain>)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})]
                  spids: [76 94]
                )
              ]
            )
            (C {<touch>} {($ Id.VSub_DollarName '$slocatedb')})
            (C {<chmod>} {<600>} {($ Id.VSub_DollarName '$slocatedb')})
          ]
          spids: [29 55]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-s>} {($ Id.VSub_DollarName '$slocatedb')} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:locatedb)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$slocatedb')}
                  spids: [148]
                )
              ]
            )
          ]
          spids: [133 145]
        )
      ]
      else_action: [
        (command.Simple
          words: [
            {<echo>}
            {
              (DQ <'Warning: using public database. Use '> 
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ($ Id.VSub_Number '$0') <' --explain'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                <' for details.'>
              )
            }
          ]
          redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
          do_fork: T
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$1'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number '$0') <' pattern'>)}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [171 185]
        )
      ]
    )
    (C {<exec>} {<grep>} {<-i>} {(DQ ($ Id.VSub_Number '$1'))} {($ Id.VSub_DollarName '$locatedb')})
  ]
)