// File: /workspace/github_c_makefile_star2_O2/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 $0x88, %rsp
movq %rdx, %r15
movq 0x10(%rdi), %r13
movq 0x18(%rdi), %rax
movslq %ecx, %r8
leaq (%rdx,%r8), %r9
cmpq %rdx, %r13
movq %rdi, -0x30(%rbp)
movq %r8, -0x68(%rbp)
movq %rsi, -0x48(%rbp)
movq %r9, -0x58(%rbp)
je 0xf2e1
movq %rax, 0x8(%rdi)
movq %r15, %rdx
subq %rax, %rdx
movq -0x30(%rbp), %rax
movq %rdx, (%rax)
movq -0x30(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xb0(%rbp)
orq $-0x1, -0x98(%rbp)
movq $0x1, -0x88(%rbp)
movq $0x2, -0x80(%rbp)
movq $0x3, -0x78(%rbp)
testl %ecx, %ecx
je 0xf5bc
pushq $0xf
popq %r8
leaq -0xc(%r9), %rax
movq %rax, -0x60(%rbp)
leaq -0x8(%r9), %r10
leaq -0x5(%r9), %rax
movq %rax, -0x50(%rbp)
movq %r15, %r13
movq %rsi, %r14
movq %r10, -0x38(%rbp)
movzbl (%r14), %edx
incq %r14
movl %edx, %ebx
shrl $0x4, %ebx
cmpl $0xf, %ebx
jne 0xf110
movq %r8, %rbx
movzbl (%r14), %eax
incq %r14
addq %rax, %rbx
cmpq $0xff, %rax
je 0xf0fe
leaq (%rbx,%r13), %r12
cmpq %r10, %r12
ja 0xf2c7
movq %r14, %rax
movq (%rax), %rcx
movq %rcx, (%r13)
addq $0x8, %r13
addq $0x8, %rax
cmpq %r12, %r13
jb 0xf120
addq %rbx, %r14
addq $0x2, %r14
movzwl -0x2(%r14), %eax
andl $0xf, %edx
cmpq $0xf, %rdx
jne 0xf15f
movq %r8, %rdx
movzbl (%r14), %ecx
incq %r14
addq %rcx, %rdx
cmpq $0xff, %rcx
je 0xf14c
movq %r12, %rsi
subq %rax, %rsi
leaq (%r12,%rdx), %r13
addq $0x4, %r13
cmpq %r15, %rsi
jae 0xf1d2
cmpq -0x50(%rbp), %r13
ja 0xf2d1
addq $0x4, %rdx
movq %r15, %rbx
subq %rsi, %rbx
movq %rdx, %rax
subq %rbx, %rax
jbe 0xf213
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, -0x40(%rbp)
callq 0x2240
addq %rbx, %r12
movq %r12, %rax
subq %r15, %rax
cmpq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
jbe 0xf21d
movq %r15, %rax
pushq $0xf
popq %r8
movq -0x38(%rbp), %r10
cmpq %r13, %r12
jae 0xf235
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
jmp 0xf1bf
movq %r12, %rcx
subq %rsi, %rcx
cmpq $0x7, %rcx
jle 0xf23d
movq (%rsi), %rax
movq %rax, (%r12)
addq $0x8, %rsi
movq %rsi, %rax
addq $0x8, %r12
cmpq -0x60(%rbp), %r13
ja 0xf27f
movq (%rax), %rcx
movq %rcx, (%r12)
addq $0x8, %r12
addq $0x8, %rax
cmpq %r13, %r12
jb 0xf1fa
jmp 0xf0ea
movq %r12, %rdi
callq 0x22f0
jmp 0xf228
movq %r12, %rdi
movq %r15, %rsi
callq 0x2240
pushq $0xf
popq %r8
movq -0x38(%rbp), %r10
jmp 0xf0ea
movq %r12, %r13
jmp 0xf0ea
movb (%rsi), %dl
leaq 0x387a(%rip), %rax      # 0x12ac0
movq (%rax,%rcx,8), %rdi
leaq (%rsi,%rdi), %rax
subq -0xb0(%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 0xf1ec
cmpq -0x50(%rbp), %r13
ja 0xf2d1
cmpq %r10, %r12
jae 0xf2bd
movq %rax, %rcx
movq %r12, %rdx
movq (%rcx), %rsi
movq %rsi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rcx
cmpq %r10, %rdx
jb 0xf290
movq %r10, %rcx
subq %r12, %rcx
addq %rcx, %rax
movq %r10, %r12
jmp 0xf2bd
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
cmpq %r13, %r12
jb 0xf2b1
jmp 0xf0ea
cmpq -0x58(%rbp), %r12
je 0xf543
movq -0x30(%rbp), %rdi
notl %r14d
addl -0x48(%rbp), %r14d
jmp 0xf55c
movq (%rdi), %rdx
addq 0x8(%rdi), %rdx
movq %rdx, -0x60(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0xb0(%rbp)
orq $-0x1, -0x98(%rbp)
movq $0x1, -0x88(%rbp)
movq $0x2, -0x80(%rbp)
movq $0x3, -0x78(%rbp)
testl %ecx, %ecx
je 0xf5c7
subq %rax, %r13
leaq -0xc(%r9), %rax
movq %rax, -0x50(%rbp)
leaq -0x8(%r9), %r8
leaq -0x5(%r9), %rax
movq %rax, -0x40(%rbp)
pushq $0xf
popq %r9
movq %rsi, %r14
movq %r8, -0x38(%rbp)
movq %r13, -0x70(%rbp)
movzbl (%r14), %edx
incq %r14
movl %edx, %ebx
shrl $0x4, %ebx
cmpl $0xf, %ebx
jne 0xf37b
movq %r9, %rbx
movzbl (%r14), %eax
incq %r14
addq %rax, %rbx
cmpq $0xff, %rax
je 0xf369
leaq (%r15,%rbx), %r12
cmpq %r8, %r12
ja 0xf534
movq %r14, %rax
movq (%rax), %rcx
movq %rcx, (%r15)
addq $0x8, %r15
addq $0x8, %rax
cmpq %r12, %r15
jb 0xf38b
addq %rbx, %r14
addq $0x2, %r14
movzwl -0x2(%r14), %eax
andl $0xf, %edx
cmpq $0xf, %rdx
jne 0xf3c9
movq %r9, %rdx
movzbl (%r14), %ecx
incq %r14
addq %rcx, %rdx
cmpq $0xff, %rcx
je 0xf3b6
movq %r12, %rcx
subq %rax, %rcx
leaq (%r12,%rdx), %r15
addq $0x4, %r15
cmpq %r13, %rcx
jae 0xf437
cmpq -0x40(%rbp), %r15
ja 0xf53a
addq $0x4, %rdx
subq %rcx, %r13
movq -0x60(%rbp), %rsi
subq %r13, %rsi
movq %rdx, %rbx
subq %r13, %rbx
jbe 0xf478
movq %r12, %rdi
movq %r13, %rdx
callq 0x2240
addq %r13, %r12
movq %r12, %rax
movq -0x70(%rbp), %r13
subq %r13, %rax
cmpq %rax, %rbx
jbe 0xf486
movq %r13, %rax
movq -0x38(%rbp), %r8
pushq $0xf
popq %r9
cmpq %r15, %r12
jae 0xf4a1
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
jmp 0xf424
movq %r12, %rdx
subq %rcx, %rdx
cmpq $0x7, %rdx
jle 0xf4a9
movq (%rcx), %rax
movq %rax, (%r12)
addq $0x8, %rcx
movq %rcx, %rax
addq $0x8, %r12
cmpq -0x50(%rbp), %r15
ja 0xf4ec
movq (%rax), %rcx
movq %rcx, (%r12)
addq $0x8, %r12
addq $0x8, %rax
cmpq %r15, %r12
jb 0xf45f
jmp 0xf355
movq %r12, %rdi
callq 0x22f0
movq -0x70(%rbp), %r13
jmp 0xf494
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2240
movq -0x38(%rbp), %r8
pushq $0xf
popq %r9
jmp 0xf355
movq %r12, %r15
jmp 0xf355
movb (%rcx), %sil
leaq 0x360d(%rip), %rax      # 0x12ac0
movq (%rax,%rdx,8), %rdi
leaq (%rcx,%rdi), %rax
subq -0xb0(%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 0xf451
cmpq -0x40(%rbp), %r15
ja 0xf53a
cmpq %r8, %r12
jae 0xf52a
movq %rax, %rcx
movq %r12, %rdx
movq (%rcx), %rsi
movq %rsi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rcx
cmpq %r8, %rdx
jb 0xf4fd
movq %r8, %rcx
subq %r12, %rcx
addq %rcx, %rax
movq %r8, %r12
jmp 0xf52a
movb (%rax), %cl
incq %rax
movb %cl, (%r12)
incq %r12
cmpq %r15, %r12
jb 0xf51e
jmp 0xf355
cmpq -0x58(%rbp), %r12
je 0xf56f
notl %r14d
addl -0x48(%rbp), %r14d
jmp 0xf584
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2240
addl %ebx, %r14d
subl -0x48(%rbp), %r14d
movq -0x30(%rbp), %rdi
testl %r14d, %r14d
jle 0xf5a7
movq -0x68(%rbp), %rax
movq %rax, 0x18(%rdi)
movq -0x58(%rbp), %r13
jmp 0xf5a3
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2240
addl %ebx, %r14d
subl -0x48(%rbp), %r14d
movq -0x30(%rbp), %rdi
testl %r14d, %r14d
jle 0xf5a7
movq 0x10(%rdi), %r13
movq 0x18(%rdi), %rax
movq -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rdi)
addq %rcx, %r13
movq %r13, 0x10(%rdi)
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, (%rsi)
jne 0xf5cc
pushq $0x1
popq %r14
jmp 0xf561
cmpb $0x0, (%rsi)
je 0xf5d2
pushq $-0x1
popq %r14
jmp 0xf5a7
pushq $0x1
popq %r14
jmp 0xf595