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

    /* This encoding matches the following set of values:
    *  Batch Item
    *      Operation - Get
    *      Ephemeral - False
    *      Request Payload
    *          Unique Identifier - 49a1ca88-6bea-4fb2-b450-7e58802c3038
    */
    uint8 expected[96] = {
        0x42, 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x58,
        0x42, 0x00, 0x5C, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x01, 0x54, 0x06, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x79, 0x01, 0x00, 0x00, 0x00, 0x30,
        0x42, 0x00, 0x94, 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[96] = {0};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_2_0);

    TextString uuid = {0};
    uuid.value = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;

    GetRequestPayload grp = {0};
    grp.unique_identifier = &uuid;

    RequestBatchItem rbi = {0};
    kmip_init_request_batch_item(&rbi);
    rbi.operation = KMIP_OP_GET;
    rbi.ephemeral = KMIP_FALSE;
    rbi.request_payload = &grp;

    int result = kmip_encode_request_batch_item(&ctx, &rbi);
    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 $0x950, %rsp            # imm = 0x950
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x50(%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 0xb8(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x60
popq %rdx
pushq $0x5
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x128ed
leaq 0x1b222(%rip), %rax     # 0x26625
movq %rsp, %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
leaq 0x30(%rsp), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
andq $0x0, 0x18(%r13)
movq %rcx, (%r13)
leaq 0x10(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12f19
movl $0xa, (%r12)
andl $0x0, 0x18(%r12)
movq %r13, 0x10(%r12)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1987d
leaq 0x1f1ac(%rip), %rdx     # 0x2a610
leaq 0x1c2e7(%rip), %r9      # 0x27752
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 $0x950, %rsp            # imm = 0x950
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_request_batch_item_get_payload
int
test_decode_request_batch_item_get_payload(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[80] = {
        0x42, 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x48, 
        0x42, 0x00, 0x5C, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x79, 0x01, 0x00, 0x00, 0x00, 0x30, 
        0x42, 0x00, 0x94, 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 get_request_payload grp = {0};
    grp.unique_identifier = &uuid;
    
    struct request_batch_item expected = {0};
    kmip_init_request_batch_item(&expected);
    expected.operation = KMIP_OP_GET;
    expected.request_payload = &grp;
    
    struct request_batch_item observed = {0};
    kmip_init_request_batch_item(&observed);
    
    int result = kmip_decode_request_batch_item(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_request_batch_item(&expected, &observed),
        result,
        __func__);
    kmip_free_request_batch_item(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x960, %rsp            # imm = 0x960
movq %rdi, %r14
incw (%rdi)
leaq 0x1f10b(%rip), %rsi     # 0x2a5c0
pushq $0xa
popq %rcx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xc8(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x50
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x128ed
leaq 0x1b134(%rip), %rax     # 0x26625
movq %rsp, %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r15
movups %xmm0, 0x8(%r15)
andq $0x0, 0x18(%r15)
movq %rcx, (%r15)
leaq 0x30(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12f19
movl $0xa, (%r12)
movq %r15, 0x10(%r12)
leaq 0x10(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12f19
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ec43
movl %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x15949
leaq 0x1c215(%rip), %r8      # 0x27786
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13a18
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x960, %rsp            # imm = 0x960
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_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 %rbx
subq $0x8d8, %rsp            # imm = 0x8D8
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
andq $0x0, 0x20(%r14)
leaq 0x40(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x28
popq %rdx
pushq $0x4
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x128ed
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %r15, %rdi
callq 0x17866
movl %eax, %ebp
movq %r15, %rdi
callq 0x12ade
leaq 0x1b6eb(%rip), %rcx     # 0x278d6
pushq $-0xb
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x13dc
addq $0x8d8, %rsp            # imm = 0x8D8
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_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
pushq $0x30
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0x1a5e6(%rip), %rax     # 0x26856
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movq $0x3, 0x8(%rcx)
leaq 0x1a5d3(%rip), %rax     # 0x2685a
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 0x176cf
leaq 0x1e68e(%rip), %rdx     # 0x2a950
leaq 0x1b63e(%rip), %r9      # 0x27907
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 $0x910, %rsp            # imm = 0x910
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_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
pushq $0x30
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0x1adb0(%rip), %rax     # 0x272c3
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
andl $0x0, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x1e461(%rip), %rdx     # 0x2a9a0
leaq 0x1b443(%rip), %r9      # 0x27989
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 $0x8f0, %rsp            # imm = 0x8F0
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_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
pushq $0x30
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0x1a203(%rip), %rax     # 0x267e0
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x9, 0x8(%rcx)
leaq 0x10(%rsp), %rax
andq $0x0, 0x8(%rax)
movq %rcx, (%rax)
pushq $0x1
popq %rcx
movl %ecx, 0x8(%rax)
movl %ecx, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x1e3b5(%rip), %rdx     # 0x2a9d0
leaq 0x1b392(%rip), %r9      # 0x279b4
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 $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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
pushq $0x2
popq %rax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x19a61(%rip), %rdx     # 0x26130
leaq 0x1b2fc(%rip), %r9      # 0x279d2
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 $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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
pushq $0x3
popq %rax
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, (%r12)
movq %rcx, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x199bd(%rip), %rdx     # 0x26140
leaq 0x1b26d(%rip), %r9      # 0x279f7
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 $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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0xc(%rsp), %rax
movl $0x80, (%rax)
movl $0x4, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x19914(%rip), %rdx     # 0x26150
leaq 0x1b1e5(%rip), %r9      # 0x27a28
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 $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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0xc(%rsp), %rax
movl $0xc, (%rax)
movl $0x6, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x1986b(%rip), %rdx     # 0x26160
leaq 0x1b15a(%rip), %r9      # 0x27a56
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 $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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0xc(%rsp), %rax
movl $0x2, (%rax)
movl $0x7, (%r12)
movq %rax, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x197c2(%rip), %rdx     # 0x26170
leaq 0x1b0d3(%rip), %r9      # 0x27a88
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 $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_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
pushq $0x20
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
leaq 0x1a188(%rip), %rax     # 0x26bcf
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 0x176cf
leaq 0x1f13a(%rip), %rdx     # 0x2bbb0
leaq 0x1b02a(%rip), %r9      # 0x27aa7
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 $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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x8(%rsp), %r13
movq $0x2, (%r13)
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl $0xa, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x1964d(%rip), %rdx     # 0x26180
leaq 0x1af93(%rip), %r9      # 0x27acd
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 %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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x8(%rsp), %r13
movq $0x4f9a5563, (%r13)     # imm = 0x4F9A5563
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl $0xb, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x1959e(%rip), %rdx     # 0x26190
leaq 0x1aefd(%rip), %r9      # 0x27af6
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 %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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x8(%rsp), %r13
movq $0x43b7b630, (%r13)     # imm = 0x43B7B630
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl $0xc, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x194ef(%rip), %rdx     # 0x261a0
leaq 0x1ae69(%rip), %r9      # 0x27b21
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 %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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x8(%rsp), %r13
movq $0x4f9a5741, (%r13)     # imm = 0x4F9A5741
leaq 0x10(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x12e6d
movl $0xd, (%r12)
movq %r13, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x176cf
leaq 0x19440(%rip), %rdx     # 0x261b0
leaq 0x1add6(%rip), %r9      # 0x27b4d
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 %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_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)
andq $0x0, 0x30(%r15)
leaq 0xa0(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x38
popq %rdx
pushq $0x5
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x128ed
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 0x12e85
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 0x12e6d
movl $0xe, (%r13)
movq %r12, 0x8(%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x176cf
leaq 0x1db8b(%rip), %rdx     # 0x2aa00
leaq 0x1acfc(%rip), %r9      # 0x27b78
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_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
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x128ed
movq %rsp, %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
orl $-0x1, (%rsi)
movq %r15, %rdi
callq 0x176cf
cmpl $-0x3, %eax
jne 0xcf2d
leaq 0x20(%rsp), %rdi
callq 0x12ade
leaq 0x192fc(%rip), %rdi     # 0x26217
leaq 0x1ac88(%rip), %rsi     # 0x27baa
xorl %eax, %eax
callq 0x1090
pushq $0x4
jmp 0xcf4c
leaq 0x192ee(%rip), %rdi     # 0x26222
leaq 0x1ac6f(%rip), %rsi     # 0x27baa
movl $0x23fb, %edx           # imm = 0x23FB
xorl %eax, %eax
callq 0x1090
pushq $0x1
popq %rbp
pushq $0x2
popq %rax
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_O2/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
pushq $0x1
popq %rdx
pushq $0x4
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x128ed
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1c766
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x131ec
movq %r14, %rdi
callq 0x12ade
leaq 0x1aa7a(%rip), %rcx     # 0x27bf0
pushq $-0xb
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x13dc
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_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 0x1d541(%rip), %xmm0    # 0x2a9c0
leaq 0x30(%rsp), %r15
movaps %xmm0, 0x20(%r15)
movaps 0x1d520(%rip), %xmm0    # 0x2a9b0
movaps %xmm0, 0x10(%r15)
movaps 0x1d504(%rip), %xmm0    # 0x2a9a0
movaps %xmm0, (%r15)
leaq 0x68(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x30
popq %rdx
pushq $0x5
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x128ed
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
leaq 0x19de3(%rip), %rax     # 0x272c3
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
andl $0x0, (%r15)
movq $0x24, 0x8(%rcx)
movq %rcx, 0x8(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1bfe7
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14d69
movl %eax, %r14d
testl %eax, %eax
jne 0xd54d
movq 0x30acf(%rip), %r12     # 0x3dff8
movq (%r12), %rdi
pushq $0x1
popq %r15
leaq 0x10(%rsp), %rdx
movl %r15d, %esi
callq 0x23eff
movq (%r12), %rdi
movq %rsp, %rdx
movl %r15d, %esi
callq 0x23eff
leaq 0x1a752(%rip), %r8      # 0x27ca6
leaq 0x68(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1309a
movq %r15, %rdi
callq 0x12ade
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_O2/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 0x18a45(%rip), %xmm0    # 0x26130
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x48(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x10
popq %rdx
pushq $0x5
popq %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x128ed
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e6d
pushq $0x2
popq %rax
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 0x1bfe7
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x14d69
movl %eax, %r14d
testl %eax, %eax
jne 0xd797
movq 0x30887(%rip), %r12     # 0x3dff8
movq (%r12), %rdi
pushq $0x1
popq %r15
leaq 0x20(%rsp), %rdx
movl %r15d, %esi
callq 0x23eff
movq (%r12), %rdi
leaq 0x10(%rsp), %rdx
movl %r15d, %esi
callq 0x23eff
leaq 0x1a551(%rip), %r8      # 0x27cef
leaq 0x48(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x1309a
movq %r15, %rdi
callq 0x12ade
movl %ebx, %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq