// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_operations
int
kmip_decode_operations(KMIP *ctx, Operations *value)
{
    int result = 0;

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

    uint32 tag = kmip_peek_tag(ctx);
    while(tag == KMIP_TAG_OPERATION)
    {
        LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
        CHECK_NEW_MEMORY(ctx, item, sizeof(LinkedListItem), "LinkedListItem");
        kmip_linked_list_enqueue(value->operation_list, item);

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


        result = kmip_decode_enum(ctx, KMIP_TAG_OPERATION, (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 0x890(%rdi), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x1d624
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
subq %rcx, %rdx
addq (%rbx), %rdx
xorl %eax, %eax
cmpq $0x3, %rdx
jb 0x1d4de
movzbl (%rcx), %eax
shll $0x10, %eax
movzbl 0x1(%rcx), %edx
shll $0x8, %edx
orl %eax, %edx
movzbl 0x2(%rcx), %eax
orl %edx, %eax
leaq 0x40fb(%rip), %r15      # 0x215e0
leaq 0x4e51(%rip), %r12      # 0x2233d
cmpl $0x42005c, %eax         # imm = 0x42005C
jne 0x1d653
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x18, %edx
callq *0x868(%rbx)
testq %rax, %rax
je 0x1d59e
movq %rax, %r13
movq (%r14), %rax
testq %rax, %rax
je 0x1d54b
movq 0x8(%rax), %rcx
movq %r13, 0x8(%rax)
movq $0x0, (%r13)
movq %rcx, 0x8(%r13)
incq 0x10(%rax)
testq %rcx, %rcx
je 0x1d542
movq %r13, (%rcx)
cmpq $0x0, (%rax)
jne 0x1d54b
movq %r13, (%rax)
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq *0x868(%rbx)
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x1d5bb
movq %rbx, %rdi
movl $0x42005c, %esi         # imm = 0x42005C
movq %rax, %rdx
callq 0x6ae0
testl %eax, %eax
je 0x1d5f5
movl %eax, %r13d
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2b7f, %edx           # imm = 0x2B7F
callq 0x6de0
movl $0x42005c, %eax         # imm = 0x42005C
xorl %ecx, %ecx
movl %r13d, %ebp
jmp 0x1d5eb
movl $0x18, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x6ba0
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2b77, %edx           # imm = 0x2B77
jmp 0x1d5da
movl $0x4, %esi
movq %rbx, %rdi
leaq 0x4d8a(%rip), %rdx      # 0x22354
callq 0x6ba0
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2b7b, %edx           # imm = 0x2B7B
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movl $0x42005c, %eax         # imm = 0x42005C
xorl %ecx, %ecx
testb %cl, %cl
jne 0x1d4ec
jmp 0x1d655
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
subq %rdx, %rsi
addq (%rbx), %rsi
xorl %eax, %eax
movb $0x1, %cl
cmpq $0x3, %rsi
jb 0x1d5eb
movzbl (%rdx), %eax
shll $0x10, %eax
movzbl 0x1(%rdx), %esi
shll $0x8, %esi
orl %eax, %esi
movzbl 0x2(%rdx), %eax
orl %esi, %eax
jmp 0x1d5eb
leaq 0x3faa(%rip), %rdx      # 0x215d5
movl $0x18, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0x4cfe(%rip), %rsi      # 0x2233d
movq %rbx, %rdi
movl $0x2b71, %edx           # imm = 0x2B71
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
jmp 0x1d655
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq