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

    uint8 expected[160] = {
        0x42, 0x00, 0x79, 0x01, 0x00, 0x00, 0x00, 0x98, 
        0x42, 0x00, 0x94, 0x07, 0x00, 0x00, 0x00, 0x24, 
        0x62, 0x66, 0x66, 0x37, 0x33, 0x34, 0x37, 0x62, 
        0x2D, 0x33, 0x61, 0x33, 0x39, 0x2D, 0x34, 0x63, 
        0x63, 0x62, 0x2D, 0x38, 0x32, 0x33, 0x34, 0x2D, 
        0x62, 0x61, 0x32, 0x35, 0x36, 0x30, 0x63, 0x61, 
        0x31, 0x35, 0x39, 0x38, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x47, 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
    };
    
    uint8 observed[160] = {0};
    struct kmip ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_1_0);
    
    struct text_string wrapping_uuid = {0};
    wrapping_uuid.value = "100182d5-72b8-47aa-8383-4d97d512e98a";
    wrapping_uuid.size = 36;
    struct text_string uuid = {0};
    uuid.value = "bff7347b-3a39-4ccb-8234-ba2560ca1598";
    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 = &wrapping_uuid;
    eki.cryptographic_parameters = &cp;
    
    struct key_wrapping_specification kws = {0};
    kws.wrapping_method = KMIP_WRAP_ENCRYPT;
    kws.encryption_key_info = &eki;
    
    struct get_request_payload grp = {0};
    grp.unique_identifier = &uuid;
    grp.key_wrapping_spec = &kws;
    
    int result = kmip_encode_get_request_payload(&ctx, &grp);
    result = report_encoding_test_result(
        tracker,
        &ctx,
        expected,
        observed,
        result,
        __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa10, %rsp            # imm = 0xA10
movq %rdi, %rbx
incw (%rdi)
leaq 0xd0(%rsp), %r14
movl $0xa0, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
leaq 0x178(%rsp), %r15
movl $0x898, %edx            # imm = 0x898
movq %r15, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0xa0, %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x13747
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x25632(%rip), %rcx     # 0x2fe49
movq %rcx, (%rax)
movl $0x24, %ecx
movq %rcx, 0x8(%rax)
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0x25c13(%rip), %rsi     # 0x30445
movq %rsi, (%rdx)
movq %rcx, 0x8(%rdx)
leaq 0x80(%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, %rsi
movaps %xmm0, (%rsi)
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
leaq 0x50(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movl $0x1, (%rax)
movq %rsi, 0x8(%rax)
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rdx, (%rsi)
movq %rax, 0x10(%rsi)
movq %r15, %rdi
callq 0x1a941
leaq 0x2899d(%rip), %rdx     # 0x33240
leaq 0x25bc0(%rip), %r9      # 0x3046a
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 $0xa10, %rsp            # imm = 0xA10
popq %rbx
popq %r14
popq %r15
retq