(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (SimpleCommand
              words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' [-d|-i|-x] url'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ('-d=domains only, -i=internal refs only, -x=external only'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [16777215 34]
        )
      ]
      spids: [16777215 63]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(1)} {(Lit_Other ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(-d)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:lastcmd)
                          op: Equal
                          rhs: {(DQ ('cut -d/ -f3 | sort | uniq'))}
                          spids: [95]
                        )
                      ]
                      spids: [95]
                    )
                    (C {(shift)})
                  ]
                  spids: [92 93 104 16777215]
                )
                (case_arm
                  pat_list: [{(-r)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:basedomain)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('http://') 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (Pipeline
                                          children: [
                                            (C {(echo)} {($ VSub_Number '$2')})
                                            (C {(cut)} {(-d/)} {(-f3)})
                                          ]
                                          negated: F
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [113 125]
                                ) (/)
                              )
                            }
                          spids: [110]
                        )
                      ]
                      spids: [110]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:lastcmd)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('grep ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('^') 
                                ($ VSub_Name '$basedomain') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' | sed ') 
                                (EscapedLiteralPart
                                  token: <Lit_EscapedChar '\\"'>
                                ) ('s|') ($ VSub_Name '$basedomain') ('||g') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                                (' | sort |') ('\t     uniq')
                              )
                            }
                          spids: [130]
                        )
                      ]
                      spids: [130]
                    )
                    (C {(shift)})
                  ]
                  spids: [107 108 152 16777215]
                )
                (case_arm
                  pat_list: [{(-a)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:basedomain)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('http://') 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (Pipeline
                                          children: [
                                            (C {(echo)} {($ VSub_Number '$2')})
                                            (C {(cut)} {(-d/)} {(-f3)})
                                          ]
                                          negated: F
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [161 173]
                                ) (/)
                              )
                            }
                          spids: [158]
                        )
                      ]
                      spids: [158]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:lastcmd)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('grep -v ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('^') 
                                ($ VSub_Name '$basedomain') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' | sort | uniq')
                              )
                            }
                          spids: [178]
                        )
                      ]
                      spids: [178]
                    )
                    (C {(shift)})
                  ]
                  spids: [155 156 192 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (Sentence
                      child: 
                        (SimpleCommand
                          words: [
                            {(echo)}
                            {
                              (DQ ($ VSub_Number '$0') (': unknown option specified: ') 
                                ($ VSub_Number '$1')
                              )
                            }
                          ]
                          redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
                  ]
                  spids: [195 196 16777215 215]
                )
              ]
              spids: [83 89 215]
            )
          ]
          spids: [16777215 80]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:lastcmd)
              op: Equal
              rhs: {(DQ ('sort | uniq'))}
              spids: [220]
            )
          ]
          spids: [220]
        )
      ]
      spids: [217 225]
    )
    (Pipeline
      children: [
        (C {(lynx)} {(-dump)} {(DQ ($ VSub_Number '$1'))})
        (C {(sed)} {(-n)} {(SQ <'/^References$/,$p'>)})
        (C {(grep)} {(-E)} {(SQ <'[[:digit:]]+\\.'>)})
        (C {(awk)} {(SQ <'{print $2}'>)})
        (C {(cut)} {(-d) (EscapedLiteralPart token:<Lit_EscapedChar '\\?'>)} {(-f1)})
        (C {(eval)} {($ VSub_Name '$lastcmd')})
      ]
      negated: F
    )
    (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
  ]
)