// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
addq (%rdi), %rcx
xorl %r15d, %r15d
cmpq $0x3, %rcx
jb 0x1d2d0
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %r15d
orl %edx, %r15d
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1d43d
leaq 0x4fec(%rip), %r12      # 0x222e6
cmpl $0x420074, %r15d        # imm = 0x420074
jne 0x1d46c
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
testq %rax, %rax
je 0x1d3af
movq %rax, %r13
movq (%r14), %rax
testq %rax, %rax
je 0x1d35b
movq 0x8(%rax), %rcx
movq %r13, 0x8(%rax)
movq $0x0, (%r13)
movq %rcx, 0x8(%r13)
incq 0x10(%rax)
testq %rcx, %rcx
je 0x1d352
movq %r13, (%rcx)
cmpq $0x0, (%rax)
jne 0x1d35b
movq %r13, (%rax)
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq *0x868(%rbx)
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x1d3d0
movq %rbx, %rdi
movl $0x420074, %esi         # imm = 0x420074
movq %rax, %rdx
callq 0x6ae0
testl %eax, %eax
je 0x1d40b
movl %eax, %r13d
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2b44, %edx           # imm = 0x2B44
callq 0x6de0
movl $0x420074, %r15d        # imm = 0x420074
xorl %eax, %eax
movl %r13d, %ebp
jmp 0x1d401
movl $0x18, %esi
movq %rbx, %rdi
leaq 0x4222(%rip), %rdx      # 0x215e0
callq 0x6ba0
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2b3d, %edx           # imm = 0x2B3D
jmp 0x1d3ef
movl $0x4, %esi
movq %rbx, %rdi
leaq 0x4f23(%rip), %rdx      # 0x22302
callq 0x6ba0
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2b41, %edx           # imm = 0x2B41
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x420074, %r15d        # imm = 0x420074
xorl %eax, %eax
testb %al, %al
jne 0x1d2fa
jmp 0x1d46e
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
subq %rcx, %rdx
addq (%rbx), %rdx
movb $0x1, %al
xorl %r15d, %r15d
cmpq $0x3, %rdx
jb 0x1d401
movzbl (%rcx), %edx
shll $0x10, %edx
movzbl 0x1(%rcx), %esi
shll $0x8, %esi
orl %edx, %esi
movzbl 0x2(%rcx), %r15d
orl %esi, %r15d
jmp 0x1d401
leaq 0x4191(%rip), %rdx      # 0x215d5
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0x4e8e(%rip), %rsi      # 0x222e6
movq %rbx, %rdi
movl $0x2b38, %edx           # imm = 0x2B38
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
jmp 0x1d46e
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq