// File: /workspace/github_c_makefile_star2_O1/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, %r9
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %rax
movslq %ecx, %rdx
leaq (%r9,%rdx), %r8
cmpq %r9, %r14
movq %r8, -0x38(%rbp)
movq %rdi, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
movq %rsi, -0x50(%rbp)
je 0x11f69
movq %rax, 0x8(%rdi)
movq %r9, %rdx
subq %rax, %rdx
movq %rdx, (%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x90(%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 0x122e4
leaq -0xc(%r8), %rax
movq %rax, -0x60(%rbp)
leaq -0x8(%r8), %r10
leaq -0x5(%r8), %rax
movq %rax, -0x48(%rbp)
leaq 0x3e6d(%rip), %r11      # 0x15b4c
movq %r9, %r13
movq %rsi, %r15
movq %r9, -0x40(%rbp)
movq %r10, -0x30(%rbp)
movzbl (%r15), %r14d
incq %r15
movl %r14d, %ebx
shrl $0x4, %ebx
cmpl $0xf, %ebx
jne 0x11d16
movl $0xf, %ebx
movzbl (%r15), %eax
incq %r15
addq %rax, %rbx
cmpq $0xff, %rax
je 0x11d04
leaq (%rbx,%r13), %r12
cmpq %r10, %r12
jbe 0x11d5e
movl $0x6, %eax
cmpq %r8, %r12
jne 0x11eb7
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2240
leaq 0x3e0a(%rip), %r11      # 0x15b4c
movq -0x30(%rbp), %r10
movq -0x40(%rbp), %r9
movq -0x38(%rbp), %r8
addq %rbx, %r15
movl $0x3, %eax
movq %r12, %r13
jmp 0x11eb7
movq %r15, %rax
movq (%rax), %rcx
movq %rcx, (%r13)
addq $0x8, %r13
addq $0x8, %rax
cmpq %r12, %r13
jb 0x11d61
addq %rbx, %r15
addq $0x2, %r15
movzwl -0x2(%r15), %eax
andl $0xf, %r14d
cmpq $0xf, %r14
jne 0x11da4
movl $0xf, %r14d
movzbl (%r15), %ecx
incq %r15
addq %rcx, %r14
cmpq $0xff, %rcx
je 0x11d91
movq %r12, %rsi
subq %rax, %rsi
leaq (%r12,%r14), %r13
addq $0x4, %r13
cmpq %r9, %rsi
jae 0x11e36
cmpq -0x48(%rbp), %r13
ja 0x11ecb
addq $0x4, %r14
movq %r9, %rbx
subq %rsi, %rbx
movq %r14, %rax
subq %rbx, %rax
jbe 0x11e7a
movq %r12, %rdi
movq %rax, -0x58(%rbp)
movq %rbx, %rdx
callq 0x2240
movq -0x58(%rbp), %rdx
addq %rbx, %r12
movq %r12, %rax
movq -0x40(%rbp), %r9
subq %r9, %rax
cmpq %rax, %rdx
jbe 0x11e94
movl $0x2, %eax
cmpq %rbx, %r14
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r10
leaq 0x3d35(%rip), %r11      # 0x15b4c
jle 0x11d56
movq %r9, %rcx
movb (%rcx), %dl
incq %rcx
movb %dl, (%r12)
incq %r12
cmpq %r13, %r12
jb 0x11e20
jmp 0x11d56
movq %r12, %rax
subq %rsi, %rax
cmpq $0x7, %rax
jle 0x11ed5
movq (%rsi), %rax
movq %rax, (%r12)
addq $0x8, %rsi
movq %rsi, %rcx
addq $0x8, %r12
cmpq -0x60(%rbp), %r13
ja 0x11f17
movq (%rcx), %rax
movq %rax, (%r12)
addq $0x8, %r12
addq $0x8, %rcx
cmpq %r13, %r12
jb 0x11e62
xorl %eax, %eax
jmp 0x11eb7
movq %r12, %rdi
movq %r14, %rdx
callq 0x22f0
movl $0x2, %eax
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
jmp 0x11eac
movq %r12, %rdi
movq %r9, %rsi
callq 0x2240
movq -0x40(%rbp), %r9
movl $0x2, %eax
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r10
leaq 0x3c95(%rip), %r11      # 0x15b4c
cmpl $0x6, %eax
ja 0x12282
movl %eax, %eax
movslq (%r11,%rax,4), %rax
addq %r11, %rax
jmpq *%rax
movl $0x6, %eax
jmp 0x11d56
movb (%rsi), %dl
leaq 0x3de2(%rip), %rcx      # 0x15cc0
movq (%rcx,%rax,8), %rdi
leaq (%rsi,%rdi), %rcx
subq -0xc0(%rbp,%rax,8), %rcx
movb %dl, (%r12)
movb 0x1(%rsi), %al
movb %al, 0x1(%r12)
movb 0x2(%rsi), %al
movb %al, 0x2(%r12)
movb 0x3(%rsi), %al
movb %al, 0x3(%r12)
movl (%rsi,%rdi), %eax
movl %eax, 0x4(%r12)
jmp 0x11e54
movl $0x6, %eax
cmpq -0x48(%rbp), %r13
ja 0x11d56
cmpq %r10, %r12
jae 0x11f50
movq %rcx, %rax
movq %r12, %rdx
movq (%rax), %rsi
movq %rsi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rax
cmpq %r10, %rdx
jb 0x11f31
movq %r10, %rax
subq %r12, %rax
addq %rax, %rcx
movq %r10, %r12
xorl %eax, %eax
cmpq %r13, %r12
jae 0x11eb7
movb (%rcx), %dl
incq %rcx
movb %dl, (%r12)
incq %r12
jmp 0x11f52
movq (%rdi), %rdx
addq 0x8(%rdi), %rdx
movq %rdx, -0x58(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x90(%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 0x122f3
subq %rax, %r14
leaq -0xc(%r8), %rax
movq %rax, -0x60(%rbp)
leaq -0x8(%r8), %r10
leaq -0x5(%r8), %rax
movq %rax, -0x48(%rbp)
leaq 0x3b83(%rip), %r11      # 0x15b68
movq %rsi, %r15
movq %r10, -0x30(%rbp)
movq %r14, -0x78(%rbp)
movzbl (%r15), %r13d
incq %r15
movl %r13d, %ebx
shrl $0x4, %ebx
cmpl $0xf, %ebx
jne 0x12019
movl $0xf, %ebx
movzbl (%r15), %eax
incq %r15
addq %rax, %rbx
cmpq $0xff, %rax
je 0x12007
leaq (%r9,%rbx), %r12
cmpq %r10, %r12
jbe 0x1205d
movl $0x6, %eax
cmpq %r8, %r12
jne 0x121cf
movq %r9, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2240
leaq 0x3b23(%rip), %r11      # 0x15b68
movq -0x30(%rbp), %r10
movq -0x38(%rbp), %r8
addq %rbx, %r15
movl $0x3, %eax
movq %r12, %r9
jmp 0x121cf
movq %r15, %rax
movq (%rax), %rcx
movq %rcx, (%r9)
addq $0x8, %r9
addq $0x8, %rax
cmpq %r12, %r9
jb 0x12060
addq %rbx, %r15
addq $0x2, %r15
movzwl -0x2(%r15), %ecx
andl $0xf, %r13d
cmpq $0xf, %r13
jne 0x120a1
movl $0xf, %r13d
movzbl (%r15), %eax
incq %r15
addq %rax, %r13
cmpq $0xff, %rax
je 0x1208f
movq %r12, %rax
subq %rcx, %rax
leaq (%r12,%r13), %r9
addq $0x4, %r9
cmpq %r14, %rax
jae 0x12141
cmpq -0x48(%rbp), %r9
ja 0x121e3
movq %r9, -0x40(%rbp)
addq $0x4, %r13
movq %r14, %rbx
subq %rax, %rbx
movq -0x58(%rbp), %rsi
subq %rbx, %rsi
movq %r13, %r14
subq %rbx, %r14
jbe 0x12185
movq %r12, %rdi
movq %rbx, %rdx
callq 0x2240
addq %rbx, %r12
movq %r12, %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
cmpq %rax, %r14
jbe 0x121a3
movq %rcx, %r14
movl $0x2, %eax
cmpq %rbx, %r13
movq -0x38(%rbp), %r8
movq -0x30(%rbp), %r10
leaq 0x3a4a(%rip), %r11      # 0x15b68
jle 0x12055
movq %r14, %rcx
movq -0x40(%rbp), %rsi
movb (%rcx), %dl
incq %rcx
movb %dl, (%r12)
incq %r12
cmpq %rsi, %r12
jb 0x1212b
jmp 0x12055
movq %r12, %rdx
subq %rax, %rdx
cmpq $0x7, %rdx
jle 0x121ed
movq (%rax), %rcx
movq %rcx, (%r12)
addq $0x8, %rax
movq %rax, %rcx
addq $0x8, %r12
cmpq -0x60(%rbp), %r9
ja 0x12230
movq (%rcx), %rax
movq %rax, (%r12)
addq $0x8, %r12
addq $0x8, %rcx
cmpq %r9, %r12
jb 0x1216d
xorl %eax, %eax
jmp 0x121cf
movq %r12, %rdi
movq %r13, %rdx
callq 0x22f0
movl $0x2, %eax
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movq -0x78(%rbp), %r14
jmp 0x121c4
movq %r12, %rdi
movq %rcx, %rbx
movq %rcx, %rsi
movq %r14, %rdx
callq 0x2240
movl $0x2, %eax
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
movq %rbx, %r14
movq -0x30(%rbp), %r10
leaq 0x3999(%rip), %r11      # 0x15b68
cmpl $0x6, %eax
ja 0x122a4
movl %eax, %eax
movslq (%r11,%rax,4), %rax
addq %r11, %rax
jmpq *%rax
movl $0x6, %eax
jmp 0x12055
movb (%rax), %sil
leaq 0x3ac9(%rip), %rcx      # 0x15cc0
movq (%rcx,%rdx,8), %rdi
leaq (%rax,%rdi), %rcx
subq -0xc0(%rbp,%rdx,8), %rcx
movb %sil, (%r12)
movb 0x1(%rax), %dl
movb %dl, 0x1(%r12)
movb 0x2(%rax), %dl
movb %dl, 0x2(%r12)
movb 0x3(%rax), %dl
movb %dl, 0x3(%r12)
movl (%rax,%rdi), %eax
movl %eax, 0x4(%r12)
jmp 0x1215f
movl $0x6, %eax
cmpq -0x48(%rbp), %r9
ja 0x12055
cmpq %r10, %r12
jae 0x12269
movq %rcx, %rax
movq %r12, %rdx
movq (%rax), %rsi
movq %rsi, (%rdx)
addq $0x8, %rdx
addq $0x8, %rax
cmpq %r10, %rdx
jb 0x1224a
movq %r10, %rax
subq %r12, %rax
addq %rax, %rcx
movq %r10, %r12
xorl %eax, %eax
cmpq %r9, %r12
jae 0x121cf
movb (%rcx), %dl
incq %rcx
movb %dl, (%r12)
incq %r12
jmp 0x1226b
jmp 0x12291
notl %r15d
addl -0x50(%rbp), %r15d
jmp 0x12291
subl -0x50(%rbp), %r15d
testl %r15d, %r15d
jle 0x122cf
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x122cb
jmp 0x122b3
notl %r15d
addl -0x50(%rbp), %r15d
jmp 0x122b3
subl -0x50(%rbp), %r15d
testl %r15d, %r15d
jle 0x122cf
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
addq %rcx, 0x18(%rax)
addq 0x10(%rax), %rcx
movq %rcx, %r8
movq %r8, 0x10(%rax)
movl %r15d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
cmpb (%rsi), %r15b
sbbl %r15d, %r15d
orl $0x1, %r15d
jmp 0x12291
xorl %r15d, %r15d
cmpb (%rsi), %r15b
sbbl %r15d, %r15d
orl $0x1, %r15d
jmp 0x122b3