// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a40
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *%rax
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x22e1f
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0x2610(%rip), %rdx      # 0x25409
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x33c0(%rip), %rsi      # 0x261c9
movl $0x2b38, %edx           # imm = 0x2B38
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x22f68
jmp 0x22e21
jmp 0x22e23
cmpl $0x420074, -0x20(%rbp)  # imm = 0x420074
jne 0x22f61
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x22e93
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0x25a7(%rip), %rdx      # 0x25414
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x334c(%rip), %rsi      # 0x261c9
movl $0x2b3d, %edx           # imm = 0x2B3D
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x22f68
jmp 0x22e95
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x67e0
movq -0x10(%rbp), %rax
movq 0x868(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x890(%rcx), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq *%rax
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x22f10
movq -0x10(%rbp), %rdi
movl $0x4, %esi
leaq 0x32f8(%rip), %rdx      # 0x261e5
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x32cc(%rip), %rsi      # 0x261c9
movl $0x2b41, %edx           # imm = 0x2B41
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x22f68
jmp 0x22f12
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
movl $0x420074, %esi         # imm = 0x420074
callq 0x6c00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22f4e
movq -0x10(%rbp), %rdi
leaq 0x328d(%rip), %rsi      # 0x261c9
movl $0x2b44, %edx           # imm = 0x2B44
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x22f68
jmp 0x22f50
movq -0x10(%rbp), %rdi
callq 0x6a40
movl %eax, -0x20(%rbp)
jmp 0x22e23
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)