// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_markup_declaration_state
static StateResult handle_markup_declaration_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int UNUSED_ARG(c),
  GumboToken* UNUSED_ARG(output)
) {
  Utf8Iterator *input = &tokenizer->_input;
  if (utf8iterator_maybe_consume_literal(input, "--")) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_COMMENT_START);
    tokenizer->_reconsume_current_input = true;
  } else if (utf8iterator_maybe_consume_literal_icase(input, "DOCTYPE")) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_DOCTYPE);
    tokenizer->_reconsume_current_input = true;
    // If we get here, we know we'll eventually emit a doctype token, so now is
    // the time to initialize the doctype strings. (Not in doctype_state_init,
    // since then they'll leak if ownership never gets transferred to the
    // doctype token.
    tokenizer->_doc_type_state.name = gumbo_strdup("");
    tokenizer->_doc_type_state.public_identifier = gumbo_strdup("");
    tokenizer->_doc_type_state.system_identifier = gumbo_strdup("");
  } else if (
    tokenizer->_is_current_node_foreign
    && utf8iterator_maybe_consume_literal(input, "[CDATA[")
  ) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_CDATA);
    tokenizer->_is_in_cdata = true;
    tokenizer->_reconsume_current_input = true;
  } else {
    tokenizer_add_parse_error(parser, GUMBO_ERR_DASHES_OR_DOCTYPE);
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_BOGUS_COMMENT);
    tokenizer->_reconsume_current_input = true;
    clear_temporary_buffer(parser);
  }
  return NEXT_CHAR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0xe8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x222a7(%rip), %rsi     # 0x36fa7
movl $0x2, %edx
movl $0x1, %ecx
callq 0x65f0
testb $0x1, %al
jne 0x14d15
jmp 0x14d30
movq -0x8(%rbp), %rdi
movl $0x2d, %esi
callq 0x11a10
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
jmp 0x14e2e
movq -0x28(%rbp), %rdi
leaq 0x2226f(%rip), %rsi     # 0x36faa
movl $0x7, %edx
xorl %ecx, %ecx
callq 0x65f0
testb $0x1, %al
jne 0x14d4d
jmp 0x14db3
movq -0x8(%rbp), %rdi
movl $0x33, %esi
callq 0x11a10
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
leaq 0x1f491(%rip), %rdi     # 0x341fb
callq 0x17da0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
leaq 0x1f477(%rip), %rdi     # 0x341fb
callq 0x17da0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd0(%rax)
leaq 0x1f45d(%rip), %rdi     # 0x341fb
callq 0x17da0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xd8(%rax)
jmp 0x14e2c
movq -0x10(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0x14dfd
movq -0x28(%rbp), %rdi
leaq 0x221ea(%rip), %rsi     # 0x36fb2
movl $0x7, %edx
movl $0x1, %ecx
callq 0x65f0
testb $0x1, %al
jne 0x14ddd
jmp 0x14dfd
movq -0x8(%rbp), %rdi
movl $0x43, %esi
callq 0x11a10
movq -0x10(%rbp), %rax
movb $0x1, 0x6(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
jmp 0x14e2a
movq -0x8(%rbp), %rdi
movl $0x1b, %esi
callq 0x16c60
movq -0x8(%rbp), %rdi
movl $0x2b, %esi
callq 0x11a10
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x8(%rbp), %rdi
callq 0x16bb0
jmp 0x14e2c
jmp 0x14e2e
movl $0x2, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)