// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_request_message
int
kmip_decode_request_message(KMIP *ctx, RequestMessage *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_REQUEST_MESSAGE, KMIP_TYPE_STRUCTURE);
    
    kmip_decode_length(ctx, &length);
    CHECK_BUFFER_FULL(ctx, length);
    
    value->request_header = ctx->calloc_func(ctx->state, 1, sizeof(RequestHeader));
    CHECK_NEW_MEMORY(ctx, value->request_header, sizeof(RequestHeader), "RequestHeader structure");
    kmip_init_request_header(value->request_header);
    result = kmip_decode_request_header(ctx, value->request_header);
    CHECK_RESULT(ctx, result);
    
    value->batch_count = kmip_get_num_items_next(ctx, KMIP_TAG_BATCH_ITEM);
    if(value->batch_count > 0)
    {
        value->batch_items = ctx->calloc_func(ctx->state, value->batch_count, sizeof(RequestBatchItem));
        CHECK_NEW_MEMORY(ctx, value->batch_items, value->batch_count * sizeof(RequestBatchItem), "sequence of RequestBatchItem structures");
        
        for(size_t i = 0; i < value->batch_count; i++)
        {
            kmip_init_request_batch_item(&value->batch_items[i]);
            result = kmip_decode_request_batch_item(ctx, &value->batch_items[i]);
            CHECK_RESULT(ctx, result);
        }
    }
    
    return(KMIP_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
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 0x227d4
movq -0x10(%rbp), %rdi
leaq 0x3950(%rip), %rsi      # 0x2610e
movl $0x2ae9, %edx           # imm = 0x2AE9
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x22a8f
jmp 0x227d6
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 $0x420078, %eax         # imm = 0x420078
je 0x22826
movq -0x10(%rbp), %rdi
leaq 0x38fe(%rip), %rsi      # 0x2610e
movl $0x2af0, %edx           # imm = 0x2AF0
callq 0x6f20
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x22a8f
movl -0x20(%rbp), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x22854
movq -0x10(%rbp), %rdi
leaq 0x38d0(%rip), %rsi      # 0x2610e
movl $0x2af0, %edx           # imm = 0x2AF0
callq 0x6f20
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x22a8f
jmp 0x22856
jmp 0x22858
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 0x228ab
movq -0x10(%rbp), %rdi
leaq 0x3879(%rip), %rsi      # 0x2610e
movl $0x2af3, %edx           # imm = 0x2AF3
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x22a8f
jmp 0x228ad
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x50, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x22919
movq -0x10(%rbp), %rdi
movl $0x50, %esi
leaq 0x3837(%rip), %rdx      # 0x2612a
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x380b(%rip), %rsi      # 0x2610e
movl $0x2af6, %edx           # imm = 0x2AF6
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x22a8f
jmp 0x2291b
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x6870
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x6d90
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22960
movq -0x10(%rbp), %rdi
leaq 0x37c3(%rip), %rsi      # 0x2610e
movl $0x2af9, %edx           # imm = 0x2AF9
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x22a8f
jmp 0x22962
movq -0x10(%rbp), %rdi
movl $0x42000f, %esi         # imm = 0x42000F
callq 0x6340
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x22a88
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rsi
movl $0x20, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x22a02
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
shlq $0x5, %rsi
leaq 0x3766(%rip), %rdx      # 0x26142
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x3722(%rip), %rsi      # 0x2610e
movl $0x2aff, %edx           # imm = 0x2AFF
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x22a8f
jmp 0x22a04
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x22a86
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x61c0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x6db0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22a74
movq -0x10(%rbp), %rdi
leaq 0x36ac(%rip), %rsi      # 0x2610e
movl $0x2b05, %edx           # imm = 0x2B05
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x22a8f
jmp 0x22a76
jmp 0x22a78
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x22a0c
jmp 0x22a88
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)