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

    uint8 expected[48] = {
        0x42, 0x00, 0x25, 0x01, 0x00, 0x00, 0x00, 0x28, 
        0x42, 0x00, 0x99, 0x07, 0x00, 0x00, 0x00, 0x04, 
        0x46, 0x72, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0xA1, 0x07, 0x00, 0x00, 0x00, 0x09, 
        0x70, 0x61, 0x73, 0x73, 0x77, 0x6F, 0x72, 0x64, 
        0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[48] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct text_string username = {0};
    username.value = "Fred";
    username.size = 4;
    struct text_string password = {0};
    password.value = "password1";
    password.size = 9;
    
    struct username_password_credential upc = {0};
    upc.username = &username;
    upc.password = &password;
    
    int result = kmip_encode_username_password_credential(&ctx, &upc);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x940, %rsp            # imm = 0x940
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x35228(%rip), %rsi     # 0x44b50
movl $0x30, %edx
callq 0x10c0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x30, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x30b33(%rip), %rax     # 0x404b9
movq %rax, -0x918(%rbp)
movq $0x4, -0x910(%rbp)
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x30b0c(%rip), %rax     # 0x404be
movq %rax, -0x928(%rbp)
movq $0x9, -0x920(%rbp)
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rax
movq %rax, -0x938(%rbp)
leaq -0x928(%rbp), %rax
movq %rax, -0x930(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x938(%rbp), %rsi
callq 0x28f30
movl %eax, -0x93c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movl -0x93c(%rbp), %r8d
leaq -0x908(%rbp), %rsi
leaq 0x30a9b(%rip), %r9      # 0x404c8
callq 0x11f0
movl %eax, -0x93c(%rbp)
leaq -0x908(%rbp), %rdi
callq 0x1cab0
movl -0x93c(%rbp), %eax
addq $0x940, %rsp            # imm = 0x940
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_username_password_credential
int
test_decode_username_password_credential(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[48] = {
        0x42, 0x00, 0x25, 0x01, 0x00, 0x00, 0x00, 0x28, 
        0x42, 0x00, 0x99, 0x07, 0x00, 0x00, 0x00, 0x04, 
        0x46, 0x72, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0xA1, 0x07, 0x00, 0x00, 0x00, 0x09, 
        0x70, 0x61, 0x73, 0x73, 0x77, 0x6F, 0x72, 0x64, 
        0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    struct text_string username = {0};
    username.value = "Fred";
    username.size = 4;
    struct text_string password = {0};
    password.value = "password1";
    password.size = 9;
    
    struct username_password_credential expected = {0};
    expected.username = &username;
    expected.password = &password;
    
    struct username_password_credential observed = {0};
    
    int result = kmip_decode_username_password_credential(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_username_password_credential(&expected, &observed),
        result,
        __func__);
    kmip_free_username_password_credential(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x930, %rsp            # imm = 0x930
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x350f8(%rip), %rsi     # 0x44b80
movl $0x30, %edx
callq 0x10c0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x40(%rbp), %rsi
leaq -0x8d8(%rbp), %rdi
movl $0x30, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x8e8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x309e3(%rip), %rax     # 0x404b9
movq %rax, -0x8e8(%rbp)
movq $0x4, -0x8e0(%rbp)
leaq -0x8f8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x309bc(%rip), %rax     # 0x404be
movq %rax, -0x8f8(%rbp)
movq $0x9, -0x8f0(%rbp)
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8e8(%rbp), %rax
movq %rax, -0x908(%rbp)
leaq -0x8f8(%rbp), %rax
movq %rax, -0x900(%rbp)
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x34920
movl %eax, -0x91c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x928(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x23400
movq -0x928(%rbp), %rdi
movl %eax, %edx
movl -0x91c(%rbp), %ecx
leaq -0x8d8(%rbp), %rsi
leaq 0x30947(%rip), %r8      # 0x404f1
callq 0x13a0
movl %eax, -0x91c(%rbp)
leaq -0x8d8(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x1efd0
leaq -0x8d8(%rbp), %rdi
callq 0x1cab0
movl -0x91c(%rbp), %eax
addq $0x930, %rsp            # imm = 0x930
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_credential_username_password_credential
int
test_encode_credential_username_password_credential(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[64] = {
        0x42, 0x00, 0x23, 0x01, 0x00, 0x00, 0x00, 0x38, 
        0x42, 0x00, 0x24, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x25, 0x01, 0x00, 0x00, 0x00, 0x20, 
        0x42, 0x00, 0x99, 0x07, 0x00, 0x00, 0x00, 0x06, 
        0x42, 0x61, 0x72, 0x6E, 0x65, 0x79, 0x00, 0x00, 
        0x42, 0x00, 0xA1, 0x07, 0x00, 0x00, 0x00, 0x07, 
        0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x32, 0x00
    };
    
    uint8 observed[64] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct text_string username = {0};
    username.value = "Barney";
    username.size = 6;
    struct text_string password = {0};
    password.value = "secret2";
    password.size = 7;
    
    struct username_password_credential upc = {0};
    upc.username = &username;
    upc.password = &password;
    
    struct credential c = {0};
    c.credential_type = KMIP_CRED_USERNAME_AND_PASSWORD;
    c.credential_value = &upc;
    
    int result = kmip_encode_credential(&ctx, &c);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x970, %rsp            # imm = 0x970
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x50(%rbp), %rdi
leaq 0x34f98(%rip), %rsi     # 0x44bb0
movl $0x40, %edx
callq 0x10c0
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x1090
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x90(%rbp), %rsi
leaq -0x928(%rbp), %rdi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x3089e(%rip), %rax     # 0x4051a
movq %rax, -0x938(%rbp)
movq $0x6, -0x930(%rbp)
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x30879(%rip), %rax     # 0x40521
movq %rax, -0x948(%rbp)
movq $0x7, -0x940(%rbp)
leaq -0x958(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x938(%rbp), %rax
movq %rax, -0x958(%rbp)
leaq -0x948(%rbp), %rax
movq %rax, -0x950(%rbp)
leaq -0x968(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
movl $0x1, -0x968(%rbp)
leaq -0x958(%rbp), %rax
movq %rax, -0x960(%rbp)
leaq -0x928(%rbp), %rdi
leaq -0x968(%rbp), %rsi
callq 0x29620
movl %eax, -0x96c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x50(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movl -0x96c(%rbp), %r8d
leaq -0x928(%rbp), %rsi
leaq 0x307d8(%rip), %r9      # 0x40529
callq 0x11f0
movl %eax, -0x96c(%rbp)
leaq -0x928(%rbp), %rdi
callq 0x1cab0
movl -0x96c(%rbp), %eax
addq $0x970, %rsp            # imm = 0x970
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_response_header
int
test_encode_response_header(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[80] = {
        0x42, 0x00, 0x7A, 0x01, 0x00, 0x00, 0x00, 0x48, 
        0x42, 0x00, 0x69, 0x01, 0x00, 0x00, 0x00, 0x20, 
        0x42, 0x00, 0x6A, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x6B, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x92, 0x09, 0x00, 0x00, 0x00, 0x08, 
        0x00, 0x00, 0x00, 0x00, 0x4F, 0x9A, 0x54, 0xE5, 
        0x42, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
    };
    
    uint8 observed[80] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct protocol_version pv = {0};
    pv.major = 1;
    pv.minor = 0;
    
    struct response_header rh = {0};
    kmip_init_response_header(&rh);
    
    rh.protocol_version = &pv;
    rh.time_stamp = 1335514341;
    rh.batch_count = 1;
    
    int result = kmip_encode_response_header(&ctx, &rh);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9a0, %rsp            # imm = 0x9A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x60(%rbp), %rdi
leaq 0x346b8(%rip), %rsi     # 0x44e30
movl $0x50, %edx
callq 0x10c0
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0xb0(%rbp), %rsi
leaq -0x948(%rbp), %rdi
movl $0x50, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x950(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x1090
movl $0x1, -0x950(%rbp)
movl $0x0, -0x94c(%rbp)
leaq -0x998(%rbp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x1090
leaq -0x998(%rbp), %rdi
callq 0x1d570
leaq -0x950(%rbp), %rax
movq %rax, -0x998(%rbp)
movq $0x4f9a54e5, -0x990(%rbp) # imm = 0x4F9A54E5
movl $0x1, -0x988(%rbp)
leaq -0x948(%rbp), %rdi
leaq -0x998(%rbp), %rsi
callq 0x29d40
movl %eax, -0x99c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
movl -0x99c(%rbp), %r8d
leaq -0x948(%rbp), %rsi
leaq 0x2fdcf(%rip), %r9      # 0x40637
callq 0x11f0
movl %eax, -0x99c(%rbp)
leaq -0x948(%rbp), %rdi
callq 0x1cab0
movl -0x99c(%rbp), %eax
addq $0x9a0, %rsp            # imm = 0x9A0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_response_header
int
test_decode_response_header(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[80] = {
        0x42, 0x00, 0x7A, 0x01, 0x00, 0x00, 0x00, 0x48, 
        0x42, 0x00, 0x69, 0x01, 0x00, 0x00, 0x00, 0x20, 
        0x42, 0x00, 0x6A, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x6B, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x92, 0x09, 0x00, 0x00, 0x00, 0x08, 
        0x00, 0x00, 0x00, 0x00, 0x4F, 0x9A, 0x54, 0xE5, 
        0x42, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
    };
    
    struct kmip ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_1_0);
    
    struct protocol_version pv = {0};
    pv.major = 1;
    pv.minor = 0;
    
    struct response_header expected = {0};
    kmip_init_response_header(&expected);
    
    expected.protocol_version = &pv;
    expected.time_stamp = 1335514341;
    expected.batch_count = 1;
    
    struct response_header observed = {0};
    kmip_init_response_header(&observed);
    
    int result = kmip_decode_response_header(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_response_header(&expected, &observed),
        result,
        __func__);
    kmip_free_response_header(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9a0, %rsp            # imm = 0x9A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x60(%rbp), %rdi
leaq 0x345c8(%rip), %rsi     # 0x44e80
movl $0x50, %edx
callq 0x10c0
leaq -0x8f8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x60(%rbp), %rsi
leaq -0x8f8(%rbp), %rdi
movl $0x50, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x900(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x1090
movl $0x1, -0x900(%rbp)
movl $0x0, -0x8fc(%rbp)
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x1090
leaq -0x948(%rbp), %rdi
callq 0x1d570
leaq -0x900(%rbp), %rax
movq %rax, -0x948(%rbp)
movq $0x4f9a54e5, -0x940(%rbp) # imm = 0x4F9A54E5
movl $0x1, -0x938(%rbp)
leaq -0x990(%rbp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x1090
leaq -0x990(%rbp), %rdi
callq 0x1d570
leaq -0x8f8(%rbp), %rdi
leaq -0x990(%rbp), %rsi
callq 0x364a0
movl %eax, -0x994(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x9a0(%rbp)
leaq -0x948(%rbp), %rdi
leaq -0x990(%rbp), %rsi
callq 0x23e80
movq -0x9a0(%rbp), %rdi
movl %eax, %edx
movl -0x994(%rbp), %ecx
leaq -0x8f8(%rbp), %rsi
leaq 0x2fc8b(%rip), %r8      # 0x40653
callq 0x13a0
movl %eax, -0x994(%rbp)
leaq -0x8f8(%rbp), %rdi
leaq -0x990(%rbp), %rsi
callq 0x1f6a0
leaq -0x8f8(%rbp), %rdi
callq 0x1cab0
movl -0x994(%rbp), %eax
addq $0x9a0, %rsp            # imm = 0x9A0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_request_batch_item_get_payload
int
test_encode_request_batch_item_get_payload(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 expected[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
    };
    
    uint8 observed[80] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct text_string uuid = {0};
    uuid.value = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;
    
    struct get_request_payload grp = {0};
    grp.unique_identifier = &uuid;
    
    struct request_batch_item rbi = {0};
    kmip_init_request_batch_item(&rbi);
    rbi.operation = KMIP_OP_GET;
    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 %rbp
movq %rsp, %rbp
subq $0x9a0, %rsp            # imm = 0x9A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x60(%rbp), %rdi
leaq 0x34498(%rip), %rsi     # 0x44ed0
movl $0x50, %edx
callq 0x10c0
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0xb0(%rbp), %rsi
leaq -0x948(%rbp), %rdi
movl $0x50, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x958(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2eab3(%rip), %rax     # 0x3f54f
movq %rax, -0x958(%rbp)
movq $0x24, -0x950(%rbp)
leaq -0x978(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x958(%rbp), %rax
movq %rax, -0x978(%rbp)
leaq -0x998(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x998(%rbp), %rdi
callq 0x1d5f0
movl $0xa, -0x998(%rbp)
leaq -0x978(%rbp), %rax
movq %rax, -0x988(%rbp)
leaq -0x948(%rbp), %rdi
leaq -0x998(%rbp), %rsi
callq 0x2a0b0
movl %eax, -0x99c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
movl -0x99c(%rbp), %r8d
leaq -0x948(%rbp), %rsi
leaq 0x2fb2c(%rip), %r9      # 0x4066f
callq 0x11f0
movl %eax, -0x99c(%rbp)
leaq -0x948(%rbp), %rdi
callq 0x1cab0
movl -0x99c(%rbp), %eax
addq $0x9a0, %rsp            # imm = 0x9A0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x28, %edx
movl $0x4, %ecx
callq 0x1c6e0
leaq -0x8d0(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
leaq -0x8d0(%rbp), %rsi
callq 0x26980
movl %eax, -0x8d4(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movq -0x8(%rbp), %rdi
movl -0x8d4(%rbp), %esi
movl $0xfffffff5, %edx       # imm = 0xFFFFFFF5
leaq 0x2e606(%rip), %rcx     # 0x4081e
callq 0x1490
movl %eax, -0x8d4(%rbp)
movl -0x8d4(%rbp), %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x950, %rsp            # imm = 0x950
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x333d8(%rip), %rsi     # 0x45640
movl $0x30, %edx
callq 0x10c0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x30, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rdi
callq 0x1d330
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2d4a0(%rip), %rax     # 0x3f788
movq %rax, -0x928(%rbp)
movq $0x3, -0x920(%rbp)
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2d478(%rip), %rax     # 0x3f78c
movq %rax, -0x938(%rbp)
movq $0xf, -0x930(%rbp)
leaq -0x948(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x928(%rbp), %rax
movq %rax, -0x948(%rbp)
leaq -0x938(%rbp), %rax
movq %rax, -0x940(%rbp)
movl $0x8, -0x918(%rbp)
leaq -0x948(%rbp), %rax
movq %rax, -0x910(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x26690
movl %eax, -0x94c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movl -0x94c(%rbp), %r8d
leaq -0x908(%rbp), %rsi
leaq 0x2e4a8(%rip), %r9      # 0x4084f
callq 0x11f0
movl %eax, -0x94c(%rbp)
leaq -0x908(%rbp), %rdi
callq 0x1cab0
movl -0x94c(%rbp), %eax
addq $0x950, %rsp            # imm = 0x950
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x930, %rsp            # imm = 0x930
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x32ff8(%rip), %rsi     # 0x45670
movl $0x30, %edx
callq 0x10c0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x30, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rdi
callq 0x1d330
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2db13(%rip), %rax     # 0x4020b
movq %rax, -0x928(%rbp)
movq $0x24, -0x920(%rbp)
movl $0x0, -0x918(%rbp)
leaq -0x928(%rbp), %rax
movq %rax, -0x910(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x26690
movl %eax, -0x92c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movl -0x92c(%rbp), %r8d
leaq -0x908(%rbp), %rsi
leaq 0x2e175(%rip), %r9      # 0x408d1
callq 0x11f0
movl %eax, -0x92c(%rbp)
leaq -0x908(%rbp), %rdi
callq 0x1cab0
movl -0x92c(%rbp), %eax
addq $0x930, %rsp            # imm = 0x930
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x940, %rsp            # imm = 0x940
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x40(%rbp), %rdi
leaq 0x32ee8(%rip), %rsi     # 0x456a0
movl $0x30, %edx
callq 0x10c0
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x30, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rdi
callq 0x1d330
leaq -0x928(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2ceda(%rip), %rax     # 0x3f712
movq %rax, -0x928(%rbp)
movq $0x9, -0x920(%rbp)
leaq -0x938(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x928(%rbp), %rax
movq %rax, -0x938(%rbp)
movl $0x1, -0x930(%rbp)
movl $0x1, -0x918(%rbp)
leaq -0x938(%rbp), %rax
movq %rax, -0x910(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x918(%rbp), %rsi
callq 0x26690
movl %eax, -0x93c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq -0x70(%rbp), %rcx
movl -0x93c(%rbp), %r8d
leaq -0x908(%rbp), %rsi
leaq 0x2e035(%rip), %r9      # 0x408fc
callq 0x11f0
movl %eax, -0x93c(%rbp)
leaq -0x908(%rbp), %rdi
callq 0x1cab0
movl -0x93c(%rbp), %eax
addq $0x940, %rsp            # imm = 0x940
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x348ac(%rip), %rax     # 0x471c0
movq %rax, -0x20(%rbp)
movq 0x348a9(%rip), %rax     # 0x471c8
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
movl $0x2, -0x8dc(%rbp)
movl $0x2, -0x8d8(%rbp)
leaq -0x8dc(%rbp), %rax
movq %rax, -0x8d0(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e0(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2df3f(%rip), %r9      # 0x4091a
callq 0x11f0
movl %eax, -0x8e0(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e0(%rbp), %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x3479c(%rip), %rax     # 0x471d0
movq %rax, -0x20(%rbp)
movq 0x34799(%rip), %rax     # 0x471d8
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
movl $0x3, -0x8dc(%rbp)
movl $0x3, -0x8d8(%rbp)
leaq -0x8dc(%rbp), %rax
movq %rax, -0x8d0(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e0(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2de44(%rip), %r9      # 0x4093f
callq 0x11f0
movl %eax, -0x8e0(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e0(%rbp), %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x3468c(%rip), %rax     # 0x471e0
movq %rax, -0x20(%rbp)
movq 0x34689(%rip), %rax     # 0x471e8
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
movl $0x80, -0x8dc(%rbp)
movl $0x4, -0x8d8(%rbp)
leaq -0x8dc(%rbp), %rax
movq %rax, -0x8d0(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e0(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2dd55(%rip), %r9      # 0x40970
callq 0x11f0
movl %eax, -0x8e0(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e0(%rbp), %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x3457c(%rip), %rax     # 0x471f0
movq %rax, -0x20(%rbp)
movq 0x34579(%rip), %rax     # 0x471f8
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
movl $0xc, -0x8dc(%rbp)
movl $0x6, -0x8d8(%rbp)
leaq -0x8dc(%rbp), %rax
movq %rax, -0x8d0(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e0(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2dc63(%rip), %r9      # 0x4099e
callq 0x11f0
movl %eax, -0x8e0(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e0(%rbp), %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8e0, %rsp            # imm = 0x8E0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x3446c(%rip), %rax     # 0x47200
movq %rax, -0x20(%rbp)
movq 0x34469(%rip), %rax     # 0x47208
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8d8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8d8(%rbp), %rdi
callq 0x1d330
movl $0x2, -0x8dc(%rbp)
movl $0x7, -0x8d8(%rbp)
leaq -0x8dc(%rbp), %rax
movq %rax, -0x8d0(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8d8(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e0(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2db75(%rip), %r9      # 0x409d0
callq 0x11f0
movl %eax, -0x8e0(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e0(%rbp), %eax
addq $0x8e0, %rsp            # imm = 0x8E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x910, %rsp            # imm = 0x910
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x343ec(%rip), %rax     # 0x472a0
movq %rax, -0x30(%rbp)
movq 0x343e9(%rip), %rax     # 0x472a8
movq %rax, -0x28(%rbp)
movq 0x343e6(%rip), %rax     # 0x472b0
movq %rax, -0x20(%rbp)
movq 0x343e3(%rip), %rax     # 0x472b8
movq %rax, -0x18(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x8e8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x50(%rbp), %rsi
leaq -0x8e8(%rbp), %rdi
movl $0x20, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x8f8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8f8(%rbp), %rdi
callq 0x1d330
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2cbc8(%rip), %rax     # 0x3fb17
movq %rax, -0x908(%rbp)
movq $0x13, -0x900(%rbp)
movl $0x9, -0x8f8(%rbp)
leaq -0x908(%rbp), %rax
movq %rax, -0x8f0(%rbp)
leaq -0x8e8(%rbp), %rdi
leaq -0x8f8(%rbp), %rsi
callq 0x26690
movl %eax, -0x90c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rdx
leaq -0x50(%rbp), %rcx
movl -0x90c(%rbp), %r8d
leaq -0x8e8(%rbp), %rsi
leaq 0x2da3c(%rip), %r9      # 0x409ef
callq 0x11f0
movl %eax, -0x90c(%rbp)
leaq -0x8e8(%rbp), %rdi
callq 0x1cab0
movl -0x90c(%rbp), %eax
addq $0x910, %rsp            # imm = 0x910
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8f0, %rsp            # imm = 0x8F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x3420c(%rip), %rax     # 0x47210
movq %rax, -0x20(%rbp)
movq 0x34209(%rip), %rax     # 0x47218
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
movq $0x2, -0x8d0(%rbp)
leaq -0x8e0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8e0(%rbp), %rdi
callq 0x1d330
movl $0xa, -0x8e0(%rbp)
leaq -0x8d0(%rbp), %rax
movq %rax, -0x8d8(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8e0(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e4(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e4(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2d949(%rip), %r9      # 0x40a15
callq 0x11f0
movl %eax, -0x8e4(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e4(%rbp), %eax
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8f0, %rsp            # imm = 0x8F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x340fc(%rip), %rax     # 0x47220
movq %rax, -0x20(%rbp)
movq 0x340f9(%rip), %rax     # 0x47228
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
movq $0x4f9a5563, -0x8d0(%rbp) # imm = 0x4F9A5563
leaq -0x8e0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8e0(%rbp), %rdi
callq 0x1d330
movl $0xb, -0x8e0(%rbp)
leaq -0x8d0(%rbp), %rax
movq %rax, -0x8d8(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8e0(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e4(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e4(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2d852(%rip), %r9      # 0x40a3e
callq 0x11f0
movl %eax, -0x8e4(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e4(%rbp), %eax
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x8f0, %rsp            # imm = 0x8F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
movq 0x33fec(%rip), %rax     # 0x47230
movq %rax, -0x20(%rbp)
movq 0x33fe9(%rip), %rax     # 0x47238
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8c8(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x30(%rbp), %rsi
leaq -0x8c8(%rbp), %rdi
movl $0x10, %edx
movl $0x5, %ecx
callq 0x1c6e0
movq $0x43b7b630, -0x8d0(%rbp) # imm = 0x43B7B630
leaq -0x8e0(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8e0(%rbp), %rdi
callq 0x1d330
movl $0xc, -0x8e0(%rbp)
leaq -0x8d0(%rbp), %rax
movq %rax, -0x8d8(%rbp)
leaq -0x8c8(%rbp), %rdi
leaq -0x8e0(%rbp), %rsi
callq 0x26690
movl %eax, -0x8e4(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl -0x8e4(%rbp), %r8d
leaq -0x8c8(%rbp), %rsi
leaq 0x2d75d(%rip), %r9      # 0x40a69
callq 0x11f0
movl %eax, -0x8e4(%rbp)
leaq -0x8c8(%rbp), %rdi
callq 0x1cab0
movl -0x8e4(%rbp), %eax
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbp
retq
nopw %cs:(%rax,%rax)