LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0xb6a1
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl %edx, %esi
callq 0xa46c
movq %r14, %rdi
movq %rax, %rsi
callq 0x7e84
leaq 0xfc55(%rip), %rsi      # 0x1b279
movq %rbx, %rdi
callq 0xb94c
testb %al, %al
je 0xb65f
leaq 0x38(%rbx), %rdi
movl %ebp, %eax
leaq 0xd4ab(%rip), %rcx      # 0x18ae8
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
leaq 0xfc2e(%rip), %rsi      # 0x1b279
callq 0xa99f
testb %al, %al
jne 0xb65f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x797d
leaq 0xfc19(%rip), %rsi      # 0x1b27f
movq %rbx, %rdi
callq 0xb94c
testb %al, %al
je 0xb68d
leaq 0x38(%rbx), %rdi
leaq 0xfc02(%rip), %rsi      # 0x1b27f
leaq 0xfc07(%rip), %rdx      # 0x1b28b
callq 0xa99f
testb %al, %al
je 0xb692
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x797d
leaq 0xf1b5(%rip), %rdi      # 0x1a85d
leaq 0xe1f1(%rip), %rsi      # 0x198a0
leaq 0xfb70(%rip), %rcx      # 0x1b226
movl $0x48a, %edx            # imm = 0x48A
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/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 0xb71f
movq %rdi, %rbx
movl 0x40(%rdi), %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xb715
movq 0x38(%rbx), %rax
movq (%rax,%r12,8), %r13
movq 0x8(%r13), %rdi
movq 0x18(%r13), %rsi
callq 0x15348
testq %rax, %rax
je 0xb710
movq %rax, %r14
movq 0x8(%r13), %rdi
callq 0xf6e0
movq 0x8(%r14), %rdi
callq 0xf6e5
movq %rax, 0x8(%r13)
incq %r12
jmp 0xb6d8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xf137(%rip), %rdi      # 0x1a85d
leaq 0xe173(%rip), %rsi      # 0x198a0
leaq 0xfc0b(%rip), %rcx      # 0x1b33f
movl $0x767, %edx            # imm = 0x767
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/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:
movq 0x18(%rdi), %rcx
movl 0x10(%rcx), %eax
xorl %edi, %edi
movq %rdi, %rdx
cmpq %rdi, %rax
je 0xb795
movq 0x8(%rcx), %r8
leaq 0x1(%rdx), %rdi
cmpq %rsi, (%r8,%rdx,8)
jne 0xb77f
cmpq %rax, %rdx
setb %al
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xb7bc
cmpl $0x6, %eax
jne 0xb887
movl $0x90, %edi
callq 0xf6a4
movq %rax, %r14
movl $0x90, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4190
andq $0x0, 0x8(%r14)
orl $-0x1, 0x10(%r14)
movl 0x14(%r14), %eax
andl $-0x4, %eax
orl %ebp, %eax
orl $0x1, %eax
movl %eax, 0x14(%r14)
leaq 0x18(%r14), %rsi
pushq $0x1
popq %rdi
callq 0x76f4
movl 0x88(%rbx), %edi
movq %r14, %r15
subq $-0x80, %r15
movq %r15, %rsi
callq 0x76f4
xorl %ebp, %ebp
movl 0x88(%rbx), %eax
cmpq %rax, %rbp
jae 0xb875
movq 0x80(%rbx), %rax
movq (%rax,%rbp,8), %r12
movl $0x98, %edi
callq 0xf6a4
movq %rax, %r13
movl $0x98, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4190
movq 0x8(%r12), %rdi
callq 0xf6e5
movq %rax, 0x8(%r13)
movq 0x20(%r12), %rdi
callq 0xf6e5
movq %rax, 0x20(%r13)
movq %r13, %rdi
movq %r15, %rsi
callq 0x7726
incq %rbp
jmp 0xb816
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe3c0(%rip), %rdi      # 0x19c4e
leaq 0xe00b(%rip), %rsi      # 0x198a0
leaq 0xf573(%rip), %rcx      # 0x1ae0f
movl $0x530, %edx            # imm = 0x530
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/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 0xb903
cmpl $0x1, (%r15)
jne 0xb90e
movq %rdi, %r14
leaq 0x18(%r15), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x77e1
cmpl $-0x1, %eax
je 0xb92d
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0x7895
andq $0x0, 0x8(%r14)
orl $-0x1, 0x10(%r14)
movl 0x20(%r15), %eax
movl %ebp, %ecx
cmpq %rax, %rcx
jae 0xb903
movq (%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movl %ecx, 0x10(%rdx)
incq %rcx
jmp 0xb8ef
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf84e(%rip), %rdi      # 0x1b163
leaq 0xdf84(%rip), %rsi      # 0x198a0
leaq 0xf869(%rip), %rcx      # 0x1b18c
movl $0x7ba, %edx            # imm = 0x7BA
callq 0x4100
leaq 0xf7cd(%rip), %rdi      # 0x1b101
leaq 0xdf65(%rip), %rsi      # 0x198a0
leaq 0xf84a(%rip), %rcx      # 0x1b18c
movl $0x7bd, %edx            # imm = 0x7BD
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x5f
popq %rsi
callq 0xb4f0
movl %eax, %ebp
testb %al, %al
je 0xb9f1
pushq $0x5f
popq %r14
movq %rbx, %rdi
callq 0xa620
movq %rax, %rdi
movl %r14d, %esi
callq 0x82b7
testb %al, %al
je 0xb9d2
movq %rbx, %rdi
callq 0x7cea
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
leaq 0xd5ba(%rip), %r14      # 0x18fc0
movq %rbx, %rdi
callq 0x7913
movq %rax, %rdi
movq %r14, %rsi
callq 0x8272
testb %al, %al
jne 0xba27
movq %rbx, %rdi
callq 0xa620
jmp 0xba06
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x97, %esi
callq 0xad93
movq %rbx, %rdi
callq 0x7913
movq %rax, %rdi
movl %ebp, %esi
callq 0x82b7
movl %eax, %r14d
testb %al, %al
jne 0xbaa3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x797d
movq %rbx, %rdi
callq 0xa620
movq %rax, %rdi
movl %ebp, %esi
callq 0x82b7
testb %al, %al
je 0xbaa3
movq %rbx, %rdi
callq 0xa965
movq 0x18(%rbx), %rax
movl $0xd, (%rax)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x67
popq %rbp
movl %ebp, %esi
callq 0xb4f0
movl %eax, %r12d
pushq $0x68
popq %r15
movq %r14, %rdi
movl %r15d, %esi
callq 0xb4f0
testb %r12b, %r12b
je 0xbb2b
testb %al, %al
je 0xbb32
leaq 0xf8d7(%rip), %rdi      # 0x1b3ea
leaq 0xdd86(%rip), %rsi      # 0x198a0
leaq 0xf8fe(%rip), %rcx      # 0x1b41f
movl $0x69f, %edx            # imm = 0x69F
callq 0x4100
movl %r15d, %ebp
testb %al, %al
je 0xbb47
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xba66
leaq 0xf89d(%rip), %rdi      # 0x1b3eb
leaq 0xdd4b(%rip), %rsi      # 0x198a0
leaq 0xf8c3(%rip), %rcx      # 0x1b41f
movl $0x6a2, %edx            # imm = 0x6A2
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: gumbo_tokenizer_state_init
void gumbo_tokenizer_state_init (
  GumboParser* parser,
  const char* text,
  size_t text_length
) {
  GumboTokenizerState* tokenizer = gumbo_alloc(sizeof(GumboTokenizerState));
  parser->_tokenizer_state = tokenizer;
  gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
  tokenizer->_reconsume_current_input = false;
  tokenizer->_is_current_node_foreign = false;
  tokenizer->_is_in_cdata = false;
  tokenizer->_tag_state._last_start_tag = GUMBO_TAG_LAST;

  tokenizer->_buffered_emit_char = kGumboNoChar;
  gumbo_string_buffer_init(&tokenizer->_temporary_buffer);
  tokenizer->_temporary_buffer_emit = NULL;

  mark_tag_state_as_empty(&tokenizer->_tag_state);

  gumbo_string_buffer_init(&tokenizer->_script_data_buffer);
  tokenizer->_token_start = text;
  utf8iterator_init(parser, text, text_length, &tokenizer->_input);
  utf8iterator_get_position(&tokenizer->_input, &tokenizer->_token_start_pos);
  doc_type_state_init(parser);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl $0x148, %edi            # imm = 0x148
callq 0xf6a4
movq %rax, %r15
movq %rax, 0x10(%rbx)
andl $0x0, (%rax)
andl $0x0, 0x3(%rax)
movl $0x97, 0xc0(%rax)
leaq 0x12cba(%rip), %rax     # 0x1e8c0
movl (%rax), %eax
movl %eax, 0x8(%r15)
leaq 0x10(%r15), %rdi
callq 0x70f4
andq $0x0, 0x28(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%r15)
leaq 0x30(%r15), %rdi
callq 0x70f4
movq %r12, 0x48(%r15)
leaq 0xe8(%r15), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x7494
movq 0x120(%r15), %rax
movq %rax, 0x60(%r15)
movups 0x110(%r15), %xmm0
movups %xmm0, 0x50(%r15)
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: gumbo_tokenizer_state_destroy
void gumbo_tokenizer_state_destroy(GumboParser* parser) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  assert(tokenizer->_doc_type_state.name == NULL);
  assert(tokenizer->_doc_type_state.public_identifier == NULL);
  assert(tokenizer->_doc_type_state.system_identifier == NULL);
  gumbo_string_buffer_destroy(&tokenizer->_temporary_buffer);
  gumbo_string_buffer_destroy(&tokenizer->_script_data_buffer);
  gumbo_free(tokenizer);
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %rbx
cmpq $0x0, 0xc8(%rbx)
jne 0xbcc5
cmpq $0x0, 0xd0(%rbx)
jne 0xbce4
cmpq $0x0, 0xd8(%rbx)
jne 0xbd03
leaq 0x10(%rbx), %rdi
callq 0x7301
leaq 0x30(%rbx), %rdi
callq 0x7301
movq %rbx, %rdi
popq %rbx
jmp 0xf6e0
leaq 0xfae0(%rip), %rdi      # 0x1b7ac
leaq 0xfb01(%rip), %rsi      # 0x1b7d4
leaq 0xfb0a(%rip), %rcx      # 0x1b7e4
movl $0x39a, %edx            # imm = 0x39A
callq 0x4100
leaq 0xfb2b(%rip), %rdi      # 0x1b816
leaq 0xfae2(%rip), %rsi      # 0x1b7d4
leaq 0xfaeb(%rip), %rcx      # 0x1b7e4
movl $0x39b, %edx            # imm = 0x39B
callq 0x4100
leaq 0xfb41(%rip), %rdi      # 0x1b84b
leaq 0xfac3(%rip), %rsi      # 0x1b7d4
leaq 0xfacc(%rip), %rcx      # 0x1b7e4
movl $0x39c, %edx            # imm = 0x39C
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: maybe_emit_from_temporary_buffer
static bool maybe_emit_from_temporary_buffer(
    GumboParser* parser, GumboToken* output) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  const char* c = tokenizer->_temporary_buffer_emit;
  GumboStringBuffer* buffer = &tokenizer->_temporary_buffer;

  if (!c || c >= buffer->data + buffer->length) {
    tokenizer->_temporary_buffer_emit = NULL;
    return false;
  }

  assert(*c == utf8iterator_current(&tokenizer->_input));
  // emit_char also advances the input stream. We need to do some juggling of
  // the _reconsume_current_input flag to get the proper behavior when emitting
  // previous tokens. Basically, _reconsume_current_input should *never* be set
  // when emitting anything from the temporary buffer, since those characters
  // have already been advanced past. However, it should be preserved so that
  // when the *next* character is encountered again, the tokenizer knows not to
  // advance past it.
  bool saved_reconsume_state = tokenizer->_reconsume_current_input;
  tokenizer->_reconsume_current_input = false;
  emit_char(parser, *c, output);
  ++tokenizer->_temporary_buffer_emit;
  tokenizer->_reconsume_current_input = saved_reconsume_state;
  return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x10(%rdi), %rbx
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xbd72
movq 0x10(%rbx), %rcx
addq 0x18(%rbx), %rcx
cmpq %rcx, %rax
jae 0xbd72
movsbl (%rax), %ecx
cmpl %ecx, 0x100(%rbx)
jne 0xbd80
movq %rsi, %rdx
movb 0x4(%rbx), %bpl
movb $0x0, 0x4(%rbx)
movsbl (%rax), %esi
callq 0x6041
incq 0x28(%rbx)
movb %bpl, 0x4(%rbx)
movb $0x1, %al
jmp 0xbd79
andq $0x0, 0x28(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xfb78(%rip), %rdi      # 0x1b8ff
leaq 0xfa46(%rip), %rsi      # 0x1b7d4
leaq 0xfb99(%rip), %rcx      # 0x1b92e
movl $0x28d, %edx            # imm = 0x28D
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: gumbo_token_destroy
void gumbo_token_destroy(GumboToken* token) {
  if (!token) {
    return;
  }

  switch (token->type) {
    case GUMBO_TOKEN_DOCTYPE:
      gumbo_free((void*) token->v.doc_type.name);
      gumbo_free((void*) token->v.doc_type.public_identifier);
      gumbo_free((void*) token->v.doc_type.system_identifier);
      return;
    case GUMBO_TOKEN_START_TAG:
      for (unsigned int i = 0; i < token->v.start_tag.attributes.length; ++i) {
        GumboAttribute* attr = token->v.start_tag.attributes.data[i];
        if (attr) {
          // May have been nulled out if this token was merged with another.
          gumbo_destroy_attribute(attr);
        }
      }
      gumbo_free((void*) token->v.start_tag.attributes.data);
      return;
    case GUMBO_TOKEN_COMMENT:
      gumbo_free((void*) token->v.text);
      return;
    default:
      return;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xbddd
movq %rdi, %rbx
movl (%rdi), %eax
testl %eax, %eax
je 0xbde9
cmpl $0x3, %eax
je 0xbde5
cmpl $0x1, %eax
jne 0xbddd
xorl %r14d, %r14d
movl 0x40(%rbx), %eax
movq 0x38(%rbx), %rdi
cmpq %rax, %r14
jae 0xbe02
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0xbdd8
callq 0x6bab
incq %r14
jmp 0xbdbe
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x30
jmp 0xbdfd
movq 0x30(%rbx), %rdi
callq 0xf6e0
movq 0x38(%rbx), %rdi
callq 0xf6e0
pushq $0x40
popq %rax
movq (%rbx,%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf6e0
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: finish_token
static void finish_token(GumboParser* parser, GumboToken* token) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  if (!tokenizer->_reconsume_current_input) {
    utf8iterator_next(&tokenizer->_input);
  }

  token->position = tokenizer->_token_start_pos;
  token->original_text.data = tokenizer->_token_start;
  reset_token_start_point(tokenizer);
  token->original_text.length =
      tokenizer->_token_start - token->original_text.data;
  if (token->original_text.length > 0 &&
      token->original_text.data[token->original_text.length - 1] == '\r') {
    // The UTF8 iterator will ignore carriage returns in the input stream, which
    // means that the next token may start one past a \r character. The pointer
    // arithmetic above results in that \r being appended to the original text
    // of the preceding token, so we have to adjust its length here to chop the
    // \r off.
    --token->original_text.length;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rdi), %r14
cmpb $0x0, 0x4(%r14)
jne 0xbe2c
leaq 0xe8(%r14), %rdi
callq 0x4337
movq 0x60(%r14), %rax
movq %rax, 0x18(%rbx)
movups 0x50(%r14), %xmm0
movups %xmm0, 0x8(%rbx)
movq 0x48(%r14), %rax
movq %rax, 0x20(%rbx)
movq 0xe8(%r14), %rax
movq %rax, 0x48(%r14)
movq 0x120(%r14), %rcx
movq %rcx, 0x60(%r14)
movups 0x110(%r14), %xmm0
movups %xmm0, 0x50(%r14)
movq 0x20(%rbx), %rcx
subq %rcx, %rax
movq %rax, 0x28(%rbx)
je 0xbe83
cmpb $0xd, -0x1(%rcx,%rax)
jne 0xbe83
decq %rax
movq %rax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_data_state
static StateResult handle_data_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  switch (c) {
    case '&':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_CHAR_REF_IN_DATA);
      // The char_ref machinery expects to be on the & so it can mark that
      // and return to it if the text isn't a char ref, so we need to
      // reconsume it.
      tokenizer->_reconsume_current_input = true;
      return NEXT_CHAR;
    case '<':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_TAG_OPEN);
      clear_temporary_buffer(parser);
      append_char_to_temporary_buffer(parser, '<');
      return NEXT_CHAR;
    case '\0':
      tokenizer_add_parse_error(parser, GUMBO_ERR_UTF8_NULL);
      emit_char(parser, c, output);
      return RETURN_ERROR;
    default:
      return emit_current_char(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xbed4
cmpl $0x3c, %edx
je 0xbeb3
cmpl $0x26, %edx
jne 0xbef0
movq 0x10(%rbx), %rax
movl $0x1, (%rax)
movb $0x1, 0x4(%rsi)
jmp 0xbed0
movq 0x10(%rbx), %rax
movl $0x7, (%rax)
movq %rbx, %rdi
callq 0xed36
pushq $0x3c
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x2
jmp 0xbefd
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xed94
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x6041
jmp 0xbefe
movq %rbx, %rdi
movq %r14, %rsi
callq 0xedf4
pushq $0x1
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rcdata_state
static StateResult handle_rcdata_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  switch (c) {
    case '&':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_CHAR_REF_IN_RCDATA);
      tokenizer->_reconsume_current_input = true;
      return NEXT_CHAR;
    case '<':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_RCDATA_LT);
      clear_temporary_buffer(parser);
      append_char_to_temporary_buffer(parser, '<');
      return NEXT_CHAR;
    case '\0':
      return emit_replacement_char(parser, output);
    case -1:
      return emit_eof(parser, output);
    default:
      return emit_current_char(parser, output);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $-0x1, %edx
je 0xbf6b
testl %edx, %edx
je 0xbf3b
cmpl $0x3c, %edx
je 0xbf4a
cmpl $0x26, %edx
jne 0xbf78
movq 0x10(%rbx), %rax
movl $0x3, (%rax)
movb $0x1, 0x4(%rsi)
jmp 0xbf67
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xee81
xorl %eax, %eax
jmp 0xbf86
movq 0x10(%rbx), %rax
movl $0xa, (%rax)
movq %rbx, %rdi
callq 0xed36
pushq $0x3c
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x2
jmp 0xbf85
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xeeaa
jmp 0xbf83
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xedf4
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rawtext_state
static StateResult handle_rawtext_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  switch (c) {
    case '<':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_RAWTEXT_LT);
      clear_temporary_buffer(parser);
      append_char_to_temporary_buffer(parser, '<');
      return NEXT_CHAR;
    case '\0':
      return emit_replacement_char(parser, output);
    case -1:
      return emit_eof(parser, output);
    default:
      return emit_current_char(parser, output);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $-0x1, %edx
je 0xbfdc
testl %edx, %edx
je 0xbfcd
cmpl $0x3c, %edx
jne 0xbfe9
movq 0x10(%rbx), %rax
movl $0xd, (%rax)
movq %rbx, %rdi
callq 0xed36
pushq $0x3c
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x2
jmp 0xbff6
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xee81
xorl %eax, %eax
jmp 0xbff7
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xeeaa
jmp 0xbff4
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xedf4
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_script_state
static StateResult handle_script_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  switch (c) {
    case '<':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT_LT);
      clear_temporary_buffer(parser);
      append_char_to_temporary_buffer(parser, '<');
      return NEXT_CHAR;
    case '\0':
      return emit_replacement_char(parser, output);
    case -1:
      return emit_eof(parser, output);
    default:
      return emit_current_char(parser, output);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $-0x1, %edx
je 0xc03b
testl %edx, %edx
je 0xc02c
cmpl $0x3c, %edx
jne 0xc048
movq 0x10(%rbx), %rax
movl $0x10, (%rax)
movq %rbx, %rdi
callq 0xed36
pushq $0x3c
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x2
jmp 0xc055
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xee81
xorl %eax, %eax
jmp 0xc056
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xeeaa
jmp 0xc053
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xedf4
pushq $0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_plaintext_state
static StateResult handle_plaintext_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  switch (c) {
    case '\0':
      return emit_replacement_char(parser, output);
    case -1:
      return emit_eof(parser, output);
    default:
      return emit_current_char(parser, output);
  }
}

// Assembly:
pushq %rax
movq %rcx, %rsi
cmpl $-0x1, %edx
je 0xc06e
testl %edx, %edx
jne 0xc075
callq 0xee81
xorl %eax, %eax
jmp 0xc07d
callq 0xeeaa
jmp 0xc07a
callq 0xedf4
pushq $0x1
popq %rax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_tag_open_state
static StateResult handle_tag_open_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "<"));
  switch (c) {
    case '!':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_MARKUP_DECLARATION);
      clear_temporary_buffer(parser);
      return NEXT_CHAR;
    case '/':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_END_TAG_OPEN);
      append_char_to_temporary_buffer(parser, '/');
      return NEXT_CHAR;
    case '?':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_BOGUS_COMMENT);
      clear_temporary_buffer(parser);
      append_char_to_temporary_buffer(parser, '?');
      tokenizer_add_parse_error(parser, GUMBO_ERR_TAG_STARTS_WITH_QUESTION);
      return NEXT_CHAR;
    default:
      if (is_alpha(c)) {
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_TAG_NAME);
        start_new_tag(parser, true);
        return NEXT_CHAR;
      } else {
        tokenizer_add_parse_error(parser, GUMBO_ERR_TAG_INVALID);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
        emit_temporary_buffer(parser, output);
        return RETURN_ERROR;
      }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xf90b(%rip), %rsi      # 0x1b99d
pushq $0x1
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc14f
cmpl $0x3f, %ebp
je 0xc0dc
cmpl $0x2f, %ebp
je 0xc0c5
cmpl $0x21, %ebp
jne 0xc106
movq 0x10(%rbx), %rax
movl $0x2c, (%rax)
movq %rbx, %rdi
callq 0xed36
jmp 0xc126
movq 0x10(%rbx), %rax
movl $0x8, (%rax)
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0xed83
jmp 0xc126
movq 0x10(%rbx), %rax
movl $0x2b, (%rax)
movq %rbx, %rdi
callq 0xed36
pushq $0x3f
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0xed94
jmp 0xc126
orl $0x20, %ebp
addl $-0x61, %ebp
cmpl $0x19, %ebp
ja 0xc12e
movq 0x10(%rbx), %rax
movl $0x9, (%rax)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xeed6
pushq $0x2
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0xed94
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
xorl %eax, %eax
jmp 0xc129
leaq 0xf849(%rip), %rdi      # 0x1b99f
leaq 0xf677(%rip), %rsi      # 0x1b7d4
leaq 0xf860(%rip), %rcx      # 0x1b9c4
movl $0x444, %edx            # imm = 0x444
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_end_tag_open_state
static StateResult handle_end_tag_open_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "</"));
  switch (c) {
    case '>':
      tokenizer_add_parse_error(parser, GUMBO_ERR_CLOSE_TAG_EMPTY);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      return NEXT_CHAR;
    case -1:
      tokenizer_add_parse_error(parser, GUMBO_ERR_CLOSE_TAG_EOF);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      return emit_temporary_buffer(parser, output);
    default:
      if (is_alpha(c)) {
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_TAG_NAME);
        start_new_tag(parser, false);
      } else {
        tokenizer_add_parse_error(parser, GUMBO_ERR_CLOSE_TAG_INVALID);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_BOGUS_COMMENT);
        clear_temporary_buffer(parser);
        append_char_to_temporary_buffer(parser, c);
      }
      return NEXT_CHAR;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xf952(%rip), %rsi      # 0x1bad3
