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

    uint8 encoding[304] = {
        0x42, 0x00, 0x7B, 0x01, 0x00, 0x00, 0x01, 0x28, 
        0x42, 0x00, 0x7A, 0x01, 0x00, 0x00, 0x00, 0x48, 
        0x42, 0x00, 0x69, 0x01, 0x00, 0x00, 0x00, 0x20, 
        0x42, 0x00, 0x6A, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x6B, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x92, 0x09, 0x00, 0x00, 0x00, 0x08, 
        0x00, 0x00, 0x00, 0x00, 0x4F, 0x9A, 0x54, 0xE7, 
        0x42, 0x00, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
        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 protocol_version pv = {0};
    pv.major = 1;
    pv.minor = 0;
    
    struct response_header rh = {0};
    kmip_init_response_header(&rh);
    
    rh.protocol_version = &pv;
    rh.time_stamp = 1335514343;
    rh.batch_count = 1;
    
    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 rbi = {0};
    rbi.operation = KMIP_OP_GET;
    rbi.result_status = KMIP_STATUS_SUCCESS;
    rbi.response_payload = &grp;
    
    struct response_message expected = {0};
    expected.response_header = &rh;
    expected.batch_items = &rbi;
    expected.batch_count = 1;
    
    struct response_message observed = {0};
    
    int result = kmip_decode_response_message(&ctx, &observed);
    result = report_decoding_test_result(
        tracker,
        &ctx,
        kmip_compare_response_message(&expected, &observed),
        result,
        __func__);
    kmip_free_response_message(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb48, %rsp            # imm = 0xB48
movq %rdi, %rbx
incw (%rdi)
leaq 0x271b7(%rip), %rsi     # 0x33800
leaq 0x180(%rsp), %r15
movl $0x130, %edx            # imm = 0x130
movq %r15, %rdi
callq 0x1100
leaq 0x2b0(%rsp), %r14
xorl %r13d, %r13d
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x130, %edx            # imm = 0x130
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13747
movl $0x1, %ebp
leaq 0x8(%rsp), %r12
movq %rbp, (%r12)
leaq 0x130(%rsp), %r15
movq %r13, 0x40(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x13ef9
movq %r12, (%r15)
movq $0x4f9a54e7, 0x8(%r15)  # imm = 0x4F9A54E7
movl $0x1, %ecx
movl %ecx, 0x10(%r15)
leaq 0x20(%rsp), %rax
xorps %xmm1, %xmm1
movaps %xmm1, (%rax)
leaq 0x22f3d(%rip), %rdx     # 0x2f625
movq %rdx, (%rax)
movq $0x24, 0x8(%rax)
movaps 0x28446(%rip), %xmm0    # 0x34b40
leaq 0xb0(%rsp), %rdx
movaps %xmm0, (%rdx)
movabsq $-0x372cd6a8bace5eb4, %rsi # imm = 0xC8D329574531A14C
movq %rsi, 0x10(%rdx)
leaq 0x10(%rsp), %rsi
movaps %xmm1, (%rsi)
movq %rdx, (%rsi)
movq $0x18, 0x8(%rsi)
leaq 0x90(%rsp), %rdx
movaps %xmm1, (%rdx)
movq %r13, 0x10(%rdx)
movq %rsi, (%rdx)
leaq 0xd0(%rsp), %rsi
movaps %xmm1, (%rsi)
movaps %xmm1, 0x10(%rsi)
movq %r13, 0x20(%rsi)
movl %ecx, (%rsi)
movq %rdx, 0x8(%rsi)
movabsq $0x200000001, %rcx      # imm = 0x200000001
movq %rcx, 0x10(%rsi)
movl $0xa8, 0x18(%rsi)
movq %rsp, %rcx
movq %rsi, (%rcx)
leaq 0x70(%rsp), %rdx
movaps %xmm1, (%rdx)
movl $0x2, (%rdx)
movq %rax, 0x8(%rdx)
movq %rcx, 0x10(%rdx)
leaq 0x100(%rsp), %rax
movaps %xmm1, (%rax)
movaps %xmm1, 0x10(%rax)
movaps %xmm1, 0x20(%rax)
movl $0xa, (%rax)
movl $0x0, 0x10(%rax)
movq %rdx, 0x28(%rax)
leaq 0x50(%rsp), %r12
movaps %xmm1, (%r12)
xorps %xmm0, %xmm0
movq %r15, (%r12)
movq %rax, 0x8(%r12)
movq %rbp, 0x10(%r12)
leaq 0x30(%rsp), %r15
movq %r13, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x28e05
movl %eax, %ebp
movq %r12, %rdi
movq %r15, %rsi
callq 0x17c32
leaq 0x240b1(%rip), %r8      # 0x3089e
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1397
movl %eax, %ebx
movq %r14, %rdi
movq %r15, %rsi
callq 0x156ce
movq %r14, %rdi
callq 0x13a23
movl %ebx, %eax
addq $0xb48, %rsp            # imm = 0xB48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq