// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x2, %eax
je 0x9ddc
cmpl $0x1, %eax
jne 0x9f1d
movl 0x30(%r14), %eax
leaq 0x1134f(%rip), %rcx     # 0x1b0f0
cmpb $0x0, (%rax,%rcx)
je 0x9e35
movq %rbx, %rdi
callq 0xc5cd
movq %rbx, %rdi
movq %r14, %rsi
callq 0xade5
movq 0x18(%rbx), %rax
movl $0xe, (%rax)
leaq 0xfd59(%rip), %rsi      # 0x19b28
movq %rbx, %rdi
callq 0xb1e4
jmp 0x9e8a
movl 0x30(%r14), %eax
cmpq $0x5f, %rax
je 0x9e46
cmpl $0x66, %eax
jne 0x9e91
movq 0x18(%rbx), %rdi
leaq 0xc(%rsp), %rdx
movl $0x66, (%rdx)
leaq 0x10cdb(%rip), %r8      # 0x1aae0
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xb40a
movq %rbx, %rdi
testb %al, %al
je 0x9eea
callq 0xc5cd
movq %rbx, %rdi
callq 0xaffb
movq 0x18(%rbx), %rax
movl $0xc, (%rax)
jmp 0x9e8a
leaq 0x1134c(%rip), %rcx     # 0x1b188
cmpb $0x0, (%rax,%rcx)
je 0x9f1d
movq 0x18(%rbx), %rdi
leaq 0xc(%rsp), %rdx
movl $0x66, (%rdx)
leaq 0x10c84(%rip), %r8      # 0x1aae0
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xb40a
testb %al, %al
je 0x9ee7
movq %rbx, %rdi
callq 0xc5cd
movq %rbx, %rdi
callq 0xaffb
movq 0x18(%rbx), %rax
movl $0xc, (%rax)
movb $0x1, 0x50(%rax)
movb $0x1, %al
jmp 0x9f13
leaq 0x11388(%rip), %rcx     # 0x1b220
cmpb $0x0, (%rax,%rcx)
je 0x9eda
movq 0x18(%rbx), %r15
leaq 0xc(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x10c30(%rip), %r8      # 0x1aae0
movq %r15, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xb40a
testb %al, %al
je 0x9ee7
leaq 0xc(%rsp), %rdx
movl $0x66, (%rdx)
leaq 0x10c0b(%rip), %r8      # 0x1aae0
movq %r15, %rdi
jmp 0x9e5c
leaq 0x113d7(%rip), %rcx     # 0x1b2b8
cmpb $0x0, (%rax,%rcx)
je 0x9f1d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7d9d
movq 0x18(%rbx), %rax
movq 0x98(%rax), %rbx
movq %rbx, %rdi
callq 0xc990
cmpl $0x1, (%rbx)
jne 0x9f11
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x942b