// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_decode_encryption_key_information
int
test_decode_encryption_key_information(TestTracker *tracker)
{
    TRACK_TEST(tracker);

    uint8 encoding[80] = {
        0x42, 0x00, 0x36, 0x01, 0x00, 0x00, 0x00, 0x48,
        0x42, 0x00, 0x94, 0x07, 0x00, 0x00, 0x00, 0x24,
        0x31, 0x30, 0x30, 0x31, 0x38, 0x32, 0x64, 0x35,
        0x2D, 0x37, 0x32, 0x62, 0x38, 0x2D, 0x34, 0x37, 
        0x61, 0x61, 0x2D, 0x38, 0x33, 0x38, 0x33, 0x2D,
        0x34, 0x64, 0x39, 0x37, 0x64, 0x35, 0x31, 0x32, 
        0x65, 0x39, 0x38, 0x61, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x00, 0x2B, 0x01, 0x00, 0x00, 0x00, 0x10, 
        0x42, 0x00, 0x11, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x0D, 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 = "100182d5-72b8-47aa-8383-4d97d512e98a";
    uuid.size = 36;
    
    struct cryptographic_parameters cp = {0};
    kmip_init_cryptographic_parameters(&cp);
    
    cp.block_cipher_mode = KMIP_BLOCK_NIST_KEY_WRAP;
    
    struct encryption_key_information expected = {0};
    expected.unique_identifier = &uuid;
    expected.cryptographic_parameters = &cp;
    
    struct encryption_key_information observed = {0};
    
    int result = kmip_decode_encryption_key_information(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_encryption_key_information(&expected, &observed),
        result,
        __func__);
    kmip_free_encryption_key_information(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x990, %rsp            # imm = 0x990
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x60(%rbp), %rdi
leaq 0x374d8(%rip), %rsi     # 0x42420
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 -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x34dfb(%rip), %rax     # 0x3fd91
movq %rax, -0x908(%rbp)
movq $0x24, -0x900(%rbp)
leaq -0x958(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
leaq -0x958(%rbp), %rdi
callq 0x1d370
movl $0xd, -0x958(%rbp)
leaq -0x968(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x908(%rbp), %rax
movq %rax, -0x968(%rbp)
leaq -0x958(%rbp), %rax
movq %rax, -0x960(%rbp)
leaq -0x978(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x8f8(%rbp), %rdi
leaq -0x978(%rbp), %rsi
callq 0x30020
movl %eax, -0x97c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x988(%rbp)
leaq -0x968(%rbp), %rdi
leaq -0x978(%rbp), %rsi
callq 0x21bd0
movq -0x988(%rbp), %rdi
movl %eax, %edx
movl -0x97c(%rbp), %ecx
leaq -0x8f8(%rbp), %rsi
leaq 0x34d76(%rip), %r8      # 0x3fddd
callq 0x13a0
movl %eax, -0x97c(%rbp)
leaq -0x8f8(%rbp), %rdi
leaq -0x978(%rbp), %rsi
callq 0x1df70
leaq -0x8f8(%rbp), %rdi
callq 0x1cab0
movl -0x97c(%rbp), %eax
addq $0x990, %rsp            # imm = 0x990
popq %rbp
retq