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

    uint8 encoding[216] = {
        0x42, 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0xD0, 
        0x42, 0x00, 0x5C, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x7F, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x7C, 0x01, 0x00, 0x00, 0x00, 0xA8, 
        0x42, 0x00, 0x57, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x94, 0x07, 0x00, 0x00, 0x00, 0x24, 
        0x34, 0x39, 0x61, 0x31, 0x63, 0x61, 0x38, 0x38, 
        0x2D, 0x36, 0x62, 0x65, 0x61, 0x2D, 0x34, 0x66, 
        0x62, 0x32, 0x2D, 0x62, 0x34, 0x35, 0x30, 0x2D, 
        0x37, 0x65, 0x35, 0x38, 0x38, 0x30, 0x32, 0x63, 
        0x33, 0x30, 0x33, 0x38, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x8F, 0x01, 0x00, 0x00, 0x00, 0x60, 
        0x42, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x58, 
        0x42, 0x00, 0x42, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x45, 0x01, 0x00, 0x00, 0x00, 0x20, 
        0x42, 0x00, 0x43, 0x08, 0x00, 0x00, 0x00, 0x18, 
        0x73, 0x67, 0x57, 0x80, 0x51, 0x01, 0x2A, 0x6D, 
        0x13, 0x4A, 0x85, 0x5E, 0x25, 0xC8, 0xCD, 0x5E, 
        0x4C, 0xA1, 0x31, 0x45, 0x57, 0x29, 0xD3, 0xC8, 
        0x42, 0x00, 0x28, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x2A, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0xA8, 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 = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;
    
    uint8 value[24] = {
        0x73, 0x67, 0x57, 0x80, 0x51, 0x01, 0x2A, 0x6D, 
        0x13, 0x4A, 0x85, 0x5E, 0x25, 0xC8, 0xCD, 0x5E, 
        0x4C, 0xA1, 0x31, 0x45, 0x57, 0x29, 0xD3, 0xC8
    };
    
    struct byte_string v = {0};
    v.value = value;
    v.size = ARRAY_LENGTH(value);
    
    struct key_value kv = {0};
    kv.key_material = &v;
    
    struct key_block kb = {0};
    kb.key_format_type = KMIP_KEYFORMAT_RAW;
    kb.key_value = &kv;
    kb.key_value_type = KMIP_TYPE_STRUCTURE;
    kb.cryptographic_algorithm = KMIP_CRYPTOALG_TRIPLE_DES;
    kb.cryptographic_length = 168;
    
    struct symmetric_key key = {0};
    key.key_block = &kb;
    
    struct get_response_payload grp = {0};
    grp.object_type = KMIP_OBJTYPE_SYMMETRIC_KEY;
    grp.unique_identifier = &uuid;
    grp.object = &key;
    
    struct response_batch_item expected = {0};
    expected.operation = KMIP_OP_GET;
    expected.result_status = KMIP_STATUS_SUCCESS;
    expected.response_payload = &grp;
    
    struct response_batch_item observed = {0};
    
    int result = kmip_decode_response_batch_item(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_response_batch_item(&expected, &observed),
        result,
        __func__);
    kmip_free_response_batch_item(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa80, %rsp            # imm = 0xA80
movq %rdi, %rbx
incw (%rdi)
leaq 0x259be(%rip), %rsi     # 0x31670
leaq 0x110(%rsp), %r15
movl $0xd8, %edx
movq %r15, %rdi
callq 0x1100
leaq 0x1e8(%rsp), %r14
xorl %r12d, %r12d
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0xd8, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
leaq 0x2192b(%rip), %rax     # 0x2d625
leaq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
movaps 0x26e1f(%rip), %xmm0    # 0x32b30
leaq 0x30(%rsp), %rax
movaps %xmm0, (%rax)
movabsq $-0x372cd6a8bace5eb4, %rdx # imm = 0xC8D329574531A14C
movq %rdx, 0x10(%rax)
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
movq $0x18, 0x8(%rdx)
xorps %xmm0, %xmm0
leaq 0x68(%rsp), %rax
movups %xmm0, 0x8(%rax)
movq %rdx, (%rax)
leaq 0x80(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movq %r12, 0x20(%rdx)
movl $0x1, (%rdx)
movq %rax, 0x8(%rdx)
movabsq $0x200000001, %rax      # imm = 0x200000001
movq %rax, 0x10(%rdx)
movl $0xa8, 0x18(%rdx)
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
leaq 0x50(%rsp), %rdx
movq %r12, (%rdx)
movl $0x2, (%rdx)
movq %rcx, 0x8(%rdx)
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %r15
movaps %xmm0, (%r15)
movq %r12, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movl $0xa, (%r15)
movq %rdx, 0x28(%r15)
leaq 0xb0(%rsp), %r12
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x245d2
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x16aa9
leaq 0x22a23(%rip), %r8      # 0x2e811
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0x14773
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0xa80, %rsp            # imm = 0xA80
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq