// File: /workspace/github_c_makefile_star2_O3/bluecmd[P]fst-example/gtkwave/lz4.c
// Function: LZ4_decompress_fast_continue
int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int originalSize)
{
    LZ4_streamDecode_t_internal* lz4sd = (LZ4_streamDecode_t_internal*) LZ4_streamDecode;
    int result;

    if (lz4sd->prefixEnd == (BYTE*)dest)
    {
        result = LZ4_decompress_generic(source, dest, 0, originalSize,
                                        endOnOutputSize, full, 0,
                                        usingExtDict, lz4sd->prefixEnd - lz4sd->prefixSize, lz4sd->externalDict, lz4sd->extDictSize);
        if (result <= 0) return result;
        lz4sd->prefixSize += originalSize;
        lz4sd->prefixEnd  += originalSize;
    }
    else
    {
        lz4sd->extDictSize = lz4sd->prefixSize;
        lz4sd->externalDict = (BYTE*)dest - lz4sd->extDictSize;
        result = LZ4_decompress_generic(source, dest, 0, originalSize,
                                        endOnOutputSize, full, 0,
                                        usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
        if (result <= 0) return result;
        lz4sd->prefixSize = originalSize;
        lz4sd->prefixEnd  = (BYTE*)dest + originalSize;
    }

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %rax
movslq %ecx, %rdx
leaq (%r15,%rdx), %rbx
cmpq %r15, %r8
movq %rdi, -0x38(%rbp)
movq %rdx, -0x70(%rbp)
movq %rsi, -0x30(%rbp)
movq %rbx, -0x60(%rbp)
je 0x1166f
movq %rax, 0x8(%rdi)
movq %r15, %rdx
subq %rax, %rdx
movq %rdx, (%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movq $-0x1, -0xa8(%rbp)
movq $0x1, -0x98(%rbp)
movq $0x2, -0x90(%rbp)
movq $0x3, -0x88(%rbp)
testl %ecx, %ecx
je 0x119a3
leaq -0xc(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq -0x8(%rbx), %r8
leaq -0x5(%rbx), %rax
movq %rax, -0x50(%rbp)
movq %r15, %rdi
movq %rsi, %r14
movq %r8, -0x48(%rbp)
movzbl (%r14), %ebx
incq %r14
movl %ebx, %r13d
shrl $0x4, %r13d
cmpl $0xf, %r13d
jne 0x11476
movl $0xf, %r13d
movzbl (%r14), %eax
incq %r14
addq %rax, %r13
cmpq $0xff, %rax
je 0x11464
leaq (%rdi,%r13), %r12
cmpq %r8, %r12
ja 0x1164f
movq %r14, %rax
movq (%rax), %rcx
movq %rcx, (%rdi)
addq $0x8, %rdi
addq $0x8, %rax
cmpq %r12, %rdi
jb 0x11486
addq %r13, %r14
addq $0x2, %r14
movzwl -0x2(%r14), %eax
andl $0xf, %ebx
cmpq $0xf, %rbx
jne 0x114c6
movl $0xf, %ebx
movzbl (%r14), %ecx
incq %r14
addq %rcx, %rbx
cmpq $0xff, %rcx
je 0x114b3
movq %r12, %rsi
subq %rax, %rsi
leaq (%r12,%rbx), %r13
addq $0x4, %r13
cmpq %r15, %rsi
jae 0x1154f
cmpq -0x50(%rbp), %r13
ja 0x11992
addq $0x4, %rbx
movq %r15, %rax
subq %rsi, %rax
movq %rbx, %rcx
subq %rax, %rcx
jbe 0x11593
movq %r12, %rdi
movq %rax, -0x58(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x58(%rbp), %rdx
callq 0x2240
movq -0x40(%rbp), %rdx
movq -0x58(%rbp), %rcx
addq %rcx, %r12
movq %r12, %rax
subq %r15, %rax
cmpq %rax, %rdx
jbe 0x115a0
movq %r12, %rdi
cmpq %rcx, %rbx
movq -0x48(%rbp), %r8
jle 0x1144a
movq %r15, %rax
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
cmpq %r13, %r12
jb 0x11536
movq %r12, %rdi
jmp 0x1144a
movq %r12, %rcx
subq %rsi, %rcx
cmpq $0x7, %rcx
jle 0x115b7
movq (%rsi), %rax
movq %rax, (%r12)
addq $0x8, %rsi
movq %rsi, %rax
addq $0x8, %r12
cmpq -0x68(%rbp), %r13
ja 0x115f9
movq (%rax), %rcx
movq %rcx, (%r12)
addq $0x8, %r12
addq $0x8, %rax
cmpq %r13, %r12
jb 0x11577
movq %r13, %rdi
jmp 0x1144a
movq %r12, %rdi
movq %rbx, %rdx
callq 0x22f0
jmp 0x115ab
movq %r12, %rdi
movq %r15, %rsi
callq 0x2240
movq %r13, %rdi
movq -0x48(%rbp), %r8
jmp 0x1144a
movb (%rsi), %dl
leaq 0x3500(%rip), %rax      # 0x14ac0
movq (%rax,%rcx,8), %rdi
leaq (%rsi,%rdi), %rax
subq -0xc0(%rbp,%rcx,8), %rax
movb %dl, (%r12)
movb 0x1(%rsi), %cl
movb %cl, 0x1(%r12)
movb 0x2(%rsi), %cl
movb %cl, 0x2(%r12)
movb 0x3(%rsi), %cl
movb %cl, 0x3(%r12)
movl (%rsi,%rdi), %ecx
movl %ecx, 0x4(%r12)
jmp 0x11569
cmpq -0x50(%rbp), %r13
ja 0x11992
cmpq %r8, %r12
jae 0x1162d
movq %rax, %rcx
movq %r12, %rdx
movq (%rcx), %rsi
movq %rsi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rcx
cmpq %r8, %rdx
jb 0x1160e
movq %r8, %rcx
subq %r12, %rcx
addq %rcx, %rax
movq %r8, %r12
movq %r13, %rdi
cmpq %r13, %r12
jae 0x1144a
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
cmpq %r13, %r12
jb 0x11639
jmp 0x1158b
movq -0x60(%rbp), %rbx
cmpq %rbx, %r12
je 0x1191d
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
notl %r14d
addl %eax, %r14d
jmp 0x11933
movq (%rdi), %rdx
addq 0x8(%rdi), %rdx
movq %rdx, -0x48(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movq $-0x1, -0xa8(%rbp)
movq $0x1, -0x98(%rbp)
movq $0x2, -0x90(%rbp)
movq $0x3, -0x88(%rbp)
testl %ecx, %ecx
je 0x119b6
subq %rax, %r8
leaq -0xc(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq -0x8(%rbx), %r9
leaq -0x5(%rbx), %rax
movq %rax, -0x50(%rbp)
movq %rsi, %r14
movq %r9, -0x40(%rbp)
movq %r8, -0x78(%rbp)
movzbl (%r14), %r13d
incq %r14
movl %r13d, %ebx
shrl $0x4, %ebx
cmpl $0xf, %ebx
jne 0x11711
movl $0xf, %ebx
movzbl (%r14), %eax
incq %r14
addq %rax, %rbx
cmpq $0xff, %rax
je 0x116ff
leaq (%r15,%rbx), %r12
cmpq %r9, %r12
ja 0x11907
movq %r14, %rax
movq (%rax), %rcx
movq %rcx, (%r15)
addq $0x8, %r15
addq $0x8, %rax
cmpq %r12, %r15
jb 0x11721
addq %rbx, %r14
addq $0x2, %r14
movzwl -0x2(%r14), %eax
andl $0xf, %r13d
cmpq $0xf, %r13
jne 0x11763
movl $0xf, %r13d
movzbl (%r14), %ecx
incq %r14
addq %rcx, %r13
cmpq $0xff, %rcx
je 0x11750
movq %r12, %rcx
subq %rax, %rcx
leaq (%r12,%r13), %rbx
addq $0x4, %rbx
cmpq %r8, %rcx
jae 0x117f3
cmpq -0x50(%rbp), %rbx
ja 0x1190d
addq $0x4, %r13
movq %r8, %rax
subq %rcx, %rax
movq -0x48(%rbp), %rsi
subq %rax, %rsi
movq %r13, %r15
subq %rax, %r15
jbe 0x11837
movq %r12, %rdi
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdx
callq 0x2240
movq -0x58(%rbp), %rcx
addq %rcx, %r12
movq %r12, %rax
movq -0x78(%rbp), %r8
subq %r8, %rax
cmpq %rax, %r15
jbe 0x11852
movq %r12, %r15
cmpq %rcx, %r13
movq -0x40(%rbp), %r9
jle 0x116e8
movq %r8, %rax
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
cmpq %rbx, %r12
jb 0x117da
movq %r12, %r15
jmp 0x116e8
movq %r12, %rdx
subq %rcx, %rdx
cmpq $0x7, %rdx
jle 0x11872
movq (%rcx), %rax
movq %rax, (%r12)
addq $0x8, %rcx
movq %rcx, %rax
addq $0x8, %r12
cmpq -0x68(%rbp), %rbx
ja 0x118b5
movq (%rax), %rcx
movq %rcx, (%r12)
addq $0x8, %r12
addq $0x8, %rax
cmpq %rbx, %r12
jb 0x1181b
movq %rbx, %r15
jmp 0x116e8
movq %r12, %rdi
movq %r13, %rdx
callq 0x22f0
movq %rbx, %r15
movq -0x78(%rbp), %r8
movq -0x40(%rbp), %r9
jmp 0x116e8
movq %r12, %rdi
movq %r8, %rsi
movq %r15, %rdx
movq %r8, %r15
callq 0x2240
movq %r15, %r8
movq %rbx, %r15
movq -0x40(%rbp), %r9
jmp 0x116e8
movb (%rcx), %sil
leaq 0x3244(%rip), %rax      # 0x14ac0
movq (%rax,%rdx,8), %rdi
leaq (%rcx,%rdi), %rax
subq -0xc0(%rbp,%rdx,8), %rax
movb %sil, (%r12)
movb 0x1(%rcx), %dl
movb %dl, 0x1(%r12)
movb 0x2(%rcx), %dl
movb %dl, 0x2(%r12)
movb 0x3(%rcx), %dl
movb %dl, 0x3(%r12)
movl (%rcx,%rdi), %ecx
movl %ecx, 0x4(%r12)
jmp 0x1180d
cmpq -0x50(%rbp), %rbx
ja 0x1190d
cmpq %r9, %r12
jae 0x118e5
movq %rax, %rcx
movq %r12, %rdx
movq (%rcx), %rsi
movq %rsi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rcx
cmpq %r9, %rdx
jb 0x118c6
movq %r9, %rcx
subq %r12, %rcx
addq %rcx, %rax
movq %r9, %r12
movq %rbx, %r15
cmpq %rbx, %r12
jae 0x116e8
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
cmpq %rbx, %r12
jb 0x118f1
jmp 0x1182f
cmpq -0x60(%rbp), %r12
je 0x11942
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
notl %r14d
addl %eax, %r14d
jmp 0x1195b
movq %r14, %rsi
movq %r13, %rdx
callq 0x2240
addl %r13d, %r14d
subl -0x30(%rbp), %r14d
movq -0x38(%rbp), %rdi
testl %r14d, %r14d
jle 0x1197d
movq -0x70(%rbp), %rax
movq %rax, 0x18(%rdi)
jmp 0x11979
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2240
addl %ebx, %r14d
subl -0x30(%rbp), %r14d
movq -0x38(%rbp), %rdi
testl %r14d, %r14d
jle 0x1197d
movq 0x10(%rdi), %r8
movq 0x18(%rdi), %rax
movq -0x70(%rbp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rdi)
addq %rcx, %r8
movq %r8, %rbx
movq %rbx, 0x10(%rdi)
movl %r14d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq -0x60(%rbp), %rbx
jmp 0x11664
cmpb $0x0, (%rsi)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jne 0x1197d
movl $0x1, %r14d
jmp 0x11938
cmpb $0x0, (%rsi)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jne 0x1197d
movl $0x1, %r14d
jmp 0x11968