LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_doctype_system_id_double_quoted_state
static StateResult handle_doctype_system_id_double_quoted_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  switch (c) {
    case '"':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_AFTER_DOCTYPE_SYSTEM_ID);
      finish_doctype_system_id(parser);
      return NEXT_CHAR;
    case '\0':
      tokenizer_add_parse_error(parser, GUMBO_ERR_UTF8_NULL);
      append_char_to_temporary_buffer(parser, UNICODE_REPLACEMENT_CHAR);
      return NEXT_CHAR;
    case '>':
      tokenizer_add_parse_error(parser, GUMBO_ERR_DOCTYPE_END);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      tokenizer->_doc_type_state.force_quirks = true;
      finish_doctype_system_id(parser);
      emit_doctype(parser, output);
      return RETURN_ERROR;
    case -1:
      tokenizer_add_parse_error(parser, GUMBO_ERR_DOCTYPE_EOF);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      tokenizer->_doc_type_state.force_quirks = true;
      finish_doctype_system_id(parser);
      emit_doctype(parser, output);
      return RETURN_ERROR;
    default:
      append_char_to_temporary_buffer(parser, c);
      return NEXT_CHAR;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x21, %edx
jg 0x11031
cmpl $-0x1, %edx
je 0x11065
testl %edx, %edx
jne 0x1104f
movl $0x2, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x11412
movq 0x10(%rbx), %rsi
addq $0x10, %rsi
movl $0xfffd, %edi           # imm = 0xFFFD
callq 0x4322
jmp 0x110d3
cmpl $0x3e, %edx
je 0x1106f
cmpl $0x22, %edx
jne 0x1104f
movq 0x10(%rbx), %rax
movl $0x41, (%rax)
movq %rbx, %rdi
callq 0x11e12
jmp 0x1105e
movq 0x10(%rbx), %rsi
addq $0x10, %rsi
movl %edx, %edi
callq 0x4322
movl $0x2, %ebp
jmp 0x110d3
movq %rbx, %rdi
movl $0x22, %esi
jmp 0x11077
movq %rbx, %rdi
movl $0x27, %esi
callq 0x11412
movq 0x10(%rbx), %rax
xorl %ebp, %ebp
movl %ebp, (%rax)
movb $0x1, 0xe0(%r15)
movq %rbx, %rdi
callq 0x11e12
movl %ebp, (%r14)
movq 0x10(%rbx), %rax
movups 0xc8(%rax), %xmm0
movups 0xd8(%rax), %xmm1
movups %xmm1, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd443
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_after_doctype_system_id_state
static StateResult handle_after_doctype_system_id_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  switch (c) {
    case '\t':
    case '\n':
    case '\f':
    case ' ':
      return NEXT_CHAR;
    case '>':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      emit_doctype(parser, output);
      return RETURN_SUCCESS;
    case -1:
      tokenizer_add_parse_error(parser, GUMBO_ERR_DOCTYPE_EOF);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      tokenizer->_doc_type_state.force_quirks = true;
      emit_doctype(parser, output);
      return RETURN_ERROR;
    default:
      tokenizer_add_parse_error(parser, GUMBO_ERR_DOCTYPE_INVALID);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_BOGUS_DOCTYPE);
      return NEXT_CHAR;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2, %ebp
incl %edx
cmpl $0x3f, %edx
ja 0x11261
movabsq $0x200002c00, %rax      # imm = 0x200002C00
btq %rdx, %rax
jae 0x11209
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %r14
testq %rdx, %rdx
je 0x1127a
cmpq $0x3f, %rdx
jne 0x11261
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ecx, (%r14)
movups 0xc8(%rax), %xmm0
movups 0xd8(%rax), %xmm1
movups %xmm0, 0x30(%r14)
movups %xmm1, 0x40(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd443
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
movl $0x1, %ebp
jmp 0x111fc
movq %rbx, %rdi
movl $0x23, %esi
callq 0x11412
movq 0x10(%rbx), %rax
movl $0x42, (%rax)
jmp 0x111fc
movq %rsi, %r15
movq %rbx, %rdi
movl $0x22, %esi
callq 0x11412
movq 0x10(%rbx), %rax
xorl %ebp, %ebp
movl %ebp, (%rax)
movb $0x1, 0xe0(%r15)
movl %ebp, (%r14)
movups 0xc8(%rax), %xmm0
movups 0xd8(%rax), %xmm1
movups %xmm0, 0x30(%r14)
movups %xmm1, 0x40(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd443
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
jmp 0x111fc
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_bogus_doctype_state
static StateResult handle_bogus_doctype_state (
  GumboParser* parser,
  GumboTokenizerState* UNUSED_ARG(tokenizer),
  int c,
  GumboToken* output
) {
  if (c == '>' || c == -1) {
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
    emit_doctype(parser, output);
    return RETURN_ERROR;
  }
  return NEXT_CHAR;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3e, %edx
je 0x112ef
movl $0x2, %ebp
cmpl $-0x1, %edx
jne 0x1132f
movq 0x10(%rbx), %rax
xorl %ebp, %ebp
movl %ebp, (%rax)
movl %ebp, (%rcx)
movups 0xc8(%rax), %xmm0
movups 0xd8(%rax), %xmm1
movups %xmm0, 0x30(%rcx)
movups %xmm1, 0x40(%rcx)
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xd443
movq 0x10(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xd3(%rax)
movups %xmm0, 0xc8(%rax)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_cdata_state
static StateResult handle_cdata_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  if (c == -1 || utf8iterator_maybe_consume_literal(&tokenizer->_input, "]]>")) {
    tokenizer->_reconsume_current_input = true;
    reset_token_start_point(tokenizer);
    gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
    tokenizer->_is_in_cdata = false;
    return NEXT_CHAR;
  } else {
    return emit_current_char(parser, output);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x1, %edx
je 0x11373
movq %rcx, %r15
leaq 0xe8(%rbx), %rdi
leaq 0xf1a7(%rip), %rsi      # 0x20502
movl $0x1, %ebp
movl $0x3, %edx
movl $0x1, %ecx
callq 0x7d5f
testb %al, %al
je 0x113ad
movb $0x1, 0x4(%rbx)
movq 0xe8(%rbx), %rax
movq %rax, 0x48(%rbx)
movups 0x110(%rbx), %xmm0
movups %xmm0, 0x50(%rbx)
movq 0x120(%rbx), %rax
movq %rax, 0x60(%rbx)
movq 0x10(%r14), %rax
movl $0x0, (%rax)
movb $0x0, 0x6(%rbx)
movl $0x2, %ebp
jmp 0x113b8
movq %r14, %rdi
movq %r15, %rsi
callq 0x11472
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: clear_temporary_buffer
static void clear_temporary_buffer(GumboParser* parser) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  assert(!tokenizer->_temporary_buffer_emit);
  utf8iterator_mark(&tokenizer->_input);
  gumbo_string_buffer_clear(&tokenizer->_temporary_buffer);
  // The temporary buffer and script data buffer are the same object in the
  // spec, so the script data buffer should be cleared as well.
  gumbo_string_buffer_clear(&tokenizer->_script_data_buffer);
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %rbx
cmpq $0x0, 0x28(%rbx)
jne 0x113f3
leaq 0xe8(%rbx), %rdi
callq 0x7e13
leaq 0x10(%rbx), %rdi
callq 0x7a1e
addq $0x30, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7a1e
leaq 0xe3f6(%rip), %rdi      # 0x1f7f0
leaq 0xe343(%rip), %rsi      # 0x1f744
leaq 0xe4da(%rip), %rcx      # 0x1f8e2
movl $0x167, %edx            # imm = 0x167
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: emit_char_ref
static StateResult emit_char_ref (
  GumboParser* parser,
  int additional_allowed_char,
  bool UNUSED_ARG(is_in_attribute),
  GumboToken* output
) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  OneOrTwoCodepoints char_ref;
  bool status = gumbo_consume_char_ref (
    parser,
    &tokenizer->_input,
    additional_allowed_char,
    false,
    &char_ref
  );
  if (char_ref.first != kGumboNoChar) {
    // gumbo_consume_char_ref ends with the iterator pointing at the next
    // character, so we need to be sure not advance it again before
    // reading the next token.
    tokenizer->_reconsume_current_input = true;
    emit_char(parser, char_ref.first, output);
    tokenizer->_buffered_emit_char = char_ref.second;
  } else {
    emit_char(parser, '&', output);
  }
  return status ? RETURN_SUCCESS : RETURN_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %r12
leaq 0xe8(%r12), %rsi
leaq 0x8(%rsp), %r15
movl $0x20, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x11eb0
movl %eax, %ebp
movl (%r15), %eax
leaq 0x11310(%rip), %rcx     # 0x22820
cmpl (%rcx), %eax
jne 0x11535
movq 0x10(%r14), %rax
movzbl 0x6(%rax), %eax
addl $0x5, %eax
movl %eax, (%rbx)
movl $0x26, 0x30(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd443
jmp 0x11584
movb $0x1, 0x4(%r12)
testl %eax, %eax
jle 0x1154e
movq 0x10(%r14), %rdx
movl $0x6, %ecx
cmpb $0x0, 0x6(%rdx)
jne 0x1156b
leal 0x1(%rax), %edx
cmpl $0x21, %edx
ja 0x115a7
movl $0x4, %ecx
movabsq $0x200006c00, %rsi      # imm = 0x200006C00
btq %rdx, %rsi
jae 0x11595
movl %ecx, (%rbx)
movl %eax, 0x30(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd443
movl 0xc(%rsp), %eax
movl %eax, 0x8(%r12)
movzbl %bpl, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %rdx, %rdx
je 0x115ae
cmpq $0x1, %rdx
jne 0x115a7
movl $0x7, %ecx
jmp 0x1156b
movl $0x5, %ecx
jmp 0x1156b
movl $0x8, %ecx
jmp 0x1156b
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: start_new_tag
static void start_new_tag(GumboParser* parser, bool is_start_tag) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  GumboTagState* tag_state = &tokenizer->_tag_state;
  int c = utf8iterator_current(&tokenizer->_input);
  assert(is_alpha(c));
  c = ensure_lowercase(c);
  assert(is_alpha(c));

  initialize_tag_buffer(parser);
  gumbo_string_buffer_append_codepoint(c, &tag_state->_buffer);

  assert(tag_state->_attributes.data == NULL);
  // Initial size chosen by statistical analysis of a corpus of 60k webpages.
  // 99.5% of elements have 0 attributes, 93% of the remainder have 1. These
  // numbers are a bit higher for more modern websites (eg. ~45% = 0, ~40% = 1
  // for the HTML5 Spec), but still have basically 99% of nodes with <= 2 attrs.
  gumbo_vector_init(1, &tag_state->_attributes);
  tag_state->_drop_next_attr_value = false;
  tag_state->_is_start_tag = is_start_tag;
  tag_state->_is_self_closing = false;
  gumbo_debug("Starting new tag.\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x10(%rdi), %r12
movl 0x100(%r12), %eax
movl %eax, %ecx
orl $0x20, %ecx
addl $-0x61, %ecx
cmpl $0x1a, %ecx
jae 0x1168b
movzbl %al, %ecx
leaq 0x8b6c(%rip), %rdx      # 0x1a150
movzbl (%rdx,%rcx), %ecx
andl $0x20, %ecx
movzbl %al, %ebp
orl %ecx, %ebp
movl %ebp, %eax
orl $0x20, %eax
addl $-0x61, %eax
cmpl $0x1a, %eax
jae 0x116aa
movl %esi, %ebx
movq %rdi, %r14
leaq 0x68(%r12), %r15
movq %r15, %rdi
callq 0x780c
movq 0x10(%r14), %rax
movq 0x120(%rax), %rcx
movq %rcx, 0xa0(%rax)
movups 0x110(%rax), %xmm0
movups %xmm0, 0x90(%rax)
movq 0xe8(%rax), %rcx
movq %rcx, 0x80(%rax)
movl %ebp, %edi
movq %r15, %rsi
callq 0x4322
cmpq $0x0, 0xa8(%r12)
jne 0x116c9
leaq 0xa8(%r12), %rsi
movl $0x1, %edi
callq 0x7ec4
xorl %eax, %eax
movb %al, 0xb8(%r12)
movb %bl, 0xc4(%r12)
movb %al, 0xc5(%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe2fb(%rip), %rdi      # 0x1f98d
leaq 0xe0ab(%rip), %rsi      # 0x1f744
leaq 0xe2f9(%rip), %rcx      # 0x1f999
movl $0x2cc, %edx            # imm = 0x2CC
callq 0x4100
leaq 0xe2dc(%rip), %rdi      # 0x1f98d
leaq 0xe08c(%rip), %rsi      # 0x1f744
leaq 0xe2da(%rip), %rcx      # 0x1f999
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x4100
leaq 0xe2f2(%rip), %rdi      # 0x1f9c2
leaq 0xe06d(%rip), %rsi      # 0x1f744
leaq 0xe2bb(%rip), %rcx      # 0x1f999
movl $0x2d3, %edx            # imm = 0x2D3
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: emit_temporary_buffer
static bool emit_temporary_buffer(GumboParser* parser, GumboToken* output) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  assert(tokenizer->_temporary_buffer.data);
  utf8iterator_reset(&tokenizer->_input);
  tokenizer->_temporary_buffer_emit = tokenizer->_temporary_buffer.data;
  return maybe_emit_from_temporary_buffer(parser, output);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r15
cmpq $0x0, 0x10(%r15)
je 0x11722
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xe8(%r15), %rdi
callq 0x7e2b
movq 0x10(%r15), %rax
movq %rax, 0x28(%r15)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xd2fd
leaq 0xe2bd(%rip), %rdi      # 0x1f9e6
leaq 0xe014(%rip), %rsi      # 0x1f744
leaq 0xe2d1(%rip), %rcx      # 0x1fa08
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: finish_tag_name
static void finish_tag_name(GumboParser* parser) {
  GumboTokenizerState* tokenizer = parser->_tokenizer_state;
  GumboTagState* tag_state = &tokenizer->_tag_state;

  tag_state->_tag =
      gumbo_tagn_enum(tag_state->_buffer.data, tag_state->_buffer.length);
  reinitialize_tag_buffer(parser);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x68(%r14), %rdi
movq 0x70(%r14), %rsi
callq 0x7b67
movl %eax, 0x88(%r14)
movq 0x10(%rbx), %rax
movq 0x68(%rax), %rdi
callq 0x11e7c
movq 0x10(%rbx), %rdi
addq $0x68, %rdi
callq 0x780c
movq 0x10(%rbx), %rax
movq 0x120(%rax), %rcx
movq %rcx, 0xa0(%rax)
movups 0x110(%rax), %xmm0
movups %xmm0, 0x90(%rax)
movq 0xe8(%rax), %rcx
movq %rcx, 0x80(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: abandon_current_tag
static void abandon_current_tag(GumboParser* parser) {
  GumboTagState* tag_state = &parser->_tokenizer_state->_tag_state;
  for (unsigned int i = 0; i < tag_state->_attributes.length; ++i) {
    gumbo_destroy_attribute(tag_state->_attributes.data[i]);
  }
  gumbo_free(tag_state->_attributes.data);
  mark_tag_state_as_empty(tag_state);
  gumbo_string_buffer_destroy(&tag_state->_buffer);
  gumbo_debug("Abandoning current tag.\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdi), %r14
cmpl $0x0, 0xb0(%r14)
je 0x11947
xorl %ebx, %ebx
movq 0xa8(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0x7284
incq %rbx
movl 0xb0(%r14), %eax
cmpq %rax, %rbx
jb 0x11928
leaq 0x68(%r14), %rbx
movq 0xa8(%r14), %rdi
callq 0x11e7c
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7a27
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: is_appropriate_end_tag
static bool is_appropriate_end_tag(GumboParser* parser) {
  GumboTagState* tag_state = &parser->_tokenizer_state->_tag_state;
  assert(!tag_state->_is_start_tag);
  return tag_state->_last_start_tag != GUMBO_TAG_LAST &&
         tag_state->_last_start_tag == gumbo_tagn_enum(tag_state->_buffer.data,
                                           tag_state->_buffer.length);
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %rax
cmpb $0x1, 0xc4(%rax)
je 0x119a5
movl 0xc0(%rax), %ebx
cmpl $0x97, %ebx
jne 0x11991
xorl %eax, %eax
jmp 0x119a3
movq 0x68(%rax), %rdi
movq 0x70(%rax), %rsi
callq 0x7b67
cmpl %eax, %ebx
sete %al
popq %rbx
retq
leaq 0xe333(%rip), %rdi      # 0x1fcdf
leaq 0xdd91(%rip), %rsi      # 0x1f744
leaq 0xe33f(%rip), %rcx      # 0x1fcf9
movl $0x378, %edx            # imm = 0x378
callq 0x4100
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: finish_attribute_value
static void finish_attribute_value(GumboParser* parser) {
  GumboTagState* tag_state = &parser->_tokenizer_state->_tag_state;
  if (tag_state->_drop_next_attr_value) {
    // Duplicate attribute name detected in an earlier state, so we have to
    // ignore the value.
    tag_state->_drop_next_attr_value = false;
    reinitialize_tag_buffer(parser);
    return;
  }

  GumboAttribute* attr =
      tag_state->_attributes.data[tag_state->_attributes.length - 1];
  gumbo_free((void*) attr->value);
  copy_over_tag_buffer(parser, &attr->value);
  copy_over_original_tag_text(
      parser, &attr->original_value, &attr->value_start, &attr->value_end);
  reinitialize_tag_buffer(parser);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
cmpb $0x1, 0xb8(%rax)
jne 0x11cb5
movb $0x0, 0xb8(%rax)
jmp 0x11d48
movq 0xa8(%rax), %rcx
movl 0xb0(%rax), %eax
decl %eax
movq (%rcx,%rax,8), %r14
movq 0x20(%r14), %rdi
callq 0x11e7c
movq 0x10(%rbx), %rdi
addq $0x68, %rdi
callq 0x79e6
movq %rax, 0x20(%r14)
leaq 0x68(%r14), %rdx
leaq 0x80(%r14), %rax
movq 0x10(%rbx), %rcx
movq 0x80(%rcx), %rdi
movq %rdi, 0x28(%r14)
movq 0xe8(%rcx), %rsi
subq %rdi, %rsi
movq %rsi, 0x30(%r14)
je 0x11d1a
cmpb $0xd, -0x1(%rdi,%rsi)
jne 0x11d1a
decq %rsi
movq %rsi, 0x30(%r14)
movq 0xa0(%rcx), %rsi
movq %rsi, 0x10(%rdx)
movups 0x90(%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x120(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups 0x110(%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rax
movq 0x68(%rax), %rdi
callq 0x11e7c
movq 0x10(%rbx), %rdi
addq $0x68, %rdi
callq 0x780c
movq 0x10(%rbx), %rax
movq 0x120(%rax), %rcx
movq %rcx, 0xa0(%rax)
movups 0x110(%rax), %xmm0
movups %xmm0, 0x90(%rax)
movq 0xe8(%rax), %rcx
movq %rcx, 0x80(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: emit_comment
static StateResult emit_comment(GumboParser* parser, GumboToken* output) {
  output->type = GUMBO_TOKEN_COMMENT;
  finish_temporary_buffer(parser, &output->v.text);
  finish_token(parser, output);
  return RETURN_SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x3, (%rsi)
movq 0x10(%rdi), %rdi
addq $0x10, %rdi
callq 0x79e6
movq %rax, 0x30(%rbx)
movq %r14, %rdi
callq 0x113c5
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd443
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: finish_doctype_public_id
static void finish_doctype_public_id(GumboParser* parser) {
  GumboTokenDocType* doc_type_state =
      &parser->_tokenizer_state->_doc_type_state;
  gumbo_free((void*) doc_type_state->public_identifier);
  finish_temporary_buffer(parser, &doc_type_state->public_identifier);
  doc_type_state->has_public_identifier = true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0xd0(%r14), %rdi
callq 0x11e7c
movq 0x10(%rbx), %rdi
addq $0x10, %rdi
callq 0x79e6
movq %rax, 0xd0(%r14)
movq %rbx, %rdi
callq 0x113c5
movb $0x1, 0xe1(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: finish_doctype_system_id
static void finish_doctype_system_id(GumboParser* parser) {
  GumboTokenDocType* doc_type_state =
      &parser->_tokenizer_state->_doc_type_state;
  gumbo_free((void*) doc_type_state->system_identifier);
  finish_temporary_buffer(parser, &doc_type_state->system_identifier);
  doc_type_state->has_system_identifier = true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0xd8(%r14), %rdi
callq 0x11e7c
movq 0x10(%rbx), %rdi
addq $0x10, %rdi
callq 0x79e6
movq %rax, 0xd8(%r14)
movq %rbx, %rdi
callq 0x113c5
movb $0x1, 0xe2(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/util.c
// Function: gumbo_alloc
void* gumbo_alloc(size_t size) {
  void* ptr = malloc(size);
  if (unlikely(ptr == NULL)) {
    perror(__func__);
    abort();
  }
  return ptr;
}

// Assembly:
pushq %rax
callq 0x41c0
testq %rax, %rax
je 0x11e65
popq %rcx
retq
callq 0x42fe
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/util.c
// Function: gumbo_realloc
void* gumbo_realloc(void* ptr, size_t size) {
  ptr = realloc(ptr, size);
  if (unlikely(ptr == NULL)) {
    perror(__func__);
    abort();
  }
  return ptr;
}

// Assembly:
pushq %rax
callq 0x4210
testq %rax, %rax
je 0x11e77
popq %rcx
retq
callq 0x4310
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/util.c
// Function: gumbo_strdup
char* gumbo_strdup(const char* str) {
  const size_t size = strlen(str) + 1;
  // The strdup(3) function isn't available in strict "-std=c99" mode
  // (it's part of POSIX, not C99), so use malloc(3) and memcpy(3)
  // instead:
  char* buffer = gumbo_alloc(size);
  return memcpy(buffer, str, size);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x40b0
leaq 0x1(%rax), %r14
movq %r14, %rdi
callq 0x11e58
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4190
nop
// File: /workspace/github_c_makefile_star2_O1/craigbarnes[P]lua-gumbo/lib/foreign_attrs.c
// Function: gumbo_get_foreign_attr_replacement
const ForeignAttrReplacement *
gumbo_get_foreign_attr_replacement (register const char *str, register size_t len)
{
  static const unsigned char lengthtable[] =
    {
       5, 11,  9, 13, 10, 10, 10, 11, 10,  8,  8
    };
  static const ForeignAttrReplacement wordlist[] =
    {
      {"xmlns", "xmlns", GUMBO_ATTR_NAMESPACE_XMLNS},
      {"xmlns:xlink", "xlink", GUMBO_ATTR_NAMESPACE_XMLNS},
      {"xml:space", "space", GUMBO_ATTR_NAMESPACE_XML},
      {"xlink:actuate", "actuate", GUMBO_ATTR_NAMESPACE_XLINK},
      {"xlink:type", "type", GUMBO_ATTR_NAMESPACE_XLINK},
      {"xlink:href", "href", GUMBO_ATTR_NAMESPACE_XLINK},
      {"xlink:role", "role", GUMBO_ATTR_NAMESPACE_XLINK},
      {"xlink:title", "title", GUMBO_ATTR_NAMESPACE_XLINK},
      {"xlink:show", "show", GUMBO_ATTR_NAMESPACE_XLINK},
      {"xml:lang", "lang", GUMBO_ATTR_NAMESPACE_XML},
      {"xml:base", "base", GUMBO_ATTR_NAMESPACE_XML}
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      register unsigned int key = hash (str, len);

      if (key <= MAX_HASH_VALUE)
        if (len == lengthtable[key])
          {
            register const char *s = wordlist[key].from;

            if (s && *str == *s && !memcmp (str + 1, s + 1, len - 1))
              return &wordlist[key];
          }
    }
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq -0x5(%rsi), %rax
cmpq $0x8, %rax
ja 0x1911b
movq %rsi, %rdx
leaq -0x2(%rsi), %rcx
xorl %eax, %eax
cmpq $0x6, %rcx
jb 0x190b7
movzbl 0x7(%rdi), %eax
leaq 0x35b8d(%rip), %rcx     # 0x4ec40
movzbl (%rax,%rcx), %eax
movzbl 0x1(%rdi), %ecx
leaq 0x35b7e(%rip), %rsi     # 0x4ec40
movzbl (%rcx,%rsi), %ecx
movl %eax, %eax
addq %rcx, %rax
movb $0x1, %bpl
cmpl $0xa, %eax
ja 0x19116
leaq 0x35b56(%rip), %rcx     # 0x4ec30
movzbl (%rax,%rcx), %ecx
cmpq %rdx, %rcx
jne 0x19116
leaq (%rax,%rax,2), %rax
leaq 0x3c392(%rip), %rcx     # 0x55480
leaq (%rcx,%rax,8), %rbx
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x19116
movb (%rdi), %al
cmpb (%rsi), %al
jne 0x19116
incq %rdi
incq %rsi
decq %rdx
callq 0x4200
testl %eax, %eax
jne 0x19116
xorl %ebp, %ebp
jmp 0x19116
testb %bpl, %bpl
je 0x1911d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/carlitosmarin[P]Sistema-Ficheros-SOII/mi_ln.c
// Function: main
int main (int argc, char **argv) {
	if (argc != 4) {
		printf("Número de parametros incorrectos\n");
		return -1;
	}
	//Montamos el disco
	bmount(argv[1]);

	if(mi_link (argv[2],argv[3]) == 0) printf("Enlace creado correctamente\n");
	else printf("Error: No se ha podido llevar a cabo mi_ln\n");

	bumount();
	return 0;
}

// Assembly:
pushq %rbx
cmpl $0x4, %edi
jne 0x3e53
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x127c
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x357c
testl %eax, %eax
leaq 0x71d(%rip), %rax       # 0x4555
leaq 0x6eb(%rip), %rdi       # 0x452a
cmoveq %rax, %rdi
callq 0x1060
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x12ba
jmp 0x3e64
leaq 0x717(%rip), %rdi       # 0x4571
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Babkock[P]st/st.c
// Function: newterm
void
newterm(const Arg* a)
{
	int res;
	switch (fork()) {
		case -1:
			die("fork failed: %s\n", strerror(errno));
			break;
		case 0:
			switch (fork()) {
				case -1:
					die("fork failed: %s\n", strerror(errno));
					break;
				case 0:
					chdir_by_pid(pid);
					execlp("/proc/self/exe", argv0, NULL);
					exit(1);
					break;
				default:
					exit(0);
			}
		default:
			wait(NULL);
	}
}

// Assembly:
pushq %rax
callq 0x6870
testl %eax, %eax
je 0x88f2
cmpl $-0x1, %eax
je 0x8900
xorl %edi, %edi
popq %rax
jmp 0x6110
callq 0x6870
testl %eax, %eax
je 0x891d
cmpl $-0x1, %eax
jne 0x894c
callq 0x6600
movl (%rax), %edi
callq 0x64b0
leaq 0x7cf8(%rip), %rdi      # 0x1060b
movq %rax, %rsi
xorl %eax, %eax
callq 0x6f86
movl 0x139e9(%rip), %edi     # 0x1c30c
callq 0x8953
leaq 0x15f89(%rip), %rax     # 0x1e8b8
movq (%rax), %rsi
leaq 0x7d3e(%rip), %rdi      # 0x10677
xorl %edx, %edx
xorl %eax, %eax
callq 0x6250
movl $0x1, %edi
callq 0x61b0
xorl %edi, %edi
callq 0x61b0
// File: /workspace/github_c_makefile_star2_O1/Babkock[P]st/x.c
// Function: xdrawline
void
xdrawline(Line line, int x1, int y1, int x2)
{
	int i, x, ox, numspecs;
	Glyph base, new;
	XftGlyphFontSpec *specs = xw.specbuf;

	numspecs = xmakeglyphfontspecs(specs, &line[x1], x2 - x1, x1, y1);
	i = ox = 0;
	for (x = x1; x < x2 && i < numspecs; x++) {
		new = line[x];
		if (new.mode == ATTR_WDUMMY)
			continue;
		if (selected(x, y1))
			new.mode |= ATTR_SELECTED;
		if (vbellset && isvbellcell(x, y1))
			new.mode ^= ATTR_REVERSE;
		if (i > 0 && ATTRCMP(base, new)) {
			xdrawglyphfontspecs(specs, base, i, ox, y1);
			specs += i;
			numspecs -= i;
			i = 0;
		}
		if (i == 0) {
			ox = x;
			base = new;
		}
		i++;
	}
	if (i > 0)
		xdrawglyphfontspecs(specs, base, i, ox, y1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebx
movl %edx, %r8d
movl %esi, %ebp
movq %rdi, %r14
movq 0x12796(%rip), %rdi     # 0x1e788
movslq %esi, %r15
movq %r15, %r12
shlq $0x4, %r12
leaq (%r14,%r12), %rsi
movl %ecx, %edx
subl %r15d, %edx
setg %r13b
movq %rdi, 0x10(%rsp)
movl %r15d, %ecx
movl %r8d, 0xc(%rsp)
callq 0xc1bf
movl %eax, %ecx
testl %eax, %eax
setg %al
andb %r13b, %al
cmpb $0x1, %al
jne 0xc171
movslq %ebx, %rdx
addq %r12, %r14
addq $0xc, %r14
incq %r15
xorl %r12d, %r12d
movl $0x0, 0x8(%rsp)
movl %ecx, %ebx
movq %rdx, 0x18(%rsp)
movzwl -0x8(%r14), %r13d
cmpl $0x400, %r13d           # imm = 0x400
je 0xc158
movl -0xc(%r14), %eax
movq %rax, 0x48(%rsp)
movl -0x4(%r14), %eax
movq %rax, 0x40(%rsp)
movzwl -0x6(%r14), %eax
movq %rax, 0x50(%rsp)
movl (%r14), %eax
movq %rax, 0x38(%rsp)
movl %ebp, %edi
movl 0xc(%rsp), %esi
callq 0x7438
movl %r13d, %ecx
orl $0x1000, %ecx           # imm = 0x1000
testl %eax, %eax
cmovel %r13d, %ecx
movl %ecx, %r13d
xorl $0x20, %r13d
cmpb $0x0, 0x127f6(%rip)     # 0x1e8a0
cmovel %ecx, %r13d
testl %r12d, %r12d
jle 0xc116
movq 0x20(%rsp), %rax
shrq $0x20, %rax
cmpw %ax, %r13w
movq 0x30(%rsp), %rdx
jne 0xc0da
cmpl %edx, 0x40(%rsp)
jne 0xc0da
movq %rdx, %rax
shrq $0x20, %rax
cmpl %eax, 0x38(%rsp)
je 0xc116
movl %ebx, 0x2c(%rsp)
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movl %r12d, %ecx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
callq 0xc5f7
movl %r12d, %eax
shlq $0x4, %rax
addq %rax, %rbx
movq %rbx, 0x10(%rsp)
movl 0x2c(%rsp), %ebx
subl %r12d, %ebx
xorl %r12d, %r12d
movq 0x18(%rsp), %rdx
testl %r12d, %r12d
jne 0xc155
movzwl %r13w, %eax
shlq $0x20, %rax
addq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x30, %rcx
orq %rax, %rcx
movq 0x38(%rsp), %rax
shlq $0x20, %rax
addq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rcx, 0x20(%rsp)
movl %ebp, 0x8(%rsp)
incl %r12d
cmpq %rdx, %r15
jge 0xc17c
incl %ebp
addq $0x10, %r14
incq %r15
cmpl %ebx, %r12d
jl 0xc04c
jmp 0xc17c
movl $0x0, 0x8(%rsp)
xorl %r12d, %r12d
testl %r12d, %r12d
jle 0xc1b0
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
movl %r12d, %ecx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc5f7
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Babkock[P]st/x.c
// Function: xbell
void
xbell(void)
{
	if (!(IS_SET(MODE_FOCUSED)))
		xseturgency(1);
	if (bellvolume)
		XkbBell(xw.dpy, xw.win, bellvolume, (Atom)NULL);
	if (vbelltimeout)
		vbellbegin();
}

// Assembly:
pushq %rax
testb $0x2, 0x11aa9(%rip)     # 0x1e890
jne 0xcdf3
movl $0x1, %edi
callq 0xce47
movl 0xafc3(%rip), %edx      # 0x17dbc
testl %edx, %edx
je 0xce12
movq 0x11964(%rip), %rdi     # 0x1e768
movq 0x1196d(%rip), %rsi     # 0x1e778
xorl %ecx, %ecx
callq 0x6930
leaq 0x11b1f(%rip), %rsi     # 0x1e938
movl $0x1, %edi
callq 0x6150
cmpb $0x0, 0x11a76(%rip)     # 0x1e8a0
je 0xce2e
popq %rax
retq
movb $0x1, 0x11a6b(%rip)     # 0x1e8a0
callq 0x8fdc
movq 0x11927(%rip), %rdi     # 0x1e768
popq %rax
jmp 0x6610
// File: /workspace/github_c_makefile_star2_O1/Sidd0107[P]EXT2-File-System/ext2_ls.c
// Function: main
int main(int argc, char **argv) {
    //Checks correct number number of arguments
    if(argc != 3) {
        fprintf(stderr, "Usage: ext2_ls <image file name> <path>\n");
        exit(1);
    }
    int fd = open(argv[1], O_RDWR);
	
	char *path = argv[2];

    disk = mmap(NULL, 128 * BLOCK_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
    //Checks to make sure mmap didnt fail.
    if(disk == MAP_FAILED) {
	perror("mmap");
	exit(1);
    }
	//Gets superblock and group descriptor(In this assignment there is only 1 group descr.)
    struct ext2_super_block *sb = (struct ext2_super_block *)(disk + BLOCK_SIZE);
	struct ext2_group_desc *gd = (struct ext2_group_desc *)  (disk + 2*BLOCK_SIZE + ((sb -> s_block_group_nr) *  sizeof(struct ext2_group_desc)));
	//Gets details about the file in path.
	struct basic_fileinfo fileinfo = find_file(path, get_block(disk, gd -> bg_inode_table, BLOCK_SIZE));
	//Makes sure file type is directory and calls helper to print contents of that directory.
	if(fileinfo.type == 'd'){
		print_directory_contents(get_block(disk, gd -> bg_inode_table, BLOCK_SIZE), fileinfo.inode);
	}//If type is file handle appropriately to make sure it prints error or the file name
	else if(fileinfo.type == 'f'){
		if(path[strlen(path)-1] != '/'){
			printf("%s\n", path);
		}
		else{
			printf("ls: cannot access %s: Not a directory\n", path);
		}
	}
	else{
		printf("ls: cannot access %s: No such file or directory\n", path);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x3, %edi
jne 0x1f55
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x10d0
movq 0x10(%rbx), %rbx
movl $0x20000, %esi          # imm = 0x20000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x1090
movq %rax, 0x21fe(%rip)      # 0x40a0
cmpq $-0x1, %rax
je 0x1f5a
movq %rax, %r14
movzwl 0x45e(%rax), %r12d
shll $0x5, %r12d
movl 0x808(%rax,%r12), %esi
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
callq 0x16c3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1388
movq %rax, %r15
cmpb $0x66, %r15b
je 0x1f17
movzbl %r15b, %eax
cmpl $0x64, %eax
jne 0x1f2f
shrq $0x20, %r15
movq 0x21a8(%rip), %rdi      # 0x40a0
movl 0x808(%r14,%r12), %esi
movl $0x400, %edx            # imm = 0x400
callq 0x16c3
movq %rax, %rdi
movl %r15d, %esi
callq 0x1cab
jmp 0x1f4a
movq %rbx, %rdi
callq 0x1080
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x1f42
leaq 0x199(%rip), %rdi       # 0x20c6
jmp 0x1f36
leaq 0x1b7(%rip), %rdi       # 0x20ed
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10a0
jmp 0x1f4a
movq %rbx, %rdi
callq 0x1070
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1168
callq 0x1190
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: report_encoding_test_result
int
report_encoding_test_result(
    TestTracker *tracker,
    struct kmip *ctx,
    const uint8 *expected,
    const uint8 *observed,
    int result,
    const char *function)
{
    if(result == KMIP_OK)
    {
        for(size_t i = 0; i < ctx->size; i++)
        {
            if(expected[i] != observed[i])
            {
                printf("FAIL - %s\n", function);
                printf("- byte mismatch at: %zu (exp: %X, obs: %X)\n",
                       i, expected[i], observed[i]);
                for(size_t j = 0; j < ctx->size; j++)
                {
                    printf("- %zu: %X - %X\n", j, expected[j], observed[j]);
                }
                tracker->tests_failed++;
                return(1);
            }
        }
        
        TEST_PASSED(tracker, function);
    }
    else
    {
        printf("FAIL - %s\n", function);
        if(result == KMIP_ERROR_BUFFER_FULL)
        {
            printf("- context buffer is full\n");
        }
        kmip_print_stack_trace(stderr, ctx);
        tracker->tests_failed++;
        return(1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r15
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
testl %r8d, %r8d
je 0x12a0
movl %r8d, %ebx
leaq 0x2df6c(%rip), %rdi     # 0x2f1d0
movq %r15, %rsi
xorl %eax, %eax
callq 0x1090
cmpl $-0x2, %ebx
jne 0x127f
leaq 0x30354(%rip), %rdi     # 0x315ce
callq 0x1070
movq 0x43d72(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq %r14, %rsi
callq 0x2a0ee
movl $0x1, %ebp
movl $0x2, %eax
jmp 0x137d
movq %rdx, %r13
movq 0x10(%r14), %rax
testq %rax, %rax
setne %dl
je 0x1365
movq %rcx, %r12
movb (%r13), %cl
cmpb (%r12), %cl
jne 0x12ec
leaq -0x1(%rax), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x1365
movb 0x1(%r13,%rdx), %sil
leaq 0x1(%rdx), %rbp
cmpb 0x1(%r12,%rdx), %sil
movq %rbp, %rdx
je 0x12c6
cmpq %rax, %rbp
setb 0xf(%rsp)
jmp 0x12f2
movb %dl, 0xf(%rsp)
xorl %ebp, %ebp
leaq 0x2ded7(%rip), %rdi     # 0x2f1d0
movq %r15, %rsi
xorl %eax, %eax
callq 0x1090
movzbl (%r13,%rbp), %edx
movzbl (%r12,%rbp), %ecx
leaq 0x2dec6(%rip), %rdi     # 0x2f1db
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1090
cmpq $0x0, 0x10(%r14)
je 0x1350
leaq 0x2deda(%rip), %rbp     # 0x2f207
xorl %ebx, %ebx
movzbl (%r13,%rbx), %edx
movzbl (%r12,%rbx), %ecx
movq %rbp, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
incq %rbx
cmpq 0x10(%r14), %rbx
jb 0x132f
movq 0x10(%rsp), %rax
incw 0x2(%rax)
movl $0x1, %ebp
cmpb $0x0, 0xf(%rsp)
jne 0x1386
leaq 0x2deab(%rip), %rdi     # 0x2f217
xorl %ebp, %ebp
movq %r15, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
movq 0x10(%rsp), %rcx
incw (%rcx,%rax)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: report_decoding_test_result
int
report_decoding_test_result(
    TestTracker *tracker,
    struct kmip *ctx,
    int comparison,
    int result,
    const char *function)
{
    if(result == KMIP_OK)
    {
        if(comparison)
        {
            TEST_PASSED(tracker, function);
        }
        else
        {
            printf("FAIL - %s\n", function);
            printf("- compared objects are not identical\n");
            tracker->tests_failed++;
            return(1);
        }
    }
    else
    {
        printf("FAIL - %s\n", function);
        if(result == KMIP_ERROR_BUFFER_FULL)
        {
            printf("- context buffer is underfull\n");
        }
        kmip_print_stack_trace(stderr, ctx);
        tracker->tests_failed++;
        return(1);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %ecx, %ecx
je 0x13e7
movl %ecx, %ebp
movq %rsi, %r14
leaq 0x2de22(%rip), %rdi     # 0x2f1d0
movq %r8, %rsi
xorl %eax, %eax
callq 0x1090
cmpl $-0x2, %ebp
jne 0x13c9
leaq 0x30223(%rip), %rdi     # 0x315e7
callq 0x1070
movq 0x43c28(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq %r14, %rsi
callq 0x2a0ee
movl $0x1, %ebp
movl $0x2, %eax
jmp 0x1403
testl %edx, %edx
je 0x140e
leaq 0x2de25(%rip), %rdi     # 0x2f217
xorl %ebp, %ebp
movq %r8, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
incw (%rbx,%rax)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2ddbb(%rip), %rdi     # 0x2f1d0
movq %r8, %rsi
xorl %eax, %eax
callq 0x1090
leaq 0x301df(%rip), %rdi     # 0x31605
callq 0x1070
jmp 0x13db
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_buffer_full_and_resize
int
test_buffer_full_and_resize(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[40] = {
        0x42, 0x00, 0x69, 0x01, 0x00, 0x00, 0x00, 0x20,
        0x42, 0x00, 0x6A, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x6B, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 too_small[30] = {0};
    uint8 large_enough[40] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, too_small, ARRAY_LENGTH(too_small), KMIP_1_0);
    
    struct protocol_version pv = {0};
    pv.major = 1;
    pv.minor = 0;
    
    int result = kmip_encode_protocol_version(&ctx, &pv);
    
    if(result == KMIP_ERROR_BUFFER_FULL)
    {
        kmip_reset(&ctx);
        kmip_set_buffer(&ctx, large_enough, ARRAY_LENGTH(large_enough));
        
        result = kmip_encode_protocol_version(&ctx, &pv);
        result = report_encoding_test_result(
            tracker,
            &ctx,
            expected,
            large_enough,
            result,
            __func__);
        
        kmip_destroy(&ctx);
        
        return(result);
    }
    else
    {
        printf("FAIL - %s\n", __func__);
        printf("- expected buffer full\n");
        
        kmip_destroy(&ctx);
        tracker->tests_failed++;
        return(1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x900, %rsp            # imm = 0x900
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r14
movups %xmm0, 0xe(%r14)
movaps %xmm0, (%r14)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x68(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x1e, %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x13747
leaq 0x8(%rsp), %rsi
movq $0x1, (%rsi)
movq %r15, %rdi
callq 0x198f8
cmpl $-0x2, %eax
jne 0x1b6d
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x13959
leaq 0x10(%rsp), %r15
movl $0x28, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x13a12
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x198f8
leaq 0x30427(%rip), %rdx     # 0x31f70
leaq 0x2d727(%rip), %r9      # 0x2f277
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r14, %rdi
callq 0x13a23
jmp 0x1ba1
leaq 0x2d65c(%rip), %rdi     # 0x2f1d0
leaq 0x2d6fc(%rip), %rsi     # 0x2f277
xorl %eax, %eax
callq 0x1090
leaq 0x2faa1(%rip), %rdi     # 0x3162a
callq 0x1070
leaq 0x68(%rsp), %rdi
callq 0x13a23
incw 0x2(%rbx)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x900, %rsp            # imm = 0x900
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_is_tag_next
int
test_is_tag_next(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[3] = {0x42, 0x00, 0x08};
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    uint8 *before = ctx.index;
    int result = 0;
    
    if(kmip_is_tag_next(&ctx, KMIP_TAG_ATTRIBUTE) == KMIP_FALSE)
    {
        printf("FAIL - %s\n", __func__);
        printf("- expected tag is not next\n");
        tracker->tests_failed++;
        result = 1;
    }
    
    uint8 *after = ctx.index;
    
    if(before != after)
    {
        printf("FAIL - %s\n", __func__);
        printf("- tag checking modifies context buffer index\n");
        tracker->tests_failed++;
        result = 1;
    }
    
    kmip_destroy(&ctx);
    
    if(result == 0)
    {
        printf("PASS - %s\n", __func__);
        tracker->tests_passed++;
    }
    
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %rbx
incw (%rdi)
leaq 0xc(%rsp), %r14
movb $0x8, 0x2(%r14)
movw $0x42, (%r14)
leaq 0x10(%rsp), %r15
xorl %ebp, %ebp
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x3, %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x13747
movq 0x8(%r15), %r14
movq %r15, %rdi
movl $0x420008, %esi         # imm = 0x420008
callq 0x13c61
testl %eax, %eax
jne 0x1c3a
leaq 0x2d5b9(%rip), %rdi     # 0x2f1d0
leaq 0x2d675(%rip), %rsi     # 0x2f293
xorl %eax, %eax
callq 0x1090
leaq 0x2fa15(%rip), %rdi     # 0x31641
callq 0x1070
incw 0x2(%rbx)
movl $0x1, %ebp
cmpq 0x18(%rsp), %r14
je 0x1c6b
leaq 0x2d588(%rip), %rdi     # 0x2f1d0
leaq 0x2d644(%rip), %rsi     # 0x2f293
xorl %eax, %eax
callq 0x1090
leaq 0x2f9ff(%rip), %rdi     # 0x3165c
callq 0x1070
incw 0x2(%rbx)
movl $0x1, %ebp
leaq 0x10(%rsp), %rdi
callq 0x13a23
testl %ebp, %ebp
jne 0x1c92
leaq 0x2d597(%rip), %rdi     # 0x2f217
leaq 0x2d60c(%rip), %rsi     # 0x2f293
xorl %eax, %eax
callq 0x1090
incw 0x4(%rbx)
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_get_num_items_next_with_mismatch_item
int
test_get_num_items_next_with_mismatch_item(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[80] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x30, 
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x18, 
        0x43, 0x72, 0x79, 0x70, 0x74, 0x6F, 0x67, 0x72, 
        0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x55, 0x73, 
        0x61, 0x67, 0x65, 0x20, 0x4D, 0x61, 0x73, 0x6B, 
        0x42, 0x00, 0x0B, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x30, 
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x18, 
        0x43, 0x72, 0x79, 0x70, 0x74, 0x6F, 0x67, 0x72 
    };

    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    uint8 *before = ctx.index;
    int result = 0;
    size_t count = 0;
    
    count = kmip_get_num_items_next(&ctx, KMIP_TAG_ATTRIBUTE);
    if(count != 1)
    {
        printf("FAIL - %s\n", __func__);
        printf("- expected item count not found (exp. 1, obs. %zu)\n",
               count);
        tracker->tests_failed++;
        result = 1;
    }
    
    uint8 *after = ctx.index;
    
    if(before != after)
    {
        printf("FAIL - %s\n", __func__);
        printf("- item count checking modifies context buffer index\n");
        tracker->tests_failed++;
        result = 1;
    }
    
    kmip_destroy(&ctx);
    
    if(result == 0)
    {
        printf("PASS - %s\n", __func__);
        tracker->tests_passed++;
    }
    
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8f0, %rsp            # imm = 0x8F0
movq %rdi, %rbx
incw (%rdi)
leaq 0x2fa62(%rip), %rsi     # 0x31940
movq %rsp, %r14
movl $0xa, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %r15
xorl %ebp, %ebp
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x50, %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x13747
movq 0x8(%r15), %r12
movq %r15, %rdi
movl $0x420008, %esi         # imm = 0x420008
callq 0x13cc8
cmpq $0x1, %rax
je 0x1f5d
movq %rax, %r14
leaq 0x2d29b(%rip), %rdi     # 0x2f1d0
leaq 0x2d412(%rip), %rsi     # 0x2f34e
xorl %eax, %eax
callq 0x1090
leaq 0x2d42f(%rip), %rdi     # 0x2f379
movq %r14, %rsi
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
cmpq 0x60(%rsp), %r12
je 0x1f8e
leaq 0x2d265(%rip), %rdi     # 0x2f1d0
leaq 0x2d3dc(%rip), %rsi     # 0x2f34e
xorl %eax, %eax
callq 0x1090
leaq 0x2f709(%rip), %rdi     # 0x31689
callq 0x1070
incw 0x2(%rbx)
movl $0x1, %ebp
leaq 0x58(%rsp), %rdi
callq 0x13a23
testl %ebp, %ebp
jne 0x1fb5
leaq 0x2d274(%rip), %rdi     # 0x2f217
leaq 0x2d3a4(%rip), %rsi     # 0x2f34e
xorl %eax, %eax
callq 0x1090
incw 0x4(%rbx)
movl %ebp, %eax
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_buffer_bytes_left
int
test_buffer_bytes_left(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 a[1] = {0x42};
    uint8 b[3] = {0x42, 0x00, 0x08};
    uint8 c[5] = {0x42, 0x00, 0x53, 0x01, 0x00};

    KMIP ctx = {0};
    kmip_init(&ctx, a, ARRAY_LENGTH(a), KMIP_1_0);

    if(BUFFER_BYTES_LEFT(&ctx) != 1)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_destroy(&ctx);
    kmip_init(&ctx, b, ARRAY_LENGTH(b), KMIP_1_0);

    if(BUFFER_BYTES_LEFT(&ctx) != 3)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_destroy(&ctx);
    kmip_init(&ctx, c, ARRAY_LENGTH(c), KMIP_1_0);

    if(BUFFER_BYTES_LEFT(&ctx) != 5)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_destroy(&ctx);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %rbx
incw (%rdi)
leaq 0x7(%rsp), %r14
movb $0x42, (%r14)
movb $0x8, 0x6(%rsp)
movw $0x42, 0x4(%rsp)
movb $0x0, 0xc(%rsp)
movl $0x1530042, 0x8(%rsp)   # imm = 0x1530042
leaq 0x10(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x13747
movq 0x10(%r15), %r14
subq 0x8(%r15), %r14
addq (%r15), %r14
movq %r15, %rdi
callq 0x13a23
cmpq $0x1, %r14
jne 0x22d5
leaq 0x10(%rsp), %r14
leaq 0x4(%rsp), %rsi
movl $0x3, %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x13747
movq 0x10(%r14), %r15
subq 0x8(%r14), %r15
addq (%r14), %r15
movq %r14, %rdi
callq 0x13a23
cmpq $0x3, %r15
jne 0x22ea
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %rsi
xorl %ebp, %ebp
movl $0x5, %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x13747
movq 0x10(%r14), %r15
subq 0x8(%r14), %r15
addq (%r14), %r15
movq %r14, %rdi
callq 0x13a23
cmpq $0x5, %r15
jne 0x22ff
leaq 0x2cf57(%rip), %rdi     # 0x2f217
leaq 0x2d16e(%rip), %rsi     # 0x2f435
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x2323
leaq 0x2cf46(%rip), %rdi     # 0x2f222
leaq 0x2d152(%rip), %rsi     # 0x2f435
movl $0x2d1, %edx            # imm = 0x2D1
jmp 0x2312
leaq 0x2cf31(%rip), %rdi     # 0x2f222
leaq 0x2d13d(%rip), %rsi     # 0x2f435
movl $0x2da, %edx            # imm = 0x2DA
jmp 0x2312
leaq 0x2cf1c(%rip), %rdi     # 0x2f222
leaq 0x2d128(%rip), %rsi     # 0x2f435
movl $0x2e3, %edx            # imm = 0x2E3
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq