// File: /workspace/github_c_makefile_star2_O3/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 0x12518
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x125a8
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x124fa
jmp 0x125cf
movq %rsi, %r14
testq %rsi, %rsi
je 0x12527
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 0x125d9
cmpb $0x1, %al
jne 0x12628
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64b0
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
movl (%r15), %edx
cmpq %rdx, %rcx
jae 0x12677
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x1271c
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x1258d
jmp 0x125cf
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xcb9f(%rip), %rsi      # 0x1f158
movl $0x63, %edx
callq 0x66f0
movl $0x2537, 0x9c(%rbx,%r14) # imm = 0x2537
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x12774
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x125f7
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x125e0
jmp 0x1261e
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xcb50(%rip), %rsi      # 0x1f158
movl $0x63, %edx
callq 0x66f0
movl $0x2540, 0x9c(%rbx,%r14) # imm = 0x2540
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x12774
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12646
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x1262f
jmp 0x1266d
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xcb01(%rip), %rsi      # 0x1f158
movl $0x63, %edx
callq 0x66f0
movl $0x2540, 0x9c(%rbx,%r14) # imm = 0x2540
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
jmp 0x12774
cmpq $0x3, %rcx
jb 0x126ef
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 0x126ef
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *0x868(%rbx)
movq %rax, (%r14)
testq %rax, %rax
je 0x12781
movq %rbx, %rdi
movl $0x420003, %esi         # imm = 0x420003
movq %rax, %rdx
callq 0x6540
testl %eax, %eax
je 0x127b0
movl %eax, %ebp
leaq 0xe296(%rip), %rsi      # 0x20973
movq %rbx, %rdi
movl $0x254b, %edx           # imm = 0x254B
callq 0x6de0
jmp 0x12774
leaq 0xe2cc(%rip), %rsi      # 0x209c2
movq %rbx, %rdi
callq 0x6800
leaq 0x38(%rbx), %rdi
xorl %r14d, %r14d
cmpl $0x0, 0x64(%rdi,%r14)
je 0x12748
addq $0x68, %r14
cmpq $0x820, %r14            # imm = 0x820
jne 0x12705
jmp 0x1276f
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xca2b(%rip), %rsi      # 0x1f158
movl $0x63, %edx
callq 0x66f0
movl $0x2543, 0x9c(%rbx,%r14) # imm = 0x2543
jmp 0x125cf
addq %r14, %rdi
movq %rdi, 0x860(%rbx)
leaq 0xc9ff(%rip), %rsi      # 0x1f158
movl $0x63, %edx
callq 0x66f0
movl $0x2550, 0x9c(%rbx,%r14) # imm = 0x2550
movl $0xffffffed, %ebp       # imm = 0xFFFFFFED
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe218(%rip), %rdx      # 0x209a0
movl $0x10, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0xe1d7(%rip), %rsi      # 0x20973
movq %rbx, %rdi
movl $0x2548, %edx           # imm = 0x2548
callq 0x6de0
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
jmp 0x12774
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
addq (%rbx), %rcx
cmpq $0x3, %rcx
jb 0x1282a
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 0x1282a
movq 0x890(%rbx), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq *0x868(%rbx)
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x1285f
movq %rbx, %rdi
movl $0x420002, %esi         # imm = 0x420002
movq %rax, %rdx
callq 0x6540
testl %eax, %eax
je 0x12858
movl %eax, %ebp
leaq 0xe156(%rip), %rsi      # 0x20973
movq %rbx, %rdi
movl $0x255a, %edx           # imm = 0x255A
jmp 0x126e5
cmpl $0x2, 0x18(%rbx)
ja 0x12858
leaq 0xe1fb(%rip), %rsi      # 0x20a32
movq %rbx, %rdi
callq 0x6800
leaq 0xe12d(%rip), %rsi      # 0x20973
movq %rbx, %rdi
movl $0x2561, %edx           # imm = 0x2561
callq 0x6de0
jmp 0x1276f
xorl %ebp, %ebp
jmp 0x12774
leaq 0xe1af(%rip), %rdx      # 0x20a15
movl $0x10, %esi
movq %rbx, %rdi
callq 0x6ba0
leaq 0xe0f9(%rip), %rsi      # 0x20973
movq %rbx, %rdi
movl $0x2557, %edx           # imm = 0x2557
jmp 0x127a4