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

    uint8 encoding[120] = {
        0x42, 0x00, 0x46, 0x01, 0x00, 0x00, 0x00, 0x70, 
        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,
        0x42, 0x00, 0xA3, 0x05, 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_1);
    
    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;
    expected.encoding_option = KMIP_ENCODE_NO_ENCODING;
    
    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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x9e0, %rsp            # imm = 0x9E0
movq %rdi, %r14
incw (%rdi)
leaq 0x1c13a(%rip), %rsi     # 0x2abf0
pushq $0xf
popq %rcx
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x148(%rsp), %rbx
movl $0x898, %edx            # imm = 0x898
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
pushq $0x78
popq %rdx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %ecx
callq 0x128ed
leaq 0x18351(%rip), %rax     # 0x26e49
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movq $0x24, 0x8(%r12)
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %r15
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x12e85
movl $0xd, (%r15)
movq %rsp, %rax
movq %r12, (%rax)
movq %r15, 0x8(%rax)
leaq 0x50(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movl %ebp, (%r15)
movq %rax, 0x8(%r15)
movl %ebp, 0x28(%r15)
leaq 0x20(%rsp), %r12
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1d2f4
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x152fe
leaq 0x1944a(%rip), %r8      # 0x27fe6
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x134d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x134e9
movq %rbx, %rdi
callq 0x12ade
movl %ebp, %eax
addq $0x9e0, %rsp            # imm = 0x9E0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq