// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_in_table
static bool handle_in_table(GumboParser* parser, GumboToken* token) {
  GumboParserState* state = parser->_parser_state;
  if (
    token->type == GUMBO_TOKEN_CHARACTER
    || token->type == GUMBO_TOKEN_WHITESPACE
  ) {
    // The "pending table character tokens" list described in the spec is
    // nothing more than the TextNodeBufferState. We accumulate text tokens as
    // normal, except that when we go to flush them in the handle_in_table_text,
    // we set _foster_parent_insertions if there're non-whitespace characters in
    // the buffer.
    assert(state->_text_node._buffer.length == 0);
    state->_original_insertion_mode = state->_insertion_mode;
    state->_reprocess_current_token = true;
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_TEXT);
    return true;
  } else if (token->type == GUMBO_TOKEN_DOCTYPE) {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  } else if (token->type == GUMBO_TOKEN_COMMENT) {
    append_comment_node(parser, get_current_node(parser), token);
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_CAPTION)) {
    clear_stack_to_table_context(parser);
    add_formatting_element(parser, &kActiveFormattingScopeMarker);
    insert_element_from_token(parser, token);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_CAPTION);
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_COLGROUP)) {
    clear_stack_to_table_context(parser);
    insert_element_from_token(parser, token);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_COLUMN_GROUP);
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_COL)) {
    clear_stack_to_table_context(parser);
    insert_element_of_tag_type (
      parser,
      GUMBO_TAG_COLGROUP,
      GUMBO_INSERTION_IMPLIED
    );
    parser->_parser_state->_reprocess_current_token = true;
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_COLUMN_GROUP);
    return true;
  } else if (
    tag_in(token, kStartTag, &(const TagSet) {
      TAG(TBODY), TAG(TFOOT), TAG(THEAD), TAG(TD), TAG(TH), TAG(TR)
    })
  ) {
    clear_stack_to_table_context(parser);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_BODY);
    if (tag_in(token, kStartTag, &(const TagSet){TAG(TD), TAG(TH), TAG(TR)})) {
      insert_element_of_tag_type (
        parser,
        GUMBO_TAG_TBODY,
        GUMBO_INSERTION_IMPLIED
      );
      state->_reprocess_current_token = true;
    } else {
      insert_element_from_token(parser, token);
    }
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_TABLE)) {
    parser_add_parse_error(parser, token);
    if (close_table(parser)) {
      parser->_parser_state->_reprocess_current_token = true;
    } else {
      ignore_token(parser);
    }
    return false;
  } else if (tag_is(token, kEndTag, GUMBO_TAG_TABLE)) {
    if (!close_table(parser)) {
      parser_add_parse_error(parser, token);
      return false;
    }
    return true;
  } else if (
    tag_in(token, kEndTag, &(const TagSet) {
      TAG(BODY), TAG(CAPTION), TAG(COL), TAG(COLGROUP), TAG(HTML),
      TAG(TBODY), TAG(TD), TAG(TFOOT), TAG(TH), TAG(THEAD), TAG(TR)
    })
  ) {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  } else if (
    tag_in(token, kStartTag, &(const TagSet){TAG(STYLE), TAG(SCRIPT), TAG(TEMPLATE)})
    || (tag_is(token, kEndTag, GUMBO_TAG_TEMPLATE))
  ) {
    return handle_in_head(parser, token);
  } else if (
    tag_is(token, kStartTag, GUMBO_TAG_INPUT)
    && attribute_matches(&token->v.start_tag.attributes, "type", "hidden")
  ) {
    parser_add_parse_error(parser, token);
    insert_element_from_token(parser, token);
    pop_current_node(parser);
    return false;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_FORM)) {
    parser_add_parse_error(parser, token);
    if (state->_form_element || has_open_element(parser, GUMBO_TAG_TEMPLATE)) {
      ignore_token(parser);
      return false;
    }
    state->_form_element = insert_element_from_token(parser, token);
    pop_current_node(parser);
    return false;
  } else if (token->type == GUMBO_TOKEN_EOF) {
    return handle_in_body(parser, token);
  } else {
    parser_add_parse_error(parser, token);
    state->_foster_parent_insertions = true;
    bool result = handle_in_body(parser, token);
    state->_foster_parent_insertions = false;
    return result;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x5, (%rax)
je 0xc311
movq -0x18(%rbp), %rax
cmpl $0x4, (%rax)
jne 0xc369
movq -0x20(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0xc31e
jmp 0xc33d
leaq 0x28ba6(%rip), %rdi     # 0x34ecb
leaq 0x26b48(%rip), %rsi     # 0x32e74
movl $0xce8, %edx            # imm = 0xCE8
leaq 0x28bb9(%rip), %rcx     # 0x34ef1
callq 0x4100
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x50(%rax)
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x8b40
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xc391
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
callq 0x8bd0
movb $0x0, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rax
cmpl $0x3, (%rax)
jne 0xc3ca
movq -0x10(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7550
movq -0x290(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0xe7b0
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
movl $0x1, %esi
movl $0x60, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc3e3
jmp 0xc420
movq -0x10(%rbp), %rdi
callq 0x11360
movq -0x10(%rbp), %rdi
leaq 0x248b9(%rip), %rsi     # 0x30cb0
callq 0xf2c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xece0
movq -0x10(%rbp), %rdi
movl $0xa, %esi
callq 0x8b40
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
movl $0x1, %esi
movl $0x61, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc439
jmp 0xc466
movq -0x10(%rbp), %rdi
callq 0x11360
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xece0
movq -0x10(%rbp), %rdi
movl $0xb, %esi
callq 0x8b40
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
movl $0x1, %esi
movl $0x62, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc47f
jmp 0xc4be
movq -0x10(%rbp), %rdi
callq 0x11360
movq -0x10(%rbp), %rdi
movl $0x61, %esi
movl $0x8, %edx
callq 0x7ea0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x1, 0x50(%rax)
movq -0x10(%rbp), %rdi
movl $0xb, %esi
callq 0x8b40
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0xb8(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x4120
leaq -0xb8(%rbp), %rdi
leaq 0x25a76(%rip), %rsi     # 0x31f60
movl $0x98, %edx
callq 0x41a0
movq -0x298(%rbp), %rdi
movl $0x1, %esi
leaq -0xb8(%rbp), %rdx
callq 0x8d40
testb $0x1, %al
jne 0xc515
jmp 0xc5b3
movq -0x10(%rbp), %rdi
callq 0x11360
movq -0x10(%rbp), %rdi
movl $0xc, %esi
callq 0x8b40
movq -0x18(%rbp), %rax
movq %rax, -0x2a0(%rbp)
leaq -0x150(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x4120
leaq -0x150(%rbp), %rdi
leaq 0x25aa0(%rip), %rsi     # 0x31ff8
movl $0x98, %edx
callq 0x41a0
movq -0x2a0(%rbp), %rdi
movl $0x1, %esi
leaq -0x150(%rbp), %rdx
callq 0x8d40
testb $0x1, %al
jne 0xc580
jmp 0xc59d
movq -0x10(%rbp), %rdi
movl $0x63, %esi
movl $0x8, %edx
callq 0x7ea0
movq -0x20(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0xc5aa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xece0
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
movl $0x1, %esi
movl $0x5f, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc5cc
jmp 0xc608
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
callq 0x113a0
testb $0x1, %al
jne 0xc5e8
jmp 0xc5f6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x1, 0x50(%rax)
jmp 0xc5ff
movq -0x10(%rbp), %rdi
callq 0x8bd0
movb $0x0, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x5f, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc61e
jmp 0xc64a
movq -0x10(%rbp), %rdi
callq 0x113a0
testb $0x1, %al
jne 0xc641
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movb $0x0, -0x1(%rbp)
jmp 0xc878
movb $0x1, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rax
movq %rax, -0x2a8(%rbp)
leaq -0x1e8(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x4120
leaq -0x1e8(%rbp), %rdi
leaq 0x25a1a(%rip), %rsi     # 0x32090
movl $0x98, %edx
callq 0x41a0
movq -0x2a8(%rbp), %rdi
xorl %esi, %esi
leaq -0x1e8(%rbp), %rdx
callq 0x8d40
testb $0x1, %al
jne 0xc69b
jmp 0xc6ba
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
callq 0x8bd0
movb $0x0, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rax
movq %rax, -0x2b0(%rbp)
leaq -0x280(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x4120
movq -0x2b0(%rbp), %rdi
movb $0x1, -0x27a(%rbp)
movb $0x1, -0x279(%rbp)
movb $0x1, -0x277(%rbp)
movl $0x1, %esi
leaq -0x280(%rbp), %rdx
callq 0x8d40
testb $0x1, %al
jne 0xc71f
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x9, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc71f
jmp 0xc736
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9940
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
movl $0x1, %esi
movl $0x6d, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc74f
jmp 0xc7a0
movq -0x18(%rbp), %rdi
addq $0x30, %rdi
addq $0x8, %rdi
leaq 0x60cdc(%rip), %rsi     # 0x6d43e
leaq 0x27eb1(%rip), %rdx     # 0x3461a
callq 0x9400
testb $0x1, %al
jne 0xc774
jmp 0xc7a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xece0
movq -0x10(%rbp), %rdi
callq 0xf060
movb $0x0, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rdi
movl $0x1, %esi
movl $0x69, %edx
callq 0x8c40
testb $0x1, %al
jne 0xc7b9
jmp 0xc81e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x20(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0xc7e5
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0xf3a0
testb $0x1, %al
jne 0xc7e5
jmp 0xc7f7
movq -0x10(%rbp), %rdi
callq 0x8bd0
movb $0x0, -0x1(%rbp)
jmp 0xc878
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xece0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
callq 0xf060
movb $0x0, -0x1(%rbp)
jmp 0xc878
movq -0x18(%rbp), %rax
cmpl $0x8, (%rax)
jne 0xc83b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa3f0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xc878
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x20(%rbp), %rax
movb $0x1, 0x54(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa3f0
andb $0x1, %al
movb %al, -0x281(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0x54(%rax)
movb -0x281(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
nopw %cs:(%rax,%rax)