LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_after_frameset
static bool handle_after_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, kEndTag, GUMBO_TAG_HTML)) {
    GumboNode* html = parser->_parser_state->_open_elements.data[0];
    assert(node_html_tag_is(html, GUMBO_TAG_HTML));
    record_end_of_element (
      parser->_parser_state->_current_token,
      &html->v.element
    );
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_AFTER_AFTER_FRAMESET);
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_NOFRAMES)) {
    return handle_in_head(parser, token);
  } else if (token->type == GUMBO_TOKEN_EOF) {
    return true;
  } else {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %ecx
testl %ecx, %ecx
je 0xb2db
cmpl $0x3, %ecx
je 0xb281
cmpl $0x4, %ecx
jne 0xb29b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb82b
jmp 0xb297
movq %rbx, %rdi
callq 0x8107
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xb4a3
movb $0x1, %al
jmp 0xb307
cmpl $0x1, %ecx
jne 0xb2a7
cmpl $0x0, 0x30(%r14)
je 0xb30f
cmpl $0x2, %ecx
jne 0xb2b3
cmpl $0x0, 0x30(%r14)
je 0xb321
cmpl $0x1, %ecx
jne 0xb2d4
cmpl $0x82, 0x30(%r14)
jne 0xb2d4
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x91d5
movb $0x1, %al
cmpl $0x8, %ecx
je 0xb307
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 0xb305
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
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 0x4fa2
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8b69
testb %al, %al
je 0xb37d
movq 0x18(%rbx), %rax
movq 0x98(%rax), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x78(%r14)
movups 0x8(%rax), %xmm0
movups %xmm0, 0x68(%r14)
addq $0x40, %r14
cmpl $0x2, (%rax)
jne 0xb367
movups 0x20(%rax), %xmm0
jmp 0xb36a
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq 0x18(%rbx), %rax
movl $0x16, (%rax)
jmp 0xb297
leaq 0x140c4(%rip), %rdi     # 0x1f448
leaq 0x12485(%rip), %rsi     # 0x1d810
leaq 0x140dd(%rip), %rcx     # 0x1f46f
movl $0xfde, %edx            # imm = 0xFDE
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_after_after_body
static bool handle_after_after_body(GumboParser* parser, GumboToken* token) {
  if (token->type == GUMBO_TOKEN_COMMENT) {
    append_comment_node(parser, get_document_node(parser), token);
    return true;
  } else if (
    token->type == GUMBO_TOKEN_DOCTYPE
    || token->type == GUMBO_TOKEN_WHITESPACE
    || tag_is(token, kStartTag, GUMBO_TAG_HTML)
  ) {
    return handle_in_body(parser, token);
  } else if (token->type == GUMBO_TOKEN_EOF) {
    return true;
  } else {
    parser_add_parse_error(parser, token);
    set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_BODY);
    parser->_parser_state->_reprocess_current_token = true;
    return false;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq %rdi, %r14
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0xb3dd
movb $0x1, %bl
leaq 0x10275(%rip), %rcx     # 0x1b62c
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
movq %r14, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4fa2
cmpl $0x0, 0x30(%rdx)
je 0xb3c0
cmpl $0x8, %eax
je 0xb409
movq %r14, %rdi
movq %rdx, %rsi
callq 0x8171
movq 0x18(%r14), %rax
movl $0x6, (%rax)
movb $0x1, 0x50(%rax)
xorl %ebx, %ebx
jmp 0xb409
movq 0x8(%r14), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0xb4a3
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: handle_after_after_frameset
static bool handle_after_after_frameset (
  GumboParser* parser,
  GumboToken* token
) {
  if (token->type == GUMBO_TOKEN_COMMENT) {
    append_comment_node(parser, get_document_node(parser), token);
    return true;
  } else if (
    token->type == GUMBO_TOKEN_DOCTYPE
    || token->type == GUMBO_TOKEN_WHITESPACE
    || tag_is(token, kStartTag, GUMBO_TAG_HTML)
  ) {
    return handle_in_body(parser, token);
  } else if (token->type == GUMBO_TOKEN_EOF) {
    return true;
  } else if (tag_is(token, kStartTag, GUMBO_TAG_NOFRAMES)) {
    return handle_in_head(parser, token);
  } else {
    parser_add_parse_error(parser, token);
    ignore_token(parser);
    return false;
  }
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movl (%rsi), %ecx
testl %ecx, %ecx
je 0xb469
cmpl $0x4, %ecx
je 0xb469
cmpl $0x3, %ecx
jne 0xb43d
movq 0x8(%rbx), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xb4a3
movb $0x1, %al
jmp 0xb4a1
cmpl $0x1, %ecx
jne 0xb448
cmpl $0x0, 0x30(%rdx)
je 0xb469
movb $0x1, %al
cmpl $0x8, %ecx
je 0xb4a1
cmpl $0x1, %ecx
jne 0xb475
cmpl $0x82, 0x30(%rdx)
jne 0xb475
movq %rbx, %rdi
movq %rdx, %rsi
popq %rbx
jmp 0x91d5
movq %rbx, %rdi
movq %rdx, %rsi
popq %rbx
jmp 0x4fa2
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x8171
movq 0x18(%rbx), %rax
movq 0x98(%rax), %rbx
movq %rbx, %rdi
callq 0xd3c9
cmpl $0x1, (%rbx)
jne 0xb49f
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: append_comment_node
static void append_comment_node (
  GumboParser* parser,
  GumboNode* node,
  const GumboToken* token
) {
  maybe_flush_text_node_buffer(parser);
  GumboNode* comment = create_node(GUMBO_NODE_COMMENT);
  comment->type = GUMBO_NODE_COMMENT;
  comment->parse_flags = GUMBO_INSERTION_NORMAL;
  comment->v.text.text = token->v.text;
  comment->v.text.original_text = token->original_text;
  comment->v.text.start_pos = token->position;
  append_node(node, comment);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
callq 0x8740
movl $0x90, %edi
callq 0x11e58
movq $0x0, 0x8(%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, 0x10(%rax)
movl $0x4, (%rax)
movq 0x30(%rbx), %rcx
movq %rcx, 0x18(%rax)
movups 0x20(%rbx), %xmm0
movups %xmm0, 0x20(%rax)
movq 0x18(%rbx), %rcx
movq %rcx, 0x40(%rax)
movups 0x8(%rbx), %xmm0
movups %xmm0, 0x30(%rax)
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8ba9
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: is_in_static_list
static bool is_in_static_list (
  const char* needle,
  const GumboStringPiece* haystack,
  bool exact_match
) {
  for (size_t i = 0; haystack[i].length > 0; i++) {
    if (
      (exact_match && string_piece_equal_cstr(&haystack[i], needle))
      || (!exact_match && string_piece_equal_cstr_icase(&haystack[i], needle))
    ) {
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0xc(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x8(%rsi), %rbx
testq %rbx, %rbx
setne %bpl
je 0xb615
movq %rdi, %r15
xorl %r14d, %r14d
leaq 0xec16(%rip), %r13      # 0x1a150
movq %r14, %r12
shlq $0x4, %r12
addq 0x10(%rsp), %r12
cmpb $0x0, 0xc(%rsp)
je 0xb578
movq %r15, %rdi
callq 0x40b0
cmpq %rbx, %rax
jne 0xb571
movq (%r12), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x4200
testl %eax, %eax
je 0xb615
cmpb $0x0, 0xc(%rsp)
jne 0xb5f4
movq %r15, %rdi
callq 0x40b0
cmpq %rbx, %rax
jne 0xb5f4
testq %rax, %rax
sete %sil
je 0xb5ef
movq (%r12), %rcx
movzbl (%rcx), %edx
movb (%r13,%rdx), %sil
andb $0x20, %sil
orb %dl, %sil
movzbl (%r15), %edx
movb (%r13,%rdx), %dil
andb $0x20, %dil
orb %dl, %dil
cmpb %dil, %sil
jne 0xb5f4
movl $0x1, %edx
cmpq %rdx, %rax
sete %sil
je 0xb5ef
movzbl (%rcx,%rdx), %esi
movb (%r13,%rsi), %dil
andb $0x20, %dil
orb %sil, %dil
movzbl (%r15,%rdx), %esi
movb (%r13,%rsi), %r8b
andb $0x20, %r8b
orb %sil, %r8b
incq %rdx
cmpb %r8b, %dil
je 0xb5bb
jmp 0xb5f4
testb %sil, %sil
jne 0xb615
incq %r14
movq %r14, %rax
shlq $0x4, %rax
movq 0x10(%rsp), %rcx
movq 0x8(%rcx,%rax), %rbx
testq %rbx, %rbx
setne %bpl
jne 0xb53a
andb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: doctype_matches
static bool doctype_matches (
  const GumboTokenDocType* doctype,
  const GumboStringPiece* public_id,
  const GumboStringPiece* system_id,
  bool allow_missing_system_id
) {
  return
    (allow_missing_system_id || doctype->has_system_identifier)
    && string_piece_equal_cstr(public_id, doctype->public_identifier)
    && string_piece_equal_cstr(system_id, doctype->system_identifier);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testl %ecx, %ecx
jne 0xb646
cmpb $0x1, 0x1a(%r14)
jne 0xb691
movq 0x8(%r14), %r12
movq %r12, %rdi
callq 0x40b0
cmpq 0x8(%r15), %rax
jne 0xb691
movq (%r15), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4200
testl %eax, %eax
jne 0xb691
movq 0x10(%r14), %r14
movq %r14, %rdi
callq 0x40b0
cmpq 0x8(%rbx), %rax
jne 0xb691
movq (%rbx), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4200
testl %eax, %eax
sete %al
jmp 0xb693
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: insert_element_from_token
static GumboNode* insert_element_from_token (
  GumboParser* parser,
  GumboToken* token
) {
  GumboNode* element = create_element_from_token(token, GUMBO_NAMESPACE_HTML);
  insert_element(parser, element, false);
  gumbo_debug (
    "Inserting <%s> element (@%p) from token.\n",
    gumbo_normalized_tagname(element->v.element.tag),
    (void*)element
  );
  return element;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
callq 0xb6d2
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8703
movl 0x28(%r14), %edi
callq 0x7a30
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: create_element_from_token
static GumboNode* create_element_from_token (
  GumboToken* token,
  GumboNamespaceEnum tag_namespace
) {
  assert(token->type == GUMBO_TOKEN_START_TAG);
  GumboTokenStartTag* start_tag = &token->v.start_tag;

  GumboNodeType type =
    (
      tag_namespace == GUMBO_NAMESPACE_HTML
      && start_tag->tag == GUMBO_TAG_TEMPLATE
    )
    ? GUMBO_NODE_TEMPLATE
    : GUMBO_NODE_ELEMENT
  ;

  GumboNode* node = create_node(type);
  GumboElement* element = &node->v.element;
  gumbo_vector_init(1, &element->children);
  element->attributes = start_tag->attributes;
  element->tag = start_tag->tag;
  element->tag_namespace = tag_namespace;

  assert(token->original_text.length >= 2);
  assert(token->original_text.data[0] == '<');
  assert(token->original_text.data[token->original_text.length - 1] == '>');
  element->original_tag = token->original_text;
  element->start_pos = token->position;
  element->original_end_tag = STRING_PIECE_INIT;
  element->end_pos = kGumboEmptySourcePosition;

  // The element takes ownership of the attributes from the token, so any
  // allocated-memory fields should be nulled out.
  start_tag->attributes = GUMBO_VECTOR_INIT;
  return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, (%rdi)
jne 0xb7af
movl %esi, %ebp
movq %rdi, %rbx
movl $0x1, %r15d
testl %esi, %esi
jne 0xb701
xorl %eax, %eax
cmpl $0x9, 0x30(%rbx)
sete %al
leal (%rax,%rax,4), %r15d
incl %r15d
movl $0x90, %edi
callq 0x11e58
movq %rax, %r14
movq $0x0, 0x8(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x10(%r14)
movl %r15d, (%r14)
leaq 0x18(%r14), %rsi
movl $0x1, %edi
callq 0x7ec4
movups 0x38(%rbx), %xmm0
movups %xmm0, 0x80(%r14)
movl 0x30(%rbx), %eax
movl %eax, 0x28(%r14)
movl %ebp, 0x2c(%r14)
movq 0x28(%rbx), %rcx
cmpq $0x1, %rcx
jbe 0xb7ce
leaq 0x20(%rbx), %rax
movq (%rax), %rdx
cmpb $0x3c, (%rdx)
jne 0xb7ed
cmpb $0x3e, -0x1(%rdx,%rcx)
jne 0xb80c
leaq 0x38(%rbx), %rcx
movups (%rax), %xmm0
movups %xmm0, 0x30(%r14)
movups 0x8(%rbx), %xmm0
movups %xmm0, 0x50(%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x60(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x68(%r14)
movq $0x0, 0x78(%r14)
movups %xmm0, (%rcx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13017(%rip), %rdi     # 0x1e7cd
leaq 0x12053(%rip), %rsi     # 0x1d810
leaq 0x1302e(%rip), %rcx     # 0x1e7f2
movl $0x426, %edx            # imm = 0x426
callq 0x4100
leaq 0x13064(%rip), %rdi     # 0x1e839
leaq 0x12034(%rip), %rsi     # 0x1d810
leaq 0x1300f(%rip), %rcx     # 0x1e7f2
movl $0x439, %edx            # imm = 0x439
callq 0x4100
leaq 0x13066(%rip), %rdi     # 0x1e85a
leaq 0x12015(%rip), %rsi     # 0x1d810
leaq 0x12ff0(%rip), %rcx     # 0x1e7f2
movl $0x43a, %edx            # imm = 0x43A
callq 0x4100
leaq 0x1306b(%rip), %rdi     # 0x1e87e
leaq 0x11ff6(%rip), %rsi     # 0x1d810
leaq 0x12fd1(%rip), %rcx     # 0x1e7f2
movl $0x43b, %edx            # imm = 0x43B
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: insert_text_token
static void insert_text_token(GumboParser* parser, GumboToken* token) {
  assert (
    token->type == GUMBO_TOKEN_WHITESPACE
    || token->type == GUMBO_TOKEN_CHARACTER
    || token->type == GUMBO_TOKEN_NULL
    || token->type == GUMBO_TOKEN_CDATA
  );
  TextNodeBufferState* buffer_state = &parser->_parser_state->_text_node;
  if (buffer_state->_buffer.length == 0) {
    // Initialize position fields.
    buffer_state->_start_original_text = token->original_text.data;
    buffer_state->_start_position = token->position;
  }
  gumbo_string_buffer_append_codepoint (
    token->v.character,
    &buffer_state->_buffer
  );
  if (token->type == GUMBO_TOKEN_CHARACTER) {
    buffer_state->_type = GUMBO_NODE_TEXT;
  } else if (token->type == GUMBO_TOKEN_CDATA) {
    buffer_state->_type = GUMBO_NODE_CDATA;
  }
  gumbo_debug("Inserting text token '%c'.\n", token->v.character);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl (%rsi), %eax
andl $-0x4, %eax
cmpl $0x4, %eax
jne 0xb896
movq %rsi, %rbx
movq 0x18(%rdi), %r14
leaq 0x58(%r14), %rsi
cmpq $0x0, 0x60(%r14)
jne 0xb867
movq 0x20(%rbx), %rax
movq %rax, 0x70(%r14)
movups 0x8(%rbx), %xmm0
movups %xmm0, 0x78(%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x88(%r14)
movl 0x30(%rbx), %edi
callq 0x4322
movl (%rbx), %eax
cmpl $0x5, %eax
je 0xb882
cmpl $0x6, %eax
jne 0xb88e
movl $0x3, %eax
jmp 0xb887
movl $0x2, %eax
movl %eax, 0x90(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1307c(%rip), %rdi     # 0x1e919
leaq 0x11f6c(%rip), %rsi     # 0x1d810
leaq 0x13103(%rip), %rcx     # 0x1e9ae
movl $0x4ac, %edx            # imm = 0x4AC
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: run_generic_parsing_algorithm
static void run_generic_parsing_algorithm (
  GumboParser* parser,
  GumboToken* token,
  GumboTokenizerEnum lexer_state
) {
  insert_element_from_token(parser, token);
  gumbo_tokenizer_set_state(parser, lexer_state);
  GumboParserState* parser_state = parser->_parser_state;
  parser_state->_original_insertion_mode = parser_state->_insertion_mode;
  parser_state->_insertion_mode = GUMBO_INSERTION_MODE_TEXT;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
callq 0xb69f
movq %r14, %rdi
movl %ebx, %esi
callq 0xd252
movq 0x18(%r14), %rax
movl (%rax), %ecx
movl %ecx, 0x4(%rax)
movl $0x7, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: add_formatting_element
static void add_formatting_element(GumboParser* parser, const GumboNode* node) {
  assert (
    node == &kActiveFormattingScopeMarker
    || node->type == GUMBO_NODE_ELEMENT
  );
  GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
  if (node == &kActiveFormattingScopeMarker) {
    gumbo_debug("Adding a scope marker.\n");
  } else {
    gumbo_debug("Adding a formatting element.\n");
  }

  // Hunt for identical elements.
  int earliest_identical_element = elements->length;
  int num_identical_elements = count_formatting_elements_of_tag (
    parser,
    node,
    &earliest_identical_element
  );

  // Noah's Ark clause: if there're at least 3, remove the earliest.
  if (num_identical_elements >= 3) {
    gumbo_debug (
      "Noah's ark clause: removing element at %d.\n",
      earliest_identical_element
    );
    gumbo_vector_remove_at(earliest_identical_element, elements);
  }

  gumbo_vector_add((void*) node, elements);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0xff99(%rip), %rdx      # 0x1ba08
cmpq %rdx, %rsi
je 0xba7d
cmpl $0x1, (%rbx)
jne 0xbbd9
movq 0x18(%rdi), %r14
movl 0x20(%r14), %r13d
addq $0x18, %r14
leaq 0x80(%rbx), %rax
movq %rax, 0x10(%rsp)
xorl %esi, %esi
movq %r13, %r15
testl %r15d, %r15d
jle 0xbb91
decq %r15
movq (%r14), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rbp
cmpq %rdx, %rbp
je 0xbb88
cmpl $0x1, (%rbp)
jne 0xbbba
movl 0x28(%rbp), %eax
cmpl 0x28(%rbx), %eax
jne 0xbb88
movl 0x2c(%rbp), %eax
cmpl 0x2c(%rbx), %eax
jne 0xbb88
movl %esi, 0x4(%rsp)
movl 0x88(%rbx), %r12d
cmpl $0x0, 0x88(%rbp)
sete %al
je 0xbb6c
movq 0x80(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq 0x10(%rsp), %rdi
callq 0xbc45
movzbl %al, %eax
subl %eax, %r12d
testb %al, %al
je 0xbb6a
movq %r13, 0x8(%rsp)
movl $0x1, %r13d
movl 0x88(%rbp), %eax
cmpq %rax, %r13
setae %al
jae 0xbb63
movq 0x80(%rbp), %rax
movq (%rax,%r13,8), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdx
movq 0x10(%rsp), %rdi
callq 0xbc45
decl %r12d
incq %r13
testb %al, %al
jne 0xbb23
movzbl %al, %eax
subl %eax, %r12d
incl %r12d
xorl %eax, %eax
movq 0x8(%rsp), %r13
jmp 0xbb6c
xorl %eax, %eax
testl %r12d, %r12d
sete %cl
andb %al, %cl
cmovnel %r15d, %r13d
movzbl %cl, %eax
movl 0x4(%rsp), %esi
addl %eax, %esi
leaq 0xfe80(%rip), %rdx      # 0x1ba08
cmpq %rdx, %rbp
jne 0xba9a
cmpl $0x3, %esi
jl 0xbba1
movl %r13d, %edi
movq %r14, %rsi
callq 0x8089
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7ef9
leaq 0x1310f(%rip), %rdi     # 0x1ecd0
leaq 0x11c48(%rip), %rsi     # 0x1d810
leaq 0x12f28(%rip), %rcx     # 0x1eaf7
movl $0x4f2, %edx            # imm = 0x4F2
callq 0x4100
leaq 0x12e8f(%rip), %rdi     # 0x1ea6f
leaq 0x11c29(%rip), %rsi     # 0x1d810
leaq 0x12ecb(%rip), %rcx     # 0x1eab9
movl $0x503, %edx            # imm = 0x503
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: generate_all_implied_end_tags_thoroughly
static void generate_all_implied_end_tags_thoroughly(GumboParser* parser) {
  static const TagSet tags = {
    TAG(CAPTION), TAG(COLGROUP), TAG(DD), TAG(DT), TAG(LI), TAG(OPTION),
    TAG(OPTGROUP), TAG(P), TAG(RP), TAG(RT), TAG(RTC), TAG(TBODY),
    TAG(TD), TAG(TFOOT), TAG(TH), TAG(HEAD), TAG(TR)
  };
  while (node_tag_in_set(get_current_node(parser), &tags)) {
    pop_current_node(parser);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8107
leaq 0xff35(%rip), %rsi      # 0x1bb40
movq %rax, %rdi
callq 0x8b24
testb %al, %al
je 0xbc3d
leaq 0xff22(%rip), %r14      # 0x1bb40
movq %rbx, %rdi
callq 0xb8b5
movq %rbx, %rdi
callq 0x8107
movq %rax, %rdi
movq %r14, %rsi
callq 0x8b24
testb %al, %al
jne 0xbc1e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: has_an_element_in_specific_scope
static bool has_an_element_in_specific_scope (
  const GumboParser* parser,
  int expected_size,
  const GumboTag* expected,
  bool negate,
  const TagSet* tags
) {
  const GumboVector* open_elements = &parser->_parser_state->_open_elements;
  for (int i = open_elements->length; --i >= 0;) {
    const GumboNode* node = open_elements->data[i];
    if (node->type != GUMBO_NODE_ELEMENT && node->type != GUMBO_NODE_TEMPLATE) {
      continue;
    }

    GumboTag node_tag = node->v.element.tag;
    GumboNamespaceEnum node_ns = node->v.element.tag_namespace;
    for (int j = 0; j < expected_size; ++j) {
      if (node_tag == expected[j] && node_ns == GUMBO_NAMESPACE_HTML) {
        return true;
      }
    }

    bool found = tagset_includes(tags, node_ns, node_tag);
    if (negate != found) {
      return false;
    }
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x18(%rdi), %rax
movslq 0x10(%rax), %rdi
testq %rdi, %rdi
jle 0xbd55
movq 0x8(%rax), %r9
testl %esi, %esi
setg %r10b
movslq %esi, %r11
movl %r11d, %ebx
movq -0x8(%r9,%rdi,8), %r12
movl (%r12), %ebp
cmpl $0x6, %ebp
je 0xbcb2
movl $0x3, %r15d
cmpl $0x1, %ebp
jne 0xbd39
movl 0x28(%r12), %r14d
movl 0x2c(%r12), %ebp
testl %esi, %esi
jle 0xbcd5
movl (%rdx), %r15d
xorl %r14d, %r15d
orl %ebp, %r15d
jne 0xbce0
movb $0x1, %al
movl $0x1, %r15d
jmp 0xbcdb
movl $0x4, %r15d
movl %r10d, %r12d
jmp 0xbd16
movl $0x1, %r15d
movq %r15, %r12
cmpq %r15, %rbx
je 0xbd09
movl (%rdx,%r12,4), %r13d
xorl %r14d, %r13d
leaq 0x1(%r12), %r15
orl %ebp, %r13d
jne 0xbce6
movb $0x1, %al
movl $0x1, %r15d
jmp 0xbd0f
movl $0x4, %r15d
cmpq %r11, %r12
setl %r12b
testb %r12b, %r12b
jne 0xbd39
movzbl (%r8,%r14), %r14d
btl %ebp, %r14d
setb %bpl
xorb %cl, %bpl
movzbl %bpl, %r15d
movl %r15d, %ebp
xorb $0x1, %bpl
andb %bpl, %al
cmpl $0x3, %r15d
je 0xbd44
testl %r15d, %r15d
jne 0xbd57
leaq -0x1(%rdi), %r14
cmpq $0x1, %rdi
movq %r14, %rdi
jg 0xbc95
xorl %eax, %eax
andb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: merge_attributes
static void merge_attributes (
  GumboToken* token,
  GumboNode* node
) {
  assert(token->type == GUMBO_TOKEN_START_TAG);
  assert(node->type == GUMBO_NODE_ELEMENT);
  const GumboVector* token_attr = &token->v.start_tag.attributes;
  GumboVector* node_attr = &node->v.element.attributes;

  for (unsigned int i = 0; i < token_attr->length; ++i) {
    GumboAttribute* attr = token_attr->data[i];
    if (!gumbo_get_attribute(node_attr, attr->name)) {
      // Ownership of the attribute is transferred by this gumbo_vector_add,
      // so it has to be nulled out of the original token so it doesn't get
      // double-deleted.
      gumbo_vector_add(attr, node_attr);
      token_attr->data[i] = NULL;
    }
  }
  // When attributes are merged, it means the token has been ignored and merged
  // with another token, so we need to free its memory. The attributes that are
  // transferred need to be nulled-out in the vector above so that they aren't
  // double-deleted.
  gumbo_token_destroy(token);

#ifndef NDEBUG
  // Mark this sentinel so the assertion in the main loop knows it's been
  // destroyed.
  token->v.start_tag.attributes = GUMBO_VECTOR_INIT;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, (%rdi)
jne 0xbf4f
movq %rsi, %r14
cmpl $0x1, (%rsi)
jne 0xbf6e
movq %rdi, %rbx
leaq 0x38(%rdi), %r12
cmpl $0x0, 0x40(%rdi)
je 0xbf35
subq $-0x80, %r14
xorl %r13d, %r13d
movq (%r12), %rax
movq (%rax,%r13,8), %r15
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x7218
testq %rax, %rax
jne 0xbf2a
movq %r15, %rdi
movq %r14, %rsi
callq 0x7ef9
movq (%r12), %rax
movq $0x0, (%rax,%r13,8)
incq %r13
movl 0x40(%rbx), %eax
cmpq %rax, %r13
jb 0xbefa
movq %rbx, %rdi
callq 0xd3c9
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x12877(%rip), %rdi     # 0x1e7cd
leaq 0x118b3(%rip), %rsi     # 0x1d810
leaq 0x12e4f(%rip), %rcx     # 0x1edb3
movl $0x72b, %edx            # imm = 0x72B
callq 0x4100
leaq 0x12d5b(%rip), %rdi     # 0x1ecd0
leaq 0x11894(%rip), %rsi     # 0x1d810
leaq 0x12e30(%rip), %rcx     # 0x1edb3
movl $0x72c, %edx            # imm = 0x72C
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: maybe_implicitly_close_p_tag
static bool maybe_implicitly_close_p_tag (
  GumboParser* parser,
  GumboToken* token
) {
  if (has_an_element_in_button_scope(parser, GUMBO_TAG_P)) {
    return implicitly_close_tags (
      parser,
      token,
      GUMBO_NAMESPACE_HTML,
      GUMBO_TAG_P
    );
  }
  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %rdx
movl $0x19, (%rdx)
leaq 0x108d7(%rip), %r8      # 0x1c880
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
je 0xbfd2
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movl $0x19, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc09f
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: maybe_implicitly_close_list_tag
static void maybe_implicitly_close_list_tag (
  GumboParser* parser,
  GumboToken* token,
  bool is_li
) {
  GumboParserState* state = parser->_parser_state;
  state->_frameset_ok = false;
  for (int i = state->_open_elements.length; --i >= 0;) {
    const GumboNode* node = state->_open_elements.data[i];
    bool is_list_tag = is_li
      ? node_html_tag_is(node, GUMBO_TAG_LI)
      : node_tag_in_set(node, &dd_dt_tags)
    ;
    if (is_list_tag) {
      implicitly_close_tags (
        parser,
        token,
        node->v.element.tag_namespace,
        node->v.element.tag
      );
      return;
    }
    if (
      is_special_node(node)
      && !node_tag_in_set(node, &(const TagSet){TAG(ADDRESS), TAG(DIV), TAG(P)})
    ) {
      return;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x18(%rdi), %rbx
movb $0x0, 0x52(%rbx)
movl 0x10(%rbx), %r15d
testl %r15d, %r15d
jle 0xc06e
movl %edx, %ebp
leaq 0x10732(%rip), %r12     # 0x1c740
leal -0x1(%r15), %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %r13
movq %r13, %rdi
testb %bpl, %bpl
je 0xc030
xorl %esi, %esi
movl $0x1f, %edx
callq 0x8b69
jmp 0xc038
movq %r12, %rsi
callq 0x8b24
testb %al, %al
jne 0xc07d
movq %r13, %rdi
callq 0xcc8d
testb %al, %al
je 0xc063
movq %r13, %rdi
leaq 0x10656(%rip), %rsi     # 0x1c6a8
callq 0x8b24
testb %al, %al
je 0xc06e
cmpl $0x1, %r15d
jg 0xc069
jmp 0xc06e
cmpl $0x2, %r15d
jl 0xc06e
movl %r14d, %r15d
jmp 0xc00e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x28(%r13), %ecx
movl 0x2c(%r13), %edx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc09f
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: implicitly_close_tags
static bool implicitly_close_tags (
  GumboParser* parser,
  GumboToken* token,
  GumboNamespaceEnum target_ns,
  GumboTag target
) {
  bool result = true;
  generate_implied_end_tags(parser, target);
  if (!node_qualified_tag_is(get_current_node(parser), target_ns, target)) {
    parser_add_parse_error(parser, token);
    while (
      !node_qualified_tag_is(get_current_node(parser), target_ns, target)
    ) {
      pop_current_node(parser);
    }
    result = false;
  }
  assert(node_qualified_tag_is(get_current_node(parser), target_ns, target));
  pop_current_node(parser);
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
movl %ecx, %esi
callq 0xc14f
movq %rbx, %rdi
callq 0x8107
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8b69
movl %eax, %r15d
testb %al, %al
je 0xc102
movq %rbx, %rdi
callq 0x8107
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8b69
testb %al, %al
je 0xc130
movq %rbx, %rdi
callq 0xb8b5
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8171
movq %rbx, %rdi
callq 0x8107
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x8b69
testb %al, %al
jne 0xc0d5
movq %rbx, %rdi
callq 0xb8b5
jmp 0xc10d
leaq 0x12cad(%rip), %rdi     # 0x1ede4
leaq 0x116d2(%rip), %rsi     # 0x1d810
leaq 0x12ce2(%rip), %rcx     # 0x1ee27
movl $0x6ee, %edx            # imm = 0x6EE
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: generate_implied_end_tags
static void generate_implied_end_tags(GumboParser* parser, GumboTag exception) {
  static const TagSet tags = {
    TAG(DD), TAG(DT), TAG(LI), TAG(OPTION), TAG(OPTGROUP),
    TAG(P), TAG(RP), TAG(RB), TAG(RT), TAG(RTC)
  };
  while (
    node_tag_in_set(get_current_node(parser), &tags)
    && !node_html_tag_is(get_current_node(parser), exception)
  ) {
    pop_current_node(parser);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x8107
leaq 0x1067b(%rip), %rsi     # 0x1c7e0
movq %rax, %rdi
callq 0x8b24
testb %al, %al
je 0xc1af
leaq 0x10668(%rip), %r15     # 0x1c7e0
movq %r14, %rdi
callq 0x8107
movq %rax, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x8b69
testb %al, %al
jne 0xc1af
movq %r14, %rdi
callq 0xb8b5
movq %r14, %rdi
callq 0x8107
movq %rax, %rdi
movq %r15, %rsi
callq 0x8b24
testb %al, %al
jne 0xc178
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: has_node_in_scope
static bool has_node_in_scope(const GumboParser* parser, const GumboNode* node) {
  const TagSet* tags = &default_scope_tags;
  const GumboVector* open_elements = &parser->_parser_state->_open_elements;
  for (int i = open_elements->length; --i >= 0;) {
    const GumboNode* current = open_elements->data[i];
    const GumboNodeType type = current->type;
    if (current == node) {
      return true;
    } else if (type != GUMBO_NODE_ELEMENT && type != GUMBO_NODE_TEMPLATE) {
      continue;
    } else if (node_tag_in_set(current, tags)) {
      return false;
    }
  }
  assert(false);
  return false;
}

// Assembly:
pushq %rax
movq 0x18(%rdi), %rax
movslq 0x10(%rax), %rdi
testq %rdi, %rdi
setle %dl
jle 0xc237
movq 0x8(%rax), %r8
incq %rdi
leaq 0x1039c(%rip), %r9      # 0x1c570
movq -0x10(%r8,%rdi,8), %r10
cmpq %rsi, %r10
je 0xc219
movl (%r10), %r11d
cmpl $0x6, %r11d
je 0xc1f2
movl $0x3, %ecx
cmpl $0x1, %r11d
jne 0xc220
movb 0x2c(%r10), %cl
movl 0x28(%r10), %r10d
movzbl (%r10,%r9), %r10d
movl $0x1, %r11d
shll %cl, %r11d
xorl %ecx, %ecx
testl %r10d, %r11d
sete %r10b
setne %cl
andb %r10b, %al
jmp 0xc220
movb $0x1, %al
movl $0x1, %ecx
cmpl $0x3, %ecx
je 0xc229
testl %ecx, %ecx
jne 0xc237
decq %rdi
cmpq $0x2, %rdi
setl %dl
jge 0xc1d4
jmp 0xc237
testb $0x1, %dl
jne 0xc240
andb $0x1, %al
popq %rcx
retq
leaq 0x12c37(%rip), %rdi     # 0x1ee7e
leaq 0x115c2(%rip), %rsi     # 0x1d810
leaq 0x12c2f(%rip), %rcx     # 0x1ee84
movl $0x62f, %edx            # imm = 0x62F
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: find_last_anchor_index
static bool find_last_anchor_index(GumboParser* parser, int* anchor_index) {
  GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
  for (int i = elements->length; --i >= 0;) {
    GumboNode* node = elements->data[i];
    if (node == &kActiveFormattingScopeMarker) {
      return false;
    }
    if (node_html_tag_is(node, GUMBO_TAG_A)) {
      *anchor_index = i;
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rdi), %r14
movl 0x20(%r14), %r15d
leaq 0xf78f(%rip), %r12      # 0x1ba08
testl %r15d, %r15d
jle 0xc2b7
decl %r15d
movq 0x18(%r14), %rax
movl %r15d, %ecx
movq (%rax,%rcx,8), %rdi
cmpq %r12, %rdi
je 0xc2ad
xorl %esi, %esi
movl $0x27, %edx
callq 0x8b69
movb $0x1, %cl
testb %al, %al
je 0xc2b1
movl %r15d, (%rbx)
movb $0x1, %bpl
xorl %ecx, %ecx
jmp 0xc2b1
xorl %ecx, %ecx
xorl %ebp, %ebp
testb %cl, %cl
jne 0xc279
jmp 0xc2b9
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: adjust_mathml_attributes
static void adjust_mathml_attributes(GumboToken* token) {
  assert(token->type == GUMBO_TOKEN_START_TAG);
  GumboAttribute* attr = gumbo_get_attribute (
    &token->v.start_tag.attributes,
    "definitionurl"
  );
  if (!attr) {
    return;
  }
  gumbo_free((void*) attr->name);
  attr->name = gumbo_strdup("definitionURL");
}

// Assembly:
pushq %rbx
cmpl $0x1, (%rdi)
jne 0xca8d
addq $0x38, %rdi
leaq 0x126e8(%rip), %rsi     # 0x1f14d
callq 0x7218
testq %rax, %rax
je 0xca8b
movq %rax, %rbx
movq 0x8(%rax), %rdi
callq 0x11e7c
leaq 0x126d9(%rip), %rdi     # 0x1f15b
callq 0x11e81
movq %rax, 0x8(%rbx)
popq %rbx
retq
leaq 0x11d39(%rip), %rdi     # 0x1e7cd
leaq 0x10d75(%rip), %rsi     # 0x1d810
leaq 0x1267f(%rip), %rcx     # 0x1f121
movl $0x77b, %edx            # imm = 0x77B
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: adjust_foreign_attributes
static void adjust_foreign_attributes(GumboToken* token) {
  assert(token->type == GUMBO_TOKEN_START_TAG);
  const GumboVector* attributes = &token->v.start_tag.attributes;
  for (unsigned int i = 0, n = attributes->length; i < n; ++i) {
    GumboAttribute* attr = attributes->data[i];
    const ForeignAttrReplacement* entry = gumbo_get_foreign_attr_replacement (
      attr->name,
      strlen(attr->name)
    );
    if (!entry) {
      continue;
    }
    gumbo_free((void*) attr->name);
    attr->attr_namespace = entry->attr_namespace;
    attr->name = gumbo_strdup(entry->local_name);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, (%rdi)
jne 0xcb20
movq %rdi, %rbx
movl 0x40(%rdi), %r15d
testq %r15, %r15
je 0xcb16
xorl %r12d, %r12d
movq 0x38(%rbx), %rax
movq (%rax,%r12,8), %r13
movq 0x8(%r13), %r14
movq %r14, %rdi
callq 0x40b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x19088
testq %rax, %rax
je 0xcb0e
movq %rax, %r14
movq 0x8(%r13), %rdi
callq 0x11e7c
movl 0x10(%r14), %eax
movl %eax, (%r13)
movq 0x8(%r14), %rdi
callq 0x11e81
movq %rax, 0x8(%r13)
incq %r12
cmpq %r12, %r15
jne 0xcac9
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x11ca6(%rip), %rdi     # 0x1e7cd
leaq 0x10ce2(%rip), %rsi     # 0x1d810
leaq 0x12634(%rip), %rcx     # 0x1f169
movl $0x753, %edx            # imm = 0x753
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: insert_foreign_element
static GumboNode* insert_foreign_element (
  GumboParser* parser,
  GumboToken* token,
  GumboNamespaceEnum tag_namespace
) {
  assert(token->type == GUMBO_TOKEN_START_TAG);
  GumboNode* element = create_element_from_token(token, tag_namespace);
  insert_element(parser, element, false);
  if (
    token_has_attribute(token, "xmlns")
    && !attribute_matches_case_sensitive (
      &token->v.start_tag.attributes,
      "xmlns",
      kLegalXmlns[tag_namespace]
    )
  ) {
    // TODO(jdtang): Since there're multiple possible error codes here, we
    // eventually need reason codes to differentiate them.
    parser_add_parse_error(parser, token);
  }
  if (
    token_has_attribute(token, "xmlns:xlink")
    && !attribute_matches_case_sensitive (
      &token->v.start_tag.attributes,
      "xmlns:xlink",
      "http://www.w3.org/1999/xlink"
    )
  ) {
    parser_add_parse_error(parser, token);
  }
  return element;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpl $0x1, (%rsi)
jne 0xcbed
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl %edx, %esi
callq 0xb6d2
movq %r14, %rdi
movq %rax, %rsi
callq 0x8703
leaq 0x12679(%rip), %rsi     # 0x1f1e9
movq %rbx, %rdi
callq 0xce97
testb %al, %al
je 0xcbab
leaq 0x38(%rbx), %rdi
movl %ebp, %eax
leaq 0xfecf(%rip), %rcx      # 0x1ca58
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
leaq 0x12652(%rip), %rsi     # 0x1f1e9
callq 0xbc45
testb %al, %al
jne 0xcbab
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8171
leaq 0x1263d(%rip), %rsi     # 0x1f1ef
movq %rbx, %rdi
callq 0xce97
testb %al, %al
je 0xcbd9
leaq 0x38(%rbx), %rdi
leaq 0x12626(%rip), %rsi     # 0x1f1ef
leaq 0x1262b(%rip), %rdx     # 0x1f1fb
callq 0xbc45
testb %al, %al
je 0xcbde
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x8171
leaq 0x11bd9(%rip), %rdi     # 0x1e7cd
leaq 0x10c15(%rip), %rsi     # 0x1d810
leaq 0x12594(%rip), %rcx     # 0x1f196
movl $0x48a, %edx            # imm = 0x48A
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: adjust_svg_attributes
static void adjust_svg_attributes(GumboToken* token) {
  assert(token->type == GUMBO_TOKEN_START_TAG);
  const GumboVector* attributes = &token->v.start_tag.attributes;
  for (unsigned int i = 0, n = attributes->length; i < n; i++) {
    GumboAttribute* attr = (GumboAttribute*) attributes->data[i];
    const StringReplacement* replacement = gumbo_get_svg_attr_replacement (
      attr->name,
      attr->original_name.length
    );
    if (!replacement) {
      continue;
    }
    gumbo_free((void*) attr->name);
    attr->name = gumbo_strdup(replacement->to);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, (%rdi)
jne 0xcc6e
movq %rdi, %rbx
movl 0x40(%rdi), %r15d
testq %r15, %r15
je 0xcc64
xorl %r12d, %r12d
movq 0x38(%rbx), %rax
movq (%rax,%r12,8), %r13
movq 0x8(%r13), %rdi
movq 0x18(%r13), %rsi
callq 0x19128
testq %rax, %rax
je 0xcc5c
movq %rax, %r14
movq 0x8(%r13), %rdi
callq 0x11e7c
movq 0x8(%r14), %rdi
callq 0x11e81
movq %rax, 0x8(%r13)
incq %r12
cmpq %r12, %r15
jne 0xcc29
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x11b58(%rip), %rdi     # 0x1e7cd
leaq 0x10b94(%rip), %rsi     # 0x1d810
leaq 0x1262c(%rip), %rcx     # 0x1f2af
movl $0x767, %edx            # imm = 0x767
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: clone_node
static GumboNode* clone_node (
  GumboNode* node,
  GumboParseFlags reason
) {
  assert(node->type == GUMBO_NODE_ELEMENT || node->type == GUMBO_NODE_TEMPLATE);
  GumboNode* new_node = gumbo_alloc(sizeof(GumboNode));
  *new_node = *node;
  new_node->parent = NULL;
  new_node->index_within_parent = -1;
  // Clear the GUMBO_INSERTION_IMPLICIT_END_TAG flag, as the cloned node may
  // have a separate end tag.
  new_node->parse_flags &= ~GUMBO_INSERTION_IMPLICIT_END_TAG;
  new_node->parse_flags |= reason | GUMBO_INSERTION_BY_PARSER;
  GumboElement* element = &new_node->v.element;
  gumbo_vector_init(1, &element->children);

  const GumboVector* old_attributes = &node->v.element.attributes;
  gumbo_vector_init(old_attributes->length, &element->attributes);
  for (unsigned int i = 0; i < old_attributes->length; ++i) {
    const GumboAttribute* old_attr = old_attributes->data[i];
    GumboAttribute* attr = gumbo_alloc(sizeof(GumboAttribute));
    *attr = *old_attr;
    attr->name = gumbo_strdup(old_attr->name);
    attr->value = gumbo_strdup(old_attr->value);
    gumbo_vector_add(attr, &element->attributes);
  }
  return new_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x1, %eax
je 0xccf1
cmpl $0x6, %eax
jne 0xcdcb
movl $0x90, %edi
callq 0x11e58
movq %rax, %r14
movl $0x90, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4190
movq $0x0, 0x8(%r14)
movl $0xffffffff, 0x10(%r14) # imm = 0xFFFFFFFF
movl 0x14(%r14), %eax
andl $-0x4, %eax
orl %ebp, %eax
orl $0x1, %eax
movl %eax, 0x14(%r14)
leaq 0x18(%r14), %rsi
movl $0x1, %edi
callq 0x7ec4
movl 0x88(%rbx), %edi
movq %r14, %r15
subq $-0x80, %r15
movq %r15, %rsi
callq 0x7ec4
cmpl $0x0, 0x88(%rbx)
je 0xcdb9
xorl %ebp, %ebp
movq 0x80(%rbx), %rax
movq (%rax,%rbp,8), %r12
movl $0x98, %edi
callq 0x11e58
movq %rax, %r13
movl $0x98, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4190
movq 0x8(%r12), %rdi
callq 0x11e81
movq %rax, 0x8(%r13)
movq 0x20(%r12), %rdi
callq 0x11e81
movq %rax, 0x20(%r13)
movq %r13, %rdi
movq %r15, %rsi
callq 0x7ef9
incq %rbp
movl 0x88(%rbx), %eax
cmpq %rax, %rbp
jb 0xcd5c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10dec(%rip), %rdi     # 0x1dbbe
leaq 0x10a37(%rip), %rsi     # 0x1d810
leaq 0x11f9f(%rip), %rcx     # 0x1ed7f
movl $0x530, %edx            # imm = 0x530
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: remove_from_parent
static void remove_from_parent(GumboNode* node) {
  if (!node->parent) {
    // The node may not have a parent if, for example, it is a newly-cloned copy
    // of an active formatting element. DOM manipulations continue with the
    // orphaned fragment of the DOM tree until it's appended/foster-parented to
    // the common ancestor at the end of the adoption agency algorithm.
    return;
  }
  assert(node->parent->type == GUMBO_NODE_ELEMENT);
  GumboVector* children = &node->parent->v.element.children;
  int index = gumbo_vector_index_of(children, node);
  assert(index != -1);

  gumbo_vector_remove_at(index, children);
  node->parent = NULL;
  node->index_within_parent = -1;
  for (unsigned int i = index; i < children->length; ++i) {
    GumboNode* child = children->data[i];
    child->index_within_parent = i;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0xce4e
cmpl $0x1, (%r15)
jne 0xce59
movq %rdi, %rbx
leaq 0x18(%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7fbe
cmpl $-0x1, %eax
je 0xce78
movl %eax, %ebp
movl %eax, %edi
movq %r14, %rsi
callq 0x8089
movq $0x0, 0x8(%rbx)
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movl 0x20(%r15), %eax
cmpl %eax, %ebp
jae 0xce4e
movq (%r14), %rcx
movl %ebp, %edx
movq (%rcx,%rdx,8), %rsi
movl %edx, 0x10(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0xce3f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12273(%rip), %rdi     # 0x1f0d3
leaq 0x109a9(%rip), %rsi     # 0x1d810
leaq 0x1228e(%rip), %rcx     # 0x1f0fc
movl $0x7ba, %edx            # imm = 0x7BA
callq 0x4100
leaq 0x121f2(%rip), %rdi     # 0x1f071
leaq 0x1098a(%rip), %rsi     # 0x1d810
leaq 0x1226f(%rip), %rcx     # 0x1f0fc
movl $0x7bd, %edx            # imm = 0x7BD
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: close_table
static bool close_table(GumboParser* parser) {
  if (!has_an_element_in_table_scope(parser, GUMBO_TAG_TABLE)) {
    return false;
  }

  GumboNode* node = pop_current_node(parser);
  while (!node_html_tag_is(node, GUMBO_TAG_TABLE)) {
    node = pop_current_node(parser);
  }
  reset_insertion_mode_appropriately(parser);
  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %rdx
movl $0x5f, (%rdx)
leaq 0xfa8e(%rip), %r8       # 0x1c9c0
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
movl %eax, %ebp
testb %al, %al
je 0xcf67
movq %rbx, %rdi
callq 0xb8b5
movq %rax, %rdi
xorl %esi, %esi
movl $0x5f, %edx
callq 0x8b69
testb %al, %al
je 0xcf44
movq %rbx, %rdi
callq 0x84ef
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: clear_stack_to_table_body_context
static void clear_stack_to_table_body_context(GumboParser* parser) {
  static const TagSet tags = {
    TAG(HTML), TAG(TBODY), TAG(TFOOT), TAG(THEAD), TAG(TEMPLATE)
  };
  while (!node_tag_in_set(get_current_node(parser), &tags)) {
    pop_current_node(parser);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8107
leaq 0xffad(%rip), %rsi      # 0x1cf30
movq %rax, %rdi
callq 0x8b24
testb %al, %al
jne 0xcfb5
leaq 0xff9a(%rip), %r14      # 0x1cf30
movq %rbx, %rdi
callq 0xb8b5
movq %rbx, %rdi
callq 0x8107
movq %rax, %rdi
movq %r14, %rsi
callq 0x8b24
testb %al, %al
je 0xcf96
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: close_table_cell
static bool close_table_cell (
  GumboParser* parser,
  const GumboToken* token,
  GumboTag cell_tag
) {
  bool result = true;
  generate_implied_end_tags(parser, GUMBO_TAG_LAST);
  const GumboNode* node = get_current_node(parser);
  if (!node_html_tag_is(node, cell_tag)) {
    parser_add_parse_error(parser, token);
    result = false;
  }
  do {
    node = pop_current_node(parser);
  } while (!node_html_tag_is(node, cell_tag));

  clear_active_formatting_elements(parser);
  set_insertion_mode(parser, GUMBO_INSERTION_MODE_IN_ROW);
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl $0x97, %esi
callq 0xc14f
movq %rbx, %rdi
callq 0x8107
movq %rax, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x8b69
movl %eax, %ebp
testb %al, %al
jne 0xd04a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8171
movq %rbx, %rdi
callq 0xb8b5
movq %rax, %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x8b69
testb %al, %al
je 0xd04a
movq 0x18(%rbx), %r14
addq $0x18, %r14
leaq 0xe996(%rip), %r15      # 0x1ba08
movq %r14, %rdi
callq 0x7fa7
testq %rax, %rax
je 0xd084
cmpq %r15, %rax
jne 0xd072
movq 0x18(%rbx), %rax
movl $0xd, (%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: close_current_cell
static bool close_current_cell(GumboParser* parser, const GumboToken* token) {
  if (has_an_element_in_table_scope(parser, GUMBO_TAG_TD)) {
    assert(!has_an_element_in_table_scope(parser, GUMBO_TAG_TH));
    return close_table_cell(parser, token, GUMBO_TAG_TD);
  } else {
    assert(has_an_element_in_table_scope(parser, GUMBO_TAG_TH));
    return close_table_cell(parser, token, GUMBO_TAG_TH);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %rdx
movl $0x67, (%rdx)
leaq 0xf906(%rip), %r8       # 0x1c9c0
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
testb %al, %al
je 0xd113
leaq 0x10(%rsp), %rdx
movl $0x68, (%rdx)
leaq 0xf8e4(%rip), %r8       # 0x1c9c0
movq %r14, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
movl $0x67, %edx
testb %al, %al
je 0xd13d
leaq 0x1225f(%rip), %rdi     # 0x1f35a
leaq 0x1070e(%rip), %rsi     # 0x1d810
leaq 0x12286(%rip), %rcx     # 0x1f38f
movl $0x69f, %edx            # imm = 0x69F
callq 0x4100
leaq 0x14(%rsp), %rdx
movl $0x68, (%rdx)
leaq 0xf89b(%rip), %r8       # 0x1c9c0
movq %r14, %rdi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0xbc6a
movl $0x68, %edx
testb %al, %al
je 0xd14f
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0xd00a
leaq 0x12205(%rip), %rdi     # 0x1f35b
leaq 0x106b3(%rip), %rsi     # 0x1d810
leaq 0x1222b(%rip), %rcx     # 0x1f38f
movl $0x6a2, %edx            # imm = 0x6A2
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: close_current_select
static void close_current_select(GumboParser* parser) {
  GumboNode* node = pop_current_node(parser);
  while (!node_html_tag_is(node, GUMBO_TAG_SELECT)) {
    node = pop_current_node(parser);
  }
  reset_insertion_mode_appropriately(parser);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xb8b5
movq %rax, %rdi
xorl %esi, %esi
movl $0x6f, %edx
callq 0x8b69
testb %al, %al
jne 0xd18f
movq %rbx, %rdi
jmp 0xd172
movq %rbx, %rdi
popq %rbx
jmp 0x84ef