// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_after_body
static bool handle_after_body(GumboParser* parser, GumboToken* token) {
  if (
    token->type == GUMBO_TOKEN_WHITESPACE
    || tag_is(token, kStartTag, GUMBO_TAG_HTML)
  ) {
    return handle_in_body(parser, token);
  } else if (token->type == GUMBO_TOKEN_COMMENT) {
    GumboNode* html_node = parser->_output->root;
    assert(html_node != NULL);
    append_comment_node(parser, html_node, token);
    return true;
  } else if (token->type == GUMBO_TOKEN_DOCTYPE) {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  } else if (tag_is(token, kEndTag, GUMBO_TAG_HTML)) {
    /* fragment case: ignore the closing HTML token */
    if (is_fragment_parser(parser)) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    }
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_AFTER_BODY);
    GumboNode* html = parser->_parser_state->_open_elements.data[0];
    assert(node_html_tag_is(html, GUMBO_TAG_HTML));
    record_end_of_element (
      parser->_parser_state->_current_token,
      &html->v.element
    );
    return true;
  } else if (token->type == GUMBO_TOKEN_EOF) {
    return true;
  } else {
    parser_add_parse_error(parser, token);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_BODY);
    parser->_parser_state->_reprocess_current_token = true;
    return false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x4, (%rax)
je 0xe06f
movq -0x18(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x8c40
testb $0x1, %al
jne 0xe06f
jmp 0xe086
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa3f0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xe1fc
movq -0x18(%rbp), %rax
cmpl $0x3, (%rax)
jne 0xe0e1
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xe0a8
jmp 0xe0c7
leaq 0x26f6b(%rip), %rdi     # 0x3501a
leaq 0x24dbe(%rip), %rsi     # 0x32e74
movl $0xf7b, %edx            # imm = 0xF7B
leaq 0x26f6a(%rip), %rcx     # 0x3502c
callq 0x4100
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xe7b0
movb $0x1, -0x1(%rbp)
jmp 0xe1fc
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xe109
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
callq 0x8bd0
movb $0x0, -0x1(%rbp)
jmp 0xe1fc
movq -0x18(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x8c40
testb $0x1, %al
jne 0xe11f
jmp 0xe1c2
movq -0x10(%rbp), %rdi
callq 0x8b60
testb $0x1, %al
jne 0xe12e
jmp 0xe14d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
callq 0x8bd0
movb $0x0, -0x1(%rbp)
jmp 0xe1fc
movq -0x10(%rbp), %rdi
movl $0x15, %esi
callq 0x8b40
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x8700
testb $0x1, %al
jne 0xe17f
jmp 0xe181
jmp 0xe1a0
leaq 0x26ed9(%rip), %rdi     # 0x35061
leaq 0x24ce5(%rip), %rsi     # 0x32e74
movl $0xf8b, %edx            # imm = 0xF8B
leaq 0x26e91(%rip), %rcx     # 0x3502c
callq 0x4100
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x98(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0xf4d0
movb $0x1, -0x1(%rbp)
jmp 0xe1fc
movq -0x18(%rbp), %rax
cmpl $0x8, (%rax)
jne 0xe1d1
movb $0x1, -0x1(%rbp)
jmp 0xe1fc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
movl $0x6, %esi
callq 0x8b40
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x1, 0x50(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)