// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_in_table_body
static bool handle_in_table_body(GumboParser* parser, GumboToken* token) {
  if (tag_is(token, kStartTag, GUMBO_TAG_TR)) {
    clear_stack_to_table_body_context(parser);
    insert_element_from_token(parser, token);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_ROW);
    return true;
  } else if (tag_in(token, kStartTag, &td_th_tags)) {
    parser_add_parse_error(parser, token);
    clear_stack_to_table_body_context(parser);
    insert_element_of_tag_type(parser, GUMBO_TAG_TR, GUMBO_INSERTION_IMPLIED);
    parser->_parser_state->_reprocess_current_token = true;
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_ROW);
    return false;
  } else if (
    tag_in(token, kEndTag, &(const TagSet){TAG(TBODY), TAG(TFOOT), TAG(THEAD)})
  ) {
    if (!has_an_element_in_table_scope(parser, token->v.end_tag)) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    }
    clear_stack_to_table_body_context(parser);
    pop_current_node(parser);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
    return true;
  } else if (
    tag_in(token, kStartTag, &(const TagSet) {
      TAG(CAPTION), TAG(COL), TAG(COLGROUP), TAG(TBODY), TAG(TFOOT),
      TAG(THEAD)
    })
    || tag_is(token, kEndTag, GUMBO_TAG_TABLE)
  ) {
    if (
      !(
        has_an_element_in_table_scope(parser, GUMBO_TAG_TBODY)
        || has_an_element_in_table_scope(parser, GUMBO_TAG_THEAD)
        || has_an_element_in_table_scope(parser, GUMBO_TAG_TFOOT)
      )
    ) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    }
    clear_stack_to_table_body_context(parser);
    pop_current_node(parser);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE);
    parser->_parser_state->_reprocess_current_token = true;
    return true;
  } else if (
    tag_in(token, kEndTag, &(const TagSet) {
      TAG(BODY), TAG(CAPTION), TAG(COL), TAG(TR), TAG(COLGROUP),
      TAG(HTML), TAG(TD), TAG(TH)
    })
  ) {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  } else {
    return handle_in_table(parser, token);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ebp
cmpl $0x1, %ebp
jne 0xa28b
cmpl $0x66, 0x30(%r14)
jne 0xa23d
movq %rbx, %rdi
callq 0xcf70
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb69f
movq 0x18(%rbx), %rax
movl $0xd, (%rax)
jmp 0xa3a0
cmpl $0x1, %ebp
jne 0xa28b
movl 0x30(%r14), %eax
leaq 0x12d83(%rip), %rcx     # 0x1cfd0
cmpb $0x0, (%rax,%rcx)
je 0xa28b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8171
movq %rbx, %rdi
callq 0xcf70
movq %rbx, %rdi
movl $0x66, %esi
movl $0x8, %edx
callq 0x84b0
movq 0x18(%rbx), %rax
movb $0x1, 0x50(%rax)
movl $0xd, (%rax)
jmp 0xa420
cmpl $0x2, %ebp
jne 0xa2e9
movl 0x30(%r14), %eax
leaq 0x12e65(%rip), %rcx     # 0x1d100
cmpb $0x0, (%rax,%rcx)
je 0xa2e9
movl 0x30(%r14), %eax
leaq 0x4(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x1270d(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
movq %rbx, %rdi
testb %al, %al
je 0xa3f9
callq 0xcf70
movq %rbx, %rdi
callq 0xb8b5
movq 0x18(%rbx), %rax
movl $0x8, (%rax)
jmp 0xa3a0
cmpl $0x1, %ebp
jne 0xa2ff
movl 0x30(%r14), %eax
leaq 0x12b07(%rip), %rcx     # 0x1ce00
cmpb $0x0, (%rax,%rcx)
jne 0xa313
cmpl $0x2, %ebp
jne 0xa3a4
cmpl $0x5f, 0x30(%r14)
jne 0xa3d0
leaq 0x4(%rsp), %rdx
movl $0x63, (%rdx)
leaq 0x1269b(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
jne 0xa382
leaq 0x4(%rsp), %rdx
movl $0x64, (%rdx)
leaq 0x12676(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
jne 0xa382
leaq 0x4(%rsp), %rdx
movl $0x65, (%rdx)
leaq 0x12651(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
je 0xa3f6
movq %rbx, %rdi
callq 0xcf70
movq %rbx, %rdi
callq 0xb8b5
movq 0x18(%rbx), %rax
movl $0x8, (%rax)
movb $0x1, 0x50(%rax)
movb $0x1, %al
jmp 0xa422
leaq 0x12aed(%rip), %rsi     # 0x1ce98
leaq 0x8(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
movq %rbx, %rdi
movq %r14, %rsi
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x99a2
leaq 0x12ac1(%rip), %rsi     # 0x1ce98
leaq 0x8(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
cmpl $0x2, %ebp
jne 0xa3ba
movl 0x30(%r14), %eax
cmpb $0x0, 0x8(%rsp,%rax)
je 0xa3ba
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8171
movq 0x18(%rbx), %rax
movq 0x98(%rax), %rbx
movq %rbx, %rdi
callq 0xd3c9
cmpl $0x1, (%rbx)
jne 0xa420
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq