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

    uint8 encoding[104] = {
        0x42, 0x00, 0x46, 0x01, 0x00, 0x00, 0x00, 0x60, 
        0x42, 0x00, 0x9E, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        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 eki = {0};
    eki.unique_identifier = &uuid;
    eki.cryptographic_parameters = &cp;
    
    struct key_wrapping_data expected = {0};
    expected.wrapping_method = KMIP_WRAP_ENCRYPT;
    expected.encryption_key_info = &eki;
    
    struct key_wrapping_data observed = {0};
    
    int result = kmip_decode_key_wrapping_data(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_key_wrapping_data(&expected, &observed),
        result,
        __func__);
    kmip_free_key_wrapping_data(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9f0, %rsp            # imm = 0x9F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x70(%rbp), %rdi
leaq 0x37068(%rip), %rsi     # 0x42580
movl $0x68, %edx
callq 0x10c0
leaq -0x908(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0x70(%rbp), %rsi
leaq -0x908(%rbp), %rdi
movl $0x68, %edx
xorl %ecx, %ecx
callq 0x1c6e0
leaq -0x918(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x3482b(%rip), %rax     # 0x3fd91
movq %rax, -0x918(%rbp)
movq $0x24, -0x910(%rbp)
leaq -0x968(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x1090
leaq -0x968(%rbp), %rdi
callq 0x1d370
movl $0xd, -0x968(%rbp)
leaq -0x978(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq -0x918(%rbp), %rax
movq %rax, -0x978(%rbp)
leaq -0x968(%rbp), %rax
movq %rax, -0x970(%rbp)
leaq -0x9a8(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x1090
movl $0x1, -0x9a8(%rbp)
leaq -0x978(%rbp), %rax
movq %rax, -0x9a0(%rbp)
leaq -0x9d8(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x1090
leaq -0x908(%rbp), %rdi
leaq -0x9d8(%rbp), %rsi
callq 0x30580
movl %eax, -0x9dc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x9e8(%rbp)
leaq -0x9a8(%rbp), %rdi
leaq -0x9d8(%rbp), %rsi
callq 0x21dd0
movq -0x9e8(%rbp), %rdi
movl %eax, %edx
movl -0x9dc(%rbp), %ecx
leaq -0x908(%rbp), %rsi
leaq 0x34814(%rip), %r8      # 0x3fe76
callq 0x13a0
movl %eax, -0x9dc(%rbp)
leaq -0x908(%rbp), %rdi
leaq -0x9d8(%rbp), %rsi
callq 0x1e0d0
leaq -0x908(%rbp), %rdi
callq 0x1cab0
movl -0x9dc(%rbp), %eax
addq $0x9f0, %rsp            # imm = 0x9F0
popq %rbp
retq
nopl (%rax,%rax)