pushq $0x2
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc223
cmpl $-0x1, %ebp
je 0xc1af
cmpl $0x3e, %ebp
jne 0xc1d1
pushq $0xb
popq %rsi
movq %rbx, %rdi
callq 0xed94
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
jmp 0xc21b
pushq $0xc
popq %rsi
movq %rbx, %rdi
callq 0xed94
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
jmp 0xc21e
movl %ebp, %eax
orl $0x20, %eax
addl $-0x61, %eax
cmpl $0x19, %eax
ja 0xc1f4
movq 0x10(%rbx), %rax
movl $0x9, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeed6
jmp 0xc21b
pushq $0xd
popq %rsi
movq %rbx, %rdi
callq 0xed94
movq 0x10(%rbx), %rax
movl $0x2b, (%rax)
movq %rbx, %rdi
callq 0xed36
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed83
pushq $0x2
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xf8ac(%rip), %rdi      # 0x1bad6
leaq 0xf5a3(%rip), %rsi      # 0x1b7d4
leaq 0xf8c4(%rip), %rcx      # 0x1bafc
movl $0x469, %edx            # imm = 0x469
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_tag_name_state
static StateResult handle_tag_name_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  switch (c) {
    case '\t':
    case '\n':
    case '\f':
    case ' ':
      finish_tag_name(parser);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_BEFORE_ATTR_NAME);
      return NEXT_CHAR;
    case '/':
      finish_tag_name(parser);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_SELF_CLOSING_START_TAG);
      return NEXT_CHAR;
    case '>':
      finish_tag_name(parser);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      return emit_current_tag(parser, output);
    case '\0':
      tokenizer_add_parse_error(parser, GUMBO_ERR_UTF8_NULL);
      append_char_to_tag_buffer(parser, UNICODE_REPLACEMENT_CHAR, true);
      return NEXT_CHAR;
    case -1:
      tokenizer_add_parse_error(parser, GUMBO_ERR_TAG_EOF);
      abandon_current_tag(parser);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      return NEXT_CHAR;
    default:
      append_char_to_tag_buffer(parser, ensure_lowercase(c), true);
      return NEXT_CHAR;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x3e, %edx
ja 0xc2a8
movq %rcx, %r14
movl %edx, %eax
movabsq $0x100001600, %rcx      # imm = 0x100001600
btq %rax, %rcx
jae 0xc27a
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
movl $0x21, (%rax)
jmp 0xc31e
cmpq $0x2f, %rax
je 0xc30c
cmpq $0x3e, %rax
jne 0xc2a8
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf08d
pushq $0x1
jmp 0xc320
cmpl $-0x1, %edx
je 0xc2d0
testl %edx, %edx
jne 0xc2ec
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed94
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl $0xfffd, %esi           # imm = 0xFFFD
callq 0xf1ea
jmp 0xc321
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0xed94
movq %rbx, %rdi
callq 0xf234
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
jmp 0xc31e
movzbl %dl, %eax
leaq 0x9e5a(%rip), %rcx      # 0x16150
movzbl (%rcx,%rax), %esi
andl $0x20, %esi
orl %eax, %esi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xf1ea
jmp 0xc31e
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
movl $0x2a, (%rax)
pushq $0x2
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rcdata_lt_state
static StateResult handle_rcdata_lt_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "<"));
  if (c == '/') {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RCDATA_END_TAG_OPEN);
    append_char_to_temporary_buffer(parser, '/');
    return NEXT_CHAR;
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RCDATA);
    tokenizer->_reconsume_current_input = true;
    return emit_temporary_buffer(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xf65c(%rip), %rsi      # 0x1b99d
pushq $0x1
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc390
movq 0x10(%rbx), %rax
cmpl $0x2f, %ebp
jne 0xc36c
movl $0xb, (%rax)
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x2
popq %rax
jmp 0xc385
movl $0x2, (%rax)
movb $0x1, 0x4(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf608(%rip), %rdi      # 0x1b99f
leaq 0xf436(%rip), %rsi      # 0x1b7d4
leaq 0xf87b(%rip), %rcx      # 0x1bc20
movl $0x4ae, %edx            # imm = 0x4AE
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rcdata_end_tag_open_state
static StateResult handle_rcdata_end_tag_open_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "</"));
  if (is_alpha(c)) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RCDATA_END_TAG_NAME);
    start_new_tag(parser, false);
    append_char_to_temporary_buffer(parser, c);
    return NEXT_CHAR;
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RCDATA);
    return emit_temporary_buffer(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xf711(%rip), %rsi      # 0x1bad3
pushq $0x2
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc417
movl %ebp, %ecx
orl $0x20, %ecx
addl $-0x61, %ecx
movq 0x10(%rbx), %rax
cmpl $0x19, %ecx
ja 0xc3fe
movl $0xc, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeed6
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed83
pushq $0x2
popq %rax
jmp 0xc412
movl $0x2, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xf6b8(%rip), %rdi      # 0x1bad6
leaq 0xf3af(%rip), %rsi      # 0x1b7d4
leaq 0xf850(%rip), %rcx      # 0x1bc7c
movl $0x4c1, %edx            # imm = 0x4C1
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rcdata_end_tag_name_state
static StateResult handle_rcdata_end_tag_name_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  UNUSED_IF_NDEBUG(tokenizer);
  assert(tokenizer->_temporary_buffer.length >= 2);
  if (is_alpha(c)) {
    append_char_to_tag_buffer(parser, ensure_lowercase(c), true);
    append_char_to_temporary_buffer(parser, c);
    return NEXT_CHAR;
  } else if (is_appropriate_end_tag(parser)) {
    switch (c) {
      case '\t':
      case '\n':
      case '\f':
      case ' ':
        finish_tag_name(parser);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_BEFORE_ATTR_NAME);
        return NEXT_CHAR;
      case '/':
        finish_tag_name(parser);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_SELF_CLOSING_START_TAG);
        return NEXT_CHAR;
      case '>':
        finish_tag_name(parser);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
        return emit_current_tag(parser, output);
    }
  }
  gumbo_tokenizer_set_state(parser, GUMBO_LEX_RCDATA);
  abandon_current_tag(parser);
  return emit_temporary_buffer(parser, output);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x1, 0x18(%rsi)
