// File: /workspace/github_c_makefile_star2_O2/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 $0xa0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x1, %eax
jne 0x96ee
movl 0x30(%r14), %ecx
leaq 0xf9a9(%rip), %rdx      # 0x19060
cmpb $0x0, (%rcx,%rdx)
je 0x972c
movq %rbx, %rdi
callq 0xba2f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa439
movq 0x18(%rbx), %rax
movl $0xe, (%rax)
leaq 0xe3b7(%rip), %rsi      # 0x17a98
movq %rbx, %rdi
callq 0xa7e8
jmp 0x979d
cmpl $0x2, %eax
jne 0x972c
movb $0x1, %bpl
cmpl $0x66, 0x30(%r14)
jne 0x972e
pushq $0x66
popq %rsi
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
je 0x97f3
movq %rbx, %rdi
callq 0xba2f
movq %rbx, %rdi
callq 0xa620
movq 0x18(%rbx), %rax
movl $0xc, (%rax)
jmp 0x979d
xorl %ebp, %ebp
cmpl $0x1, %eax
jne 0x9744
movl 0x30(%r14), %eax
leaq 0xf9ba(%rip), %rcx      # 0x190f8
cmpb $0x0, (%rax,%rcx)
jne 0x9770
testb %bpl, %bpl
je 0x97a1
movl 0x30(%r14), %esi
cmpq $0x5f, %rsi
je 0x9770
leaq 0xfa36(%rip), %rax      # 0x19190
cmpb $0x0, (%rsi,%rax)
je 0x97cd
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
je 0x97f3
pushq $0x66
popq %rsi
movq %rbx, %rdi
callq 0xb4f0
testb %al, %al
je 0x97f3
movq %rbx, %rdi
callq 0xba2f
movq %rbx, %rdi
callq 0xa620
movq 0x18(%rbx), %rax
movl $0xc, (%rax)
movb $0x1, 0x50(%rax)
movb $0x1, %al
jmp 0x9808
leaq 0xfa80(%rip), %rsi      # 0x19228
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 0x8ec8
leaq 0xfa54(%rip), %rsi      # 0x19228
leaq 0x8(%rsp), %rdi
movl $0x98, %edx
callq 0x4190
testb %bpl, %bpl
je 0x97b7
movl 0x30(%r14), %eax
cmpb $0x0, 0x8(%rsp,%rax)
je 0x97b7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x797d
movq %rbx, %rdi
callq 0x83cf
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq