(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bflag='> name:bflag)
          op: assign_op.Equal
          rhs: (rhs_word.Empty)
          spids: [92]
        )
      ]
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: (condition.Shell commands:[(C {<getopts>} {<b>} {<c>})])
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName c)}
              arms: [
                (case_arm
                  pat_list: [{<b>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bflag='> name:bflag)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [115]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [112 113 117 -1]
                )
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'> ch:'?')}]
                  action: [
                    (C {<echo>} {(DQ <'getoptcvt [-b] file'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<2>}
                    )
                  ]
                  spids: [120 121 133 -1]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (C {<shift>} 
      {
        (command_sub
          left_token: <Id.Left_Backtick '`'>
          child: (C {<expr>} {($ Id.VSub_DollarName OPTIND)} {<->} {<1>})
          right: <Id.Backtick_Right '`'>
        )
      }
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName bflag))} {<Id.Lit_Equals '='>} 
                  {<1>} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<ed>} {<->} {($ Id.VSub_Number 1)}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {(SQ <'!'>)}
                      here_end_span_id: 219
                      stdin_parts: [
                        <
'1,$s/set[ \t][ \t]*--[ \t][ \t]*`getopt[ \t][ \t]*\\(.*\\)[ \t][ \t]*.*`/{\\\n'
                        >
                        <'if [ "$OPTIND" != 1 ]\\\n'>
                        <'then\\\n'>
                        <'\tset -- `getopt \\1 $*`\\\n'>
                        <'else\\\n'>
                        <'sedfunc() \\\n'>
                        <'{\\\n'>
                        <'echo "$1" | sed "s\\/\'\\/\'\\\\\\\\\\\\\\\\\'\'\\/g"\\\n'>
                        <'}\\\n'>
                        <'exitcode_=0\\\n'>
                        <'while getopts \\1 c_\\\n'>
                        <'do\\\n'>
                        <'\tcase $c_ in\\\n'>
                        <'\t\\\\?)\\\n'>
                        <'\t\texitcode_=1\\\n'>
                        <'\t\tbreak;;\\\n'>
                        <'\t*)\tif [ "$OPTARG" ]\\\n'>
                        <'\t\tthen\\\n'>
                        <'\t\t\toptarg_=`sedfunc "$OPTARG"`\\\n'>
                        <'\t\t\targ_="$arg_ \'-$c_\' \'$optarg_\'"\\\n'>
                        <'\t\telse\\\n'>
                        <'\t\t\targ_="$arg_ \'-$c_\'"\\\n'>
                        <'\t\tfi;;\\\n'>
                        <'\tesac\\\n'>
                        <'done\\\n'>
                        <'shift `expr $OPTIND - 1`\\\n'>
                        <'arg_="$arg_ \'--\'"\\\n'>
                        <'for i_ in "$@"\\\n'>
                        <'do\\\n'>
                        <'\toptarg_=`sedfunc "$i_"`\\\n'>
                        <'\targ_="$arg_ \'$optarg_\'"\\\n'>
                        <'done\\\n'>
                        <'eval set -- "$arg_"\\\n'>
                        <'test  $exitcode_ = 0\\\n'>
                        <'fi ;}/\n'>
                        <'1,$p\n'>
                        <'Q\n'>
                      ]
                    )
                )
              ]
              more_env: []
              do_fork: T
            )
          ]
          spids: [154 168]
        )
      ]
      else_action: [
        (command.Simple
          words: [{<ed>} {<->} {($ Id.VSub_Number 1)}]
          redirects: [
            (redir
              op: <Id.Redir_DLess '<<'>
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.HereDoc
                  here_begin: {(SQ <'!'>)}
                  here_end_span_id: 266
                  stdin_parts: [
                    <
'1,$s/set[ \t][ \t]*--[ \t][ \t]*`getopt[ \t][ \t]*\\(.*\\)[ \t][ \t]*.*`/{\\\n'
                    >
                    <'sedfunc()\\\n'>
                    <'{\\\n'>
                    <'echo "$1" | sed "s\\/\'\\/\'\\\\\\\\\\\\\\\\\'\'\\/g"\\\n'>
                    <'}\\\n'>
                    <'exitcode_=0\\\n'>
                    <'while getopts \\1 c_\\\n'>
                    <'do\\\n'>
                    <'\tcase $c_ in\\\n'>
                    <'\t\\\\?)\\\n'>
                    <'\t\texitcode_=1\\\n'>
                    <'\t\tbreak;;\\\n'>
                    <'\t*)\tif [ "$OPTARG" ]\\\n'>
                    <'\t\tthen\\\n'>
                    <'\t\t\toptarg_=`sedfunc "$OPTARG"`\\\n'>
                    <'\t\t\targ_="$arg_ -$c_ \'$optarg_\'"\\\n'>
                    <'\t\telse\\\n'>
                    <'\t\t\targ_="$arg_ -$c_"\\\n'>
                    <'\t\tfi;;\\\n'>
                    <'\tesac\\\n'>
                    <'done\\\n'>
                    <'shift `expr $OPTIND - 1`\\\n'>
                    <'arg_="$arg_ --"\\\n'>
                    <'for i_ in "$@"\\\n'>
                    <'do\\\n'>
                    <'\toptarg_=`sedfunc "$i_"`\\\n'>
                    <'\targ_="$arg_ \'$optarg_\'"\\\n'>
                    <'done\\\n'>
                    <'eval set -- "$arg_"\\\n'>
                    <'test  $exitcode_ = 0 ;}/\n'>
                    <'1,$p\n'>
                    <'Q\n'>
                  ]
                )
            )
          ]
          more_env: []
          do_fork: T
        )
      ]
      redirects: []
    )
  ]
)