00000048
 /     class << self
      attr_accessor :_trans_targs
      private :_trans_targs, :_trans_targs=
    end
    self._trans_targs = [
      40, 0, 2, 3, 5, 27, 4, 5,
      6, 7, 8, 43, 10, 24, 7, 8,
      10, 24, 9, 11, 12, 41, 16, 17,
      18, 19, 20, 21, 22, 23, 11, 12,
      41, 16, 17, 18, 19, 20, 21, 22,
      23, 13, 15, 41, 7, 8, 10, 24,
      26, 44, 2, 3, 5, 27, 29, 30,
      29, 46, 32, 33, 34, 35, 36, 37,
      38, 39, 29, 30, 29, 46, 32, 33,
      34, 35, 36, 37, 38, 39, 31, 40,
      2, 41, 14, 42, 2, 41, 14, 42,
      2, 44, 25, 43, 45, 25, 45, 44,
      25, 45,
    ]

    class << self
      attr_accessor :_trans_actions
      private :_trans_actions, :_trans_actions=
    end
    self._trans_actions = [
      1, 0, 0, 0, 2, 3, 0, 0,
      4, 5, 5, 5, 5, 6, 0, 0,
      0, 3, 0, 7, 7, 8, 7, 7,
      7, 7, 7, 7, 7, 7, 0, 0,
      9, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 10, 10, 10, 11,
      0, 0, 10, 10, 12, 11, 13, 13,
      14, 15, 13, 13, 13, 13, 13, 13,
      13, 13, 0, 0, 3, 16, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0,
      17, 18, 18, 19, 18, 20, 20, 21,
      20, 18, 18, 0, 22, 0, 3, 10,
      10, 11,
    ]

    class << self
      attr_accessor :_eof_actions
      private :_eof_actions, :_eof_actions=
    end
    self._eof_actions = [
      0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0,
      17, 18, 20, 18, 0, 10, 0,
    ]

    class << self
      attr_accessor :start
    end
    self.start = 1
    class << self
      attr_accessor :first_final
    end
    self.first_final = 40
    class << self
      attr_accessor :error
    end
    self.error = 0

    class << self
      attr_accessor :en_comment_tail
    end
    self.en_comment_tail = 28
    class << self
      attr_accessor :en_main
    end
    self.en_main = 1

    def self.parse(data)
      data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)

      content_disposition = ContentDispositionStruct.new("", [])
      return content_disposition if Mail::Utilities.blank?(data)

      # Parser state
      disp_type_s = param_attr_s = param_attr = qstr_s = qstr = param_val_s = nil

      # 5.1 Variables Used by Ragel
      p = 0
      eof = pe = data.length
      stack = []

      begin
        p ||= 0
        pe ||= data.length
        cs = start
        top = 0
      end

      begin
        testEof = false
        _slen, _trans, _keys, _inds, _acts, _nacts = nil
        _goto_level = 0
        _resume = 10
        _eof_trans = 15
        _again = 20
        _test_eof = 30
        _out = 40
        while true
          if _goto_level <= 0
            if p == pe
              _goto_level = _test_eof
              next
            end
            if cs == 0
              _goto_level = _out
              next
            end
          end
          if _goto_level <= _resume
            _keys = cs << 1
            _inds = _index_offsets[cs]
            _slen = _key_spans[cs]
            _wide = data[p].ord
            _trans = if (_slen > 0 &&
                         _trans_keys[_keys] <= _wide &&
                         _wide <= _trans_keys[_keys + 1])
                       _indicies[_inds + _wide - _trans_keys[_keys]]
                     else
                       _indicies[_inds + _slen]
                     end
            cs = _trans_targs[_trans]
            if _trans_actions[_trans] != 0
              case _trans_actions[_trans]
              when 1
                begin
                  disp_type_s = p
                end
              when 17
                begin
                  content_disposition.disposition_type = chars(data, disp_type_s, p - 1).downcase
                end
              when 2
                begin
                  param_attr_s = p
                end
              when 4
                begin
                  param_attr = chars(data, param_attr_s, p - 1)
                end
              when 7
                begin
                  qstr_s = p
                end
       