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

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

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

        item->data = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, item->data, sizeof(TextString), "Endpoint text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_ALTERNATE_FAILOVER_ENDPOINTS, 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), %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 0x233c3
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0x206c(%rip), %rdx      # 0x25409
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x2eb4(%rip), %rsi      # 0x26261
movl $0x2ba8, %edx           # imm = 0x2BA8
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x23516
jmp 0x233c5
movq -0x10(%rbp), %rdi
callq 0x6a40
movl %eax, -0x20(%rbp)
cmpl $0x420135, -0x20(%rbp)  # imm = 0x420135
jne 0x2350f
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 0x23441
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0x1ff9(%rip), %rdx      # 0x25414
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x2e36(%rip), %rsi      # 0x26261
movl $0x2bae, %edx           # imm = 0x2BAE
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x23516
jmp 0x23443
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 $0x10, %edx
callq *%rax
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x234be
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0x2de8(%rip), %rdx      # 0x26283
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0x2db6(%rip), %rsi      # 0x26261
movl $0x2bb2, %edx           # imm = 0x2BB2
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x23516
jmp 0x234c0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
movl $0x420135, %esi         # imm = 0x420135
callq 0x65b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x234fc
movq -0x10(%rbp), %rdi
leaq 0x2d77(%rip), %rsi      # 0x26261
movl $0x2bb5, %edx           # imm = 0x2BB5
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x23516
jmp 0x234fe
movq -0x10(%rbp), %rdi
callq 0x6a40
movl %eax, -0x20(%rbp)
jmp 0x233d1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop