// File: /workspace/github_c_makefile_star2_O1/OpenKMIP[P]libkmip/src/kmip.c
// Function: kmip_decode_application_specific_information
int
kmip_decode_application_specific_information(KMIP *ctx, ApplicationSpecificInformation *value)
{
    CHECK_BUFFER_FULL(ctx, 8);

    kmip_init_application_specific_information(value);

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

    kmip_decode_int32_be(ctx, &tag_type);
    CHECK_TAG_TYPE(ctx, tag_type, KMIP_TAG_APPLICATION_SPECIFIC_INFORMATION, KMIP_TYPE_STRUCTURE);

    kmip_decode_length(ctx, &length);
    CHECK_BUFFER_FULL(ctx, length);

    if(kmip_is_tag_next(ctx, KMIP_TAG_APPLICATION_NAMESPACE))
    {
        value->application_namespace = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->application_namespace, sizeof(TextString), "Application Namespace text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_APPLICATION_NAMESPACE, value->application_namespace);
        CHECK_RESULT(ctx, result);
    }
    else
    {
        kmip_set_error_message(ctx, "The ApplicationSpecificInformation encoding is missing the application name field.");
        kmip_push_error_frame(ctx, __func__, __LINE__);
        return(KMIP_INVALID_ENCODING);
    }

    if(kmip_is_tag_next(ctx, KMIP_TAG_APPLICATION_DATA))
    {
        value->application_data = ctx->calloc_func(ctx->state, 1, sizeof(TextString));
        CHECK_NEW_MEMORY(ctx, value->application_data, sizeof(TextString), "Application Data text string");

        result = kmip_decode_text_string(ctx, KMIP_TAG_APPLICATION_DATA, value->application_data);
        CHECK_RESULT(ctx, result);
    }
    else
    {
        if(ctx->version < KMIP_1_3)
        {
            kmip_set_error_message(ctx, "The ApplicationSpecificInformation encoding is missing the application data field.");
            kmip_push_error_frame(ctx, __func__, __LINE__);
            return(KMIP_INVALID_ENCODING);
        }
    }

    return(KMIP_OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
addq (%rdi), %rax
cmpq $0x7, %rax
ja 0x12bba
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testq %rbx, %rbx
je 0x12cfb
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12c83
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x12b9c
jmp 0x12cfb
movq %rsi, %r14
testq %rsi, %rsi
je 0x12bc9
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
xorl %eax, %eax
leaq 0x4(%rsp), %r15
movl %eax, (%r15)
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6a10
movl (%r15), %eax
movl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
cmpl $0x42000400, %ecx       # imm = 0x42000400
jne 0x12c57
cmpb $0x1, %al
jne 0x12cac
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64b0
movq 0x10(%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rax, %rcx
addq (%rbx), %rcx
movl (%r15), %edx
cmpq %rdx, %rcx
jae 0x12d08
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testq %rbx, %rbx
je 0x12cfb
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12de0
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x12c39
jmp 0x12cfb
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
testq %rbx, %rbx
je 0x12cfb
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12cd4
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x12c6c
jmp 0x12cfb
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xd450(%rip), %rsi      # 0x200e4
movl $0x63, %edx
callq 0x66f0
movl $0x2537, 0x9c(%rbx,%r14) # imm = 0x2537
jmp 0x12cfb
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
testq %rbx, %rbx
je 0x12cfb
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12cd4
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x12cbd
jmp 0x12cfb
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xd3ff(%rip), %rsi      # 0x200e4
movl $0x63, %edx
callq 0x66f0
movl $0x2540, 0x9c(%rbx,%r14) # imm = 0x2540
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
je 0x12dc7
cmpq $0x3, %rcx
jb 0x12d89
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %eax
orl %edx, %eax
cmpl $0x420003, %eax         # imm = 0x420003
jne 0x12d89
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x12e38
movq %rbx, %rdi
movl $0x420003, %esi         # imm = 0x420003
movq %rax, %rdx
callq 0x6540
testl %eax, %eax
je 0x12e6a
movl %eax, %ebp
leaq 0xeb8c(%rip), %rsi      # 0x21903
movq %rbx, %rdi
movl $0x254b, %edx           # imm = 0x254B
callq 0x6de0
jmp 0x12cfb
leaq 0xebc2(%rip), %rsi      # 0x21952
movq %rbx, %rdi
callq 0x6800
movl $0xffffffed, %ebp       # imm = 0xFFFFFFED
testq %rbx, %rbx
je 0x12cfb
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12e0c
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x12dad
jmp 0x12cfb
leaq 0xeb84(%rip), %rsi      # 0x21952
movq %rbx, %rdi
callq 0x6800
movl $0xffffffed, %ebp       # imm = 0xFFFFFFED
jmp 0x12cfb
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xd2f3(%rip), %rsi      # 0x200e4
movl $0x63, %edx
callq 0x66f0
movl $0x2543, 0x9c(%rbx,%r14) # imm = 0x2543
jmp 0x12cfb
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xd2c7(%rip), %rsi      # 0x200e4
movl $0x63, %edx
callq 0x66f0
movl $0x2550, 0x9c(%rbx,%r14) # imm = 0x2550
jmp 0x12cfb
leaq 0xeaf1(%rip), %rdx      # 0x21930
movl $0x10, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0xeab0(%rip), %rsi      # 0x21903
movq %rbx, %rdi
movl $0x2548, %edx           # imm = 0x2548
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
jmp 0x12cfb
testq %rbx, %rbx
je 0x12ee9
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
cmpq $0x3, %rcx
jb 0x12ee9
movzbl (%rax), %ecx
shll $0x10, %ecx
movzbl 0x1(%rax), %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl 0x2(%rax), %eax
orl %edx, %eax
cmpl $0x420002, %eax         # imm = 0x420002
jne 0x12ee9
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *0x868(%rbx)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x12f1e
movq %rbx, %rdi
movl $0x420002, %esi         # imm = 0x420002
movq %rax, %rdx
callq 0x6540
testl %eax, %eax
je 0x12f17
movl %eax, %ebp
leaq 0xea27(%rip), %rsi      # 0x21903
movq %rbx, %rdi
movl $0x255a, %edx           # imm = 0x255A
jmp 0x12d7f
cmpl $0x2, 0x18(%rbx)
ja 0x12f17
leaq 0xeacc(%rip), %rsi      # 0x219c2
movq %rbx, %rdi
callq 0x6800
leaq 0xe9fe(%rip), %rsi      # 0x21903
movq %rbx, %rdi
movl $0x2561, %edx           # imm = 0x2561
callq 0x6de0
jmp 0x12dd6
xorl %ebp, %ebp
jmp 0x12cfb
leaq 0xea80(%rip), %rdx      # 0x219a5
movl $0x10, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0xe9ca(%rip), %rsi      # 0x21903
movq %rbx, %rdi
movl $0x2557, %edx           # imm = 0x2557
jmp 0x12e5b