(command.CommandList
  children: [
    (command.ShFunction
      name: _heimdal_principals
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {<compgen>} {<-W>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (command.Pipeline
                                                    children: [
                                                      (command.Simple
                                                        words: [{<kadmin>} {<-l>} {<dump>}]
                                                        redirects: [
                                                          (redir.Redir
                                                            op: <Id.Redir_Great '2>'>
                                                            fd: 2
                                                            arg_word: {</dev/null>}
                                                          )
                                                        ]
                                                      )
                                                      (C {<awk>} {(SQ <'{print $1}'>)})
                                                    ]
                                                    negated: F
                                                  )
                                                ]
                                              )
                                          )
                                        )
                                      } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [11]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _heimdal_realms
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {<compgen>} {<-W>} 
                                      {
                                        (DQ <'( kadmin -l dump 2>/dev/null | '> 
                                          <"        awk '{print "> ($ Id.VSub_Number '$1') <"}' | awk -F@ '{print "> ($ Id.VSub_Number '$2') <"}' )">
                                        )
                                      } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [65]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: _heimdal_encodings
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {<compgen>} {<-W>} 
                                      {
                                        (SQ <'des-cbc-mcrc des-cbc-md4 des-cbc-md5\n'> 
                                          <
'        des3-cbc-sha1 arcfour-hmac-md5 aes128-cts-hmac-sha1-96\n'
                                          > <'        aes256-cts-hmac-sha1-96'>
                                        )
                                      } {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                    )
                                  ]
                                )
                            )
                          }
                        ]
                      )
                    }
                  spids: [104]
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.ShFunction
          name: _ktutil
          body: 
            (command.BraceGroup
              children: [
                (C {<local>} {<cur>} {<prev>} {<words>} {<cword>} {<split>})
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {<_init_completion>} {<-s>})
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                )
                (C {<local>} {<command>} {<options>})
                (command.Case
                  to_match: {($ Id.VSub_DollarName '$prev')}
                  arms: [
                    (case_arm
                      pat_list: [{<-p>} {<--principal>}]
                      action: [
                        (C {<_heimdal_principals>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [177 180 191 -1]
                    )
                    (case_arm
                      pat_list: [{<-e>} {<--enctype>}]
                      action: [
                        (C {<_heimdal_encodings>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [194 197 208 -1]
                    )
                    (case_arm
                      pat_list: [{<-a>} {<--admin-server>}]
                      action: [
                        (C {<_known_hosts_real>} {(DQ ($ Id.VSub_DollarName '$cur'))})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [211 214 229 -1]
                    )
                    (case_arm
                      pat_list: [{<-r>} {<--realm>}]
                      action: [
                        (C {<_heimdal_realms>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [232 235 246 -1]
                    )
                    (case_arm
                      pat_list: [{<-s>} {<-k>} {<--srvtab>} {<--keytab>}]
                      action: [
                        (C {<_filedir>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [249 256 267 -1]
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {($ Id.VSub_DollarName '$split')})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:commands)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (SQ <'add change copy get list remove rename purge srvconvert\n'> 
                            <'        srv2keytab srvcreate key2srvtab'>
                          )
                        }
                      spids: [284]
                    )
                  ]
                )
                (command.ForExpr
                  init: 
                    (arith_expr.BinaryAssign
                      op_id: Id.Arith_Equal
                      left: (sh_lhs_expr.Name name:i)
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                    )
                  cond: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Less
                      left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>)
                      right: (arith_expr.VarRef token:<Id.Lit_ArithVarLike cword>)
                    )
                  update: 
                    (arith_expr.UnaryAssign
                      op_id: Id.Node_PostDPlus
                      child: (sh_lhs_expr.Name name:i)
                    )
                  body: 
                    (command.DoGroup
                      children: [
                        (command.Case
                          to_match: 
                            {
                              (braced_var_sub
                                token: <Id.VSub_Name words>
                                bracket_op: 
                                  (bracket_op.ArrayIndex
                                    expr: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>)
                                  )
                              )
                            }
                          arms: [
                            (case_arm
                              pat_list: [{<-k>} {<--keytab>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:i)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (word_part.ArithSub
                                            anode: 
                                              (arith_expr.Binary
                                                op_id: Id.Arith_Plus
                                                left: 
                                                  (arith_expr.ArithWord
                                                    w: {($ Id.VSub_DollarName '$i')}
                                                  )
                                                right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                                              )
                                          )
                                        }
                                      spids: [336]
                                    )
                                  ]
                                )
                              ]
                              spids: [330 333 345 -1]
                            )
                            (case_arm
                              pat_list: [{<-> <Id.Lit_Star '*'>}]
                              spids: [348 350 353 -1]
                            )
                            (case_arm
                              pat_list: [{<Id.Lit_Star '*'>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:command)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (braced_var_sub
                                            token: <Id.VSub_Name words>
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: 
                                                  (arith_expr.VarRef
                                                    token: <Id.Lit_ArithVarLike i>
                                                  )
                                              )
                                          )
                                        }
                                      spids: [360]
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Break break>
                                )
                              ]
                              spids: [356 357 372 -1]
                            )
                          ]
                        )
                      ]
                    )
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Binary
                                  op_id: Id.BoolBinary_GlobDEqual
                                  left: {(DQ ($ Id.VSub_DollarName '$cur'))}
                                  right: {<-> <Id.Lit_Other '*'>}
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [
                        (command.Case
                          to_match: {($ Id.VSub_DollarName '$command')}
                          arms: [
                            (case_arm
                              pat_list: [{<add>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (SQ <'-p --principal -V -e --enctype -w --password -r\n'> 
                                            <'                    --random -s --no-salt -h --hex'>
                                          )
                                        }
                                      spids: [412]
                                    )
                                  ]
                                )
                              ]
                              spids: [408 409 419 -1]
                            )
                            (case_arm
                              pat_list: [{<change>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: {(SQ <'-r --realm -a --admin-server -s --server-port'>)}
                                      spids: [426]
                                    )
                                  ]
                                )
                              ]
                              spids: [422 423 432 -1]
                            )
                            (case_arm
                              pat_list: [{<get>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (SQ <'-p --principal -e --enctype -r --realm -a\n'> 
                                            <
'                    --admin-server -s server --server-port'
                                            >
                                          )
                                        }
                                      spids: [439]
                                    )
                                  ]
                                )
                              ]
                              spids: [435 436 446 -1]
                            )
                            (case_arm
                              pat_list: [{<list>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: {(SQ <'--keys --timestamp'>)}
                                      spids: [453]
                                    )
                                  ]
                                )
                              ]
                              spids: [449 450 459 -1]
                            )
                            (case_arm
                              pat_list: [{<remove>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: {(SQ <'-p --principal -V --kvno -e --enctype'>)}
                                      spids: [466]
                                    )
                                  ]
                                )
                              ]
                              spids: [462 463 472 -1]
                            )
                            (case_arm
                              pat_list: [{<purge>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: {(SQ <--age>)}
                                      spids: [479]
                                    )
                                  ]
                                )
                              ]
                              spids: [475 476 485 -1]
                            )
                            (case_arm
                              pat_list: [{<srv2keytab>} {<key2srvtab>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: {(SQ <'-s --srvtab'>)}
                                      spids: [494]
                                    )
                                  ]
                                )
                              ]
                              spids: [488 491 500 -1]
                            )
                            (case_arm
                              pat_list: [{<Id.Lit_Star '*'>}]
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:options)
                                      op: assign_op.Equal
                                      rhs: {(SQ <'-k --keytab -v --verbose --version -v --help'>)}
                                      spids: [507]
                                    )
                                  ]
                                )
                              ]
                              spids: [503 504 513 -1]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:COMPREPLY)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (sh_array_literal
                                    left: <Id.Op_LParen _>
                                    words: [
                                      {
                                        (command_sub
                                          left_token: <Id.Left_DollarParen '$('>
                                          command_list: 
                                            (command.CommandList
                                              children: [
                                                (C {<compgen>} {<-W>} 
                                                  {(DQ ($ Id.VSub_DollarName '$options'))} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                                )
                                              ]
                                            )
                                        )
                                      }
                                    ]
                                  )
                                }
                              spids: [519]
                            )
                          ]
                        )
                      ]
                      spids: [382 398]
                    )
                  ]
                  else_action: [
                    (command.Case
                      to_match: {($ Id.VSub_DollarName '$command')}
                      arms: [
                        (case_arm
                          pat_list: [{<copy>}]
                          action: [(C {<_filedir>})]
                          spids: [553 554 560 -1]
                        )
                        (case_arm
                          pat_list: [{<get>}]
                          action: [(C {<_heimdal_principals>})]
                          spids: [563 564 570 -1]
                        )
                        (case_arm
                          pat_list: [{<rename>}]
                          action: [(C {<_heimdal_principals>})]
                          spids: [573 574 580 -1]
                        )
                        (case_arm
                          pat_list: [{<Id.Lit_Star '*'>}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:COMPREPLY)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (sh_array_literal
                                        left: <Id.Op_LParen _>
                                        words: [
                                          {
                                            (command_sub
                                              left_token: <Id.Left_DollarParen '$('>
                                              command_list: 
                                                (command.CommandList
                                                  children: [
                                                    (C {<compgen>} {<-W>} 
                                                      {(DQ ($ Id.VSub_DollarName '$commands'))} {<-->} {(DQ ($ Id.VSub_DollarName '$cur'))}
                                                    )
                                                  ]
                                                )
                                            )
                                          }
                                        ]
                                      )
                                    }
                                  spids: [587]
                                )
                              ]
                            )
                          ]
                          spids: [583 584 611 -1]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
        )
        (C {<complete>} {<-F>} {<_ktutil>} {<ktutil>})
      ]
    )
  ]
)