LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: maybe_add_doctype_error
static bool maybe_add_doctype_error (
  GumboParser* parser,
  const GumboToken* token
) {
  const GumboTokenDocType* doctype = &token->v.doc_type;
  bool html_doctype = !strcmp(doctype->name, "html");
  if (
    (
      !html_doctype
      || doctype->has_public_identifier
      || (
        doctype->has_system_identifier &&
        string_piece_equal_cstr(&kSystemIdLegacyCompat, doctype->system_identifier)
      )
    )
    && !(
      html_doctype
      && (
        doctype_matches(doctype, &kPublicIdHtml4_0, &kSystemIdRecHtml4_0, true)
        || doctype_matches(doctype, &kPublicIdHtml4_01, &kSystemIdHtml4, true)
        || doctype_matches(doctype, &kPublicIdXhtml1_0, &kSystemIdXhtmlStrict1_1, false)
        || doctype_matches(doctype, &kPublicIdXhtml1_1, &kSystemIdXhtml1_1, false)
      )
    )
  ) {
    parser_add_parse_error(parser, token);
    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq 0x24b63(%rip), %rsi     # 0x334ed
callq 0x4170
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0xe9d7
movq -0x20(%rbp), %rax
testb $0x1, 0x19(%rax)
jne 0xe9d7
movq -0x20(%rbp), %rax
testb $0x1, 0x1a(%rax)
je 0xea6a
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x64a17(%rip), %rdi     # 0x733e0
callq 0xeb20
testb $0x1, %al
jne 0xe9d7
jmp 0xea6a
testb $0x1, -0x21(%rbp)
je 0xea57
movq -0x20(%rbp), %rdi
leaq 0x64a08(%rip), %rsi     # 0x733f0
leaq 0x64a11(%rip), %rdx     # 0x73400
movl $0x1, %ecx
callq 0xec70
testb $0x1, %al
jne 0xea6a
movq -0x20(%rbp), %rdi
leaq 0x64a08(%rip), %rsi     # 0x73410
leaq 0x64a11(%rip), %rdx     # 0x73420
movl $0x1, %ecx
callq 0xec70
testb $0x1, %al
jne 0xea6a
movq -0x20(%rbp), %rdi
leaq 0x64a08(%rip), %rsi     # 0x73430
leaq 0x64a11(%rip), %rdx     # 0x73440
xorl %ecx, %ecx
callq 0xec70
testb $0x1, %al
jne 0xea6a
movq -0x20(%rbp), %rdi
leaq 0x64a0b(%rip), %rsi     # 0x73450
leaq 0x64a14(%rip), %rdx     # 0x73460
xorl %ecx, %ecx
callq 0xec70
testb $0x1, %al
jne 0xea6a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movb $0x0, -0x1(%rbp)
jmp 0xea6e
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jbe 0xeb11
testb $0x1, -0x19(%rbp)
je 0xead7
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xeb20
testb $0x1, %al
jne 0xeafb
testb $0x1, -0x19(%rbp)
jne 0xeb01
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0xeb80
testb $0x1, %al
jne 0xeafb
jmp 0xeb01
movb $0x1, -0x1(%rbp)
jmp 0xeb15
jmp 0xeb03
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xea9f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/string_piece.h
// Function: string_piece_equal_cstr
static inline PURE NONNULL_ARGS bool string_piece_equal_cstr (
  const GumboStringPiece *piece,
  const char *cstr
) {
  const size_t cstr_len = strlen(cstr);
  return
    cstr_len == piece->length
    && memcmp(piece->data, cstr, cstr_len) == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x19(%rbp)
jne 0xeb6d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4150
cmpl $0x0, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/string_piece.h
// Function: string_piece_equal_cstr_icase
static inline PURE NONNULL_ARGS bool string_piece_equal_cstr_icase (
  const GumboStringPiece *piece,
  const char *cstr
) {
  const size_t cstr_len = strlen(cstr);
  return
    cstr_len == piece->length
    && mem_equal_icase(piece->data, cstr, cstr_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x40b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x19(%rbp)
jne 0xebc7
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xebe0
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0xeca0
movq -0x8(%rbp), %rcx
xorl %eax, %eax
testb $0x1, 0x1a(%rcx)
movb %al, -0x1a(%rbp)
je 0xecd3
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xeb20
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1a(%rbp)
jne 0xecbf
jmp 0xecd3
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xeb20
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xed40
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x7fc0
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edi
callq 0x5f80
movq %rax, %rsi
movq -0x18(%rbp), %rdx
leaq 0x25279(%rip), %rdi     # 0x33fa1
movb $0x0, %al
callq 0x7540
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, (%rax)
je 0xef94
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
je 0xef94
movq -0x10(%rbp), %rax
cmpl $0x7, (%rax)
je 0xef94
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0xef96
jmp 0xefb5
leaq 0x2517a(%rip), %rdi     # 0x34117
leaq 0x23ed0(%rip), %rsi     # 0x32e74
movl $0x4ac, %edx            # imm = 0x4AC
leaq 0x251fc(%rip), %rcx     # 0x341ac
callq 0x4100
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x58, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xf000
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edi
movq -0x18(%rbp), %rsi
callq 0x5c00
movq -0x10(%rbp), %rax
cmpl $0x5, (%rax)
jne 0xf026
movq -0x18(%rbp), %rax
movl $0x2, 0x38(%rax)
jmp 0xf03c
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0xf03a
movq -0x18(%rbp), %rax
movl $0x3, 0x38(%rax)
jmp 0xf03c
movq -0x10(%rbp), %rax
movl 0x30(%rax), %esi
leaq 0x25196(%rip), %rdi     # 0x341e0
movb $0x0, %al
callq 0x7540
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xece0
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x11a10
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl $0x7, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x219d9(%rip), %rax     # 0x30cb0
cmpq %rax, -0x10(%rbp)
je 0xf2e6
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xf2e8
jmp 0xf307
leaq 0x24fac(%rip), %rdi     # 0x3429b
leaq 0x23b7e(%rip), %rsi     # 0x32e74
movl $0x503, %edx            # imm = 0x503
leaq 0x24fe3(%rip), %rcx     # 0x342e5
callq 0x4100
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
leaq 0x21992(%rip), %rax     # 0x30cb0
cmpq %rax, -0x10(%rbp)
jne 0xf334
leaq 0x24ff8(%rip), %rdi     # 0x34323
movb $0x0, %al
callq 0x7540
jmp 0xf342
leaq 0x25000(%rip), %rdi     # 0x3433b
movb $0x0, %al
callq 0x7540
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0xf550
movl %eax, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jl 0xf383
movl -0x1c(%rbp), %esi
leaq 0x24fe9(%rip), %rdi     # 0x34359
movb $0x0, %al
callq 0x7540
movl -0x1c(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x6d40
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6a80
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7550
movq %rax, %rdi
leaq 0x219e1(%rip), %rsi     # 0x30de0
callq 0x8680
testb $0x1, %al
jne 0xf40a
jmp 0xf415
movq -0x8(%rbp), %rdi
callq 0xf060
jmp 0xf3ec
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: clear_active_formatting_elements
static void clear_active_formatting_elements(GumboParser* parser) {
  GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
  int num_elements_cleared = 0;
  const GumboNode* node;
  do {
    node = gumbo_vector_pop(elements);
    ++num_elements_cleared;
  } while (node && node != &kActiveFormattingScopeMarker);
  gumbo_debug (
    "Cleared %d elements from active formatting list.\n",
    num_elements_cleared
  );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x18, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6bb0
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x21(%rbp)
je 0xf476
leaq 0x21844(%rip), %rax     # 0x30cb0
cmpq %rax, -0x20(%rbp)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xf443
movl -0x14(%rbp), %esi
leaq 0x24f4c(%rip), %rdi     # 0x343d3
movb $0x0, %al
callq 0x7540
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: record_end_of_element
static void record_end_of_element (
  const GumboToken* current_token,
  GumboElement* element
) {
  element->end_pos = current_token->position;
  if (current_token->type == GUMBO_TOKEN_END_TAG) {
    element->original_end_tag = current_token->original_text;
  } else {
    element->original_end_tag = STRING_PIECE_INIT;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, 0x50(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x58(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xf51f
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x28(%rcx), %rcx
movq %rcx, 0x30(%rax)
jmp 0xf543
movq -0x10(%rbp), %rax
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x30(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: count_formatting_elements_of_tag
static int count_formatting_elements_of_tag (
  GumboParser* parser,
  const GumboNode* desired_node,
  int* earliest_matching_index
) {
  const GumboElement* desired_element = &desired_node->v.element;
  GumboVector* elements = &parser->_parser_state->_active_formatting_elements;
  int num_identical_elements = 0;
  for (int i = elements->length; --i >= 0;) {
    GumboNode* node = elements->data[i];
    if (node == &kActiveFormattingScopeMarker) {
      break;
    }
    assert(node->type == GUMBO_NODE_ELEMENT);
    if (
      node_qualified_tag_is(node, desired_element->tag_namespace, desired_element->tag)
      && all_attributes_match(&node->v.element.attributes, &desired_element->attributes)
    ) {
      num_identical_elements++;
      *earliest_matching_index = i;
    }
  }
  return num_identical_elements;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
jl 0xf642
movq -0x28(%rbp), %rax
movq (%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
leaq 0x216f3(%rip), %rax     # 0x30cb0
cmpq %rax, -0x38(%rbp)
jne 0xf5c5
jmp 0xf642
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xf5d0
jmp 0xf5ef
leaq 0x24fd0(%rip), %rdi     # 0x345a7
leaq 0x23896(%rip), %rsi     # 0x32e74
movl $0x4f2, %edx            # imm = 0x4F2
leaq 0x24d9b(%rip), %rcx     # 0x34385
callq 0x4100
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x20(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x8770
testb $0x1, %al
jne 0xf60c
jmp 0xf63d
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
addq $0x68, %rdi
movq -0x20(%rbp), %rsi
addq $0x68, %rsi
callq 0xf650
testb $0x1, %al
jne 0xf62b
jmp 0xf63d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0xf591
movl -0x2c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: all_attributes_match
static bool all_attributes_match (
  const GumboVector* attr1,
  const GumboVector* attr2
) {
  unsigned int num_unmatched_attr2_elements = attr2->length;
  for (unsigned int i = 0; i < attr1->length; ++i) {
    const GumboAttribute* attr = attr1->data[i];
    if (attribute_matches_case_sensitive(attr2, attr->name, attr->value)) {
      --num_unmatched_attr2_elements;
    } else {
      return false;
    }
  }
  return num_unmatched_attr2_elements == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xf6cc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rdx
callq 0xf6f0
testb $0x1, %al
jne 0xf6ae
jmp 0xf6b9
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf6bf
movb $0x0, -0x1(%rbp)
jmp 0xf6d8
jmp 0xf6c1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xf671
cmpl $0x0, -0x1c(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jl 0xf851
movq -0x38(%rbp), %rax
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpl $0x1, (%rax)
je 0xf7d1
movq -0x48(%rbp), %rax
cmpl $0x6, (%rax)
je 0xf7d1
jmp 0xf798
movq -0x48(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xf81d
movl -0x4c(%rbp), %eax
movq -0x20(%rbp), %rcx
movslq -0x54(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0xf810
cmpl $0x0, -0x50(%rbp)
jne 0xf810
movb $0x1, -0x1(%rbp)
jmp 0xf855
jmp 0xf812
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xf7ec
movq -0x30(%rbp), %rdi
movl -0x50(%rbp), %esi
movl -0x4c(%rbp), %edx
callq 0x8730
andb $0x1, %al
movb %al, -0x55(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb -0x55(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0xf84c
movb $0x0, -0x1(%rbp)
jmp 0xf855
jmp 0xf798
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xfaeb
jmp 0xfb0a
leaq 0x244d9(%rip), %rdi     # 0x33fcb
leaq 0x2337b(%rip), %rsi     # 0x32e74
movl $0x72b, %edx            # imm = 0x72B
leaq 0x24c38(%rip), %rcx     # 0x3473d
callq 0x4100
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xfb15
jmp 0xfb34
leaq 0x24a8b(%rip), %rdi     # 0x345a7
leaq 0x23351(%rip), %rsi     # 0x32e74
movl $0x72c, %edx            # imm = 0x72C
leaq 0x24c0e(%rip), %rcx     # 0x3473d
callq 0x4100
movq -0x8(%rbp), %rax
addq $0x30, %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
addq $0x68, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xfbbc
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5090
cmpq $0x0, %rax
jne 0xfbaf
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6a80
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0xfbb1
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xfb5b
movq -0x8(%rbp), %rdi
callq 0x11f60
movq -0x8(%rbp), %rax
movq $0x0, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x40(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x19, %esi
callq 0xffe0
testb $0x1, %al
jne 0xfc64
jmp 0xfc7f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
movl $0x19, %ecx
callq 0xfdd0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xfc83
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xe0, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0x52(%rax)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jl 0xfdc1
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
testb $0x1, -0x11(%rbp)
je 0xfd0f
movq -0x30(%rbp), %rdi
movl $0x1f, %esi
callq 0x8700
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xd0(%rbp)
jmp 0xfd2a
movq -0x30(%rbp), %rdi
leaq 0x21e96(%rip), %rsi     # 0x31bb0
callq 0x8680
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
je 0xfd5e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rax
movl 0x2c(%rax), %edx
movq -0x30(%rbp), %rax
movl 0x28(%rax), %ecx
callq 0xfdd0
jmp 0xfdc1
movq -0x30(%rbp), %rdi
callq 0x10f80
testb $0x1, %al
jne 0xfd6d
jmp 0xfdbc
movq -0x30(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0xc9(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x4120
leaq -0xc9(%rbp), %rdi
leaq 0x21d7f(%rip), %rsi     # 0x31b18
movl $0x98, %edx
callq 0x41a0
movq -0xd8(%rbp), %rdi
leaq -0xc9(%rbp), %rsi
callq 0x8680
testb $0x1, %al
jne 0xfdbc
jmp 0xfdc1
jmp 0xfcc8
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movb $0x1, -0x19(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0xfea0
movq -0x8(%rbp), %rdi
callq 0x7550
movq %rax, %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x8770
testb $0x1, %al
jne 0xfe4c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x78a0
movq -0x8(%rbp), %rdi
callq 0x7550
movq %rax, %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x8770
xorb $-0x1, %al
testb $0x1, %al
jne 0xfe3d
jmp 0xfe48
movq -0x8(%rbp), %rdi
callq 0xf060
jmp 0xfe1e
movb $0x0, -0x19(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7550
movq %rax, %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x8770
testb $0x1, %al
jne 0xfe69
jmp 0xfe6b
jmp 0xfe8a
leaq 0x248fc(%rip), %rdi     # 0x3476e
leaq 0x22ffb(%rip), %rsi     # 0x32e74
movl $0x6ee, %edx            # imm = 0x6EE
leaq 0x2492c(%rip), %rcx     # 0x347b1
callq 0x4100
movq -0x8(%rbp), %rdi
callq 0xf060
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x7550
movq %rax, %rdi
leaq 0x21d8e(%rip), %rsi     # 0x31c50
callq 0x8680
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xd(%rbp)
jne 0xfed5
jmp 0xfeee
movq -0x8(%rbp), %rdi
callq 0x7550
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x8700
xorb $-0x1, %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0xfef7
jmp 0xff02
movq -0x8(%rbp), %rdi
callq 0xf060
jmp 0xfeaf
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x21ab9(%rip), %rax     # 0x319e0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jl 0xffac
movq -0x28(%rbp), %rax
movq (%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0xff7f
movb $0x1, -0x1(%rbp)
jmp 0xffcb
cmpl $0x1, -0x3c(%rbp)
je 0xff8d
cmpl $0x6, -0x3c(%rbp)
je 0xff8d
jmp 0xff45
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x8680
testb $0x1, %al
jne 0xffa0
jmp 0xffa6
movb $0x0, -0x1(%rbp)
jmp 0xffcb
jmp 0xffa8
jmp 0xffaa
jmp 0xff45
leaq 0x24855(%rip), %rdi     # 0x34808
leaq 0x22eba(%rip), %rsi     # 0x32e74
movl $0x62f, %edx            # imm = 0x62F
leaq 0x24848(%rip), %rcx     # 0x3480e
callq 0x4100
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jl 0x10123
movq -0x20(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
leaq 0x20bbe(%rip), %rax     # 0x30cb0
cmpq %rax, -0x30(%rbp)
jne 0x100fe
movb $0x0, -0x1(%rbp)
jmp 0x10127
movq -0x30(%rbp), %rdi
movl $0x27, %esi
callq 0x8700
testb $0x1, %al
jne 0x10112
jmp 0x10121
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x10127
jmp 0x100ca
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10c47
jmp 0x10c66
leaq 0x2337d(%rip), %rdi     # 0x33fcb
leaq 0x2221f(%rip), %rsi     # 0x32e74
movl $0x77b, %edx            # imm = 0x77B
leaq 0x2408a(%rip), %rcx     # 0x34ceb
callq 0x4100
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
addq $0x8, %rdi
leaq 0x2409e(%rip), %rsi     # 0x34d17
callq 0x5090
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x10c8b
jmp 0x10caf
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17d80
leaq 0x24086(%rip), %rdi     # 0x34d25
callq 0x17da0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10cd7
jmp 0x10cf6
leaq 0x232ed(%rip), %rdi     # 0x33fcb
leaq 0x2218f(%rip), %rsi     # 0x32e74
movl $0x753, %edx            # imm = 0x753
leaq 0x24042(%rip), %rcx     # 0x34d33
callq 0x4100
movq -0x8(%rbp), %rax
addq $0x30, %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x10da7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x40b0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x2e5d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x10d67
jmp 0x10d99
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17d80
movq -0x28(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17da0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10d17
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10dce
jmp 0x10ded
leaq 0x231f6(%rip), %rdi     # 0x33fcb
leaq 0x22098(%rip), %rsi     # 0x32e74
movl $0x48a, %edx            # imm = 0x48A
leaq 0x23f78(%rip), %rcx     # 0x34d60
callq 0x4100
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xed40
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x7fc0
movq -0x10(%rbp), %rdi
leaq 0x23f9c(%rip), %rsi     # 0x34db3
callq 0x11300
testb $0x1, %al
jne 0x10e22
jmp 0x10e5b
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
addq $0x8, %rdi
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x64346(%rip), %rax     # 0x75180
movq (%rax,%rcx,8), %rdx
leaq 0x23f6e(%rip), %rsi     # 0x34db3
callq 0xf6f0
testb $0x1, %al
jne 0x10e5b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x78a0
movq -0x10(%rbp), %rdi
leaq 0x23f53(%rip), %rsi     # 0x34db9
callq 0x11300
testb $0x1, %al
jne 0x10e71
jmp 0x10ea1
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
addq $0x8, %rdi
leaq 0x23f35(%rip), %rsi     # 0x34db9
leaq 0x23f3a(%rip), %rdx     # 0x34dc5
callq 0xf6f0
testb $0x1, %al
jne 0x10ea1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x78a0
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x10ec7
jmp 0x10ee6
leaq 0x230fd(%rip), %rdi     # 0x33fcb
leaq 0x21f9f(%rip), %rsi     # 0x32e74
movl $0x767, %edx            # imm = 0x767
leaq 0x23f98(%rip), %rcx     # 0x34e79
callq 0x4100
movq -0x8(%rbp), %rax
addq $0x30, %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x10f73
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x2e710
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x10f43
jmp 0x10f68
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17d80
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17da0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10f07
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: is_open_element
static bool is_open_element(const GumboParser* parser, const GumboNode* node) {
  const GumboVector* open_elements = &parser->_parser_state->_open_elements;
  for (unsigned int i = 0; i < open_elements->length; ++i) {
    if (open_elements->data[i] == node) {
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x11066
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0x11059
movb $0x1, -0x1(%rbp)
jmp 0x1106a
jmp 0x1105b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x11033
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
je 0x110a1
movq -0x8(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x110a3
jmp 0x110c2
leaq 0x22279(%rip), %rdi     # 0x33323
leaq 0x21dc3(%rip), %rsi     # 0x32e74
movl $0x530, %edx            # imm = 0x530
leaq 0x2362d(%rip), %rcx     # 0x346ea
callq 0x4100
movl $0x90, %edi
callq 0x17cf0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x90, %edx
callq 0x41a0
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl 0x14(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x14(%rax)
movl -0xc(%rbp), %ecx
orl $0x1, %ecx
movq -0x18(%rbp), %rax
orl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movl $0x1, %edi
callq 0x69f0
movq -0x8(%rbp), %rax
addq $0x18, %rax
addq $0x68, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rsi
addq $0x68, %rsi
callq 0x69f0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x111ec
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl -0x2c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movl $0x98, %edi
callq 0x17cf0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x98, %edx
callq 0x41a0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17da0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x17da0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x68, %rsi
callq 0x6a80
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1115b
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)