// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_in_frameset
static bool handle_in_frameset(GumboParser* parser, GumboToken* token) {
  if (token->type == GUMBO_TOKEN_WHITESPACE) {
    insert_text_token(parser, token);
    return true;
  } else if (token->type == GUMBO_TOKEN_COMMENT) {
    append_comment_node(parser, get_current_node(parser), token);
    return true;
  } else if (token->type == GUMBO_TOKEN_DOCTYPE) {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_HTML)) {
    return handle_in_body(parser, token);
  } else if (tag_is(token, kStartTag, GUMBO_TAG_FRAMESET)) {
    insert_element_from_token(parser, token);
    return true;
  } else if (tag_is(token, kEndTag, GUMBO_TAG_FRAMESET)) {
    if (node_html_tag_is(get_current_node(parser), GUMBO_TAG_HTML)) {
      parser_add_parse_error(parser, token);
      ignore_token(parser);
      return false;
    }
    pop_current_node(parser);
    if (
      !is_fragment_parser(parser)
      && !node_html_tag_is(get_current_node(parser), GUMBO_TAG_FRAMESET)
    ) {
      set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_FRAMESET);
    }
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_FRAME)) {
    insert_element_from_token(parser, token);
    pop_current_node(parser);
    acknowledge_self_closing_tag(parser);
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_NOFRAMES)) {
    return handle_in_head(parser, token);
  } else if (token->type == GUMBO_TOKEN_EOF) {
    if (!node_html_tag_is(get_current_node(parser), GUMBO_TAG_HTML)) {
      parser_add_parse_error(parser, token);
      return false;
    }
    return true;
  } else {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x9fe2
leaq 0xd6c3(%rip), %rcx      # 0x17644
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x30(%r14), %eax
cmpl $0x82, %eax
je 0xa0b1
cmpl $0x80, %eax
je 0xa087
cmpl $0x81, %eax
je 0xa0a4
testl %eax, %eax
jne 0x9fe2
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4d63
cmpl $0x81, 0x30(%r14)
jne 0x9fe2
movq %rbx, %rdi
callq 0x7913
movq %rax, %rdi
xorl %esi, %esi
callq 0x82b7
testb %al, %al
je 0xa04c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x797d
movq %rbx, %rdi
callq 0x83cf
xorl %ebp, %ebp
jmp 0xa045
movq %rbx, %rdi
callq 0x7913
movq %rax, %rdi
xorl %esi, %esi
callq 0x82b7
movb $0x1, %bpl
testb %al, %al
jne 0xa045
movq %rbx, %rdi
movq %r14, %rsi
callq 0x797d
jmp 0x9ff5
movq %rbx, %rdi
callq 0x7913
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xa2ca
jmp 0xa042
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa59b
movb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0xa620
movq 0x18(%rbx), %rax
movb $0x1, %bpl
cmpq $0x0, 0x48(%rax)
jne 0xa045
movq %rbx, %rdi
callq 0x7913
movq %rax, %rdi
movl $0x81, %esi
callq 0x82b7
testb %al, %al
jne 0xa045
movq 0x18(%rbx), %rax
movl $0x14, (%rax)
jmp 0xa045
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa439
movq %rbx, %rdi
callq 0xa620
movq 0x18(%rbx), %rax
movb $0x1, 0x51(%rax)
jmp 0xa042
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa439
jmp 0xa042
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x8893