// File: /workspace/github_c_makefile_star2_O3/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_query_functions
int
kmip_decode_query_functions(KMIP *ctx, Functions* value)
{
    int result = 0;
    uint32 tag = kmip_peek_tag(ctx);

    value->function_list = ctx->calloc_func(ctx->state, 1, sizeof(LinkedList));
    CHECK_NEW_MEMORY(ctx, value->function_list, sizeof(LinkedList), "LinkedList");

    while(tag == KMIP_TAG_QUERY_FUNCTION)
    {
        LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
        CHECK_NEW_MEMORY(ctx, item, sizeof(LinkedListItem), "LinkedListItem");
        kmip_linked_list_enqueue(value->function_list, item);

        item->data = ctx->calloc_func(ctx->state, 1, sizeof(int32));
        CHECK_NEW_MEMORY(ctx, item->data, sizeof(int32), "Query Function");

        result = kmip_decode_enum(ctx, KMIP_TAG_QUERY_FUNCTION, (int32 *)item->data);
        CHECK_RESULT(ctx, result);

        tag = kmip_peek_tag(ctx);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
addq (%rdi), %rcx
cmpq $0x3, %rcx
jae 0x1c70a
xorl %r15d, %r15d
jmp 0x1c728
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
sete %r15b
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1c81b
xorl %ebp, %ebp
testb %r15b, %r15b
je 0x1c848
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
testq %rax, %rax
je 0x1c855
movq %rax, %r15
movq (%r14), %rax
testq %rax, %rax
je 0x1c7a9
movq 0x8(%rax), %rcx
movq %r15, 0x8(%rax)
movq $0x0, (%r15)
movq %rcx, 0x8(%r15)
incq 0x10(%rax)
testq %rcx, %rcx
je 0x1c7a0
movq %r15, (%rcx)
cmpq $0x0, (%rax)
jne 0x1c7a9
movq %r15, (%rax)
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq *0x868(%rbx)
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x1c875
movq %rbx, %rdi
movl $0x420074, %esi         # imm = 0x420074
movq %rax, %rdx
callq 0x6ae0
testl %eax, %eax
jne 0x1c895
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
cmpq $0x3, %rcx
jb 0x1c848
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
je 0x1c756
jmp 0x1c848
leaq 0x3e23(%rip), %rdx      # 0x20645
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b38, %edx           # imm = 0x2B38
leaq 0x4b16(%rip), %rsi      # 0x21356
movq %rbx, %rdi
callq 0x6de0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3df4(%rip), %rdx      # 0x20650
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b3d, %edx           # imm = 0x2B3D
jmp 0x1c839
leaq 0x4af6(%rip), %rdx      # 0x21372
movl $0x4, %esi
movq %rbx, %rdi
callq 0x6ba0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x2b41, %edx           # imm = 0x2B41
jmp 0x1c839
movl $0x2b44, %edx           # imm = 0x2B44
movl %eax, %ebp
jmp 0x1c839