LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attributes_with_invalid_kmip_version
int
test_encode_attributes_with_invalid_kmip_version(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 observed[40] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_4);

    Attributes attributes = {0};

    int result = kmip_encode_attributes(&ctx, &attributes);
    kmip_destroy(&ctx);

    result = report_result(tracker, result, KMIP_INVALID_FOR_VERSION, __func__);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8d0, %rsp            # imm = 0x8D0
movq %rdi, %rbx
incw (%rdi)
xorl %r12d, %r12d
leaq 0x10(%rsp), %r14
movq %r12, 0x20(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
leaq 0x38(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x28, %edx
movq %r15, %rdi
movq %r14, %rsi
movl $0x4, %ecx
callq 0x13177
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, %rdi
callq 0x18d48
movl %eax, %ebp
movq %r15, %rdi
callq 0x13455
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpl $-0xb, %ebp
setne %r14b
sete %r15b
leaq 0x20b5d(%rip), %rax     # 0x2d1d0
leaq 0x20b9d(%rip), %rdi     # 0x2d217
cmovneq %rax, %rdi
leaq 0x22251(%rip), %rsi     # 0x2e8d6
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx,%r15,2)
movl %r14d, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_application_specific_information
int
test_encode_attribute_v2_application_specific_information(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Application Specific Information
    *    Application Namespace - ssl
    *    Application Data - www.example.com
    */
    uint8 expected[48] = {
        0x42, 0x00, 0x04, 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[48] = {0};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_2_0);

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

    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.type = KMIP_ATTR_APPLICATION_SPECIFIC_INFORMATION;
    attribute.value = &asi;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    kmip_destroy(&ctx);

    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x910, %rsp            # imm = 0x910
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x78(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x30, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0x21143(%rip), %rax     # 0x2d856
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movq $0x3, 0x8(%rcx)
leaq 0x21130(%rip), %rax     # 0x2d85a
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
movq $0xf, 0x8(%rdx)
leaq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq %rdx, 0x8(%rax)
movl $0x8, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x251eb(%rip), %rdx     # 0x31950
leaq 0x2219b(%rip), %r9      # 0x2e907
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x910, %rsp            # imm = 0x910
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_unique_identifier
int
test_encode_attribute_v2_unique_identifier(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Unique Identifier - fb4b5b9c-6188-4c63-8142-fe9c328129fc
    */
    uint8 expected[48] = {
        0x42, 0x00, 0x94, 0x07, 0x00, 0x00, 0x00, 0x24,
        0x66, 0x62, 0x34, 0x62, 0x35, 0x62, 0x39, 0x63,
        0x2D, 0x36, 0x31, 0x38, 0x38, 0x2D, 0x34, 0x63,
        0x36, 0x33, 0x2D, 0x38, 0x31, 0x34, 0x32, 0x2D,
        0x66, 0x65, 0x39, 0x63, 0x33, 0x32, 0x38, 0x31,
        0x32, 0x39, 0x66, 0x63, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    TextString unique_identifier = {0};
    unique_identifier.value = "fb4b5b9c-6188-4c63-8142-fe9c328129fc";
    unique_identifier.size = 36;
    attribute.type = KMIP_ATTR_UNIQUE_IDENTIFIER;
    attribute.value = &unique_identifier;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    kmip_destroy(&ctx);

    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8f0, %rsp            # imm = 0x8F0
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x58(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x30, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0x218f2(%rip), %rax     # 0x2e2c3
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
movl $0x0, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x24fa0(%rip), %rdx     # 0x319a0
leaq 0x21f82(%rip), %r9      # 0x2e989
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_name
int
test_encode_attribute_v2_name(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Name
    *      Value - Template1
    *      Type - Uninterpreted Text String
    */
    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};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_2_0);

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    TextString name_value = {0};
    name_value.value = "Template1";
    name_value.size = 9;
    Name name = {0};
    name.value = &name_value;
    name.type = KMIP_NAME_UNINTERPRETED_TEXT_STRING;

    attribute.type = KMIP_ATTR_NAME;
    attribute.value = &name;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
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
movl $0x5, %ecx
callq 0x13177
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0x20d3e(%rip), %rax     # 0x2d7e0
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x9, 0x8(%rcx)
leaq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq %rcx, (%rax)
movl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl %ecx, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x24eeb(%rip), %rdx     # 0x319d0
leaq 0x21ec8(%rip), %r9      # 0x2e9b4
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x900, %rsp            # imm = 0x900
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_object_type
int
test_encode_attribute_v2_object_type(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Object Type - Symmetric Key
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x57, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    enum object_type object_type = KMIP_OBJTYPE_SYMMETRIC_KEY;
    attribute.type = KMIP_ATTR_OBJECT_TYPE;
    attribute.value = &object_type;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x38(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
movl $0x2, %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x20591(%rip), %rdx     # 0x2d130
leaq 0x21e2c(%rip), %r9      # 0x2e9d2
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_cryptographic_algorithm
int
test_encode_attribute_v2_cryptographic_algorithm(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Cryptographic Algorithm - AES
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x28, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    enum cryptographic_algorithm algorithm = KMIP_CRYPTOALG_AES;
    attribute.type = KMIP_ATTR_CRYPTOGRAPHIC_ALGORITHM;
    attribute.value = &algorithm;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x38(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
movl $0x3, %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x204e7(%rip), %rdx     # 0x2d140
leaq 0x21d97(%rip), %r9      # 0x2e9f7
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_cryptographic_length
int
test_encode_attribute_v2_cryptographic_length(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Cryptographic Length - 128
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x2A, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    int32 length = 128;
    attribute.type = KMIP_ATTR_CRYPTOGRAPHIC_LENGTH;
    attribute.value = &length;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x38(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0xc(%rsp), %rax
movl $0x80, (%rax)
movl $0x4, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x2043a(%rip), %rdx     # 0x2d150
leaq 0x21d0b(%rip), %r9      # 0x2ea28
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_cryptographic_usage_mask
int
test_encode_attribute_v2_cryptographic_usage_mask(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Cryptographic Usage Mask - Encrypt | Decrypt
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x2C, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    int32 mask = KMIP_CRYPTOMASK_ENCRYPT | KMIP_CRYPTOMASK_DECRYPT;
    attribute.type = KMIP_ATTR_CRYPTOGRAPHIC_USAGE_MASK;
    attribute.value = &mask;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x38(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0xc(%rsp), %rax
movl $0xc, (%rax)
movl $0x6, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x2038d(%rip), %rdx     # 0x2d160
leaq 0x21c7c(%rip), %r9      # 0x2ea56
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_state
int
test_encode_attribute_v2_state(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  State - Active
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x8D, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    enum state state = KMIP_STATE_ACTIVE;
    attribute.type = KMIP_ATTR_STATE;
    attribute.value = &state;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x38(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0xc(%rsp), %rax
movl $0x2, (%rax)
movl $0x7, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x202e0(%rip), %rdx     # 0x2d170
leaq 0x21bf1(%rip), %r9      # 0x2ea88
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8d0, %rsp            # imm = 0x8D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_object_group
int
test_encode_attribute_v2_object_group(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Object Group - RoundRobinTestGroup
    */
    uint8 expected[32] = {
        0x42, 0x00, 0x56, 0x07, 0x00, 0x00, 0x00, 0x13,
        0x52, 0x6F, 0x75, 0x6E, 0x64, 0x52, 0x6F, 0x62,
        0x69, 0x6E, 0x54, 0x65, 0x73, 0x74, 0x47, 0x72,
        0x6F, 0x75, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00
    };

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

    Attribute attribute = {0};
    kmip_init_attribute(&attribute);
    TextString object_group_value = {0};
    object_group_value.value = "RoundRobinTestGroup";
    object_group_value.size = 19;

    attribute.type = KMIP_ATTR_OBJECT_GROUP;
    attribute.value = &object_group_value;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);

    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)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x20, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
leaq 0x20ca2(%rip), %rax     # 0x2dbcf
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq $0x13, 0x8(%rcx)
movl $0x9, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x25c54(%rip), %rdx     # 0x32bb0
leaq 0x21b44(%rip), %r9      # 0x2eaa7
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_activation_date
int
test_encode_attribute_v2_activation_date(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following values:
    *  Activation Date - 2 (Thu Jan 01 01:00:02 UST 1970)
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x01, 0x09, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02
    };

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

    int64 date_time = 2;

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

    attribute.type = KMIP_ATTR_ACTIVATION_DATE;
    attribute.value = &date_time;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    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 $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
movl $0x5, %ecx
callq 0x13177
leaq 0x8(%rsp), %r13
movq $0x2, (%r13)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
movl $0xa, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x20163(%rip), %rdx     # 0x2d180
leaq 0x21aa9(%rip), %r9      # 0x2eacd
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_deactivation_date
int
test_encode_attribute_v2_deactivation_date(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following values:
    *  Deactivation Date - 1335514467 (Fri Apr 27 10:14:27 CEST 2012)
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x2F, 0x09, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x4F, 0x9A, 0x55, 0x63
    };

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

    int64 date_time = 1335514467;

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

    attribute.type = KMIP_ATTR_DEACTIVATION_DATE;
    attribute.value = &date_time;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    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 $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
movl $0x5, %ecx
callq 0x13177
leaq 0x8(%rsp), %r13
movq $0x4f9a5563, (%r13)     # imm = 0x4F9A5563
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
movl $0xb, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x200b0(%rip), %rdx     # 0x2d190
leaq 0x21a0f(%rip), %r9      # 0x2eaf6
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_process_start_date
int
test_encode_attribute_v2_process_start_date(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following values:
    *  Process Start Date - 1136113200 (Sun Jan 01 12:00:00 CET 2006)
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x43, 0xB7, 0xB6, 0x30
    };

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

    int64 date_time = 1136113200;

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

    attribute.type = KMIP_ATTR_PROCESS_START_DATE;
    attribute.value = &date_time;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    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 $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
movl $0x5, %ecx
callq 0x13177
leaq 0x8(%rsp), %r13
movq $0x43b7b630, (%r13)     # imm = 0x43B7B630
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
movl $0xc, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x1fffd(%rip), %rdx     # 0x2d1a0
leaq 0x21977(%rip), %r9      # 0x2eb21
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_protect_stop_date
int
test_encode_attribute_v2_protect_stop_date(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following values:
    *  Protect Stop Date - 1335514945 (Fri Apr 27 10:22:25 CEST 2012)
    */
    uint8 expected[16] = {
        0x42, 0x00, 0x68, 0x09, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x4F, 0x9A, 0x57, 0x41
    };

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

    int64 date_time = 1335514945;

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

    attribute.type = KMIP_ATTR_PROTECT_STOP_DATE;
    attribute.value = &date_time;

    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    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 $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
movl $0x5, %ecx
callq 0x13177
leaq 0x8(%rsp), %r13
movq $0x4f9a5741, (%r13)     # imm = 0x4F9A5741
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1388b
movl $0xd, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b29
leaq 0x1ff4a(%rip), %rdx     # 0x2d1b0
leaq 0x218e0(%rip), %r9      # 0x2eb4d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x8c8, %rsp            # imm = 0x8C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_cryptographic_parameters
int
test_encode_attribute_v2_cryptographic_parameters(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following values:
    *  Cryptographic Parameters
    *      Block Cipher Mode - CBC
    *      Padding Method - PKCS5
    *      Hashing Algorithm - SHA-1
    */
    uint8 expected[56] = {
        0x42, 0x00, 0x2B, 0x01, 0x00, 0x00, 0x00, 0x30,
        0x42, 0x00, 0x11, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x5F, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x38, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00
    };

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

    CryptographicParameters value = {0};
    kmip_init_cryptographic_parameters(&value);
    value.block_cipher_mode = KMIP_BLOCK_CBC;
    value.padding_method = KMIP_PAD_PKCS5;
    value.hashing_algorithm = KMIP_HASH_SHA1;

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

    attr.type = KMIP_ATTR_CRYPTOGRAPHIC_PARAMETERS;
    attr.value = &value;

    int result = kmip_encode_attribute_v2(&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 $0x938, %rsp            # imm = 0x938
movq %rdi, %r14
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq $0x0, 0x30(%r15)
leaq 0xa0(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x38, %edx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
leaq 0x50(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%r12)
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x138a6
movabsq $0x300000001, %rax      # imm = 0x300000001
movq %rax, (%r12)
movl $0x4, 0x8(%r12)
movq %rsp, %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
movq %r13, %rdi
callq 0x1388b
movl $0xe, (%r13)
movq %r12, 0x8(%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18b29
leaq 0x2468e(%rip), %rdx     # 0x31a00
leaq 0x217ff(%rip), %r9      # 0x2eb78
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x13455
movl %ebp, %eax
addq $0x938, %rsp            # imm = 0x938
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_attribute_v2_unsupported_attribute
int
test_encode_attribute_v2_unsupported_attribute(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[16] = {0};

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute attribute = {0};
    attribute.type = -1;
    int result = kmip_encode_attribute_v2(&ctx, &attribute);
    if(result != KMIP_ERROR_ATTR_UNSUPPORTED)
    {
        TEST_FAILED(tracker, __func__, __LINE__);
    }

    kmip_destroy(&ctx);

    TEST_PASSED(tracker, __func__);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8b8, %rsp            # imm = 0x8B8
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
leaq 0x20(%rsp), %r15
xorl %ebp, %ebp
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %r15, %rdi
movq %r14, %rsi
movl $0x5, %ecx
callq 0x13177
movq %rsp, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0x18b29
cmpl $-0x3, %eax
jne 0xd434
leaq 0x20(%rsp), %rdi
callq 0x13455
leaq 0x1fdf8(%rip), %rdi     # 0x2d217
leaq 0x21784(%rip), %rsi     # 0x2ebaa
xorl %eax, %eax
callq 0x1090
movl $0x4, %eax
jmp 0xd458
leaq 0x1fde7(%rip), %rdi     # 0x2d222
leaq 0x21768(%rip), %rsi     # 0x2ebaa
movl $0x23fb, %edx           # imm = 0x23FB
xorl %eax, %eax
callq 0x1090
movl $0x1, %ebp
movl $0x2, %eax
incw (%rbx,%rax)
movl %ebp, %eax
addq $0x8b8, %rsp            # imm = 0x8B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attributes_with_invalid_kmip_version
int
test_decode_attributes_with_invalid_kmip_version(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[] = {0};

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_4);

    Attributes observed = {0};
    int result = kmip_decode_attributes(&ctx, &observed);

    kmip_free_attributes(&ctx, &observed);
    kmip_destroy(&ctx);

    result = report_result(tracker, result, KMIP_INVALID_FOR_VERSION, __func__);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, %rbx
incw (%rdi)
leaq 0x7(%rsp), %r15
movb $0x0, (%r15)
leaq 0x10(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x4, %ecx
callq 0x13177
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1f6b9
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x13c9e
movq %r14, %rdi
callq 0x13455
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpl $-0xb, %ebp
setne %r14b
sete %r15b
leaq 0x1fb32(%rip), %rax     # 0x2d1d0
leaq 0x1fb72(%rip), %rdi     # 0x2d217
cmovneq %rax, %rdi
leaq 0x21540(%rip), %rsi     # 0x2ebf0
xorl %eax, %eax
callq 0x1090
incw 0x2(%rbx,%r15,2)
movl %r14d, %eax
addq $0x8a8, %rsp            # imm = 0x8A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_v2_unique_identifier
int
test_decode_attribute_v2_unique_identifier(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Unique Identifier - fb4b5b9c-6188-4c63-8142-fe9c328129fc
    */
    uint8 encoding[48] = {
        0x42, 0x00, 0x94, 0x07, 0x00, 0x00, 0x00, 0x24,
        0x66, 0x62, 0x34, 0x62, 0x35, 0x62, 0x39, 0x63,
        0x2D, 0x36, 0x31, 0x38, 0x38, 0x2D, 0x34, 0x63,
        0x36, 0x33, 0x2D, 0x38, 0x31, 0x34, 0x32, 0x2D,
        0x66, 0x65, 0x39, 0x63, 0x33, 0x32, 0x38, 0x31,
        0x32, 0x39, 0x66, 0x63, 0x00, 0x00, 0x00, 0x00
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    TextString unique_identifier = {0};
    unique_identifier.value = "fb4b5b9c-6188-4c63-8142-fe9c328129fc";
    unique_identifier.size = 36;
    expected.type = KMIP_ATTR_UNIQUE_IDENTIFIER;
    expected.value = &unique_identifier;

    Attribute observed = {0};
    int result = kmip_decode_attribute_v2(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        kmip_print_attribute(stderr, 1, &expected);
        kmip_print_attribute(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&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, %rbx
incw (%rdi)
movaps 0x23fef(%rip), %xmm0    # 0x319c0
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps 0x23fce(%rip), %xmm0    # 0x319b0
movaps %xmm0, 0x10(%r15)
movaps 0x23fb2(%rip), %xmm0    # 0x319a0
movaps %xmm0, (%r15)
leaq 0x68(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x30, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
leaq 0x2088d(%rip), %rax     # 0x2e2c3
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
movl $0x0, (%r15)
movq %rcx, 0x8(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ee71
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x15d75
testl %eax, %eax
jne 0xdaa3
movq 0x35579(%rip), %r14     # 0x42ff8
movq (%r14), %rdi
leaq 0x10(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
movq (%r14), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0x2b53a
xorl %eax, %eax
leaq 0x211fc(%rip), %r8      # 0x2eca6
leaq 0x68(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
movq %rsp, %rsi
movq %r14, %rdi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0x900, %rsp            # imm = 0x900
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_v2_object_type
int
test_decode_attribute_v2_object_type(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Object Type - Symmetric Key
    */
    uint8 encoding[16] = {
        0x42, 0x00, 0x57, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    enum object_type object_type = KMIP_OBJTYPE_SYMMETRIC_KEY;
    expected.type = KMIP_ATTR_OBJECT_TYPE;
    expected.value = &object_type;

    Attribute observed = {0};
    int result = kmip_decode_attribute_v2(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        kmip_print_attribute(stderr, 1, &expected);
        kmip_print_attribute(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&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, %rbx
incw (%rdi)
movaps 0x1f4eb(%rip), %xmm0    # 0x2d130
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
movl $0x2, %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, (%r15)
movq %rcx, 0x8(%r15)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ee71
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x15d75
testl %eax, %eax
jne 0xdcf4
movq 0x3532a(%rip), %r14     # 0x42ff8
movq (%r14), %rdi
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
movq (%r14), %rdi
leaq 0x10(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
xorl %eax, %eax
leaq 0x20ff4(%rip), %r8      # 0x2ecef
leaq 0x48(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_v2_cryptographic_algorithm
int
test_decode_attribute_v2_cryptographic_algorithm(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Cryptographic Algorithm - AES
    */
    uint8 encoding[16] = {
        0x42, 0x00, 0x28, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    enum cryptographic_algorithm algorithm = KMIP_CRYPTOALG_AES;
    expected.type = KMIP_ATTR_CRYPTOGRAPHIC_ALGORITHM;
    expected.value = &algorithm;

    Attribute observed = {0};
    int result = kmip_decode_attribute_v2(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        kmip_print_attribute(stderr, 1, &expected);
        kmip_print_attribute(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&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, %rbx
incw (%rdi)
movaps 0x1f3ec(%rip), %xmm0    # 0x2d140
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
movl $0x3, %eax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, (%r15)
movq %rcx, 0x8(%r15)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ee71
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x15d75
testl %eax, %eax
jne 0xde03
movq 0x3521b(%rip), %r14     # 0x42ff8
movq (%r14), %rdi
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
movq (%r14), %rdi
leaq 0x10(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
xorl %eax, %eax
leaq 0x20f0a(%rip), %r8      # 0x2ed14
leaq 0x48(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_v2_cryptographic_length
int
test_decode_attribute_v2_cryptographic_length(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Cryptographic Length - 128
    */
    uint8 encoding[16] = {
        0x42, 0x00, 0x2A, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    int32 length = 128;
    expected.type = KMIP_ATTR_CRYPTOGRAPHIC_LENGTH;
    expected.value = &length;

    Attribute observed = {0};
    int result = kmip_decode_attribute_v2(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        kmip_print_attribute(stderr, 1, &expected);
        kmip_print_attribute(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&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, %rbx
incw (%rdi)
movaps 0x1f2ed(%rip), %xmm0    # 0x2d150
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
leaq 0xc(%rsp), %rax
movl $0x80, (%rax)
movl $0x4, (%r15)
movq %rax, 0x8(%r15)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ee71
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x15d75
testl %eax, %eax
jne 0xdf15
movq 0x35109(%rip), %r14     # 0x42ff8
movq (%r14), %rdi
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
movq (%r14), %rdi
leaq 0x10(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
xorl %eax, %eax
leaq 0x20e29(%rip), %r8      # 0x2ed45
leaq 0x48(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_attribute_v2_cryptographic_usage_mask
int
test_decode_attribute_v2_cryptographic_usage_mask(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    /* This encoding matches the following value:
    *  Cryptographic Usage Mask - Encrypt | Decrypt
    */
    uint8 encoding[16] = {
        0x42, 0x00, 0x2C, 0x02, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    Attribute expected = {0};
    kmip_init_attribute(&expected);
    int32 mask = KMIP_CRYPTOMASK_ENCRYPT | KMIP_CRYPTOMASK_DECRYPT;
    expected.type = KMIP_ATTR_CRYPTOGRAPHIC_USAGE_MASK;
    expected.value = &mask;

    Attribute observed = {0};
    int result = kmip_decode_attribute_v2(&ctx, &observed);
    int comparison = kmip_compare_attribute(&expected, &observed);
    if(!comparison)
    {
        kmip_print_attribute(stderr, 1, &expected);
        kmip_print_attribute(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_attribute(&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, %rbx
incw (%rdi)
movaps 0x1f1eb(%rip), %xmm0    # 0x2d160
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x10, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13177
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x1388b
leaq 0xc(%rsp), %rax
movl $0xc, (%rax)
movl $0x6, (%r15)
movq %rax, 0x8(%r15)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1ee71
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x15d75
testl %eax, %eax
jne 0xe027
movq 0x34ff7(%rip), %r14     # 0x42ff8
movq (%r14), %rdi
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
movq (%r14), %rdi
leaq 0x10(%rsp), %rdx
movl $0x1, %esi
callq 0x2b53a
xorl %eax, %eax
leaq 0x20d45(%rip), %r8      # 0x2ed73
leaq 0x48(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x13afe
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq