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

    uint8 expected[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
    };
    
    uint8 observed[120] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_1);
    
    struct text_string uuid = {0};
    uuid.value = "100182d5-72b8-47aa-8383-4d97d512e98a";
    uuid.size = 36;
    
    struct cryptographic_parameters cp = {0};
    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 kwd = {0};
    kwd.wrapping_method = KMIP_WRAP_ENCRYPT;
    kwd.encryption_key_info = &eki;
    kwd.encoding_option = KMIP_ENCODE_NO_ENCODING;
    
    int result = kmip_encode_key_wrapping_data(&ctx, &kwd);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x9b8, %rsp            # imm = 0x9B8
movq %rdi, %rbx
incw (%rdi)
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %r14
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq $0x0, 0x70(%r14)
leaq 0x120(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x1, %ebp
movl $0x78, %edx
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x13747
leaq 0x10(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x20ad3(%rip), %rcx     # 0x2fe49
movq %rcx, (%rax)
movq $0x24, 0x8(%rax)
leaq 0x50(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x40(%rcx)
movaps %xmm0, 0x30(%rcx)
movaps %xmm0, 0x20(%rcx)
movaps %xmm0, 0x10(%rcx)
movl $0xd, (%rcx)
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq %rax, (%rdx)
movq %rcx, 0x8(%rdx)
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movl %ebp, (%rsi)
movq %rdx, 0x8(%rsi)
movl %ebp, 0x28(%rsi)
movq %r15, %rdi
callq 0x19b64
leaq 0x2482c(%rip), %rdx     # 0x33c00
leaq 0x21bd8(%rip), %r9      # 0x30fb3
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
movl %eax, %r8d
callq 0x123c
movl %eax, %ebx
movq %r15, %rdi
callq 0x13a23
movl %ebx, %eax
addq $0x9b8, %rsp            # imm = 0x9B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq