LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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:
leaq -0x5(%rsi), %rcx
xorl %eax, %eax
cmpq $0x8, %rcx
ja 0x1709a
movq %rsi, %rdx
leaq -0x2(%rsi), %rcx
cmpq $0x6, %rcx
jb 0x17038
movzbl 0x7(%rdi), %eax
leaq 0x35d2c(%rip), %rcx     # 0x4cd60
movzbl (%rax,%rcx), %eax
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x1(%rdi), %ecx
leaq 0x35d19(%rip), %rsi     # 0x4cd60
movzbl (%rcx,%rsi), %ecx
movl %eax, %eax
addq %rcx, %rax
cmpl $0xa, %eax
ja 0x17091
leaq 0x35cf4(%rip), %rcx     # 0x4cd50
movzbl (%rax,%rcx), %ecx
cmpq %rdx, %rcx
jne 0x17091
leaq (%rax,%rax,2), %rbx
leaq 0x3c410(%rip), %r14     # 0x53480
movq (%r14,%rbx,8), %rsi
testq %rsi, %rsi
je 0x17091
movb (%rdi), %al
cmpb (%rsi), %al
jne 0x17091
incq %rdi
incq %rsi
decq %rdx
callq 0x4200
testl %eax, %eax
je 0x1709b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq (%r14,%rbx,8), %rax
jmp 0x17093
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x3d3f
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
callq 0x127c
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x347c
testl %eax, %eax
leaq 0x82f(%rip), %rax       # 0x4553
leaq 0x7fd(%rip), %rdi       # 0x4528
cmoveq %rax, %rdi
callq 0x1060
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x12ba
jmp 0x3d50
leaq 0x829(%rip), %rdi       # 0x456f
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6860
testl %eax, %eax
je 0x8af5
cmpl $-0x1, %eax
je 0x8b03
xorl %edi, %edi
popq %rax
jmp 0x6110
callq 0x6860
testl %eax, %eax
je 0x8b20
cmpl $-0x1, %eax
jne 0x8b4f
callq 0x6600
movl (%rax), %edi
callq 0x64b0
leaq 0x8b23(%rip), %rdi      # 0x11639
movq %rax, %rsi
xorl %eax, %eax
callq 0x6f76
movl 0x147e6(%rip), %edi     # 0x1d30c
callq 0x8b56
leaq 0x16d86(%rip), %rax     # 0x1f8b8
movq (%rax), %rsi
leaq 0x8b69(%rip), %rdi      # 0x116a5
xorl %edx, %edx
xorl %eax, %eax
callq 0x6250
movl $0x1, %edi
callq 0x61b0
xorl %edi, %edi
callq 0x61b0
// File: /workspace/github_c_makefile_star2_O3/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 0x13118(%rip), %rdi     # 0x1f788
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 0xc83e
movl %eax, %ecx
testl %eax, %eax
setg %al
andb %r13b, %al
cmpb $0x1, %al
jne 0xc82f
movslq %ebx, %rdx
leaq (%r12,%r14), %rbx
addq $0xc, %rbx
incq %r15
xorl %r13d, %r13d
movl $0x0, 0x8(%rsp)
movl %ecx, %r12d
movq %rdx, 0x18(%rsp)
movzwl -0x8(%rbx), %r14d
cmpl $0x400, %r14d           # imm = 0x400
je 0xc7e4
movl -0xc(%rbx), %eax
movq %rax, 0x48(%rsp)
movl -0x4(%rbx), %eax
movq %rax, 0x40(%rsp)
movzwl -0x6(%rbx), %eax
movq %rax, 0x50(%rsp)
movl (%rbx), %eax
movq %rax, 0x38(%rsp)
movl %ebp, %edi
movl 0xc(%rsp), %esi
callq 0x750e
movl %r14d, %ecx
orl $0x1000, %ecx           # imm = 0x1000
testl %eax, %eax
cmovel %r14d, %ecx
movl %ecx, %r14d
xorl $0x20, %r14d
cmpb $0x0, 0x1317a(%rip)     # 0x1f8a0
cmovel %ecx, %r14d
testl %r13d, %r13d
jle 0xc760
movq 0x20(%rsp), %rax
shrq $0x20, %rax
cmpw %ax, %r14w
movq 0x30(%rsp), %rdx
jne 0xc769
cmpl %edx, 0x40(%rsp)
jne 0xc769
movq %rdx, %rax
shrq $0x20, %rax
cmpl %eax, 0x38(%rsp)
jne 0xc769
movq 0x18(%rsp), %rdx
jmp 0xc7e1
movq 0x18(%rsp), %rdx
jne 0xc7e1
jmp 0xc7a9
movl %r12d, 0x2c(%rsp)
movq 0x10(%rsp), %r12
movq %r12, %rdi
movq 0x20(%rsp), %rsi
movl %r13d, %ecx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
callq 0xcc6f
movl %r13d, %eax
shlq $0x4, %rax
addq %rax, %r12
movq %r12, 0x10(%rsp)
movl 0x2c(%rsp), %r12d
subl %r13d, %r12d
movq 0x18(%rsp), %rdx
movzwl %r14w, %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
xorl %r13d, %r13d
movq %rax, 0x30(%rsp)
movq %rcx, 0x20(%rsp)
movl %ebp, 0x8(%rsp)
incl %r13d
cmpq %rdx, %r15
jge 0xc7fb
incl %ebp
addq $0x10, %rbx
incq %r15
cmpl %r12d, %r13d
jl 0xc6cc
testl %r13d, %r13d
jle 0xc82f
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
movl %r13d, %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 0xcc6f
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x12436(%rip)     # 0x1f890
jne 0xd466
movl $0x1, %edi
callq 0xd4ba
movl 0xb950(%rip), %edx      # 0x18dbc
testl %edx, %edx
je 0xd485
movq 0x122f1(%rip), %rdi     # 0x1f768
movq 0x122fa(%rip), %rsi     # 0x1f778
xorl %ecx, %ecx
callq 0x6920
leaq 0x124ac(%rip), %rsi     # 0x1f938
movl $0x1, %edi
callq 0x6150
cmpb $0x0, 0x12403(%rip)     # 0x1f8a0
je 0xd4a1
popq %rax
retq
movb $0x1, 0x123f8(%rip)     # 0x1f8a0
callq 0x93a1
movq 0x122b4(%rip), %rdi     # 0x1f768
popq %rax
jmp 0x6610
// File: /workspace/github_c_makefile_star2_O3/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 0x1ed1
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, 0x2282(%rip)      # 0x40a0
cmpq $-0x1, %rax
je 0x1ed6
movq %rax, %r14
movzwl 0x45e(%rax), %r12d
shll $0x5, %r12d
movl 0x808(%rax,%r12), %esi
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
callq 0x16aa
movq %rbx, %rdi
movq %rax, %rsi
callq 0x136e
movq %rax, %r15
cmpb $0x66, %r15b
je 0x1e93
movzbl %r15b, %eax
cmpl $0x64, %eax
jne 0x1eab
shrq $0x20, %r15
movq 0x222c(%rip), %rdi      # 0x40a0
movl 0x808(%r14,%r12), %esi
movl $0x400, %edx            # imm = 0x400
callq 0x16aa
movq %rax, %rdi
movl %r15d, %esi
callq 0x1c34
jmp 0x1ec6
movq %rbx, %rdi
callq 0x1080
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x1ebe
leaq 0x21d(%rip), %rdi       # 0x20c6
jmp 0x1eb2
leaq 0x23b(%rip), %rdi       # 0x20ed
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10a0
jmp 0x1ec6
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_O3/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
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testl %r8d, %r8d
je 0x1299
movl %r8d, %ebp
leaq 0x2bf74(%rip), %rdi     # 0x2d1d0
movq %r9, %rsi
xorl %eax, %eax
callq 0x1090
cmpl $-0x2, %ebp
jne 0x1277
leaq 0x2e356(%rip), %rdi     # 0x2f5c8
callq 0x1070
movq 0x41d7a(%rip), %rax     # 0x42ff8
movq (%rax), %rdi
movq %r14, %rsi
callq 0x28d0a
movl $0x1, %r13d
movl $0x2, %ebp
jmp 0x134d
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x12bd
movq %rcx, %r15
movq %rdx, %r12
xorl %r13d, %r13d
movb (%r12,%r13), %cl
cmpb (%r15,%r13), %cl
jne 0x12d8
incq %r13
cmpq %r13, %rax
jne 0x12ab
leaq 0x2bf53(%rip), %rdi     # 0x2d217
xorl %r13d, %r13d
movq %r9, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x4, %ebp
jmp 0x134d
leaq 0x2bef1(%rip), %rdi     # 0x2d1d0
movq %r9, %rsi
xorl %eax, %eax
callq 0x1090
movzbl (%r12,%r13), %edx
movzbl (%r15,%r13), %ecx
leaq 0x2bee1(%rip), %rdi     # 0x2d1db
movq %r13, %rsi
xorl %eax, %eax
callq 0x1090
movl $0x1, %r13d
movl $0x2, %ebp
cmpq $0x0, 0x10(%r14)
je 0x134d
movq %rbx, (%rsp)
leaq 0x2bee6(%rip), %r13     # 0x2d207
xorl %ebx, %ebx
movzbl (%r12,%rbx), %edx
movzbl (%r15,%rbx), %ecx
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
incq %rbx
cmpq 0x10(%r14), %rbx
jb 0x1323
movq (%rsp), %rbx
movl $0x1, %r13d
incw (%rbx,%rbp)
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x13b3
movl %ecx, %ebp
movq %rsi, %r14
leaq 0x2be56(%rip), %rdi     # 0x2d1d0
movq %r8, %rsi
xorl %eax, %eax
callq 0x1090
cmpl $-0x2, %ebp
jne 0x1395
leaq 0x2e251(%rip), %rdi     # 0x2f5e1
callq 0x1070
movq 0x41c5c(%rip), %rax     # 0x42ff8
movq (%rax), %rdi
movq %r14, %rsi
callq 0x28d0a
movl $0x1, %ebp
movl $0x2, %eax
jmp 0x13cf
testl %edx, %edx
je 0x13da
leaq 0x2be59(%rip), %rdi     # 0x2d217
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 0x2bdef(%rip), %rdi     # 0x2d1d0
movq %r8, %rsi
xorl %eax, %eax
callq 0x1090
leaq 0x2e20d(%rip), %rdi     # 0x2f5ff
callq 0x1070
jmp 0x13a7
// File: /workspace/github_c_makefile_star2_O3/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 0x13177
leaq 0x8(%rsp), %rsi
movq $0x1, (%rsi)
movq %r15, %rdi
callq 0x1904a
cmpl $-0x2, %eax
jne 0x1a43
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x13387
leaq 0x10(%rsp), %r15
movl $0x28, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x13444
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1904a
leaq 0x2e541(%rip), %rdx     # 0x2ff60
leaq 0x2b851(%rip), %r9      # 0x2d277
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r14, %rdi
callq 0x13455
jmp 0x1a77
leaq 0x2b786(%rip), %rdi     # 0x2d1d0
leaq 0x2b826(%rip), %rsi     # 0x2d277
xorl %eax, %eax
callq 0x1090
leaq 0x2dbc5(%rip), %rdi     # 0x2f624
callq 0x1070
leaq 0x68(%rsp), %rdi
callq 0x13455
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_O3/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
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 0x13177
movq 0x8(%r15), %r14
movq %r15, %rdi
movl $0x420008, %esi         # imm = 0x420008
callq 0x13693
testl %eax, %eax
je 0x1b12
cmpq 0x18(%rsp), %r14
jne 0x1b3e
leaq 0x10(%rsp), %rdi
callq 0x13455
leaq 0x2b71b(%rip), %rdi     # 0x2d217
leaq 0x2b790(%rip), %rsi     # 0x2d293
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
incw 0x4(%rbx)
jmp 0x1b72
leaq 0x2b6b7(%rip), %rdi     # 0x2d1d0
leaq 0x2b773(%rip), %rsi     # 0x2d293
xorl %eax, %eax
callq 0x1090
leaq 0x2db0d(%rip), %rdi     # 0x2f63b
callq 0x1070
incw 0x2(%rbx)
cmpq 0x18(%rsp), %r14
je 0x1b63
leaq 0x2b68b(%rip), %rdi     # 0x2d1d0
leaq 0x2b747(%rip), %rsi     # 0x2d293
xorl %eax, %eax
callq 0x1090
leaq 0x2dafc(%rip), %rdi     # 0x2f656
callq 0x1070
incw 0x2(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x13455
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2db52(%rip), %rsi     # 0x2f930
movq %rsp, %r14
movl $0xa, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x58(%rsp), %r15
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 0x13177
movq 0x8(%r15), %r12
movq %r15, %rdi
movl $0x420008, %esi         # imm = 0x420008
callq 0x136fa
cmpq $0x1, %rax
jne 0x1e57
cmpq 0x60(%rsp), %r12
jne 0x1e8b
leaq 0x58(%rsp), %rdi
callq 0x13455
leaq 0x2b3d6(%rip), %rdi     # 0x2d217
leaq 0x2b506(%rip), %rsi     # 0x2d34e
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
incw 0x4(%rbx)
jmp 0x1ebf
movq %rax, %r14
leaq 0x2b36f(%rip), %rdi     # 0x2d1d0
leaq 0x2b4e6(%rip), %rsi     # 0x2d34e
xorl %eax, %eax
callq 0x1090
leaq 0x2b503(%rip), %rdi     # 0x2d379
movq %r14, %rsi
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
cmpq 0x60(%rsp), %r12
je 0x1eb0
leaq 0x2b33e(%rip), %rdi     # 0x2d1d0
leaq 0x2b4b5(%rip), %rsi     # 0x2d34e
xorl %eax, %eax
callq 0x1090
leaq 0x2d7dc(%rip), %rdi     # 0x2f683
callq 0x1070
incw 0x2(%rbx)
leaq 0x58(%rsp), %rdi
callq 0x13455
movl $0x1, %ebp
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_O3/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 0x13177
movq 0x10(%r15), %r14
subq 0x8(%r15), %r14
addq (%r15), %r14
movq %r15, %rdi
callq 0x13455
cmpq $0x1, %r14
jne 0x21fb
leaq 0x10(%rsp), %r14
leaq 0x4(%rsp), %rsi
movl $0x3, %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x13177
movq 0x10(%r14), %r15
subq 0x8(%r14), %r15
addq (%r14), %r15
movq %r14, %rdi
callq 0x13455
cmpq $0x3, %r15
jne 0x2210
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %rsi
xorl %ebp, %ebp
movl $0x5, %edx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x13177
movq 0x10(%r14), %r15
subq 0x8(%r14), %r15
addq (%r14), %r15
movq %r14, %rdi
callq 0x13455
cmpq $0x5, %r15
jne 0x2225
leaq 0x2b031(%rip), %rdi     # 0x2d217
leaq 0x2b248(%rip), %rsi     # 0x2d435
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x2249
leaq 0x2b020(%rip), %rdi     # 0x2d222
leaq 0x2b22c(%rip), %rsi     # 0x2d435
movl $0x2d1, %edx            # imm = 0x2D1
jmp 0x2238
leaq 0x2b00b(%rip), %rdi     # 0x2d222
leaq 0x2b217(%rip), %rsi     # 0x2d435
movl $0x2da, %edx            # imm = 0x2DA
jmp 0x2238
leaq 0x2aff6(%rip), %rdi     # 0x2d222
leaq 0x2b202(%rip), %rsi     # 0x2d435
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
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_init_request_batch_item
int
test_init_request_batch_item(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    kmip_init_request_batch_item(NULL);

    RequestBatchItem rbi = {0};

    if(rbi.operation != 0)
        TEST_FAILED(tracker, __func__, __LINE__);
    if(rbi.unique_batch_item_id != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);
    if(rbi.request_payload != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);
    if(rbi.ephemeral != 0)
        TEST_FAILED(tracker, __func__, __LINE__);

    kmip_init_request_batch_item(&rbi);

    if(rbi.operation != 0)
        TEST_FAILED(tracker, __func__, __LINE__);
    if(rbi.unique_batch_item_id != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);
    if(rbi.request_payload != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);
    if(rbi.ephemeral != KMIP_UNSET)
        TEST_FAILED(tracker, __func__, __LINE__);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
incw (%rdi)
xorl %edi, %edi
callq 0x1394a
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r14, %rdi
callq 0x1394a
cmpl $0x0, (%r14)
je 0x3359
leaq 0x29ed7(%rip), %rdi     # 0x2d222
leaq 0x2a1a0(%rip), %rsi     # 0x2d4f2
movl $0x4db, %edx            # imm = 0x4DB
jmp 0x33ad
cmpq $0x0, 0x8(%rsp)
je 0x3376
leaq 0x29eba(%rip), %rdi     # 0x2d222
leaq 0x2a183(%rip), %rsi     # 0x2d4f2
movl $0x4dd, %edx            # imm = 0x4DD
jmp 0x33ad
cmpq $0x0, 0x10(%rsp)
je 0x3393
leaq 0x29e9d(%rip), %rdi     # 0x2d222
leaq 0x2a166(%rip), %rsi     # 0x2d4f2
movl $0x4df, %edx            # imm = 0x4DF
jmp 0x33ad
cmpl $-0x1, 0x18(%rsp)
je 0x33cd
leaq 0x29e81(%rip), %rdi     # 0x2d222
leaq 0x2a14a(%rip), %rsi     # 0x2d4f2
movl $0x4e1, %edx            # imm = 0x4E1
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x29e43(%rip), %rdi     # 0x2d217
leaq 0x2a117(%rip), %rsi     # 0x2d4f2
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x33be
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_deep_copy_int32
int
test_deep_copy_int32(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    int32 expected = 42;
    int32 *observed = NULL;

    observed = kmip_deep_copy_int32(NULL, NULL);
    if(observed != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);

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

    observed = kmip_deep_copy_int32(&ctx, NULL);
    if(observed != NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    observed = kmip_deep_copy_int32(&ctx, &expected);
    if(observed == NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(*observed != expected)
    {
        kmip_print_integer(stderr, expected);
        kmip_print_integer(stderr, *observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    ctx.free_func(ctx.state, observed);
    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)
movl $0x2a, 0xc(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1539d
testq %rax, %rax
je 0x34bd
leaq 0x29d83(%rip), %rdi     # 0x2d222
leaq 0x2a0ac(%rip), %rsi     # 0x2d552
movl $0x521, %edx            # imm = 0x521
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3520
leaq 0x10(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x13177
movq %r14, %rdi
xorl %esi, %esi
callq 0x1539d
leaq 0x10(%rsp), %rdi
testq %rax, %rax
je 0x3530
callq 0x13455
leaq 0x29d23(%rip), %rdi     # 0x2d222
leaq 0x2a04c(%rip), %rsi     # 0x2d552
movl $0x52a, %edx            # imm = 0x52A
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
leaq 0xc(%rsp), %rsi
callq 0x1539d
testq %rax, %rax
je 0x3586
movq %rax, %r14
movl 0xc(%rsp), %esi
cmpl %esi, (%rax)
jne 0x35a8
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x29ca8(%rip), %rdi     # 0x2d217
leaq 0x29fdc(%rip), %rsi     # 0x2d552
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x351c
leaq 0x10(%rsp), %rdi
callq 0x13455
leaq 0x29c8b(%rip), %rdi     # 0x2d222
leaq 0x29fb4(%rip), %rsi     # 0x2d552
movl $0x531, %edx            # imm = 0x531
jmp 0x350b
movq 0x3fa49(%rip), %r15     # 0x42ff8
movq (%r15), %rdi
callq 0x2aa8c
movq (%r15), %rdi
movl (%r14), %esi
callq 0x2aa8c
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x29c3b(%rip), %rdi     # 0x2d222
leaq 0x29f64(%rip), %rsi     # 0x2d552
movl $0x539, %edx            # imm = 0x539
jmp 0x350b
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_deep_copy_int64
int
test_deep_copy_int64(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    int64 expected = 42;
    int64 *observed = NULL;

    observed = kmip_deep_copy_int64(NULL, NULL);
    if(observed != NULL)
        TEST_FAILED(tracker, __func__, __LINE__);

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

    observed = kmip_deep_copy_int64(&ctx, NULL);
    if(observed != NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    observed = kmip_deep_copy_int64(&ctx, &expected);
    if(observed == NULL)
    {
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }
    if(*observed != expected)
    {
        kmip_print_date_time(stderr, expected);
        kmip_print_date_time(stderr, *observed);
        ctx.free_func(ctx.state, observed);
        kmip_destroy(&ctx);
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    ctx.free_func(ctx.state, observed);
    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)
movq $0x2a, 0x8(%rsp)
xorl %edi, %edi
xorl %esi, %esi
callq 0x153f9
testq %rax, %rax
je 0x3647
leaq 0x29bf9(%rip), %rdi     # 0x2d222
leaq 0x29f37(%rip), %rsi     # 0x2d567
movl $0x54c, %edx            # imm = 0x54C
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x36aa
leaq 0x10(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x13177
movq %r14, %rdi
xorl %esi, %esi
callq 0x153f9
leaq 0x10(%rsp), %rdi
testq %rax, %rax
je 0x36ba
callq 0x13455
leaq 0x29b99(%rip), %rdi     # 0x2d222
leaq 0x29ed7(%rip), %rsi     # 0x2d567
movl $0x555, %edx            # imm = 0x555
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
leaq 0x8(%rsp), %rsi
callq 0x153f9
testq %rax, %rax
je 0x3712
movq %rax, %r14
movq 0x8(%rsp), %rsi
cmpq %rsi, (%rax)
jne 0x3734
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x29b1c(%rip), %rdi     # 0x2d217
leaq 0x29e65(%rip), %rsi     # 0x2d567
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x36a6
leaq 0x10(%rsp), %rdi
callq 0x13455
leaq 0x29aff(%rip), %rdi     # 0x2d222
leaq 0x29e3d(%rip), %rsi     # 0x2d567
movl $0x55c, %edx            # imm = 0x55C
jmp 0x3695
movq 0x3f8bd(%rip), %r15     # 0x42ff8
movq (%r15), %rdi
callq 0x2ac27
movq (%r15), %rdi
movq (%r14), %rsi
callq 0x2ac27
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13455
leaq 0x29aaf(%rip), %rdi     # 0x2d222
leaq 0x29ded(%rip), %rsi     # 0x2d567
movl $0x564, %edx            # imm = 0x564
jmp 0x3695
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_int8_be
int
test_decode_int8_be(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[1] = {0x42};
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    int8 value = 0;
    
    int result = kmip_decode_int8_be(&ctx, &value);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        value == 0x42, 
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %r14
incw (%rdi)
leaq 0xf(%rsp), %r15
movb $0x42, (%r15)
leaq 0x10(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
leaq 0xe(%rsp), %r15
movb $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b69f
xorl %edx, %edx
cmpb $0x42, (%r15)
sete %dl
leaq 0x28d10(%rip), %r8      # 0x2d652
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1363
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_int32_be
int
test_decode_int32_be(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[4] = {0x11, 0x22, 0x33, 0x44};
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);

    int32 expected = 0x11223344;
    int32 observed = 0;
    
    int result = kmip_decode_int32_be(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        observed == expected,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %r14
incw (%rdi)
leaq 0xc(%rsp), %r15
movl $0x44332211, (%r15)     # imm = 0x44332211
leaq 0x10(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
leaq 0x8(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b71c
xorl %edx, %edx
cmpl $0x11223344, (%r15)     # imm = 0x11223344
sete %dl
leaq 0x28c8e(%rip), %r8      # 0x2d666
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1363
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_int64_be
int
test_decode_int64_be(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[8] = {
        0x01, 0xB6, 0x9B, 0x4B, 0xA5, 0x74, 0x92, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    int64 expected = 0x01B69B4BA5749200;
    int64 observed = 0;
    
    int result = kmip_decode_int64_be(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        observed == expected,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %r14
incw (%rdi)
movabsq $0x9274a54b9bb601, %rax # imm = 0x9274A54B9BB601
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x10(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
movq %rsp, %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b7d9
movabsq $0x1b69b4ba5749200, %rcx # imm = 0x1B69B4BA5749200
xorl %edx, %edx
cmpq %rcx, (%r15)
sete %dl
leaq 0x28c03(%rip), %r8      # 0x2d67b
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1363
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_integer
int
test_encode_integer(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[16] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    int result = kmip_encode_integer(&ctx, KMIP_TAG_DEFAULT, 8);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x10(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0x8, %edx
callq 0x179ec
leaq 0x28595(%rip), %rdx     # 0x2d090
leaq 0x28b8e(%rip), %r9      # 0x2d690
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_integer
int
test_decode_integer(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00
    };

    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    int32 expected = 8;
    int32 observed = 0;
    
    int result = kmip_decode_integer(&ctx, KMIP_TAG_DEFAULT, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        observed == expected,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rdi, %r14
incw (%rdi)
movaps 0x28549(%rip), %xmm0    # 0x2d090
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1b9c6
xorl %edx, %edx
cmpl $0x8, (%r15)
sete %dl
leaq 0x28b02(%rip), %r8      # 0x2d6a4
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1363
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_long
int
test_encode_long(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08,
        0x01, 0xB6, 0x9B, 0x4B, 0xA5, 0x74, 0x92, 0x00
    };
    
    uint8 observed[16] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    int result = kmip_encode_long(&ctx, KMIP_TAG_DEFAULT, 123456789000000000);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x10(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
movabsq $0x1b69b4ba5749200, %rdx # imm = 0x1B69B4BA5749200
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x17a8a
leaq 0x28476(%rip), %rdx     # 0x2d0a0
leaq 0x28a87(%rip), %r9      # 0x2d6b8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_long
int
test_decode_long(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08,
        0x01, 0xB6, 0x9B, 0x4B, 0xA5, 0x74, 0x92, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    int64 expected = 0x01B69B4BA5749200;
    int64 observed = 0;
    
    int result = kmip_decode_long(&ctx, KMIP_TAG_DEFAULT, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        observed == expected,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rdi, %r14
incw (%rdi)
movaps 0x2842a(%rip), %xmm0    # 0x2d0a0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1bbfa
movabsq $0x1b69b4ba5749200, %rcx # imm = 0x1B69B4BA5749200
xorl %edx, %edx
cmpq %rcx, (%r15)
sete %dl
leaq 0x289ef(%rip), %r8      # 0x2d6c9
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1363
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_enum
int
test_encode_enum(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[16] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    int result = kmip_encode_enum(&ctx, KMIP_TAG_DEFAULT, KMIP_CRYPTOALG_AES);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x10(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0x3, %edx
callq 0x17b21
leaq 0x28353(%rip), %rdx     # 0x2d0b0
leaq 0x28976(%rip), %r9      # 0x2d6da
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_enum
int
test_decode_enum(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    enum cryptographic_algorithm expected = KMIP_CRYPTOALG_AES;
    enum cryptographic_algorithm observed = 0;
    
    int result = kmip_decode_enum(&ctx, KMIP_TAG_DEFAULT, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        observed == expected,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rdi, %r14
incw (%rdi)
movaps 0x28307(%rip), %xmm0    # 0x2d0b0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1bdb2
xorl %edx, %edx
cmpl $0x3, (%r15)
sete %dl
leaq 0x288e7(%rip), %r8      # 0x2d6eb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1363
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq