// File: /workspace/github_c_makefile_star2_O3/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_doctype_name_state
static StateResult handle_doctype_name_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  switch (c) {
    case '\t':
    case '\n':
    case '\f':
    case ' ':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_AFTER_DOCTYPE_NAME);
      gumbo_free((void*) tokenizer->_doc_type_state.name);
      finish_temporary_buffer(parser, &tokenizer->_doc_type_state.name);
      return NEXT_CHAR;
    case '>':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      gumbo_free((void*) tokenizer->_doc_type_state.name);
      finish_temporary_buffer(parser, &tokenizer->_doc_type_state.name);
      emit_doctype(parser, output);
      return RETURN_SUCCESS;
    case '\0':
      tokenizer_add_parse_error(parser, GUMBO_ERR_UTF8_NULL);
      append_char_to_temporary_buffer(parser, UNICODE_REPLACEMENT_CHAR);
      return NEXT_CHAR;
    case -1:
      tokenizer_add_parse_error(parser, GUMBO_ERR_DOCTYPE_EOF);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      tokenizer->_doc_type_state.force_quirks = true;
      gumbo_free((void*) tokenizer->_doc_type_state.name);
      finish_temporary_buffer(parser, &tokenizer->_doc_type_state.name);
      emit_doctype(parser, output);
      return RETURN_ERROR;
    default:
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DOCTYPE_NAME);
      tokenizer->_doc_type_state.force_quirks = false;
      append_char_to_temporary_buffer(parser, ensure_lowercase(c));
      return NEXT_CHAR;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x3e, %edx
ja 0xf7e0
movl %edx, %eax
movabsq $0x100001600, %rcx      # imm = 0x100001600
btq %rax, %rcx
jae 0xf756
movq 0x10(%rbx), %rax
movl $0x36, (%rax)
movq 0xc8(%r15), %rdi
callq 0x113f8
movq 0x10(%rbx), %rdi
addq $0x10, %rdi
callq 0x7648
movq %rax, 0xc8(%r15)
movq 0x10(%rbx), %rdi
callq 0x10a14
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %rax, %rax
je 0xf8a7
cmpq $0x3e, %rax
jne 0xf7e0
movq 0x10(%rbx), %rax
xorl %ebp, %ebp
movl %ebp, (%rax)
movq 0xc8(%r15), %rdi
callq 0x113f8
movq 0x10(%rbx), %rdi
addq $0x10, %rdi
callq 0x7648
movq %rax, 0xc8(%r15)
movq 0x10(%rbx), %rdi
callq 0x10a14
movl %ebp, (%r14)
movq 0x10(%rbx), %rax
movups 0xc8(%rax), %xmm0
movups 0xd8(%rax), %xmm1
movups %xmm1, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0xca0d
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
movl $0x1, %ebp
jmp 0xf749
cmpl $-0x1, %edx
jne 0xf874
movq %rbx, %rdi
movl $0x22, %esi
callq 0x10a60
movq 0x10(%rbx), %rax
xorl %ebp, %ebp
movl %ebp, (%rax)
movb $0x1, 0xe0(%r15)
movq 0xc8(%r15), %rdi
callq 0x113f8
movq 0x10(%rbx), %rdi
addq $0x10, %rdi
callq 0x7648
movq %rax, 0xc8(%r15)
movq 0x10(%rbx), %rdi
callq 0x10a14
movl %ebp, (%r14)
movq 0x10(%rbx), %rax
movups 0xc8(%rax), %xmm0
movups 0xd8(%rax), %xmm1
movups %xmm1, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0xca0d
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
jmp 0xf749
movq 0x10(%rbx), %rsi
movl $0x35, (%rsi)
movb $0x0, 0xe0(%r15)
movzbl %dl, %eax
leaq 0x88c0(%rip), %rcx      # 0x18150
movzbl (%rcx,%rax), %edi
andl $0x20, %edi
orl %eax, %edi
addq $0x10, %rsi
callq 0x4322
jmp 0xf744
movl $0x2, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x10a60
movq 0x10(%rbx), %rsi
addq $0x10, %rsi
movl $0xfffd, %edi           # imm = 0xFFFD
callq 0x4322
jmp 0xf749