// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x1, %eax
jne 0x959c
movl 0x30(%r14), %ecx
cmpq $0x66, %rcx
jne 0x955b
movq %rbx, %rdi
callq 0xb9f8
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa439
movq 0x18(%rbx), %rax
movl $0xd, (%rax)
jmp 0x963f
leaq 0xfafe(%rip), %rdx      # 0x19060
cmpb $0x0, (%rcx,%rdx)
je 0x959c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x797d
movq %rbx, %rdi
callq 0xb9f8
pushq $0x66
popq %rsi
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x7c99
movq 0x18(%rbx), %rax
movb $0x1, 0x50(%rax)
movl $0xd, (%rax)
jmp 0x9678
cmpl $0x2, %eax
jne 0x95de
movl 0x30(%r14), %esi
leaq 0xfbe4(%rip), %rcx      # 0x19190
cmpb $0x0, (%rsi,%rcx)
je 0x95de
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
je 0x9665
movq %rbx, %rdi
callq 0xb9f8
movq %rbx, %rdi
callq 0xa620
movq 0x18(%rbx), %rax
movl $0x8, (%rax)
jmp 0x963f
cmpl $0x1, %eax
jne 0x9643
movl 0x30(%r14), %ecx
leaq 0xf8a2(%rip), %rdx      # 0x18e90
cmpb $0x0, (%rcx,%rdx)
je 0x9651
pushq $0x63
popq %rsi
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
jne 0x9621
pushq $0x64
popq %rsi
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
jne 0x9621
pushq $0x65
popq %rsi
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
je 0x9665
movq %rbx, %rdi
callq 0xb9f8
movq %rbx, %rdi
callq 0xa620
movq 0x18(%rbx), %rax
movl $0x8, (%rax)
movb $0x1, 0x50(%rax)
movb $0x1, %al
jmp 0x967a
cmpl $0x2, %eax
jne 0x9682
movl 0x30(%r14), %ecx
cmpl $0x5f, %ecx
je 0x95f4
cmpl $0x2, %eax
jne 0x9682
movl %ecx, %eax
leaq 0xf8c9(%rip), %rcx      # 0x18f28
cmpb $0x0, (%rax,%rcx)
je 0x9682
movq %rbx, %rdi
movq %r14, %rsi
callq 0x797d
movq %rbx, %rdi
callq 0x83cf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8ec8