// File: /workspace/github_c_makefile_star2_O1/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 $0x88, %rsp
movq %rdx, %r15
movq 0x10(%rdi), %r12
movq 0x18(%rdi), %r9
movslq %ecx, %rdx
movq %rsi, 0x30(%rsp)
addq %rsi, %rdx
movq %rdx, 0x58(%rsp)
movslq %r8d, %rax
addq %r15, %rax
movq %rax, 0x50(%rsp)
cmpq %r15, %r12
movq %rdi, 0x28(%rsp)
movq %r15, 0x60(%rsp)
je 0x296f1
movq %r9, 0x8(%rdi)
movq %r12, %rax
subq %r9, %rax
movq %rax, (%rdi)
testl %r8d, %r8d
je 0x29b1a
movq %r15, %rax
subq %r9, %rax
movq %rax, 0x68(%rsp)
movq 0x50(%rsp), %rcx
leaq -0xc(%rcx), %r10
movq 0x58(%rsp), %rax
leaq -0xf(%rax), %r14
leaq -0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
addq $-0x5, %rax
movq %rax, 0x40(%rsp)
leaq -0x7(%rcx), %rax
movq %rax, 0x38(%rsp)
leaq -0x5(%rcx), %rax
movq %rax, 0x10(%rsp)
leaq 0x8950(%rip), %r11      # 0x31ce4
movq %r15, %rbp
movq 0x30(%rsp), %r13
movq %r9, 0x8(%rsp)
movq %r10, 0x18(%rsp)
movq %r12, 0x48(%rsp)
leaq 0x1(%r13), %rax
movzbl (%r13), %r8d
movl %r8d, %edx
shrl $0x4, %edx
cmpl $0xf, %edx
jne 0x29411
addq $0x2, %r13
movl $0xf, %edx
movzbl (%rax), %ecx
incq %rax
addq %rcx, %rdx
incq %r13
cmpq %r14, %rax
jae 0x293de
cmpb $-0x1, %cl
je 0x293c8
movq %rbp, %rsi
notq %rsi
negq %r13
cmpq %r13, %rdx
movl $0x6, %ecx
movl $0x0, %edi
cmovbel %edi, %ecx
cmpq %rsi, %rdx
movl $0x6, %esi
cmoval %esi, %ecx
ja 0x29501
cmpq %r13, %rdx
ja 0x29501
leaq (%rdx,%rbp), %rbx
leaq (%rax,%rdx), %r13
cmpq %r10, %rbx
ja 0x294c8
cmpq 0x70(%rsp), %r13
ja 0x294c8
movq %rax, %rcx
movq (%rcx), %rsi
movq %rsi, (%rbp)
addq $0x8, %rbp
addq $0x8, %rcx
cmpq %rbx, %rbp
jb 0x29430
movzwl (%r13), %edi
addq $0x2, %r13
movq %rbx, %rsi
subq %rdi, %rsi
movl $0x6, %ecx
cmpq $0xffff, %r9            # imm = 0xFFFF
ja 0x2946c
cmpq 0x68(%rsp), %rsi
jb 0x29602
movl %edi, (%rbx)
andl $0xf, %r8d
cmpq $0xf, %r8
jne 0x2951f
addq %rdx, %rax
addq $0x3, %rax
movl $0xf, %r8d
movq 0x40(%rsp), %r11
movq %rax, %r13
cmpq %r11, %rax
ja 0x29509
movzbl -0x1(%r13), %edx
addq %rdx, %r8
leaq 0x1(%r13), %rax
cmpq $0xff, %rdx
je 0x2948e
movq %rbx, %rax
notq %rax
cmpq %rax, %r8
setbe %dl
movl $0x6, %eax
movl $0x0, %r11d
cmovbel %r11d, %eax
jmp 0x29510
movl $0x6, %ecx
cmpq 0x58(%rsp), %r13
jne 0x29501
cmpq 0x50(%rsp), %rbx
ja 0x29501
movq %rbp, %rdi
movq %rax, %rsi
callq 0x6400
leaq 0x87f7(%rip), %r11      # 0x31ce4
movq 0x18(%rsp), %r10
movq 0x8(%rsp), %r9
movl $0x3, %ecx
jmp 0x29602
movq %rax, %r13
jmp 0x2964d
movl $0x6, %eax
xorl %edx, %edx
testb %dl, %dl
leaq 0x87cb(%rip), %r11      # 0x31ce4
je 0x29600
leaq 0x4(%r8), %rdx
leaq (%rbx,%r8), %rbp
addq $0x4, %rbp
cmpq %r15, %rsi
jae 0x295b4
cmpq 0x10(%rsp), %rbp
ja 0x29602
movq %r15, %r12
subq %rsi, %r12
movq %rdx, %r15
subq %r12, %r15
jbe 0x29607
movq %rdx, 0x20(%rsp)
movq 0x48(%rsp), %rsi
subq %r12, %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x6400
addq %r12, %rbx
movq %rbx, %rax
movq 0x60(%rsp), %rcx
subq %rcx, %rax
cmpq %rax, %r15
jbe 0x29623
movq %rcx, %r15
movl $0x2, %ecx
cmpq %r12, 0x20(%rsp)
movq 0x8(%rsp), %r9
movq 0x18(%rsp), %r10
leaq 0x8746(%rip), %r11      # 0x31ce4
jle 0x29602
movq %r15, %rax
movb (%rax), %dl
incq %rax
movb %dl, (%rbx)
incq %rbx
cmpq %rbp, %rbx
jb 0x295a3
jmp 0x29602
cmpw $0x7, %di
jbe 0x29661
movq (%rsi), %rax
movq %rax, (%rbx)
addq $0x8, %rsi
leaq 0x8(%rbx), %rax
cmpq %r10, %rbp
ja 0x29693
movq (%rsi), %rcx
movq %rcx, (%rax)
cmpq $0x11, %rdx
jb 0x295fc
addq $0x10, %rbx
addq $0x8, %rsi
movq (%rsi), %rax
movq %rax, (%rbx)
addq $0x8, %rbx
addq $0x8, %rsi
cmpq %rbp, %rbx
jb 0x295e9
xorl %ecx, %ecx
jmp 0x2964d
movl %eax, %ecx
movq %rbx, %rbp
jmp 0x2964d
movq 0x48(%rsp), %rsi
subq %r12, %rsi
movq %rbx, %rdi
callq 0x6730
movl $0x2, %ecx
movq 0x60(%rsp), %r15
jmp 0x2963c
movq %rbx, %rdi
movq %rcx, %rbx
movq %rcx, %rsi
movq %r15, %rdx
callq 0x6400
movl $0x2, %ecx
movq %rbx, %r15
movq 0x8(%rsp), %r9
movq 0x18(%rsp), %r10
leaq 0x8697(%rip), %r11      # 0x31ce4
cmpl $0x6, %ecx
ja 0x29ab5
movl %ecx, %eax
movslq (%r11,%rax,4), %rax
addq %r11, %rax
jmpq *%rax
movq %rdx, 0x20(%rsp)
movq %rbx, %rdx
leaq 0x78(%rsp), %rcx
callq 0x6b69
movq 0x20(%rsp), %rdx
leaq 0x8665(%rip), %r11      # 0x31ce4
movq 0x18(%rsp), %r10
movq 0x8(%rsp), %r9
movq 0x78(%rsp), %rsi
jmp 0x295c8
movl $0x6, %ecx
cmpq 0x10(%rsp), %rbp
jbe 0x296af
cmpq 0x10(%rsp), %rbp
jbe 0x295fc
movq %rax, %rbp
jmp 0x2964d
movq 0x38(%rsp), %r8
cmpq %r8, %rax
jae 0x296de
movq %rsi, %rcx
movq %rax, %rdx
movq (%rcx), %rdi
movq %rdi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rcx
cmpq %r8, %rdx
jb 0x296bf
movq %r8, %rcx
subq %rax, %rcx
addq %rcx, %rsi
movq %r8, %rax
xorl %ecx, %ecx
cmpq %rbp, %rax
jae 0x2969f
movb (%rsi), %dl
incq %rsi
movb %dl, (%rax)
incq %rax
jmp 0x296e0
testl %r8d, %r8d
je 0x29b32
subq %r9, %r12
movq 0x8(%rdi), %rbx
movq %r12, %rax
subq %rbx, %rax
movq %rax, 0x18(%rsp)
movq (%rdi), %rax
addq %rbx, %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rcx
leaq -0xc(%rcx), %r9
movq 0x58(%rsp), %rax
leaq -0xf(%rax), %r14
leaq -0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
addq $-0x5, %rax
movq %rax, 0x68(%rsp)
leaq -0x7(%rcx), %rax
movq %rax, 0x80(%rsp)
leaq -0x5(%rcx), %rax
movq %rax, 0x40(%rsp)
leaq 0x85a9(%rip), %r11      # 0x31d00
movq %r15, %rbp
movq 0x30(%rsp), %r15
movq %r9, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r12, 0x48(%rsp)
leaq 0x1(%r15), %rax
movzbl (%r15), %r8d
movl %r8d, %edx
shrl $0x4, %edx
cmpl $0xf, %edx
jne 0x297d3
addq $0x2, %r15
movl $0xf, %edx
movzbl (%rax), %ecx
incq %rax
addq %rcx, %rdx
incq %r15
cmpq %r14, %rax
jae 0x297a0
cmpb $-0x1, %cl
je 0x2978a
movq %rbp, %rsi
notq %rsi
negq %r15
cmpq %r15, %rdx
movl $0x6, %ecx
movl $0x0, %edi
cmovbel %edi, %ecx
cmpq %rsi, %rdx
movl $0x6, %esi
cmoval %esi, %ecx
ja 0x298bf
cmpq %r15, %rdx
ja 0x298bf
leaq (%rdx,%rbp), %r13
leaq (%rax,%rdx), %r15
cmpq %r9, %r13
ja 0x2988b
cmpq 0x70(%rsp), %r15
ja 0x2988b
movq %rax, %rcx
movq (%rcx), %rsi
movq %rsi, (%rbp)
addq $0x8, %rbp
addq $0x8, %rcx
cmpq %r13, %rbp
jb 0x297f2
movzwl (%r15), %edi
addq $0x2, %r15
movq %r13, %rsi
subq %rdi, %rsi
movl $0x6, %ecx
cmpq $0xffff, %rbx           # imm = 0xFFFF
ja 0x2982d
cmpq 0x18(%rsp), %rsi
jb 0x299be
movl %edi, (%r13)
andl $0xf, %r8d
cmpq $0xf, %r8
jne 0x298d6
addq %rdx, %rax
addq $0x3, %rax
movl $0xf, %r8d
movq 0x68(%rsp), %r10
movq %rax, %r15
cmpq %r10, %rax
ja 0x298c7
movzbl -0x1(%r15), %edx
addq %rdx, %r8
leaq 0x1(%r15), %rax
cmpq $0xff, %rdx
je 0x29851
movq %r13, %rax
notq %rax
cmpq %rax, %r8
setbe %dl
movl $0x6, %eax
movl $0x0, %r10d
cmovbel %r10d, %eax
jmp 0x298ce
movl $0x6, %ecx
cmpq 0x58(%rsp), %r15
jne 0x298bf
cmpq 0x50(%rsp), %r13
ja 0x298bf
movq %rbp, %rdi
movq %rax, %rsi
callq 0x6400
leaq 0x8450(%rip), %r11      # 0x31d00
movq 0x8(%rsp), %r9
movl $0x3, %ecx
jmp 0x299be
movq %rax, %r15
jmp 0x29a06
movl $0x6, %eax
xorl %edx, %edx
testb %dl, %dl
je 0x299bc
leaq 0x4(%r8), %rdx
leaq (%r8,%r13), %rbp
addq $0x4, %rbp
cmpq %r12, %rsi
jae 0x2996e
cmpq 0x40(%rsp), %rbp
ja 0x299be
subq %rsi, %r12
movq %rdx, %rbx
subq %r12, %rbx
jbe 0x299c3
movq %rdx, 0x38(%rsp)
movq 0x20(%rsp), %rsi
subq %r12, %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x6400
addq %r12, %r13
movq %r13, %rax
movq 0x48(%rsp), %rcx
subq %rcx, %rax
cmpq %rax, %rbx
jbe 0x299df
movq %rcx, %rax
movl $0x2, %ecx
cmpq %r12, 0x38(%rsp)
movq 0x8(%rsp), %r9
leaq 0x83b3(%rip), %r11      # 0x31d00
jle 0x29a1a
movq %rax, %r12
movq 0x10(%rsp), %rbx
movb (%rax), %dl
incq %rax
movb %dl, (%r13)
incq %r13
cmpq %rbp, %r13
jb 0x2995b
jmp 0x299be
cmpw $0x7, %di
jbe 0x29a27
movq (%rsi), %rax
movq %rax, (%r13)
addq $0x8, %rsi
leaq 0x8(%r13), %rax
cmpq %r9, %rbp
ja 0x29a54
movq (%rsi), %rcx
movq %rcx, (%rax)
cmpq $0x11, %rdx
jb 0x299b8
addq $0x10, %r13
addq $0x8, %rsi
movq (%rsi), %rax
movq %rax, (%r13)
addq $0x8, %r13
addq $0x8, %rsi
cmpq %rbp, %r13
jb 0x299a4
xorl %ecx, %ecx
jmp 0x29a06
movl %eax, %ecx
movq %r13, %rbp
jmp 0x29a06
movq 0x20(%rsp), %rsi
subq %r12, %rsi
movq %r13, %rdi
callq 0x6730
movl $0x2, %ecx
movq 0x48(%rsp), %r12
jmp 0x299f5
movq %r13, %rdi
movq %rcx, %r12
movq %rcx, %rsi
movq %rbx, %rdx
callq 0x6400
movl $0x2, %ecx
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r9
leaq 0x82fa(%rip), %r11      # 0x31d00
cmpl $0x6, %ecx
ja 0x29adb
movl %ecx, %eax
movslq (%r11,%rax,4), %rax
addq %r11, %rax
jmpq *%rax
movq %r13, %rbp
movq %rax, %r12
movq 0x10(%rsp), %rbx
jmp 0x29a06
movq %rdx, 0x38(%rsp)
movq %r13, %rdx
leaq 0x78(%rsp), %rcx
callq 0x6bae
movq 0x38(%rsp), %rdx
leaq 0x82bb(%rip), %r11      # 0x31d00
movq 0x8(%rsp), %r9
movq 0x78(%rsp), %rsi
jmp 0x29983
movl $0x6, %ecx
cmpq 0x40(%rsp), %rbp
jbe 0x29a70
cmpq 0x40(%rsp), %rbp
jbe 0x299b8
movq %rax, %rbp
jmp 0x29a06
movq 0x80(%rsp), %r8
cmpq %r8, %rax
jae 0x29aa2
movq %rsi, %rcx
movq %rax, %rdx
movq (%rcx), %rdi
movq %rdi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rcx
cmpq %r8, %rdx
jb 0x29a83
movq %r8, %rcx
subq %rax, %rcx
addq %rcx, %rsi
movq %r8, %rax
xorl %ecx, %ecx
cmpq %rbp, %rax
jae 0x29a60
movb (%rsi), %dl
incq %rsi
movb %dl, (%rax)
incq %rax
jmp 0x29aa4
jmp 0x29ac7
notl %r13d
addl 0x30(%rsp), %r13d
movl %r13d, %ebp
jmp 0x29ac7
subl %r15d, %ebp
movq 0x28(%rsp), %rdi
testl %ebp, %ebp
jle 0x29b06
movl %ebp, %eax
movq %rax, 0x18(%rdi)
addq %rax, %r15
jmp 0x29b02
jmp 0x29aee
notl %r15d
addl 0x30(%rsp), %r15d
movl %r15d, %ebp
jmp 0x29aee
subl 0x60(%rsp), %ebp
movq 0x28(%rsp), %rdi
testl %ebp, %ebp
jle 0x29b06
movl %ebp, %r15d
addq %r15, 0x18(%rdi)
addq 0x10(%rdi), %r15
movq %r15, 0x10(%rdi)
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %ecx
jne 0x29acc
xorl %ebp, %ebp
movq 0x30(%rsp), %rax
cmpb (%rax), %bpl
sbbl %ebp, %ebp
jmp 0x29acc
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x1, %ecx
jne 0x29af3
xorl %ebp, %ebp
movq 0x30(%rsp), %rax
cmpb (%rax), %bpl
sbbl %ebp, %ebp
jmp 0x29af3