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

    uint8 encoding[152] = {
        0x42, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x90, 
        0x42, 0x00, 0x77, 0x01, 0x00, 0x00, 0x00, 0x38, 
        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, 0x0D, 0x02, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x48, 
        0x42, 0x00, 0x5C, 0x05, 0x00, 0x00, 0x00, 0x04, 
        0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 
        0x42, 0x00, 0x79, 0x01, 0x00, 0x00, 0x00, 0x30, 
        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
    };
    
    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 request_header rh = {0};
    kmip_init_request_header(&rh);
    
    rh.protocol_version = &pv;
    rh.batch_count = 1;
    
    struct text_string uuid = {0};
    uuid.value = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;
    
    struct get_request_payload grp = {0};
    grp.unique_identifier = &uuid;
    
    struct request_batch_item rbi = {0};
    kmip_init_request_batch_item(&rbi);
    rbi.operation = KMIP_OP_GET;
    rbi.request_payload = &grp;
    
    struct request_message expected = {0};
    expected.request_header = &rh;
    expected.batch_items = &rbi;
    expected.batch_count = 1;
    
    struct request_message observed = {0};
    
    int result = kmip_decode_request_message(&ctx, &observed);
    int comparison = kmip_compare_request_message(&expected, &observed);
    if(!comparison)
    {
        kmip_print_request_message(stderr, &expected);
        kmip_print_request_message(stderr, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

    kmip_free_request_message(&ctx, &observed);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa28, %rsp            # imm = 0xA28
movq %rdi, 0x8(%rsp)
incw (%rdi)
leaq 0x257c6(%rip), %rsi     # 0x31750
leaq 0xf0(%rsp), %r15
movl $0x98, %edx
movq %r15, %rdi
callq 0x1100
leaq 0x190(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x98, %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x13177
movl $0x1, %ebp
leaq 0x30(%rsp), %r12
movq %rbp, (%r12)
xorps %xmm0, %xmm0
leaq 0xa0(%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 0x138f0
movq %r12, (%r15)
movl $0x1, 0x28(%r15)
leaq 0x21612(%rip), %rax     # 0x2d625
leaq 0x50(%rsp), %rcx
movq %rax, (%rcx)
movq $0x24, 0x8(%rcx)
leaq 0x80(%rsp), %r13
xorl %eax, %eax
movq %rax, 0x18(%r13)
xorl %ebx, %ebx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movq %rcx, (%r13)
leaq 0x60(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x1394a
movl $0xa, (%r12)
movq %r13, 0x10(%r12)
leaq 0x38(%rsp), %r13
movq %r15, (%r13)
movq %r12, 0x8(%r13)
movq %rbp, 0x10(%r13)
leaq 0x10(%rsp), %r15
movq %rbx, 0x10(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x278c9
movl %eax, %ebp
movq %r13, %rdi
movq %r15, %rsi
callq 0x173a7
testl %eax, %eax
jne 0xc0c4
movq 0x36f50(%rip), %r14     # 0x42ff8
movq (%r14), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2c814
movq (%r14), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2c814
xorl %eax, %eax
leaq 0x22792(%rip), %r8      # 0x2e85d
leaq 0x190(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl %eax, %edx
movl %ebp, %ecx
callq 0x1363
movl %eax, %ebx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x15080
movq %r14, %rdi
callq 0x13455
movl %ebx, %eax
addq $0xa28, %rsp            # imm = 0xA28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq