// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_request_batch_item
int
kmip_decode_request_batch_item(KMIP *ctx, RequestBatchItem *value)
{
    CHECK_DECODE_ARGS(ctx, value);
    CHECK_BUFFER_FULL(ctx, 8);
    
    int result = 0;
    int32 tag_type = 0;
    uint32 length = 0;
    
    kmip_decode_int32_be(ctx, &tag_type);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_BATCH_ITEM, KMIP_TYPE_STRUCTURE);
    
    kmip_decode_length(ctx, &length);
    CHECK_BUFFER_FULL(ctx, length);
    
    result = kmip_decode_enum(ctx, KMIP_TAG_OPERATION, &value->operation);
    CHECK_RESULT(ctx, result);
    CHECK_ENUM(ctx, KMIP_TAG_OPERATION, value->operation);

    if(ctx->version >= KMIP_2_0)
    {
        if(kmip_is_tag_next(ctx, KMIP_TAG_EPHEMERAL))
        {
            result = kmip_decode_bool(ctx, KMIP_TAG_EPHEMERAL, &value->ephemeral);
            CHECK_RESULT(ctx, result);
        }
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_UNIQUE_BATCH_ITEM_ID))
    {
        value->unique_batch_item_id = ctx->calloc_func(ctx->state, 1, sizeof(ByteString));
        CHECK_NEW_MEMORY(ctx, value->unique_batch_item_id, sizeof(ByteString), "UniqueBatchItemID byte string");
        result = kmip_decode_byte_string(ctx, KMIP_TAG_UNIQUE_BATCH_ITEM_ID, value->unique_batch_item_id);
        CHECK_RESULT(ctx, result);
    }
    
    switch(value->operation)
    {
        case KMIP_OP_CREATE:
        value->request_payload = ctx->calloc_func(ctx->state, 1, sizeof(CreateRequestPayload));
        CHECK_NEW_MEMORY(ctx, value->request_payload, sizeof(CreateRequestPayload), "CreateRequestPayload structure");
        result = kmip_decode_create_request_payload(ctx, (CreateRequestPayload *)value->request_payload);
        break;
        
        case KMIP_OP_GET:
        value->request_payload = ctx->calloc_func(ctx->state, 1, sizeof(GetRequestPayload));
        CHECK_NEW_MEMORY(ctx, value->request_payload, sizeof(GetRequestPayload), "GetRequestPayload structure");
        result = kmip_decode_get_request_payload(ctx, (GetRequestPayload*)value->request_payload);
        break;
        
        case KMIP_OP_DESTROY:
        value->request_payload = ctx->calloc_func(ctx->state, 1, sizeof(DestroyRequestPayload));
        CHECK_NEW_MEMORY(ctx, value->request_payload, sizeof(DestroyRequestPayload), "DestroyRequestPayload structure");
        result = kmip_decode_destroy_request_payload(ctx, (DestroyRequestPayload*)value->request_payload);
        break;
        
        case KMIP_OP_QUERY:
        value->request_payload = ctx->calloc_func(ctx->state, 1, sizeof(QueryRequestPayload));
        CHECK_NEW_MEMORY(ctx, value->request_payload, sizeof(QueryRequestPayload), "QueryRequestPayload structure");
        result = kmip_decode_query_request_payload(ctx, (QueryRequestPayload*)value->request_payload);
        break;

        default:
        kmip_push_error_frame(ctx, __func__, __LINE__);
        return(KMIP_NOT_IMPLEMENTED);
        break;
    };
    CHECK_RESULT(ctx, result);
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1ee0e
cmpq $0x0, -0x18(%rbp)
jne 0x1ee1a
movl $0xffffffef, -0x4(%rbp) # imm = 0xFFFFFFEF
jmp 0x1f394
jmp 0x1ee1c
jmp 0x1ee1e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
cmpq $0x8, %rax
jae 0x1ee62
movq -0x10(%rbp), %rdi
leaq 0x6de0(%rip), %rsi      # 0x25c2c
movl $0x286c, %edx           # imm = 0x286C
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1f394
jmp 0x1ee64
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6b10
movl -0x20(%rbp), %eax
sarl $0x8, %eax
cmpl $0x42000f, %eax         # imm = 0x42000F
je 0x1eeb4
movq -0x10(%rbp), %rdi
leaq 0x6d8e(%rip), %rsi      # 0x25c2c
movl $0x2873, %edx           # imm = 0x2873
callq 0x6f20
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x1f394
movl -0x20(%rbp), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x1eee2
movq -0x10(%rbp), %rdi
leaq 0x6d60(%rip), %rsi      # 0x25c2c
movl $0x2873, %edx           # imm = 0x2873
callq 0x6f20
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x1f394
jmp 0x1eee4
jmp 0x1eee6
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x6520
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1ef39
movq -0x10(%rbp), %rdi
leaq 0x6d09(%rip), %rsi      # 0x25c2c
movl $0x2876, %edx           # imm = 0x2876
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1f394
jmp 0x1ef3b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x42005c, %esi         # imm = 0x42005C
callq 0x6c00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1ef76
movq -0x10(%rbp), %rdi
leaq 0x6ccb(%rip), %rsi      # 0x25c2c
movl $0x2879, %edx           # imm = 0x2879
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1f394
jmp 0x1ef78
jmp 0x1ef7a
movq -0x10(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl $0x42005c, %esi         # imm = 0x42005C
callq 0x63a0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x1efd1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl -0x28(%rbp), %ecx
movl $0x42005c, %esi         # imm = 0x42005C
callq 0x6140
movq -0x10(%rbp), %rdi
leaq 0x6c70(%rip), %rsi      # 0x25c2c
movl $0x287a, %edx           # imm = 0x287A
callq 0x6f20
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1f394
jmp 0x1efd3
movq -0x10(%rbp), %rax
cmpl $0x5, 0x18(%rax)
jb 0x1f035
movq -0x10(%rbp), %rdi
movl $0x420154, %esi         # imm = 0x420154
callq 0x6300
cmpl $0x0, %eax
je 0x1f033
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x18, %rdx
movl $0x420154, %esi         # imm = 0x420154
callq 0x6e60
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f02f
movq -0x10(%rbp), %rdi
leaq 0x6c12(%rip), %rsi      # 0x25c2c
movl $0x2881, %edx           # imm = 0x2881
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1f394
jmp 0x1f031
jmp 0x1f033
jmp 0x1f035
movq -0x10(%rbp), %rdi
movl $0x420093, %esi         # imm = 0x420093
callq 0x6300
cmpl $0x0, %eax
je 0x1f0ff
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1f0ba
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x6bb7(%rip), %rdx      # 0x25c4b
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x6b88(%rip), %rsi      # 0x25c2c
movl $0x2888, %edx           # imm = 0x2888
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1f394
jmp 0x1f0bc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x420093, %esi         # imm = 0x420093
callq 0x6df0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1f0fb
movq -0x10(%rbp), %rdi
leaq 0x6b46(%rip), %rsi      # 0x25c2c
movl $0x288a, %edx           # imm = 0x288A
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1f394
jmp 0x1f0fd
jmp 0x1f0ff
movq -0x18(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x17, %eax
ja 0x1f348
movq -0x30(%rbp), %rax
leaq 0x58c3(%rip), %rcx      # 0x249e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x20, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1f198
movq -0x10(%rbp), %rdi
movl $0x20, %esi
leaq 0x6af7(%rip), %rdx      # 0x25c69
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x6aaa(%rip), %rsi      # 0x25c2c
movl $0x2891, %edx           # imm = 0x2891
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1f394
jmp 0x1f19a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6d80
movl %eax, -0x1c(%rbp)
jmp 0x1f366
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x20, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1f221
movq -0x10(%rbp), %rdi
movl $0x20, %esi
leaq 0x6a8d(%rip), %rdx      # 0x25c88
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x6a21(%rip), %rsi      # 0x25c2c
movl $0x2897, %edx           # imm = 0x2897
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1f394
jmp 0x1f223
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6440
movl %eax, -0x1c(%rbp)
jmp 0x1f366
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1f2aa
movq -0x10(%rbp), %rdi
movl $0x8, %esi
leaq 0x6a20(%rip), %rdx      # 0x25ca4
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x6998(%rip), %rsi      # 0x25c2c
movl $0x289d, %edx           # imm = 0x289D
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1f394
jmp 0x1f2ac
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6800
movl %eax, -0x1c(%rbp)
jmp 0x1f366
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1f330
movq -0x10(%rbp), %rdi
movl $0x8, %esi
leaq 0x69b7(%rip), %rdx      # 0x25cc4
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x690f(%rip), %rsi      # 0x25c2c
movl $0x28a3, %edx           # imm = 0x28A3
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1f394
jmp 0x1f332
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x6860
movl %eax, -0x1c(%rbp)
jmp 0x1f366
movq -0x10(%rbp), %rdi
leaq 0x68d9(%rip), %rsi      # 0x25c2c
movl $0x28a8, %edx           # imm = 0x28A8
callq 0x6f20
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1f394
jmp 0x1f368
cmpl $0x0, -0x1c(%rbp)
je 0x1f38b
movq -0x10(%rbp), %rdi
leaq 0x68b3(%rip), %rsi      # 0x25c2c
movl $0x28ac, %edx           # imm = 0x28AC
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1f394
jmp 0x1f38d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)