LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x21792(%rip), %xmm0    # 0x26090
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1a0df
xorl %edx, %edx
cmpl $0x8, (%r15)
sete %dl
leaq 0x21d50(%rip), %r8      # 0x266a4
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
movabsq $0x1b69b4ba5749200, %rdx # imm = 0x1B69B4BA5749200
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x168bd
leaq 0x216c6(%rip), %rdx     # 0x260a0
leaq 0x21cd7(%rip), %r9      # 0x266b8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2167a(%rip), %xmm0    # 0x260a0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1a1c3
movabsq $0x1b69b4ba5749200, %rcx # imm = 0x1B69B4BA5749200
xorl %edx, %edx
cmpq %rcx, (%r15)
sete %dl
leaq 0x21c44(%rip), %r8      # 0x266c9
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
pushq $0x3
popq %rdx
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x1691f
leaq 0x215ac(%rip), %rdx     # 0x260b0
leaq 0x21bcf(%rip), %r9      # 0x266da
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x21560(%rip), %xmm0    # 0x260b0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1a29b
xorl %edx, %edx
cmpl $0x3, (%r15)
sete %dl
leaq 0x21b45(%rip), %r8      # 0x266eb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x16989
leaq 0x2149b(%rip), %rdx     # 0x260c0
leaq 0x21ad0(%rip), %r9      # 0x266fc
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2144f(%rip), %xmm0    # 0x260c0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1a37f
xorl %edx, %edx
cmpl $0x1, (%r15)
sete %dl
leaq 0x21a46(%rip), %r8      # 0x2670d
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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)
andq $0x0, 0x10(%r15)
leaq 0x30(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x18
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x219e1(%rip), %rax     # 0x2671e
movq %rsp, %rdx
movq %rax, (%rdx)
movq $0xb, 0x8(%rdx)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x169f5
leaq 0x23d11(%rip), %rdx     # 0x28a70
leaq 0x219c4(%rip), %r9      # 0x2672a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x23cc3(%rip), %xmm0    # 0x28a70
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
pushq $0x18
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x21935(%rip), %rax     # 0x2671e
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq $0xb, 0x8(%r15)
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r12, %rdx
callq 0x1a471
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14bdc
leaq 0x2191a(%rip), %r8      # 0x26742
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12f63
movq %rbx, %rdi
callq 0x12ade
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_O2/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 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x30(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0xc(%rsp), %rax
movb $0x3, 0x2(%rax)
movw $0x201, (%rax)          # imm = 0x201
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
movq $0x3, 0x8(%rdx)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x16a9e
leaq 0x211fd(%rip), %rdx     # 0x260d0
leaq 0x21880(%rip), %r9      # 0x2675a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x211af(%rip), %xmm0    # 0x260d0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0xc(%rsp), %rax
movb $0x3, 0x2(%rax)
movw $0x201, (%rax)          # imm = 0x201
leaq 0x38(%rsp), %r15
movq %rax, (%r15)
movq $0x3, 0x8(%r15)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r12, %rdx
callq 0x1a5a9
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14c3f
leaq 0x217d5(%rip), %r8      # 0x26772
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12fb4
movq %rbx, %rdi
callq 0x12ade
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_O2/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
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
movl $0x47da67f8, %edx       # imm = 0x47DA67F8
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
callq 0x16b47
leaq 0x210b3(%rip), %rdx     # 0x260e0
leaq 0x21756(%rip), %r9      # 0x2678a
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x21067(%rip), %xmm0    # 0x260e0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1a6e1
xorl %edx, %edx
cmpq $0x47da67f8, (%r15)     # imm = 0x47DA67F8
sete %dl
leaq 0x216ce(%rip), %r8      # 0x267a0
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movl $0xd2f00, %edx          # imm = 0xD2F00
callq 0x16ba9
leaq 0x20f9d(%rip), %rdx     # 0x260f0
leaq 0x2165c(%rip), %r9      # 0x267b6
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x20f51(%rip), %xmm0    # 0x260f0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x20(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0xc(%rsp), %r15
andl $0x0, (%r15)
movq %rbx, %rdi
movl $0x420000, %esi         # imm = 0x420000
movq %r15, %rdx
callq 0x1a7b9
xorl %edx, %edx
cmpl $0xd2f00, (%r15)        # imm = 0xD2F00
sete %dl
leaq 0x215d3(%rip), %r8      # 0x267cb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x2156d(%rip), %rax     # 0x267e0
leaq 0x10(%rsp), %rcx
movq %rsp, %rsi
andq $0x0, 0x8(%rsi)
movq %rax, (%rcx)
movq $0x9, 0x8(%rcx)
movq %rcx, (%rsi)
movl $0x1, 0x8(%rsi)
movq %rbx, %rdi
callq 0x16c5b
leaq 0x2572c(%rip), %rdx     # 0x2a9d0
leaq 0x2153f(%rip), %r9      # 0x267ea
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8e8, %rsp            # imm = 0x8E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x256fe(%rip), %xmm0    # 0x2a9f0
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps 0x256dd(%rip), %xmm0    # 0x2a9e0
movaps %xmm0, 0x10(%r15)
movaps 0x256c1(%rip), %xmm0    # 0x2a9d0
movaps %xmm0, (%r15)
leaq 0x68(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x214a2(%rip), %rax     # 0x267e0
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x9, 0x8(%rcx)
leaq 0x10(%rsp), %r15
andq $0x0, 0x8(%r15)
movq %rcx, (%r15)
movl $0x1, 0x8(%r15)
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1a89d
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14ca2
leaq 0x2146e(%rip), %r8      # 0x267fb
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12ffa
movq %rbx, %rdi
callq 0x12ade
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_O2/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, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
andq $0x0, 0x20(%r15)
leaq 0xa0(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x28
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x50(%rsp), %r12
andq $0x0, 0x10(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x4(%rsp), %rax
movl $0x3fff, (%rax)         # imm = 0x3FFF
movq %rax, 0x10(%rsi)
leaq 0x10(%rsp), %r13
movaps %xmm0, (%r13)
movq %rsp, %rax
movl $0x3, (%rax)
movq %rax, 0x10(%r13)
movq %r12, %rdi
callq 0x12233
movq %r12, %rdi
movq %r13, %rsi
callq 0x12233
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movq %rbx, %rdi
callq 0x16d2c
leaq 0x2360d(%rip), %rdx     # 0x28a90
leaq 0x21382(%rip), %r9      # 0x2680c
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_application_specific_information
int
test_encode_attribute_application_specific_information(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[96] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x58,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x20,
        0x41, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74,
        0x69, 0x6F, 0x6E, 0x20, 0x53, 0x70, 0x65, 0x63,
        0x69, 0x66, 0x69, 0x63, 0x20, 0x49, 0x6E, 0x66,
        0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E,
        0x42, 0x00, 0x0B, 0x01, 0x00, 0x00, 0x00, 0x28,
        0x42, 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, 0x03,
        0x73, 0x73, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x02, 0x07, 0x00, 0x00, 0x00, 0x0F,
        0x77, 0x77, 0x77, 0x2E, 0x65, 0x78, 0x61, 0x6D,
        0x70, 0x6C, 0x65, 0x2E, 0x63, 0x6F, 0x6D, 0x00
    };

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

    TextString namespace = {0};
    namespace.value = "ssl";
    namespace.size = 3;

    TextString data = {0};
    data.value = "www.example.com";
    data.size = 15;

    ApplicationSpecificInformation asi = {0};
    asi.application_namespace = &namespace;
    asi.application_data = &data;

    Attribute attr = {0};
    kmip_init_attribute(&attr);

    attr.type = KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION;
    attr.value = &asi;

    int result = kmip_encode_attribute(&ctx, &attr);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x940, %rsp            # imm = 0x940
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r14
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
leaq 0xa8(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x60
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x211d5(%rip), %rax     # 0x26856
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movq $0x3, 0x8(%rcx)
leaq 0x211c2(%rip), %rax     # 0x2685a
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
movq $0xf, 0x8(%rdx)
leaq 0x10(%rsp), %r13
movq %rcx, (%r13)
movq %rdx, 0x8(%r13)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl $0x8, (%r12)
movq %r13, 0x8(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x17846
leaq 0x233d9(%rip), %rdx     # 0x28ac0
leaq 0x2117c(%rip), %r9      # 0x2686a
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r15, %rdi
callq 0x12ade
movl %ebx, %eax
addq $0x940, %rsp            # imm = 0x940
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_unique_identifier
int
test_encode_attribute_unique_identifier(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[88] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x50,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x11,
        0x55, 0x6E, 0x69, 0x71, 0x75, 0x65, 0x20, 0x49,
        0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65,
        0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x0B, 0x07, 0x00, 0x00, 0x00, 0x24,
        0x34, 0x39, 0x61, 0x31, 0x63, 0x61, 0x38, 0x38,
        0x2D, 0x36, 0x62, 0x65, 0x61, 0x2D, 0x34, 0x66,
        0x62, 0x32, 0x2D, 0x62, 0x34, 0x35, 0x30, 0x2D,
        0x37, 0x65, 0x35, 0x38, 0x38, 0x30, 0x32, 0x63,
        0x33, 0x30, 0x33, 0x38, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[88] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct text_string uuid = {0};
    uuid.value = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;
    
    struct attribute attr = {0};
    kmip_init_attribute(&attr);
    
    attr.type = KMIP_ATTR_UNIQUE_IDENTIFIER;
    attr.value = &uuid;
    
    int result = kmip_encode_attribute(&ctx, &attr);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x910, %rsp            # imm = 0x910
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
andq $0x0, 0x50(%r14)
leaq 0x78(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x58
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x20a2d(%rip), %rax     # 0x26625
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movq $0x24, 0x8(%r13)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
andl $0x0, (%r12)
movq %r13, 0x8(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x17846
leaq 0x22f88(%rip), %rdx     # 0x28bc0
leaq 0x20d26(%rip), %r9      # 0x26965
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r15, %rdi
callq 0x12ade
movl %ebx, %eax
addq $0x910, %rsp            # imm = 0x910
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_unique_identifier
int
test_decode_attribute_unique_identifier(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[88] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x50,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x11,
        0x55, 0x6E, 0x69, 0x71, 0x75, 0x65, 0x20, 0x49,
        0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65,
        0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x0B, 0x07, 0x00, 0x00, 0x00, 0x24,
        0x34, 0x39, 0x61, 0x31, 0x63, 0x61, 0x38, 0x38,
        0x2D, 0x36, 0x62, 0x65, 0x61, 0x2D, 0x34, 0x66,
        0x62, 0x32, 0x2D, 0x62, 0x34, 0x35, 0x30, 0x2D,
        0x37, 0x65, 0x35, 0x38, 0x38, 0x30, 0x32, 0x63,
        0x33, 0x30, 0x33, 0x38, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    struct text_string uuid = {0};
    uuid.value = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;
    
    struct attribute expected = {0};
    kmip_init_attribute(&expected);
    expected.type = KMIP_ATTR_UNIQUE_IDENTIFIER;
    expected.value = &uuid;
    struct attribute observed = {0};
    kmip_init_attribute(&observed);
    
    int result = kmip_decode_attribute(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_attribute(&expected, &observed),
        result,
        __func__);
    kmip_free_attribute(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x920, %rsp            # imm = 0x920
movq %rdi, %r14
incw (%rdi)
leaq 0x22f37(%rip), %rsi     # 0x28bc0
pushq $0xb
popq %rcx
leaq 0x30(%rsp), %r15
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x88(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x58
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x20960(%rip), %rax     # 0x26625
leaq 0x20(%rsp), %r12
movq %rax, (%r12)
movq $0x24, 0x8(%r12)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
andl $0x0, (%r15)
movq %r12, 0x8(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1c743
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14d69
leaq 0x20c68(%rip), %r8      # 0x2698d
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1309a
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x920, %rsp            # imm = 0x920
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_name
int
test_encode_attribute_name(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[72] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x40,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x04,
        0x4E, 0x61, 0x6D, 0x65, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x0B, 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[72] = {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;
    
    struct attribute attr = {0};
    kmip_init_attribute(&attr);
    
    attr.type = KMIP_ATTR_NAME;
    attr.value = &n;
    
    int result = kmip_encode_attribute(&ctx, &attr);
    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 $0x918, %rsp            # imm = 0x918
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
andq $0x0, 0x40(%r15)
leaq 0x80(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x48
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x20a20(%rip), %rax     # 0x267e0
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x9, 0x8(%rcx)
leaq 0x10(%rsp), %r13
andq $0x0, 0x8(%r13)
movq %rcx, (%r13)
pushq $0x1
popq %rbp
movl %ebp, 0x8(%r13)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl %ebp, (%r12)
movq %r13, 0x8(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x17846
leaq 0x22e0d(%rip), %rdx     # 0x28c20
leaq 0x20b9b(%rip), %r9      # 0x269b5
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r14, %rdi
callq 0x12ade
movl %ebx, %eax
addq $0x918, %rsp            # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_name
int
test_decode_attribute_name(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[72] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x40,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x04,
        0x4E, 0x61, 0x6D, 0x65, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x0B, 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 n = {0};
    n.value = &value;
    n.type = KMIP_NAME_UNINTERPRETED_TEXT_STRING;
    
    struct attribute expected = {0};
    kmip_init_attribute(&expected);
    expected.type = KMIP_ATTR_NAME;
    expected.value = &n;
    struct attribute observed = {0};
    kmip_init_attribute(&observed);
    
    int result = kmip_decode_attribute(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_attribute(&expected, &observed),
        result,
        __func__);
    kmip_free_attribute(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x920, %rsp            # imm = 0x920
movq %rdi, %r14
incw (%rdi)
leaq 0x22dbb(%rip), %rsi     # 0x28c20
pushq $0x9
popq %rcx
leaq 0x40(%rsp), %r15
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x88(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x48
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x2093f(%rip), %rax     # 0x267e0
leaq 0x30(%rsp), %rcx
leaq 0x20(%rsp), %r12
andq $0x0, 0x8(%r12)
movq %rax, (%rcx)
movq $0x9, 0x8(%rcx)
movq %rcx, (%r12)
pushq $0x1
popq %rbp
movl %ebp, 0x8(%r12)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
movl %ebp, (%r15)
movq %r12, 0x8(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1c743
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14d69
leaq 0x20abb(%rip), %r8      # 0x269d0
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1309a
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x920, %rsp            # imm = 0x920
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_object_type
int
test_encode_attribute_object_type(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[48] = {
        0x42, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x28,
        0x42, 0x00, 0x0A, 0x07, 0x00, 0x00, 0x00, 0x0B,
        0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x20, 0x54,
        0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x0B, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[48] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    enum object_type t = KMIP_OBJTYPE_SYMMETRIC_KEY;
    struct attribute attr = {0};
    kmip_init_attribute(&attr);
    
    attr.type = KMIP_ATTR_OBJECT_TYPE;
    attr.value = &t;
    
    int result = kmip_encode_attribute(&ctx, &attr);
    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 $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
pushq $0x30
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
pushq $0x2
popq %rbp
leaq 0xc(%rsp), %r13
movl %ebp, (%r13)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl %ebp, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17846
leaq 0x22c98(%rip), %rdx     # 0x28c70
leaq 0x20a0c(%rip), %r9      # 0x269eb
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x8e8, %rsp            # imm = 0x8E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq