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

    /* This encoding matches the following set of values:
    *  Batch Item
    *      Operation - Get
    *      Ephemeral - False
    *      Request Payload
    *          Unique Identifier - 49a1ca88-6bea-4fb2-b450-7e58802c3038
    */
    uint8 encoding[96] = {
        0x42, 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x58,
        0x42, 0x00, 0x5C, 0x05, 0x00, 0x00, 0x00, 0x04,
        0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
        0x42, 0x01, 0x54, 0x06, 0x00, 0x00, 0x00, 0x08,
        0x00, 0x00, 0x00, 0x00, 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
    };

    KMIP ctx = {0};
    kmip_init(&ctx, encoding, ARRAY_LENGTH(encoding), KMIP_2_0);

    TextString uuid = {0};
    uuid.value = "49a1ca88-6bea-4fb2-b450-7e58802c3038";
    uuid.size = 36;

    GetRequestPayload grp = {0};
    grp.unique_identifier = &uuid;

    RequestBatchItem expected = {0};
    kmip_init_request_batch_item(&expected);
    expected.operation = KMIP_OP_GET;
    expected.ephemeral = KMIP_FALSE;
    expected.request_payload = &grp;

    RequestBatchItem observed = {0};
    kmip_init_request_batch_item(&observed);

    int result = kmip_decode_request_batch_item(&ctx, &observed);
    int comparison = kmip_compare_request_batch_item(&expected, &observed);
    if(!comparison)
    {
        kmip_print_request_batch_item(stderr, 1, &expected);
        kmip_print_request_batch_item(stderr, 1, &observed);
    }
    result = report_decoding_test_result(tracker, &ctx, comparison, result, __func__);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x970, %rsp            # imm = 0x970
movq %rdi, %rbx
incw (%rdi)
leaq 0x278fd(%rip), %rsi     # 0x33620
leaq 0x70(%rsp), %r15
movl $0xc, %ecx
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd8(%rsp), %r14
movl $0x898, %edx            # imm = 0x898
movq %r14, %rdi
xorl %esi, %esi
callq 0x10c0
movl $0x60, %edx
movq %r14, %rdi
movq %r15, %rsi
movl $0x5, %ecx
callq 0x13747
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
leaq 0x238b4(%rip), %rcx     # 0x2f625
movq %rcx, (%rax)
movq $0x24, 0x8(%rax)
leaq 0x50(%rsp), %r12
movaps %xmm0, (%r12)
movaps %xmm0, 0x10(%r12)
movq %rax, (%r12)
leaq 0x20(%rsp), %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x13f18
movl $0xa, (%r15)
movl $0x0, 0x18(%r15)
movq %r12, 0x10(%r15)
movq %rsp, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
callq 0x13f18
movq %r14, %rdi
movq %r12, %rsi
callq 0x24dc1
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x170f9
movl %eax, %r14d
testl %eax, %eax
jne 0xbe1a
movq 0x39200(%rip), %r15     # 0x44ff8
movq (%r15), %rdi
leaq 0x20(%rsp), %rdx
movl $0x1, %esi
callq 0x2d61c
movq (%r15), %rdi
movq %rsp, %rdx
movl $0x1, %esi
callq 0x2d61c
leaq 0x24990(%rip), %r8      # 0x307b1
leaq 0xd8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x1397
movl %eax, %ebx
movq %rsp, %rsi
movq %r15, %rdi
callq 0x14c08
movq %r15, %rdi
callq 0x13a23
movl %ebx, %eax
addq $0x970, %rsp            # imm = 0x970
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq