LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x13f18
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x340e
leaq 0x2be25(%rip), %rdi     # 0x2f222
leaq 0x2c0ee(%rip), %rsi     # 0x2f4f2
movl $0x4d2, %edx            # imm = 0x4D2
jmp 0x34c4
cmpq $0x0, 0x10(%rsp)
je 0x342e
leaq 0x2be05(%rip), %rdi     # 0x2f222
leaq 0x2c0ce(%rip), %rsi     # 0x2f4f2
movl $0x4d4, %edx            # imm = 0x4D4
jmp 0x34c4
cmpl $0x0, 0x18(%rsp)
je 0x344a
leaq 0x2bde6(%rip), %rdi     # 0x2f222
leaq 0x2c0af(%rip), %rsi     # 0x2f4f2
movl $0x4d6, %edx            # imm = 0x4D6
jmp 0x34c4
movq %rsp, %r14
movq %r14, %rdi
callq 0x13f18
cmpl $0x0, (%r14)
je 0x3470
leaq 0x2bdc0(%rip), %rdi     # 0x2f222
leaq 0x2c089(%rip), %rsi     # 0x2f4f2
movl $0x4db, %edx            # imm = 0x4DB
jmp 0x34c4
cmpq $0x0, 0x8(%rsp)
je 0x348d
leaq 0x2bda3(%rip), %rdi     # 0x2f222
leaq 0x2c06c(%rip), %rsi     # 0x2f4f2
movl $0x4dd, %edx            # imm = 0x4DD
jmp 0x34c4
cmpq $0x0, 0x10(%rsp)
je 0x34aa
leaq 0x2bd86(%rip), %rdi     # 0x2f222
leaq 0x2c04f(%rip), %rsi     # 0x2f4f2
movl $0x4df, %edx            # imm = 0x4DF
jmp 0x34c4
cmpl $-0x1, 0x18(%rsp)
je 0x34e4
leaq 0x2bd6a(%rip), %rdi     # 0x2f222
leaq 0x2c033(%rip), %rsi     # 0x2f4f2
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 0x2bd2c(%rip), %rdi     # 0x2f217
leaq 0x2c000(%rip), %rsi     # 0x2f4f2
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x34d5
// File: /workspace/github_c_makefile_star2_O1/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 0x1594e
testq %rax, %rax
je 0x35d4
leaq 0x2bc6c(%rip), %rdi     # 0x2f222
leaq 0x2bf95(%rip), %rsi     # 0x2f552
movl $0x521, %edx            # imm = 0x521
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x3637
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 0x13747
movq %r14, %rdi
xorl %esi, %esi
callq 0x1594e
leaq 0x10(%rsp), %rdi
testq %rax, %rax
je 0x3647
callq 0x13a23
leaq 0x2bc0c(%rip), %rdi     # 0x2f222
leaq 0x2bf35(%rip), %rsi     # 0x2f552
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 0x1594e
testq %rax, %rax
je 0x369d
movq %rax, %r14
movl 0xc(%rsp), %esi
cmpl %esi, (%rax)
jne 0x36bf
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2bb91(%rip), %rdi     # 0x2f217
leaq 0x2bec5(%rip), %rsi     # 0x2f552
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x3633
leaq 0x10(%rsp), %rdi
callq 0x13a23
leaq 0x2bb74(%rip), %rdi     # 0x2f222
leaq 0x2be9d(%rip), %rsi     # 0x2f552
movl $0x531, %edx            # imm = 0x531
jmp 0x3622
movq 0x41932(%rip), %r15     # 0x44ff8
movq (%r15), %rdi
callq 0x2be70
movq (%r15), %rdi
movl (%r14), %esi
callq 0x2be70
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2bb24(%rip), %rdi     # 0x2f222
leaq 0x2be4d(%rip), %rsi     # 0x2f552
movl $0x539, %edx            # imm = 0x539
jmp 0x3622
// File: /workspace/github_c_makefile_star2_O1/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 0x159aa
testq %rax, %rax
je 0x375e
leaq 0x2bae2(%rip), %rdi     # 0x2f222
leaq 0x2be20(%rip), %rsi     # 0x2f567
movl $0x54c, %edx            # imm = 0x54C
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx)
movl $0x1, %ebp
jmp 0x37c1
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 0x13747
movq %r14, %rdi
xorl %esi, %esi
callq 0x159aa
leaq 0x10(%rsp), %rdi
testq %rax, %rax
je 0x37d1
callq 0x13a23
leaq 0x2ba82(%rip), %rdi     # 0x2f222
leaq 0x2bdc0(%rip), %rsi     # 0x2f567
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 0x159aa
testq %rax, %rax
je 0x3829
movq %rax, %r14
movq 0x8(%rsp), %rsi
cmpq %rsi, (%rax)
jne 0x384b
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2ba05(%rip), %rdi     # 0x2f217
leaq 0x2bd4e(%rip), %rsi     # 0x2f567
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0x37bd
leaq 0x10(%rsp), %rdi
callq 0x13a23
leaq 0x2b9e8(%rip), %rdi     # 0x2f222
leaq 0x2bd26(%rip), %rsi     # 0x2f567
movl $0x55c, %edx            # imm = 0x55C
jmp 0x37ac
movq 0x417a6(%rip), %r15     # 0x44ff8
movq (%r15), %rdi
callq 0x2c00b
movq (%r15), %rdi
movq (%r14), %rsi
callq 0x2c00b
leaq 0x10(%rsp), %r15
movq 0x890(%r15), %rdi
movq %r14, %rsi
callq *0x878(%r15)
movq %r15, %rdi
callq 0x13a23
leaq 0x2b998(%rip), %rdi     # 0x2f222
leaq 0x2bcd6(%rip), %rsi     # 0x2f567
movl $0x564, %edx            # imm = 0x564
jmp 0x37ac
// File: /workspace/github_c_makefile_star2_O1/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 0x13747
leaq 0xe(%rsp), %r15
movb $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c0fe
xorl %edx, %edx
cmpb $0x42, (%r15)
sete %dl
leaq 0x2abe2(%rip), %r8      # 0x2f652
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_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 0x13747
leaq 0x8(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c17b
xorl %edx, %edx
cmpl $0x11223344, (%r15)     # imm = 0x11223344
sete %dl
leaq 0x2ab60(%rip), %r8      # 0x2f666
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_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 0x13747
movq %rsp, %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c238
movabsq $0x1b69b4ba5749200, %rcx # imm = 0x1B69B4BA5749200
xorl %edx, %edx
cmpq %rcx, (%r15)
sete %dl
leaq 0x2aad5(%rip), %r8      # 0x2f67b
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_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 0x13747
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0x8, %edx
callq 0x18213
leaq 0x2a467(%rip), %rdx     # 0x2f090
leaq 0x2aa60(%rip), %r9      # 0x2f690
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_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 0x2a41b(%rip), %xmm0    # 0x2f090
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 0x13747
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1c425
xorl %edx, %edx
cmpl $0x8, (%r15)
sete %dl
leaq 0x2a9d4(%rip), %r8      # 0x2f6a4
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x13747
movabsq $0x1b69b4ba5749200, %rdx # imm = 0x1B69B4BA5749200
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x182b1
leaq 0x2a348(%rip), %rdx     # 0x2f0a0
leaq 0x2a959(%rip), %r9      # 0x2f6b8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_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 0x2a2fc(%rip), %xmm0    # 0x2f0a0
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 0x13747
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1c659
movabsq $0x1b69b4ba5749200, %rcx # imm = 0x1B69B4BA5749200
xorl %edx, %edx
cmpq %rcx, (%r15)
sete %dl
leaq 0x2a8c1(%rip), %r8      # 0x2f6c9
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x13747
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0x3, %edx
callq 0x18348
leaq 0x2a225(%rip), %rdx     # 0x2f0b0
leaq 0x2a848(%rip), %r9      # 0x2f6da
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_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 0x2a1d9(%rip), %xmm0    # 0x2f0b0
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 0x13747
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1c811
xorl %edx, %edx
cmpl $0x3, (%r15)
sete %dl
leaq 0x2a7b9(%rip), %r8      # 0x2f6eb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_bool
int
test_encode_bool(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
    };
    
    uint8 observed[16] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    int result = kmip_encode_bool(&ctx, KMIP_TAG_DEFAULT, KMIP_TRUE);
    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 0x13747
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0x1, %edx
callq 0x183e6
leaq 0x2a10b(%rip), %rdx     # 0x2f0c0
leaq 0x2a740(%rip), %r9      # 0x2f6fc
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_decode_bool
int
test_decode_bool(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    bool32 expected = KMIP_TRUE;
    bool32 observed = 0;
    
    int result = kmip_decode_bool(&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 0x2a0bf(%rip), %xmm0    # 0x2f0c0
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 0x13747
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1ca45
xorl %edx, %edx
cmpl $0x1, (%r15)
sete %dl
leaq 0x2a6b1(%rip), %r8      # 0x2f70d
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_text_string
int
test_encode_text_string(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[24] = {
        0x42, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0B,
        0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F,
        0x72, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[24] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);

    struct text_string example = {0};
    example.value = "Hello World";
    example.size = 11;
    
    int result = kmip_encode_text_string(&ctx, KMIP_TAG_DEFAULT, &example);
    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 $0x8c8, %rsp            # imm = 0x8C8
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
leaq 0x30(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x18, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
movq %rsp, %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
leaq 0x2a63e(%rip), %rax     # 0x2f71e
movq %rax, (%rdx)
movq $0xb, 0x8(%rdx)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x18487
leaq 0x2c981(%rip), %rdx     # 0x31a80
leaq 0x2a624(%rip), %r9      # 0x2f72a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_text_string
int
test_decode_text_string(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[24] = {
        0x42, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0B,
        0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x57, 0x6F,
        0x72, 0x6C, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);

    struct text_string expected = {0};
    expected.value = "Hello World";
    expected.size = 11;
    struct text_string observed = {0};
    
    int result = kmip_decode_text_string(&ctx, KMIP_TAG_DEFAULT, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_text_string(&expected, &observed),
        result,
        __func__);
    kmip_free_text_string(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8d0, %rsp            # imm = 0x8D0
movq %rdi, %r14
incw (%rdi)
movaps 0x2c933(%rip), %xmm0    # 0x31a80
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq $0x646c72, 0x10(%r15)   # imm = 0x646C72
leaq 0x38(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x18, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x2a587(%rip), %rax     # 0x2f71e
movq %rax, (%r15)
movq $0xb, 0x8(%r15)
movq %rsp, %r12
movaps %xmm0, (%r12)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r12, %rdx
callq 0x1cc9b
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x161d1
leaq 0x2a574(%rip), %r8      # 0x2f742
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x13f68
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
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_encode_byte_string
int
test_encode_byte_string(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03,
        0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[16] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    uint8 str[3] = {0x01, 0x02, 0x03};
    
    struct byte_string example = {0};
    example.value = str;
    example.size = 3;
    
    int result = kmip_encode_byte_string(&ctx, KMIP_TAG_DEFAULT, &example);
    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 $0x8c8, %rsp            # imm = 0x8C8
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x30(%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 0x13747
leaq 0xc(%rsp), %rax
movb $0x3, 0x2(%rax)
movw $0x201, (%rax)          # imm = 0x201
leaq 0x10(%rsp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
movq %rax, (%rdx)
movq $0x3, 0x8(%rdx)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x18570
leaq 0x29e4f(%rip), %rdx     # 0x2f0d0
leaq 0x2a4d2(%rip), %r9      # 0x2f75a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_byte_string
int
test_decode_byte_string(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03,
        0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);

    uint8 str[3] = {0x01, 0x02, 0x03};
    
    struct byte_string expected = {0};
    expected.value = str;
    expected.size = 3;
    struct byte_string observed = {0};
    
    int result = kmip_decode_byte_string(&ctx, KMIP_TAG_DEFAULT, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_byte_string(&expected, &observed),
        result,
        __func__);
    kmip_free_byte_string(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, %r14
incw (%rdi)
movaps 0x29e01(%rip), %xmm0    # 0x2f0d0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%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 0x13747
leaq 0xc(%rsp), %rax
movb $0x3, 0x2(%rax)
movw $0x201, (%rax)          # imm = 0x201
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %rax, (%r15)
movq $0x3, 0x8(%r15)
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r12, %rdx
callq 0x1cf2b
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x16252
leaq 0x2a421(%rip), %r8      # 0x2f772
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x13fbf
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
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_encode_date_time
int
test_encode_date_time(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x47, 0xDA, 0x67, 0xF8
    };
    
    uint8 observed[16] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    int result = kmip_encode_date_time(&ctx, KMIP_TAG_DEFAULT, 1205495800);
    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 0x13747
movl $0x47da67f8, %edx       # imm = 0x47DA67F8
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x18659
leaq 0x29cfd(%rip), %rdx     # 0x2f0e0
leaq 0x2a3a0(%rip), %r9      # 0x2f78a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_decode_date_time
int
test_decode_date_time(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x47, 0xDA, 0x67, 0xF8
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    int64 expected = 1205495800;
    int64 observed = 0;
    
    int result = kmip_decode_date_time(&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 0x29cb1(%rip), %xmm0    # 0x2f0e0
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 0x13747
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1d1bb
xorl %edx, %edx
cmpq $0x47da67f8, (%r15)     # imm = 0x47DA67F8
sete %dl
leaq 0x2a313(%rip), %r8      # 0x2f7a0
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_interval
int
test_encode_interval(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[16] = {
        0x42, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x0D, 0x2F, 0x00, 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_interval(&ctx, KMIP_TAG_DEFAULT, 864000);
    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 0x13747
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0xd2f00, %edx          # imm = 0xD2F00
callq 0x186f0
leaq 0x29be0(%rip), %rdx     # 0x2f0f0
leaq 0x2a29f(%rip), %r9      # 0x2f7b6
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
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_decode_interval
int
test_decode_interval(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {
        0x42, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x0D, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    uint32 expected = 864000;
    uint32 observed = 0;
    
    int result = kmip_decode_interval(&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 0x29b94(%rip), %xmm0    # 0x2f0f0
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 0x13747
leaq 0xc(%rsp), %r15
movl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1d373
xorl %edx, %edx
cmpl $0xd2f00, (%r15)        # imm = 0xD2F00
sete %dl
leaq 0x2a211(%rip), %r8      # 0x2f7cb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_name
int
test_encode_name(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[48] = {
        0x42, 0x00, 0x53, 0x01, 0x00, 0x00, 0x00, 0x28,
        0x42, 0x00, 0x55, 0x07, 0x00, 0x00, 0x00, 0x09,
        0x54, 0x65, 0x6D, 0x70, 0x6C, 0x61, 0x74, 0x65,
        0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x54, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[48] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct text_string value = {0};
    value.value = "Template1";
    value.size = 9;
    
    struct name n = {0};
    n.value = &value;
    n.type = KMIP_NAME_UNINTERPRETED_TEXT_STRING;
    
    int result = kmip_encode_name(&ctx, &n);
    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 $0x8e8, %rsp            # imm = 0x8E8
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x50(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x30, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
leaq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x2a19e(%rip), %rcx     # 0x2f7e0
movq %rcx, (%rax)
movq $0x9, 0x8(%rax)
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq %rax, (%rsi)
movl $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0x187d8
leaq 0x2e374(%rip), %rdx     # 0x339e0
leaq 0x2a177(%rip), %r9      # 0x2f7ea
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x8e8, %rsp            # imm = 0x8E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_name
int
test_decode_name(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[48] = {
        0x42, 0x00, 0x53, 0x01, 0x00, 0x00, 0x00, 0x28,
        0x42, 0x00, 0x55, 0x07, 0x00, 0x00, 0x00, 0x09,
        0x54, 0x65, 0x6D, 0x70, 0x6C, 0x61, 0x74, 0x65,
        0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x54, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    struct text_string value = {0};
    value.value = "Template1";
    value.size = 9;
    
    struct name expected = {0};
    expected.value = &value;
    expected.type = KMIP_NAME_UNINTERPRETED_TEXT_STRING;
    struct name observed = {0};
    
    int result = kmip_decode_name(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_name(&expected, &observed),
        result,
        __func__);
    kmip_free_name(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x900, %rsp            # imm = 0x900
movq %rdi, %r14
incw (%rdi)
movaps 0x2e346(%rip), %xmm0    # 0x33a00
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps 0x2e325(%rip), %xmm0    # 0x339f0
movaps %xmm0, 0x10(%r15)
movaps 0x2e309(%rip), %xmm0    # 0x339e0
movaps %xmm0, (%r15)
leaq 0x68(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x30, %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x2a0cd(%rip), %rcx     # 0x2f7e0
movq %rcx, (%rax)
movq $0x9, 0x8(%rax)
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %rax, (%r15)
movl $0x1, 0x8(%r15)
movq %rsp, %r12
movaps %xmm0, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1d5a7
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x162d3
leaq 0x2a0a2(%rip), %r8      # 0x2f7fb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1397
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1400b
movq %rbx, %rdi
callq 0x13a23
movl %ebp, %eax
addq $0x900, %rsp            # imm = 0x900
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_encode_protection_storage_masks
int
test_encode_protection_storage_masks(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following set of values:
    *  Protection Storage Masks
    *      Protection Storage Mask
    *          Software
    *          Hardware
    *          On Processor
    *          On System
    *          Off System
    *          Hypervisor
    *          Operating System
    *          Container
    *          On Premises
    *          Off Premises
    *          Self Managed
    *          Outsourced
    *          Validated
    *          Same Jurisdiction
    *      Protection Storage Mask
    *          Software
    *          Hardware
    */
    uint8 expected[40] = {
        0x42, 0x01, 0x5F, 0x01, 0x00, 0x00, 0x00, 0x20,
        0x42, 0x01, 0x5E, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x01, 0x5E, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
    };

    uint8 observed[40] = {0};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_2_0);

    LinkedList list = {0};
    LinkedListItem item_1 = {0};
    int32 mask_1 = 0x3FFF;
    item_1.data = &mask_1;

    LinkedListItem item_2 = {0};
    int32 mask_2 = 0x0003;
    item_2.data = &mask_2;

    kmip_linked_list_enqueue(&list, &item_1);
    kmip_linked_list_enqueue(&list, &item_2);

    ProtectionStorageMasks psm = {0};
    psm.masks = &list;

    int result = kmip_encode_protection_storage_masks(&ctx, &psm);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    kmip_destroy(&ctx);

    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x938, %rsp            # imm = 0x938
movq %rdi, %rbx
incw (%rdi)
xorl %ebp, %ebp
leaq 0x70(%rsp), %r15
movq %rbp, 0x20(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0xa0(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x28, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13747
leaq 0x50(%rsp), %r12
movq %rbp, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
leaq 0x30(%rsp), %rsi
movq %rbp, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x4(%rsp), %rax
movl $0x3fff, (%rax)         # imm = 0x3FFF
movq %rax, 0x10(%rsi)
leaq 0x10(%rsp), %r13
movq %rbp, 0x10(%r13)
movaps %xmm0, (%r13)
movq %rsp, %rax
movl $0x3, (%rax)
movq %rax, 0x10(%r13)
movq %r12, %rdi
callq 0x12ebd
movq %r12, %rdi
movq %r13, %rsi
callq 0x12ebd
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movq %r14, %rdi
callq 0x188a9
leaq 0x2c245(%rip), %rdx     # 0x31aa0
leaq 0x29faa(%rip), %r9      # 0x2f80c
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r14, %rdi
callq 0x13a23
movl %ebx, %eax
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq