// File: /workspace/github_c_makefile_star2_O0/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_attributes
int
kmip_decode_attributes(KMIP *ctx, Attributes *value)
{
    CHECK_DECODE_ARGS(ctx, value);
    CHECK_KMIP_VERSION(ctx, KMIP_2_0);
    CHECK_BUFFER_FULL(ctx, 8);

    int result = 0;
    int32 tag_type = 0;
    uint32 length = 0;

    result = kmip_decode_int32_be(ctx, &tag_type);
    CHECK_RESULT(ctx, result);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_ATTRIBUTES, KMIP_TYPE_STRUCTURE);

    result = kmip_decode_length(ctx, &length);
    CHECK_RESULT(ctx, result);
    CHECK_BUFFER_FULL(ctx, length);

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

    uint32 tag = kmip_peek_tag(ctx);
    while(tag != 0 && kmip_is_attribute_tag(tag))
    {
        LinkedListItem *item = ctx->calloc_func(ctx->state, 1, sizeof(LinkedListItem));
        CHECK_NEW_MEMORY(ctx, item, sizeof(LinkedListItem), "LinkedListItem");
        kmip_linked_list_enqueue(value->attribute_list, item);

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

        result = kmip_decode_attribute(ctx, (Attribute *)item->data);
        CHECK_RESULT(ctx, result);

        tag = kmip_peek_tag(ctx);
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1acbe
cmpq $0x0, -0x18(%rbp)
jne 0x1acca
movl $0xffffffef, -0x4(%rbp) # imm = 0xFFFFFFEF
jmp 0x1b049
jmp 0x1accc
jmp 0x1acce
movq -0x10(%rbp), %rax
cmpl $0x5, 0x18(%rax)
jae 0x1acf9
movq -0x10(%rbp), %rdi
leaq 0xa94b(%rip), %rsi      # 0x2562e
movl $0x2459, %edx           # imm = 0x2459
callq 0x6f20
movl $0xfffffff5, -0x4(%rbp) # imm = 0xFFFFFFF5
jmp 0x1b049
jmp 0x1acfb
jmp 0x1acfd
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
cmpq $0x8, %rax
jae 0x1ad41
movq -0x10(%rbp), %rdi
leaq 0xa903(%rip), %rsi      # 0x2562e
movl $0x245a, %edx           # imm = 0x245A
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1b049
jmp 0x1ad43
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6b10
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1ad8e
movq -0x10(%rbp), %rdi
leaq 0xa8b5(%rip), %rsi      # 0x2562e
movl $0x2461, %edx           # imm = 0x2461
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b049
jmp 0x1ad90
jmp 0x1ad92
movl -0x20(%rbp), %eax
sarl $0x8, %eax
cmpl $0x420125, %eax         # imm = 0x420125
je 0x1adc0
movq -0x10(%rbp), %rdi
leaq 0xa884(%rip), %rsi      # 0x2562e
movl $0x2462, %edx           # imm = 0x2462
callq 0x6f20
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x1b049
movl -0x20(%rbp), %eax
andl $0xff, %eax
cmpl $0x1, %eax
je 0x1adee
movq -0x10(%rbp), %rdi
leaq 0xa856(%rip), %rsi      # 0x2562e
movl $0x2462, %edx           # imm = 0x2462
callq 0x6f20
movl $0xfffffffb, -0x4(%rbp) # imm = 0xFFFFFFFB
jmp 0x1b049
jmp 0x1adf0
jmp 0x1adf2
movq -0x10(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x6520
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1ae28
movq -0x10(%rbp), %rdi
leaq 0xa81b(%rip), %rsi      # 0x2562e
movl $0x2465, %edx           # imm = 0x2465
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b049
jmp 0x1ae2a
jmp 0x1ae2c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
cmpq %rcx, %rax
jae 0x1ae72
movq -0x10(%rbp), %rdi
leaq 0xa7d2(%rip), %rsi      # 0x2562e
movl $0x2466, %edx           # imm = 0x2466
callq 0x6f20
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x1b049
jmp 0x1ae74
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 0x1aee0
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0xa54f(%rip), %rdx      # 0x25409
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0xa764(%rip), %rsi      # 0x2562e
movl $0x2469, %edx           # imm = 0x2469
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1b049
jmp 0x1aee2
movq -0x10(%rbp), %rdi
callq 0x6a40
movl %eax, -0x28(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
je 0x1af0a
movl -0x28(%rbp), %edi
callq 0x6c90
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x1af16
jmp 0x1b042
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, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1af79
movq -0x10(%rbp), %rdi
movl $0x18, %esi
leaq 0xa4c1(%rip), %rdx      # 0x25414
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0xa6cb(%rip), %rsi      # 0x2562e
movl $0x246f, %edx           # imm = 0x246F
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1b049
jmp 0x1af7b
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%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 -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1aff6
movq -0x10(%rbp), %rdi
movl $0x10, %esi
leaq 0xab17(%rip), %rdx      # 0x25aea
callq 0x6cd0
movq -0x10(%rbp), %rdi
leaq 0xa64b(%rip), %rsi      # 0x2562e
movl $0x2473, %edx           # imm = 0x2473
callq 0x6f20
movl $0xfffffff4, -0x4(%rbp) # imm = 0xFFFFFFF4
jmp 0x1b049
jmp 0x1aff8
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x68a0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1b02f
movq -0x10(%rbp), %rdi
leaq 0xa611(%rip), %rsi      # 0x2562e
movl $0x2476, %edx           # imm = 0x2476
callq 0x6f20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b049
jmp 0x1b031
movq -0x10(%rbp), %rdi
callq 0x6a40
movl %eax, -0x28(%rbp)
jmp 0x1aeee
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)