jbe 0xc522
movl %edx, %ebp
movq %rdi, %rbx
movl %edx, %eax
orl $0x20, %eax
addl $-0x61, %eax
cmpl $0x19, %eax
ja 0xc482
movzbl %bpl, %eax
leaq 0x9cee(%rip), %rcx      # 0x16150
movzbl (%rcx,%rax), %esi
andl $0x20, %esi
orl %eax, %esi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xf1ea
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed83
jmp 0xc4ba
movq %rcx, %r14
movq %rbx, %rdi
callq 0xf2a1
testb %al, %al
je 0xc4e9
cmpl $0x3e, %ebp
ja 0xc4e9
movl %ebp, %eax
movabsq $0x100001600, %rcx      # imm = 0x100001600
btq %rax, %rcx
jae 0xc4bf
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
movl $0x21, (%rax)
pushq $0x2
popq %rax
jmp 0xc509
cmpq $0x2f, %rax
je 0xc50e
cmpq $0x3e, %rax
jne 0xc4e9
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf08d
pushq $0x1
jmp 0xc4bc
movq 0x10(%rbx), %rax
movl $0x2, (%rax)
movq %rbx, %rdi
callq 0xf234
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
movl $0x2a, (%rax)
jmp 0xc4ba
leaq 0xf7b9(%rip), %rdi      # 0x1bce2
leaq 0xf2a4(%rip), %rsi      # 0x1b7d4
leaq 0xf7d4(%rip), %rcx      # 0x1bd0b
movl $0x4d5, %edx            # imm = 0x4D5
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rawtext_lt_state
static StateResult handle_rawtext_lt_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "<"));
  if (c == '/') {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RAWTEXT_END_TAG_OPEN);
    append_char_to_temporary_buffer(parser, '/');
    return NEXT_CHAR;
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RAWTEXT);
    tokenizer->_reconsume_current_input = true;
    return emit_temporary_buffer(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xf443(%rip), %rsi      # 0x1b99d
pushq $0x1
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc5a9
movq 0x10(%rbx), %rax
cmpl $0x2f, %ebp
jne 0xc585
movl $0xe, (%rax)
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0xed83
pushq $0x2
popq %rax
jmp 0xc59e
movl $0x4, (%rax)
movb $0x1, 0x4(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf3ef(%rip), %rdi      # 0x1b99f
leaq 0xf21d(%rip), %rsi      # 0x1b7d4
leaq 0xf7f9(%rip), %rcx      # 0x1bdb7
movl $0x4f9, %edx            # imm = 0x4F9
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rawtext_end_tag_open_state
static StateResult handle_rawtext_end_tag_open_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "</"));
  if (is_alpha(c)) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RAWTEXT_END_TAG_NAME);
    start_new_tag(parser, false);
    append_char_to_temporary_buffer(parser, c);
    return NEXT_CHAR;
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_RAWTEXT);
    return emit_temporary_buffer(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xf4f8(%rip), %rsi      # 0x1bad3
pushq $0x2
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc630
movl %ebp, %ecx
orl $0x20, %ecx
addl $-0x61, %ecx
movq 0x10(%rbx), %rax
cmpl $0x19, %ecx
ja 0xc617
movl $0xf, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeed6
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed83
pushq $0x2
popq %rax
jmp 0xc62b
movl $0x4, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xf49f(%rip), %rdi      # 0x1bad6
leaq 0xf196(%rip), %rsi      # 0x1b7d4
leaq 0xf7cf(%rip), %rcx      # 0x1be14
movl $0x50c, %edx            # imm = 0x50C
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_rawtext_end_tag_name_state
static StateResult handle_rawtext_end_tag_name_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  assert(tokenizer->_temporary_buffer.length >= 2);
  gumbo_debug("Last end tag: %.*s\n", (int) tokenizer->_tag_state._buffer.length,
      tokenizer->_tag_state._buffer.data);
  if (is_alpha(c)) {
    append_char_to_tag_buffer(parser, ensure_lowercase(c), true);
    append_char_to_temporary_buffer(parser, c);
    return NEXT_CHAR;
  } else if (is_appropriate_end_tag(parser)) {
    gumbo_debug("Is an appropriate end tag.\n");
    switch (c) {
      case '\t':
      case '\n':
      case '\f':
      case ' ':
        finish_tag_name(parser);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_BEFORE_ATTR_NAME);
        return NEXT_CHAR;
      case '/':
        finish_tag_name(parser);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_SELF_CLOSING_START_TAG);
        return NEXT_CHAR;
      case '>':
        finish_tag_name(parser);
        gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
        return emit_current_tag(parser, output);
    }
  }
  gumbo_tokenizer_set_state(parser, GUMBO_LEX_RAWTEXT);
  abandon_current_tag(parser);
  return emit_temporary_buffer(parser, output);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x1, 0x18(%rsi)
jbe 0xc73b
movl %edx, %ebp
movq %rdi, %rbx
movl %edx, %eax
orl $0x20, %eax
addl $-0x61, %eax
cmpl $0x19, %eax
ja 0xc69b
movzbl %bpl, %eax
leaq 0x9ad5(%rip), %rcx      # 0x16150
movzbl (%rcx,%rax), %esi
andl $0x20, %esi
orl %eax, %esi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xf1ea
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed83
jmp 0xc6d3
movq %rcx, %r14
movq %rbx, %rdi
callq 0xf2a1
testb %al, %al
je 0xc702
cmpl $0x3e, %ebp
ja 0xc702
movl %ebp, %eax
movabsq $0x100001600, %rcx      # imm = 0x100001600
btq %rax, %rcx
jae 0xc6d8
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
movl $0x21, (%rax)
pushq $0x2
popq %rax
jmp 0xc722
cmpq $0x2f, %rax
je 0xc727
cmpq $0x3e, %rax
jne 0xc702
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
andl $0x0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf08d
pushq $0x1
jmp 0xc6d5
movq 0x10(%rbx), %rax
movl $0x4, (%rax)
movq %rbx, %rdi
callq 0xf234
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0xf05f
movq 0x10(%rbx), %rax
movl $0x2a, (%rax)
jmp 0xc6d3
leaq 0xf5a0(%rip), %rdi      # 0x1bce2
leaq 0xf08b(%rip), %rsi      # 0x1b7d4
leaq 0xf72b(%rip), %rcx      # 0x1be7b
movl $0x51f, %edx            # imm = 0x51F
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_script_lt_state
static StateResult handle_script_lt_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "<"));
  if (c == '/') {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT_END_TAG_OPEN);
    append_char_to_temporary_buffer(parser, '/');
    return NEXT_CHAR;
  } else if (c == '!') {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT_ESCAPED_START);
    append_char_to_temporary_buffer(parser, '!');
    return emit_temporary_buffer(parser, output);
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT);
    tokenizer->_reconsume_current_input = true;
    return emit_temporary_buffer(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
leaq 0xf22a(%rip), %rsi      # 0x1b99d
pushq $0x1
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc7da
movq 0x10(%r14), %rax
cmpl $0x21, %ebp
je 0xc7a3
cmpl $0x2f, %ebp
jne 0xc7b6
movl $0x11, (%rax)
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0xed83
pushq $0x2
popq %rax
jmp 0xc7cf
movl $0x13, (%rax)
pushq $0x21
popq %rsi
movq %r14, %rdi
callq 0xed83
jmp 0xc7c1
movl $0x5, (%rax)
movb $0x1, 0x4(%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xefc5
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf1be(%rip), %rdi      # 0x1b99f
leaq 0xefec(%rip), %rsi      # 0x1b7d4
leaq 0xf6f3(%rip), %rcx      # 0x1bee2
movl $0x546, %edx            # imm = 0x546
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_script_end_tag_open_state
static StateResult handle_script_end_tag_open_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  assert(temporary_buffer_equals(parser, "</"));
  if (is_alpha(c)) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT_END_TAG_NAME);
    start_new_tag(parser, false);
    append_char_to_temporary_buffer(parser, c);
    return NEXT_CHAR;
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT);
    return emit_temporary_buffer(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
leaq 0xf2c7(%rip), %rsi      # 0x1bad3
pushq $0x2
popq %rdx
callq 0xeeb5
testb %al, %al
je 0xc861
movl %ebp, %ecx
orl $0x20, %ecx
addl $-0x61, %ecx
movq 0x10(%rbx), %rax
cmpl $0x19, %ecx
ja 0xc848
movl $0x12, (%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xeed6
movq %rbx, %rdi
movl %ebp, %esi
callq 0xed83
pushq $0x2
popq %rax
jmp 0xc85c
movl $0x5, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xefc5
movzbl %al, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xf26e(%rip), %rdi      # 0x1bad6
leaq 0xef65(%rip), %rsi      # 0x1b7d4
leaq 0xf6c8(%rip), %rcx      # 0x1bf3e
movl $0x55d, %edx            # imm = 0x55D
callq 0x4100
// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_script_escaped_start_state
static StateResult handle_script_escaped_start_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  if (c == '-') {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT_ESCAPED_START_DASH);
    return emit_current_char(parser, output);
  } else {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_SCRIPT);
    tokenizer->_reconsume_current_input = true;
    return NEXT_CHAR;
  }
}

// Assembly:
movq 0x10(%rdi), %rax
cmpl $0x2d, %edx
jne 0xc9ab
pushq %rax
movl $0x14, (%rax)
movq %rcx, %rsi
callq 0xedf4
pushq $0x1
popq %rax
addq $0x8, %rsp
retq
movl $0x5, (%rax)
movb $0x1, 0x4(%rsi)
pushq $0x2
popq %rax
retq