(command.AndOr
  ops: [Op_DAmp]
  children: [
    (command.FuncDef
      name: _cal
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cur spids:[20])
                  op: Equal
                  spids: [20]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:prev spids:[22])
                  op: Equal
                  spids: [22]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:words spids:[24])
                  op: Equal
                  spids: [24]
                )
                (assign_pair
                  lhs: (lhs_expr.LhsName name:cword spids:[26])
                  op: Equal
                  spids: [26]
                )
              ]
              spids: [18]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(_init_completion)})
                (command.ControlFlow token:<ControlFlow_Return return>)
              ]
            )
            (command.Case
              to_match: {($ VSub_DollarName '$prev')}
              arms: [
                (case_arm
                  pat_list: [{(-m)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {($ VSub_DollarName '$OSTYPE')}
                                      right: {(Lit_Other '*') (bsd) (Lit_Other '*')}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (command.Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:COMPREPLY spids:[66])
                                  op: Equal
                                  rhs: 
                                    {
                                      (word_part.ArrayLiteralPart
                                        words: [
                                          {
                                            (word_part.CommandSubPart
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {(compgen)} {(-W)} {(SQ <'{1..12}'>)} {(--)} 
                                                      {(DQ ($ VSub_DollarName '$cur'))}
                                                    )
                                                  ]
                                                )
                                              left_token: <Left_CommandSub '$('>
                                              spids: [69 85]
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [66]
                                )
                              ]
                              spids: [66]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                            )
                          ]
                          spids: [16777215 63]
                        )
                      ]
                      spids: [16777215 93]
                    )
                  ]
                  spids: [44 45 96 16777215]
                )
                (case_arm
                  pat_list: [{(-s)}]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_DollarName '$OSTYPE')}
                              right: {(Lit_Other '*') (bsd) (Lit_Other '*')}
                            )
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                        )
                      ]
                    )
                  ]
                  spids: [99 100 120 16777215]
                )
                (case_arm
                  pat_list: [{(-A)} {(-B)} {(-d)} {(-H)}]
                  action: [(command.ControlFlow token:<ControlFlow_Return return>)]
                  spids: [123 130 136 16777215]
                )
              ]
              spids: [37 41 139]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.BoolBinary
                              op_id: BoolBinary_GlobDEqual
                              left: {($ VSub_DollarName '$cur')}
                              right: {(-) (Lit_Other '*')}
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:COMPREPLY spids:[160])
                          op: Equal
                          rhs: 
                            {
                              (word_part.ArrayLiteralPart
                                words: [
                                  {
                                    (word_part.CommandSubPart
                                      command_list: 
                                        (command.CommandList
                                          children: [
                                            (C {(compgen)} {(-W)} {(SQ <'$( _parse_usage "$1" )'>)} 
                                              {(--)} {(DQ ($ VSub_DollarName '$cur'))}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub '$('>
                                      spids: [163 179]
                                    )
                                  }
                                ]
                              )
                            }
                          spids: [160]
                        )
                      ]
                      spids: [160]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [16777215 157]
                )
              ]
              spids: [16777215 187]
            )
            (command.Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:args spids:[193]) op:Equal spids:[193])]
              spids: [191]
            )
            (C {(_count_args)})
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.BoolBinary
                      op_id: BoolBinary_eq
                      left: {($ VSub_DollarName '$args')}
                      right: {(1)}
                    )
                )
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:COMPREPLY spids:[211])
                      op: Equal
                      rhs: 
                        {
                          (word_part.ArrayLiteralPart
                            words: [
                              {
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(compgen)} {(-W)} {(SQ <'{1..12}'>)} {(--)} 
                                          {(DQ ($ VSub_DollarName '$cur'))}
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [214 230]
                                )
                              }
                            ]
                          )
                        }
                      spids: [211]
                    )
                  ]
                  spids: [211]
                )
              ]
            )
          ]
          spids: [15]
        )
      spids: [11 14]
    )
    (C {(complete)} {(-F)} {(_cal)} {(cal)} {(ncal)})
  ]
)