// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_query_request_payload
int
kmip_decode_query_request_payload(KMIP *ctx, QueryRequestPayload *value)
{
    CHECK_DECODE_ARGS(ctx, value);
    CHECK_BUFFER_FULL(ctx, 8);

    int result = 0;
    int32 tag_type = 0;
    uint32 length = 0;

    result = kmip_decode_int32_be(ctx, &tag_type);
    CHECK_RESULT(ctx, result);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_QUERY_FUNCTION, KMIP_TYPE_STRUCTURE);

    result = kmip_decode_int32_be(ctx, &length);
    CHECK_RESULT(ctx, result);
    CHECK_BUFFER_FULL(ctx, length);

    if(kmip_is_tag_next(ctx, KMIP_TAG_QUERY_FUNCTION))
    {
        value->functions = ctx->calloc_func(ctx->state, 1, sizeof(Functions));
        CHECK_NEW_MEMORY(ctx, value->functions, sizeof(Functions), "Functions");

        result = kmip_decode_query_functions(ctx, value->functions);
        CHECK_RESULT(ctx, result);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0xffffffef, %ebp       # imm = 0xFFFFFFEF
jne 0x18ba4
movq %rdi, %rbx
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
addq (%rdi), %rax
cmpq $0x7, %rax
ja 0x18a22
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x18a65
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x18a0b
jmp 0x18a8c
movq %rsi, %r14
xorl %eax, %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl %eax, 0x8(%rsp)
movq %rbx, %rdi
callq 0x6a10
testl %eax, %eax
je 0x18a96
movl %eax, %ebp
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x18ae2
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x18a47
jmp 0x18ba4
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0x6f16(%rip), %rsi      # 0x1f98c
movl $0x63, %edx
callq 0x66f0
movl $0x2b50, 0x9c(%rbx,%r14) # imm = 0x2B50
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x18ba4
movl 0xc(%rsp), %eax
movl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
cmpl $0x42007400, %ecx       # imm = 0x42007400
jne 0x18b0e
cmpb $0x1, %al
jne 0x18b5a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6a10
testl %eax, %eax
je 0x18baf
movl %eax, %ebp
leaq 0x88b1(%rip), %rsi      # 0x21381
movq %rbx, %rdi
movl $0x2b5b, %edx           # imm = 0x2B5B
callq 0x6de0
jmp 0x18ba4
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0x6e99(%rip), %rsi      # 0x1f98c
movl $0x63, %edx
callq 0x66f0
movl $0x2b57, 0x9c(%rbx,%r14) # imm = 0x2B57
jmp 0x18ba4
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x18b2c
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x18b15
jmp 0x18b53
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0x6e4f(%rip), %rsi      # 0x1f98c
movl $0x63, %edx
callq 0x66f0
movl $0x2b58, 0x9c(%rbx,%r14) # imm = 0x2B58
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x18ba4
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x18b78
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x18b61
jmp 0x18b9f
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0x6e03(%rip), %rsi      # 0x1f98c
movl $0x63, %edx
callq 0x66f0
movl $0x2b58, 0x9c(%rbx,%r14) # imm = 0x2B58
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
movl 0x8(%rsp), %edx
cmpq %rdx, %rcx
jae 0x18bdf
leaq 0x87b4(%rip), %rsi      # 0x21381
movq %rbx, %rdi
movl $0x2b5c, %edx           # imm = 0x2B5C
callq 0x6de0
jmp 0x18a8c
xorl %ebp, %ebp
cmpq $0x3, %rcx
jb 0x18ba4
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %eax
orl %edx, %eax
cmpl $0x420074, %eax         # imm = 0x420074
jne 0x18ba4
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x18c54
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6b90
testl %eax, %eax
je 0x18ba4
movl %eax, %r14d
leaq 0x8742(%rip), %rsi      # 0x21381
movq %rbx, %rdi
movl $0x2b64, %edx           # imm = 0x2B64
callq 0x6de0
movl %r14d, %ebp
jmp 0x18ba4
leaq 0x8748(%rip), %rdx      # 0x213a3
movl $0x8, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0x8712(%rip), %rsi      # 0x21381
movq %rbx, %rdi
movl $0x2b61, %edx           # imm = 0x2B61
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
jmp 0x18ba4