// File: /workspace/github_c_makefile_star2_O2/kieselsteini[P]PiXL-old/lz4.c
// Function: LZ4_decompress_safe_continue
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->prefixEnd == (BYTE*)dest) {
        result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize,
                                        endOnInputSize, full, 0,
                                        usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize);
        if (result <= 0) return result;
        lz4sd->prefixSize += result;
        lz4sd->prefixEnd  += result;
    } else {
        lz4sd->extDictSize = lz4sd->prefixSize;
        lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize;
        result = LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize,
                                        endOnInputSize, full, 0,
                                        usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
        if (result <= 0) return result;
        lz4sd->prefixSize = 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, %r9
movq %rsi, %r10
movq %rdi, %rbx
movq 0x10(%rdi), %r11
movq 0x18(%rdi), %r13
movslq %ecx, %rsi
addq %r10, %rsi
movslq %r8d, %rdx
addq %r9, %rdx
cmpq %r9, %r11
movq %rdx, 0x60(%rsp)
movq %rsi, 0x68(%rsp)
je 0x233ce
movq %r13, 0x8(%rbx)
movq %r11, %rax
subq %r13, %rax
movq %rax, (%rbx)
testl %r8d, %r8d
je 0x23753
pushq $0xf
popq %r8
movq %r9, %rax
subq %r13, %rax
movq %rax, 0x50(%rsp)
leaq -0xc(%rdx), %rax
movq %rax, 0x40(%rsp)
leaq -0xf(%rsi), %r14
leaq -0x8(%rsi), %rax
movq %rax, 0x58(%rsp)
leaq -0x5(%rsi), %rax
movq %rax, 0x48(%rsp)
leaq -0x7(%rdx), %rax
movq %rax, 0x28(%rsp)
leaq -0x5(%rdx), %rax
movq %rax, 0x38(%rsp)
movq %r9, %rbp
movq %r10, %r12
leaq 0x1(%r12), %rsi
movzbl (%r12), %eax
movl %eax, %edx
shrl $0x4, %edx
cmpl $0xf, %edx
jne 0x23147
addq $0x2, %r12
movq %r12, %rcx
movq %r8, %rdx
movq %rsi, %r12
movzbl (%r12), %esi
incq %r12
addq %rsi, %rdx
incq %rcx
cmpq %r14, %r12
jae 0x2312e
cmpb $-0x1, %sil
je 0x23115
movq %rbp, %rsi
addq %rdx, %rsi
jb 0x23766
negq %rcx
cmpq %rcx, %rdx
jbe 0x2314a
jmp 0x23766
movq %rsi, %r12
leaq (%rdx,%rbp), %r15
leaq (%r12,%rdx), %rdi
cmpq 0x40(%rsp), %r15
ja 0x23708
cmpq 0x58(%rsp), %rdi
ja 0x23708
movq (%r12), %rcx
movq %rcx, (%rbp)
addq $0x8, %rbp
addq $0x8, %r12
cmpq %r15, %rbp
jb 0x23168
movzwl (%rdi), %esi
addq $0x2, %rdi
movq %r15, %rcx
subq %rsi, %rcx
cmpq $0xffff, %r13           # imm = 0xFFFF
ja 0x2319e
cmpq 0x50(%rsp), %rcx
jb 0x23763
movl %esi, (%r15)
andl $0xf, %eax
cmpq $0xf, %rax
jne 0x231de
movq %r8, %rax
movq 0x48(%rsp), %rbp
leaq 0x1(%rdi), %r12
cmpq %rbp, %r12
ja 0x23766
movzbl (%rdi), %edx
addq %rdx, %rax
movq %r12, %rdi
cmpq $0xff, %rdx
je 0x231b2
movq %r15, %rdx
addq %rax, %rdx
jae 0x231e1
jmp 0x23766
movq %rdi, %r12
leaq 0x4(%rax), %rdx
leaq (%r15,%rax), %rbp
addq $0x4, %rbp
cmpq %r9, %rcx
jae 0x23285
cmpq 0x38(%rsp), %rbp
ja 0x23766
movq %r13, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r9, %rbx
subq %rcx, %rbx
movq %rdx, %r13
subq %rbx, %r13
movq %r9, 0x20(%rsp)
jbe 0x232db
movq %r11, 0x30(%rsp)
subq %rbx, %r11
movq %r15, %rdi
movq %r11, %rsi
movq %rbx, %rdx
callq 0x63f0
addq %rbx, %r15
movq %r15, %rax
movq 0x20(%rsp), %r9
subq %r9, %rax
cmpq %rax, %r13
jbe 0x23300
movq %r9, %rax
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r10
movq 0x30(%rsp), %r11
movq 0x8(%rsp), %r13
pushq $0xf
popq %r8
cmpq %rbp, %r15
jae 0x23331
movb (%rax), %cl
incq %rax
movb %cl, (%r15)
incq %r15
jmp 0x2326f
cmpw $0x7, %si
jbe 0x23339
movq (%rcx), %rax
movq %rax, (%r15)
addq $0x8, %rcx
movq %rcx, %rax
leaq 0x8(%r15), %rcx
cmpq 0x40(%rsp), %rbp
ja 0x2337e
movq (%rax), %rsi
movq %rsi, (%rcx)
cmpq $0x11, %rdx
jb 0x230f4
addq $0x10, %r15
addq $0x8, %rax
movq (%rax), %rcx
movq %rcx, (%r15)
addq $0x8, %r15
addq $0x8, %rax
cmpq %rbp, %r15
jb 0x232c3
jmp 0x230f4
movq %r11, %rsi
subq %rbx, %rsi
movq %r15, %rdi
movq %r11, %rbx
callq 0x6720
movq %rbx, %r11
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r9
movq 0x10(%rsp), %r10
jmp 0x23323
movq %r15, %rdi
movq %r9, %rsi
movq %r13, %rdx
movq %r9, %rbx
callq 0x63f0
movq %rbx, %r9
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %r10
movq 0x30(%rsp), %r11
movq 0x8(%rsp), %r13
pushq $0xf
popq %r8
jmp 0x230f4
movq %r15, %rbp
jmp 0x230f4
shll $0x2, %esi
leaq 0x8a5d(%rip), %rax      # 0x2bda0
movslq (%rsi,%rax), %rdi
movb (%rcx), %al
movb %al, (%r15)
movb 0x1(%rcx), %al
movb %al, 0x1(%r15)
movb 0x2(%rcx), %al
movb %al, 0x2(%r15)
movb 0x3(%rcx), %al
movb %al, 0x3(%r15)
leaq 0x8a18(%rip), %rax      # 0x2bd80
movl (%rsi,%rax), %esi
leaq (%rcx,%rsi), %rax
subq %rdi, %rax
movl (%rcx,%rsi), %ecx
movl %ecx, 0x4(%r15)
jmp 0x2329c
cmpq 0x38(%rsp), %rbp
ja 0x23766
movq 0x28(%rsp), %r15
cmpq %r15, %rcx
jae 0x233c4
movq %rax, %rdx
movq %rcx, %rsi
movq (%rdx), %rdi
movq %rdi, (%rsi)
addq $0x8, %rsi
addq $0x8, %rdx
cmpq %r15, %rsi
jb 0x23399
movq %r15, %rdx
subq %rcx, %rdx
addq %rdx, %rax
movq %r15, %rcx
jmp 0x233c4
movb (%rax), %dl
incq %rax
movb %dl, (%rcx)
incq %rcx
cmpq %rbp, %rcx
jb 0x233ba
jmp 0x230f4
testl %r8d, %r8d
je 0x23753
subq %r13, %r11
movq 0x8(%rbx), %r8
movq %r11, %r13
subq %r8, %r13
movq (%rbx), %rax
addq %r8, %rax
movq %rax, 0x38(%rsp)
leaq -0xc(%rdx), %rax
movq %rax, 0x40(%rsp)
leaq -0xf(%rsi), %r14
leaq -0x8(%rsi), %rax
movq %rax, 0x58(%rsp)
leaq -0x5(%rsi), %rax
movq %rax, 0x50(%rsp)
leaq -0x7(%rdx), %rax
movq %rax, 0x70(%rsp)
leaq -0x5(%rdx), %rax
movq %rax, 0x48(%rsp)
movq %r9, %rbp
movq %r10, %r12
leaq 0x1(%r12), %rsi
movzbl (%r12), %eax
movl %eax, %edx
shrl $0x4, %edx
cmpl $0xf, %edx
jne 0x23479
addq $0x2, %r12
movq %r12, %rcx
pushq $0xf
popq %rdx
movq %rsi, %r12
movzbl (%r12), %esi
incq %r12
addq %rsi, %rdx
incq %rcx
cmpq %r14, %r12
jae 0x23460
cmpb $-0x1, %sil
je 0x23447
movq %rbp, %rsi
addq %rdx, %rsi
jb 0x23780
negq %rcx
cmpq %rcx, %rdx
jbe 0x2347c
jmp 0x23780
movq %rsi, %r12
leaq (%rdx,%rbp), %r15
leaq (%r12,%rdx), %rdi
cmpq 0x40(%rsp), %r15
ja 0x2372f
cmpq 0x58(%rsp), %rdi
ja 0x2372f
movq (%r12), %rcx
movq %rcx, (%rbp)
addq $0x8, %rbp
addq $0x8, %r12
cmpq %r15, %rbp
jb 0x2349a
movzwl (%rdi), %esi
addq $0x2, %rdi
movq %r15, %rcx
subq %rsi, %rcx
cmpq $0xffff, %r8            # imm = 0xFFFF
ja 0x234ce
cmpq %r13, %rcx
jb 0x2377d
movl %esi, (%r15)
andl $0xf, %eax
cmpq $0xf, %rax
jne 0x2350e
pushq $0xf
popq %rax
movq 0x50(%rsp), %rbp
leaq 0x1(%rdi), %r12
cmpq %rbp, %r12
ja 0x23780
movzbl (%rdi), %edx
addq %rdx, %rax
movq %r12, %rdi
cmpq $0xff, %rdx
je 0x234e2
movq %r15, %rdx
addq %rax, %rdx
jae 0x23511
jmp 0x23780
movq %rdi, %r12
leaq 0x4(%rax), %rdx
leaq (%r15,%rax), %rbp
addq $0x4, %rbp
cmpq %r11, %rcx
jae 0x235bd
movq %r13, 0x8(%rsp)
cmpq 0x48(%rsp), %rbp
ja 0x23780
movq %r8, 0x28(%rsp)
movq %r10, 0x10(%rsp)
movq %r9, 0x20(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, %rbx
subq %rcx, %rbx
movq %rdx, %r13
subq %rbx, %r13
movq %r11, 0x30(%rsp)
jbe 0x23613
movq 0x38(%rsp), %rsi
subq %rbx, %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x63f0
addq %rbx, %r15
movq %r15, %rax
movq 0x30(%rsp), %r11
subq %r11, %rax
cmpq %rax, %r13
jbe 0x23639
movq %r11, %rax
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r9
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %r8
movq 0x8(%rsp), %r13
cmpq %rbp, %r15
jae 0x2366b
movb (%rax), %cl
incq %rax
movb %cl, (%r15)
incq %r15
jmp 0x235a7
cmpw $0x7, %si
jbe 0x23673
movq (%rcx), %rax
movq %rax, (%r15)
addq $0x8, %rcx
movq %rcx, %rax
leaq 0x8(%r15), %rcx
cmpq 0x40(%rsp), %rbp
ja 0x236b8
movq (%rax), %rsi
movq %rsi, (%rcx)
cmpq $0x11, %rdx
jb 0x23426
addq $0x10, %r15
addq $0x8, %rax
movq (%rax), %rcx
movq %rcx, (%r15)
addq $0x8, %r15
addq $0x8, %rax
cmpq %rbp, %r15
jb 0x235fb
jmp 0x23426
movq 0x38(%rsp), %rsi
subq %rbx, %rsi
movq %r15, %rdi
callq 0x6720
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r9
movq 0x10(%rsp), %r10
movq 0x30(%rsp), %r11
jmp 0x2365c
movq %r15, %rdi
movq %r11, %rsi
movq %r13, %rdx
movq %r11, %rbx
callq 0x63f0
movq %rbx, %r11
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r9
movq 0x10(%rsp), %r10
movq 0x28(%rsp), %r8
movq 0x8(%rsp), %r13
jmp 0x23426
movq %r15, %rbp
jmp 0x23426
shll $0x2, %esi
leaq 0x8723(%rip), %rax      # 0x2bda0
movslq (%rsi,%rax), %rdi
movb (%rcx), %al
movb %al, (%r15)
movb 0x1(%rcx), %al
movb %al, 0x1(%r15)
movb 0x2(%rcx), %al
movb %al, 0x2(%r15)
movb 0x3(%rcx), %al
movb %al, 0x3(%r15)
leaq 0x86de(%rip), %rax      # 0x2bd80
movl (%rsi,%rax), %esi
leaq (%rcx,%rsi), %rax
subq %rdi, %rax
movl (%rcx,%rsi), %ecx
movl %ecx, 0x4(%r15)
jmp 0x235d4
cmpq 0x48(%rsp), %rbp
ja 0x23780
movq 0x70(%rsp), %r15
cmpq %r15, %rcx
jae 0x236fe
movq %rax, %rdx
movq %rcx, %rsi
movq (%rdx), %rdi
movq %rdi, (%rsi)
addq $0x8, %rsi
addq $0x8, %rdx
cmpq %r15, %rsi
jb 0x236d3
movq %r15, %rdx
subq %rcx, %rdx
addq %rdx, %rax
movq %r15, %rcx
jmp 0x236fe
movb (%rax), %dl
incq %rax
movb %dl, (%rcx)
incq %rcx
cmpq %rbp, %rcx
jb 0x236f4
jmp 0x23426
cmpq 0x68(%rsp), %rdi
jne 0x23766
cmpq 0x60(%rsp), %r15
ja 0x23766
movq %rbp, %rdi
movq %r12, %rsi
movq %r9, %r14
callq 0x63f0
movq %r14, %r9
subl %r9d, %r15d
movl %r15d, %r12d
jmp 0x2376c
cmpq 0x68(%rsp), %rdi
jne 0x23780
cmpq 0x60(%rsp), %r15
ja 0x23780
movq %rbp, %rdi
movq %r12, %rsi
movq %r9, %r14
callq 0x63f0
subl %r14d, %r15d
movl %r15d, %r12d
jmp 0x23786
cmpl $0x1, %ecx
jne 0x237ac
xorl %r12d, %r12d
cmpb (%r10), %r12b
sbbl %r12d, %r12d
jmp 0x2379a
movq %rdi, %r12
notl %r12d
addl %r10d, %r12d
testl %r12d, %r12d
jle 0x2379a
movl %r12d, %eax
movq %rax, 0x18(%rbx)
addq %rax, %r9
jmp 0x23796
movq %rdi, %r12
notl %r12d
addl %r10d, %r12d
testl %r12d, %r12d
jle 0x2379a
movl %r12d, %r9d
addq %r9, 0x18(%rbx)
addq 0x10(%rbx), %r9
movq %r9, 0x10(%rbx)
movl %r12d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %r12
jmp 0x2379a