// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_in_row
static bool handle_in_row(GumboParser* parser, GumboToken* token) {
  if (tag_in(token, kStartTag, &td_th_tags)) {
    clear_stack_to_table_row_context(parser);
    insert_element_from_token(parser, token);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_CELL);
    add_formatting_element(parser, &kActiveFormattingScopeMarker);
    return true;
  } else if (tag_is(token, kEndTag, GUMBO_TAG_TR)) {
    if (!has_an_element_in_table_scope(parser, GUMBO_TAG_TR)) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    } else {
      clear_stack_to_table_row_context(parser);
      pop_current_node(parser);
      set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_BODY);
      return true;
    }
  } else if (
    tag_in(token, kStartTag, &(const TagSet) {
      TAG(CAPTION), TAG(COL), TAG(COLGROUP), TAG(TBODY), TAG(TFOOT),
      TAG(THEAD), TAG(TR)
    })
    || tag_is(token, kEndTag, GUMBO_TAG_TABLE)
  ) {
    if (!has_an_element_in_table_scope(parser, GUMBO_TAG_TR)) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    } else {
      clear_stack_to_table_row_context(parser);
      pop_current_node(parser);
      set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_BODY);
      parser->_parser_state->_reprocess_current_token = true;
      return true;
    }
  } 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)
      || !has_an_element_in_table_scope(parser, GUMBO_TAG_TR)
    ) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    } else {
      clear_stack_to_table_row_context(parser);
      pop_current_node(parser);
      set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_TABLE_BODY);
      parser->_parser_state->_reprocess_current_token = true;
      return true;
    }
  } else if (
    tag_in(token, kEndTag, &(const TagSet) {
      TAG(BODY), TAG(CAPTION), TAG(COL), 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 $0x140, %rsp            # imm = 0x140
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ebp
cmpl $0x1, %ebp
jne 0xa488
movl 0x30(%r14), %eax
leaq 0x12b7f(%rip), %rcx     # 0x1cfd0
cmpb $0x0, (%rax,%rcx)
je 0xa488
movq %rbx, %rdi
callq 0xcfbd
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb69f
movq 0x18(%rbx), %rax
movl $0xe, (%rax)
leaq 0x1158d(%rip), %rsi     # 0x1ba08
movq %rbx, %rdi
callq 0xba57
jmp 0xa542
cmpl $0x2, %ebp
jne 0xa4d9
cmpl $0x66, 0x30(%r14)
jne 0xa4d9
leaq 0xc(%rsp), %rdx
movl $0x66, (%rdx)
leaq 0x1251a(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
movq %rbx, %rdi
testb %al, %al
je 0xa590
callq 0xcfbd
movq %rbx, %rdi
callq 0xb8b5
movq 0x18(%rbx), %rax
movl $0xc, (%rax)
jmp 0xa542
cmpl $0x1, %ebp
jne 0xa4ef
movl 0x30(%r14), %eax
leaq 0x12b7f(%rip), %rcx     # 0x1d068
cmpb $0x0, (%rax,%rcx)
jne 0xa4ff
cmpl $0x2, %ebp
jne 0xa546
cmpl $0x5f, 0x30(%r14)
jne 0xa5c5
leaq 0xc(%rsp), %rdx
movl $0x66, (%rdx)
leaq 0x124af(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
je 0xa58d
movq %rbx, %rdi
callq 0xcfbd
movq %rbx, %rdi
callq 0xb8b5
movq 0x18(%rbx), %rax
movl $0xc, (%rax)
movb $0x1, 0x50(%rax)
movb $0x1, %al
jmp 0xa5b9
leaq 0x12bb3(%rip), %rsi     # 0x1d100
leaq 0xa8(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
leaq 0x12c32(%rip), %rsi     # 0x1d198
leaq 0x10(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
cmpl $0x2, %ebp
jne 0xa639
movl 0x30(%r14), %eax
cmpb $0x0, 0x10(%rsp,%rax)
je 0xa639
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 0xa5b7
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
xorl %eax, %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x12b34(%rip), %rsi     # 0x1d100
leaq 0xa8(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
cmpl $0x2, %ebp
jne 0xa623
movl 0x30(%r14), %eax
cmpb $0x0, 0xa8(%rsp,%rax)
je 0xa55f
movl 0x30(%r14), %eax
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x123b9(%rip), %r8      # 0x1c9c0
movq %rbx, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
jne 0xa4ff
jmp 0xa58d
leaq 0x12b6e(%rip), %rsi     # 0x1d198
leaq 0x10(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
movq %rbx, %rdi
movq %r14, %rsi
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %rbp
jmp 0x99a2