// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/tests/tests.c
// Function: test_encode_request_batch_item_get_payload_kmip_2_0
int
test_encode_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 expected[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
    };

    uint8 observed[96] = {0};
    KMIP ctx = {0};
    kmip_init(&ctx, observed, ARRAY_LENGTH(observed), KMIP_2_0);

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

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

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

    int result = kmip_encode_request_batch_item(&ctx, &rbi);
    result = report_encoding_test_result(tracker, &ctx, expected, observed, result, __func__);
    kmip_destroy(&ctx);
    return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9c0, %rsp            # imm = 0x9C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
leaq -0x70(%rbp), %rdi
leaq 0x34388(%rip), %rsi     # 0x44f20
movl $0x60, %edx
callq 0x10c0
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
movl $0x60, %edx
callq 0x1090
leaq -0x968(%rbp), %rdi
xorl %esi, %esi
movl $0x898, %edx            # imm = 0x898
callq 0x1090
leaq -0xd0(%rbp), %rsi
leaq -0x968(%rbp), %rdi
movl $0x60, %edx
movl $0x5, %ecx
callq 0x1c6e0
leaq -0x978(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
leaq 0x2e950(%rip), %rax     # 0x3f54f
movq %rax, -0x978(%rbp)
movq $0x24, -0x970(%rbp)
leaq -0x998(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x978(%rbp), %rax
movq %rax, -0x998(%rbp)
leaq -0x9b8(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x1090
leaq -0x9b8(%rbp), %rdi
callq 0x1d5f0
movl $0xa, -0x9b8(%rbp)
movl $0x0, -0x9a0(%rbp)
leaq -0x998(%rbp), %rax
movq %rax, -0x9a8(%rbp)
leaq -0x968(%rbp), %rdi
leaq -0x9b8(%rbp), %rsi
callq 0x2a0b0
movl %eax, -0x9bc(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
movl -0x9bc(%rbp), %r8d
leaq -0x968(%rbp), %rsi
leaq 0x2f9ea(%rip), %r9      # 0x4069a
callq 0x11f0
movl %eax, -0x9bc(%rbp)
leaq -0x968(%rbp), %rdi
callq 0x1cab0
movl -0x9bc(%rbp), %eax
addq $0x9c0, %rsp            # imm = 0x9C0
popq %rbp
retq
nopw %cs:(%rax,%rax)