(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Pound '$#'))} {(-eq)} {(DQ (0))} 
              {(Id.Lit_RBracket ']')}
            )
          ]
          action: [
            (C {(echo)} {(DQ ('usage:  gcore [-o filename] pid'))})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:97)
              arg_word: {(2)}
            )
          ]
          spids: [71 87]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:name)
          op: assign_op.Equal
          rhs: {(core)}
          spids: [107]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} {(DQ (-o))} 
              {(Id.Lit_RBracket ']')}
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Pound '$#'))} {(-lt)} {(DQ (3))} 
                      {(Id.Lit_RBracket ']')}
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('usage:  gcore [-o filename] pid'))})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:161)
                      arg_word: {(2)}
                    )
                  ]
                  spids: [130 147]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:name)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [169]
                )
              ]
            )
            (command.Sentence
              child: (C {(shift)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:179)
            )
            (C {(shift)})
          ]
          spids: [111 127]
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:rc) op:assign_op.Equal rhs:{(0)} spids:[189])]
    )
    (command.ForEach
      iter_name: pid
      iter_words: [{($ Id.VSub_Star '$*')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.Simple
              words: [{(/usr/bin/gdb)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:223)
                  fd: -1
                  arg_word: {(/dev/null)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:227)
                  fd: -1
                  here_begin: {(EOF)}
                  here_end_span_id: 242
                  stdin_parts: [
                    ('\tattach ')
                    ($ Id.VSub_DollarName '$pid')
                    ('\n')
                    ('\tgcore ')
                    ($ Id.VSub_DollarName '$name')
                    (.)
                    ($ Id.VSub_DollarName '$pid')
                    ('\n')
                    ('\tdetach\n')
                    ('\tquit\n')
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-r)} 
                          {($ Id.VSub_DollarName '$name') (.) ($ Id.VSub_DollarName '$pid')} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:257)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:rc)
                          op: assign_op.Equal
                          rhs: {(0)}
                          spids: [263]
                        )
                      ]
                    )
                  ]
                  spids: [245 259]
                )
              ]
              else_action: [
                (C {(echo)} {(gcore) (Id.Lit_Other ':')} {(failed)} {(to)} {(create)} 
                  {($ Id.VSub_DollarName '$name') (.) ($ Id.VSub_DollarName '$pid')}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:rc)
                      op: assign_op.Equal
                      rhs: {(1)}
                      spids: [286]
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Break val:break span_id:290)
                )
              ]
            )
          ]
        )
    )
    (command.ControlFlow
      token: (Token id:Id.ControlFlow_Exit val:exit span_id:300)
      arg_word: {($ Id.VSub_DollarName '$rc')}
    )
  ]
)