// File: /workspace/github_c_makefile_star2_O2/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_decompress_safe_continue
LZ4_FORCE_O2_GCC_PPC64LE
int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize)
{
    LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse;
    int result;

    if (lz4sd->prefixSize == 0) {
        /* The first call, no dictionary yet. */
        assert(lz4sd->extDictSize == 0);
        result = LZ4_decompress_safe(source, dest, compressedSize, maxOutputSize);
        if (result <= 0) return result;
        lz4sd->prefixSize = (size_t)result;
        lz4sd->prefixEnd = (BYTE*)dest + result;
    } else if (lz4sd->prefixEnd == (BYTE*)dest) {
        /* They're rolling the current segment. */
        if (lz4sd->prefixSize >= 64 KB - 1)
            result = LZ4_decompress_safe_withPrefix64k(source, dest, compressedSize, maxOutputSize);
        else if (lz4sd->extDictSize == 0)
            result = LZ4_decompress_safe_withSmallPrefix(source, dest, compressedSize, maxOutputSize,
                                                         lz4sd->prefixSize);
        else
            result = LZ4_decompress_safe_doubleDict(source, dest, compressedSize, maxOutputSize,
                                                    lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize);
        if (result <= 0) return result;
        lz4sd->prefixSize += (size_t)result;
        lz4sd->prefixEnd  += result;
    } else {
        /* The buffer wraps around, or they're switching to another buffer. */
        lz4sd->extDictSize = lz4sd->prefixSize;
        lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize;
        result = LZ4_decompress_safe_forceExtDict(source, dest, compressedSize, maxOutputSize,
                                                  lz4sd->externalDict, lz4sd->extDictSize);
        if (result <= 0) return result;
        lz4sd->prefixSize = (size_t)result;
        lz4sd->prefixEnd  = (BYTE*)dest + result;
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rdi, %rbx
movq 0x18(%rdi), %r9
testq %r9, %r9
je 0xb050
movq 0x10(%rbx), %rax
cmpq %r13, %rax
je 0xb07c
movq %r9, 0x8(%rbx)
subq %r9, %rax
movq %rax, (%rbx)
movq %rsi, %rdi
movq %r13, %rsi
movl %ecx, %edx
movl %r8d, %ecx
movq %rax, %r8
callq 0xa86b
jmp 0xb060
movq %rsi, %rdi
movq %r13, %rsi
movl %ecx, %edx
movl %r8d, %ecx
callq 0x9361
movl %eax, %ebp
testl %eax, %eax
jle 0xb45f
movl %ebp, %eax
movq %rax, 0x18(%rbx)
addq %rax, %r13
movq %r13, 0x10(%rbx)
jmp 0xb45f
cmpq $0xffff, %r9            # imm = 0xFFFF
jb 0xb09a
movq %rsi, %rdi
movq %r13, %rsi
movl %ecx, %edx
movl %r8d, %ecx
callq 0xa2a0
jmp 0xb42a
movq 0x8(%rbx), %r10
testq %r10, %r10
je 0xb417
pushq $-0x1
popq %rbp
testq %rsi, %rsi
je 0xb45f
movq (%rbx), %rax
leaq (%rax,%r10), %rdx
testq %rax, %rax
cmoveq %rax, %rdx
movq %rdx, 0x18(%rsp)
testl %r8d, %r8d
je 0xb443
movq %rbx, 0x28(%rsp)
testl %ecx, %ecx
je 0xb45f
movq %r13, %rbx
subq %r9, %rbx
movslq %ecx, %rax
leaq (%rsi,%rax), %r11
movslq %r8d, %rcx
leaq (%rcx,%r13), %r9
leaq -0x10(%rsi,%rax), %rax
movq %rax, 0x70(%rsp)
leaq -0x20(%r13,%rcx), %rax
movq %rax, 0x40(%rsp)
movq %rsi, 0x30(%rsp)
movq %rsi, %r12
movq %r13, 0x20(%rsp)
cmpl $0x40, %r8d
movq %r10, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movq %r11, (%rsp)
jl 0xb482
leaq -0x11(%r11), %rax
movq %rax, 0x68(%rsp)
leaq -0xf(%r11), %rax
movq %rax, 0x60(%rsp)
leaq -0x20(%r11), %rax
movq %rax, 0x58(%rsp)
leaq -0x40(%r9), %rax
movq %rax, 0x38(%rsp)
leaq -0x4(%r11), %rax
movq %rax, 0x50(%rsp)
leaq -0x5(%r9), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %r12
movq 0x20(%rsp), %r13
leaq 0x1(%r12), %rbp
movzbl (%r12), %edx
movl %edx, %r15d
shrl $0x4, %r15d
cmpl $0xf, %r15d
jne 0xb22b
movq 0x60(%rsp), %r14
cmpq %r14, %rbp
jae 0xb470
leaq 0x10(%r12), %rax
addq $0x2, %r12
xorl %esi, %esi
movq %r12, %rcx
movb -0xf(%rax), %dil
movzbl %dil, %edi
incq %rbp
leaq -0xe(%rax), %r8
addl %edi, %esi
cmpq %r14, %r8
setb %r8b
cmpb $-0x1, %dil
sete %dil
incq %rax
incq %rcx
testb %dil, %r8b
jne 0xb1a0
movl %esi, %r12d
leaq 0xf(%r12), %r15
movq %r13, %r14
addq %r15, %r14
jb 0xb43a
negq %rcx
cmpq %rcx, %r15
ja 0xb43a
cmpq 0x40(%rsp), %r14
ja 0xb576
addq %rax, %r12
cmpq 0x58(%rsp), %r12
ja 0xb42e
xorl %eax, %eax
movups (%rbp,%rax), %xmm0
leaq (%rax,%r13), %rcx
addq $0x20, %rcx
movups %xmm0, -0x20(%rcx)
movups 0x10(%rbp,%rax), %xmm0
movups %xmm0, -0x10(%rcx)
addq $0x20, %rax
cmpq %r14, %rcx
jb 0xb206
jmp 0xb249
leaq (%r15,%r13), %r14
cmpq 0x68(%rsp), %rbp
ja 0xb576
movups (%rbp), %xmm0
movups %xmm0, (%r13)
addq %rbp, %r15
movq %r15, %r12
movzwl (%r12), %ecx
addq $0x2, %r12
movq %r14, %rsi
subq %rcx, %rsi
andl $0xf, %edx
cmpq $0xf, %rdx
jne 0xb2c7
cmpq $0xffff, %r10           # imm = 0xFFFF
movq 0x50(%rsp), %rdi
ja 0xb27c
leaq (%rsi,%r10), %rax
cmpq %rbx, %rax
jb 0xb47d
xorl %eax, %eax
leaq 0x1(%r12), %rbp
cmpq %rdi, %rbp
jae 0xb470
movzbl (%r12), %edx
addl %edx, %eax
movq %rbp, %r12
cmpl $0xff, %edx
je 0xb27e
movl %eax, %edx
pushq $-0x10
popq %rax
subq %rdx, %rax
cmpq %r14, %rax
jb 0xb470
leaq (%r14,%rdx), %rax
addq $0x13, %rax
addq $0x13, %rdx
cmpq 0x38(%rsp), %rax
jb 0xb308
jmp 0xb61a
leaq (%r14,%rdx), %r13
addq $0x4, %r13
addq $0x4, %rdx
cmpq 0x38(%rsp), %r13
jae 0xb61d
cmpq %rbx, %rsi
jb 0xb305
cmpw $0x8, %cx
jb 0xb305
movq (%rsi), %rax
movq %rax, (%r14)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%r14)
movzwl 0x10(%rsi), %eax
movw %ax, 0x10(%r14)
jmp 0xb169
movq %r12, %rbp
cmpq $0xffff, %r10           # imm = 0xFFFF
ja 0xb31e
leaq (%rsi,%r10), %rax
cmpq %rbx, %rax
jb 0xb470
leaq (%r14,%rdx), %r13
cmpq %rbx, %rsi
jae 0xb387
cmpq 0x48(%rsp), %r13
ja 0xb470
movq %rbx, %r12
subq %rsi, %rbx
movq %rdx, %r15
subq %rbx, %r15
jbe 0xb3b8
movq 0x18(%rsp), %rsi
subq %rbx, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1140
addq %rbx, %r14
movq %r14, %rax
subq %r12, %rax
cmpq %rax, %r15
movq %r12, %rbx
jbe 0xb3cd
movq %rbx, %rax
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %r9
movq (%rsp), %r11
cmpq %r13, %r14
jae 0xb3f1
movb (%rax), %cl
incq %rax
movb %cl, (%r14)
incq %r14
jmp 0xb375
cmpw $0x10, %cx
jb 0xb3fc
pushq $0x10
popq %rax
subq %rcx, %rax
movups -0x10(%r14,%rax), %xmm0
movups %xmm0, (%r14)
movups (%r14,%rax), %xmm0
movups %xmm0, 0x10(%r14)
addq $0x20, %r14
cmpq %r13, %r14
jb 0xb393
movq %rbp, %r12
jmp 0xb169
movq 0x18(%rsp), %rsi
subq %rbx, %rsi
movq %r14, %rdi
callq 0x1190
movq %r12, %rbx
jmp 0xb3db
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1140
movq %rbp, %r12
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %r9
movq (%rsp), %r11
jmp 0xb169
movq %rbp, %r12
movq %r14, %r13
jmp 0xb169
movq %r14, %rdi
movq %r13, %rdx
callq 0xcac1
movq (%rsp), %r11
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r10
jmp 0xb3b0
movq %rsi, %rdi
movq %r13, %rsi
movl %ecx, %edx
movl %r8d, %ecx
movq %r9, %r8
callq 0xb812
movl %eax, %ebp
jmp 0xb451
addq $-0xf, %rax
movq %rax, %rbp
jmp 0xb576
addq $-0xf, %rax
movq %rax, %rbp
jmp 0xb470
cmpl $0x1, %ecx
jne 0xb45f
xorl %ebp, %ebp
cmpb (%rsi), %bpl
sbbl %ebp, %ebp
jmp 0xb45f
testl %ebp, %ebp
jle 0xb45f
movl %ebp, %eax
addq %rax, 0x18(%rbx)
addq %rax, 0x10(%rbx)
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
notl %ebp
addl 0x30(%rsp), %ebp
movq 0x28(%rsp), %rbx
jmp 0xb451
movq %r12, %rbp
jmp 0xb470
movq 0x70(%rsp), %rdi
movq 0x40(%rsp), %r8
leaq 0x1(%r12), %rbp
movzbl (%r12), %edx
movl %edx, %r15d
shrl $0x4, %r15d
cmpl $0xf, %r15d
je 0xb51c
cmpq %rdi, %rbp
jae 0xb572
cmpq %r8, %r13
ja 0xb572
movups (%rbp), %xmm0
movups %xmm0, (%r13)
addq %r15, %r13
andl $0xf, %edx
leaq (%r15,%rbp), %r12
addq $0x2, %r12
movzwl -0x2(%r12), %eax
movzwl %ax, %ecx
movq %r13, %rsi
subq %rcx, %rsi
cmpq $0xf, %rdx
je 0xb5be
cmpw $0x8, %ax
jb 0xb5be
cmpq %rbx, %rsi
jb 0xb5be
movq (%rsi), %rax
movq %rax, (%r13)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%r13)
movzwl 0x10(%rsi), %eax
movw %ax, 0x10(%r13)
addq %rdx, %r13
addq $0x4, %r13
jmp 0xb48c
leaq -0xf(%r11), %rax
cmpq %rax, %rbp
jae 0xb470
addq $0x2, %r12
xorl %ecx, %ecx
movb (%rbp), %sil
movzbl %sil, %esi
incq %rbp
addl %esi, %ecx
cmpq %rax, %rbp
setb %dil
cmpb $-0x1, %sil
sete %sil
incq %r12
testb %sil, %dil
jne 0xb52f
movl %ecx, %r15d
addq $0xf, %r15
movq %r13, %rax
addq %r15, %rax
jb 0xb470
negq %r12
cmpq %r12, %r15
ja 0xb470
leaq (%r15,%r13), %r14
leaq -0xc(%r9), %rcx
leaq (%r15,%rbp), %rax
cmpq %rcx, %r14
ja 0xb744
leaq -0x8(%r11), %rcx
cmpq %rcx, %rax
ja 0xb744
movq (%rbp), %rcx
movq %rcx, (%r13)
addq $0x8, %r13
addq $0x8, %rbp
cmpq %r14, %r13
jb 0xb594
movzwl (%rax), %ecx
addq $0x2, %rax
movq %r14, %rsi
subq %rcx, %rsi
andl $0xf, %edx
movq %rax, %rbp
jmp 0xb5c4
movq %r12, %rbp
movq %r13, %r14
cmpl $0xf, %edx
jne 0xb616
leaq -0x4(%r11), %rax
xorl %edx, %edx
movb (%rbp), %dil
movzbl %dil, %edi
incq %rbp
addl %edi, %edx
cmpq %rax, %rbp
setae %r8b
cmpb $-0x1, %dil
setne %dil
orb %r8b, %dil
cmpb $0x1, %dil
jne 0xb5cf
movl %edx, %edx
addq $0xf, %rdx
movq %r14, %rdi
addq %rdx, %rdi
setb %dil
cmpq %rax, %rbp
jae 0xb470
testb %dil, %dil
jne 0xb470
addq $0x4, %rdx
movq %rbp, %r12
cmpq $0xffff, %r10           # imm = 0xFFFF
ja 0xb633
leaq (%rsi,%r10), %rax
cmpq %rbx, %rax
jb 0xb47d
leaq (%r14,%rdx), %r13
cmpq %rbx, %rsi
jae 0xb6aa
leaq -0x5(%r9), %rax
cmpq %rax, %r13
ja 0xb47d
movq %rbx, %rbp
subq %rsi, %rbx
movq %rdx, %r15
subq %rbx, %r15
jbe 0xb701
movq 0x18(%rsp), %rsi
subq %rbx, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1140
addq %rbx, %r14
movq %r14, %rax
subq %rbp, %rax
cmpq %rax, %r15
movq %rbp, %rbx
jbe 0xb71b
movq %rbx, %rax
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %r9
movq (%rsp), %r11
cmpq %r13, %r14
jae 0xb73c
movb (%rax), %cl
incq %rax
movb %cl, (%r14)
incq %r14
jmp 0xb694
leaq -0xc(%r9), %rdi
cmpl $0x7, %ecx
jbe 0xb774
movq (%rsi), %rax
movq %rax, (%r14)
addq $0x8, %rsi
movq %rsi, %rax
leaq 0x8(%r14), %rsi
cmpq %rdi, %r13
ja 0xb7bf
movq (%rax), %rcx
movq %rcx, (%rsi)
cmpq $0x11, %rdx
jb 0xb482
addq $0x10, %r14
addq $0x8, %rax
movq (%rax), %rcx
movq %rcx, (%r14)
addq $0x8, %r14
addq $0x8, %rax
cmpq %r13, %r14
jb 0xb6e9
jmp 0xb482
movq 0x18(%rsp), %rsi
subq %rbx, %rsi
movq %r14, %rdi
callq 0x1190
movq 0x10(%rsp), %r10
movq %rbp, %rbx
jmp 0xb72e
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1140
movq 0x10(%rsp), %r10
movq 0x8(%rsp), %r9
movq (%rsp), %r11
jmp 0xb482
movq %r14, %r13
jmp 0xb482
cmpq %r11, %rax
jne 0xb470
cmpq %r9, %r14
ja 0xb470
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x1190
addl %r15d, %r13d
subl 0x20(%rsp), %r13d
movl %r13d, %ebp
jmp 0xb476
andl $0x0, (%r14)
movb (%rsi), %al
movb %al, (%r14)
movb 0x1(%rsi), %al
movb %al, 0x1(%r14)
movb 0x2(%rsi), %al
movb %al, 0x2(%r14)
movb 0x3(%rsi), %al
movb %al, 0x3(%r14)
shll $0x2, %ecx
leaq 0x3bd4(%rip), %rax      # 0xf370
movl (%rcx,%rax), %r8d
leaq (%rsi,%r8), %rax
movl (%rsi,%r8), %esi
movl %esi, 0x4(%r14)
leaq 0x3bdd(%rip), %rsi      # 0xf390
movslq (%rcx,%rsi), %rcx
subq %rcx, %rax
jmp 0xb6c4
leaq -0x5(%r9), %rcx
cmpq %rcx, %r13
ja 0xb47d
leaq -0x7(%r9), %rcx
cmpq %rcx, %rsi
jae 0xb7f9
movq %rax, %rdx
movq %rsi, %rdi
movq (%rdx), %r8
movq %r8, (%rdi)
addq $0x8, %rdi
addq $0x8, %rdx
cmpq %rcx, %rdi
jb 0xb7db
movq %rcx, %rdx
subq %rsi, %rdx
addq %rdx, %rax
jmp 0xb808
movq %rsi, %rcx
jmp 0xb808
movb (%rax), %dl
incq %rax
movb %dl, (%rcx)
incq %rcx
cmpq %r13, %rcx
jb 0xb7fe
jmp 0xb482