// File: /workspace/github_c_makefile_star2_O1/bluecmd[P]fst-example/gtkwave/lz4.c
// Function: LZ4_compress_forceExtDict
int LZ4_compress_forceExtDict (LZ4_stream_t* LZ4_dict, const char* source, char* dest, int inputSize)
{
    LZ4_stream_t_internal* streamPtr = (LZ4_stream_t_internal*)LZ4_dict;
    int result;
    const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;

    const BYTE* smallest = dictEnd;
    if (smallest > (const BYTE*) source) smallest = (const BYTE*) source;
    LZ4_renormDictT((LZ4_stream_t_internal*)LZ4_dict, smallest);

    result = LZ4_compress_generic(LZ4_dict, source, dest, inputSize, 0, notLimited, byU32, usingExtDict, noDictIssue, 1);

    streamPtr->dictionary = (const BYTE*)source;
    streamPtr->dictSize = (U32)inputSize;
    streamPtr->currentOffset += (U32)inputSize;

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r14
movl 0x4018(%rdi), %esi
addq 0x4008(%rdi), %rsi
cmpq %r14, %rsi
cmovaq %r14, %rsi
movq %rdi, -0x40(%rbp)
callq 0x10494
movq %r14, %r9
xorl %eax, %eax
cmpl $0x7e000000, %ebx       # imm = 0x7E000000
ja 0x10ac5
movslq %ebx, %r12
movq %r15, %rcx
movq %r9, %r13
cmpl $0xd, %ebx
movq %r9, -0x48(%rbp)
jl 0x10a27
movl %ebx, -0x54(%rbp)
movq -0x40(%rbp), %rbx
movl 0x4018(%rbx), %eax
movq 0x4008(%rbx), %rdi
addq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rax, %r11
subq %r9, %r11
leaq (%r9,%r12), %rax
addq $-0xc, %rax
movq %rax, -0x78(%rbp)
movq %r12, -0x90(%rbp)
leaq -0x5(%r9,%r12), %rax
movq %rax, -0x68(%rbp)
movl 0x4000(%rbx), %eax
movq %r9, %rcx
subq %rax, %rcx
movq %rcx, -0x88(%rbp)
movabsq $0xcf1bbcdcbb, %rdx     # imm = 0xCF1BBCDCBB
movq (%r9), %rcx
imulq %rdx, %rcx
shrq $0x1c, %rcx
movl $0xfff, %esi            # imm = 0xFFF
andl %esi, %ecx
movl %eax, (%rbx,%rcx,4)
movq %r15, %rax
leaq 0x1(%r9), %r15
movq 0x1(%r9), %r14
imulq %rdx, %r14
shrq $0x1c, %r14
andl %esi, %r14d
xorl %r12d, %r12d
movq %rax, -0x98(%rbp)
movq %rax, -0x30(%rbp)
movq %r9, %r13
movq %r9, -0x50(%rbp)
movq %rdi, -0x70(%rbp)
movq %r11, -0x80(%rbp)
movl $0x40, %edx
movl $0x1, %ecx
movq %r8, %rax
movl %ecx, %esi
addq %r15, %rsi
cmpq -0x78(%rbp), %rsi
ja 0x106b3
movl %r14d, %edi
movl (%rbx,%rdi,4), %eax
movq -0x88(%rbp), %r10
addq %r10, %rax
xorl %ecx, %ecx
cmpq %r9, %rax
movl $0x0, %r12d
cmovbq %r11, %r12
movq %r9, %r8
cmovbq -0x70(%rbp), %r8
movq %r8, -0x50(%rbp)
movq (%rsi), %r14
movl %r15d, %r8d
subl %r10d, %r8d
movl %r8d, (%rbx,%rdi,4)
movabsq $0xcf1bbcdcbb, %rdi     # imm = 0xCF1BBCDCBB
imulq %rdi, %r14
shrq $0x1c, %r14
andl $0xfff, %r14d           # imm = 0xFFF
cmpq -0x78(%rbp), %rsi
ja 0x106bc
leaq 0xffff(%rax), %rcx
cmpq %r15, %rcx
jb 0x106a4
movl (%rax,%r12), %ecx
cmpl (%r15), %ecx
je 0x106ba
movl %edx, %ecx
shrl $0x6, %ecx
incl %edx
movq %rsi, %r15
jmp 0x1062d
movl $0x3, %ecx
jmp 0x10689
xorl %ecx, %ecx
testl %ecx, %ecx
je 0x106c8
movq %rax, %r8
jmp 0x109fe
cmpq %r13, %r15
jbe 0x1070c
leaq (%rax,%r12), %rcx
cmpq -0x50(%rbp), %rcx
jbe 0x1070c
leaq -0x1(%r12), %rcx
decq %r15
movq %r15, %rdx
movb (%rdx), %sil
cmpb (%rax,%rcx), %sil
jne 0x10711
leaq -0x1(%rax), %r8
leaq -0x1(%rdx), %r15
cmpq %r13, %rdx
jbe 0x10707
addq %rcx, %rax
movq %r15, %rdx
cmpq -0x50(%rbp), %rax
movq %r8, %rax
ja 0x106e2
incq %r15
jmp 0x1071a
movq %rax, %r8
jmp 0x1071a
incq %rdx
movq %rax, %r8
movq %rdx, %r15
movq %r15, %rdx
subq %r13, %rdx
movq -0x30(%rbp), %rcx
leaq 0x1(%rcx), %rdi
cmpl $0xf, %edx
jb 0x107bc
leal -0xf(%rdx), %eax
movb $-0x10, (%rcx)
cmpl $0xff, %eax
jl 0x107b5
movl $0x1fd, %ecx            # imm = 0x1FD
cmpl %ecx, %eax
cmovgel %ecx, %eax
addl %r13d, %eax
negl %eax
leal (%r15,%rax), %ecx
addl $0xef, %ecx
movl $0x80808081, %eax       # imm = 0x80808081
imulq %rax, %rcx
shrq $0x27, %rcx
movq %rcx, -0xa0(%rbp)
movq %rdx, -0x60(%rbp)
leal 0x1(%rcx), %edx
movl $0xff, %esi
movq %r8, -0x38(%rbp)
callq 0x2190
movq -0x60(%rbp), %rdx
movq -0x38(%rbp), %r8
movq -0xa0(%rbp), %rsi
movl %esi, %eax
shll $0x8, %eax
movl %esi, %ecx
subl %eax, %ecx
movq -0x30(%rbp), %rax
leaq (%rax,%rsi), %rdi
addq $0x2, %rdi
movl %r15d, %eax
subl %r13d, %eax
addl %ecx, %eax
addl $0xfffffef2, %eax       # imm = 0xFFFFFEF2
movq -0x30(%rbp), %rcx
movb %al, (%rdi)
incq %rdi
jmp 0x107c3
movl %edx, %eax
shlb $0x4, %al
movb %al, (%rcx)
movl %edx, %edx
addq %rdi, %rdx
movq (%r13), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
addq $0x8, %r13
cmpq %rdx, %rdi
jb 0x107c8
movq %rcx, -0x38(%rbp)
movq %r15, %r13
movq -0x68(%rbp), %r15
movl %r13d, %eax
subl %r8d, %eax
movq %rdx, -0x30(%rbp)
movw %ax, (%rdx)
movq -0x70(%rbp), %rax
cmpq %rax, -0x50(%rbp)
je 0x1081f
leaq 0x4(%r13), %rdi
leaq 0x4(%r8), %rsi
movq %r15, %rdx
movq %r8, %r15
callq 0x143d2
movl %eax, %esi
addl $0x4, %eax
addq %rax, %r13
movq %r15, -0x60(%rbp)
jmp 0x1087c
leaq (%r8,%r12), %rax
movq -0xa8(%rbp), %rbx
movq %rax, -0x60(%rbp)
subq %rax, %rbx
addq %r13, %rbx
cmpq %r15, %rbx
cmovaq %r15, %rbx
leaq 0x4(%r13), %rdi
leaq (%r8,%r12), %rsi
addq $0x4, %rsi
movq %rbx, %rdx
callq 0x143d2
movl %eax, %esi
leal 0x4(%rsi), %eax
addq %rax, %r13
cmpq %rbx, %r13
jne 0x10878
movq %r13, %rdi
movq %rsi, %rbx
movq -0x48(%rbp), %rsi
movq %r15, %rdx
callq 0x143d2
movq %rbx, %rsi
addl %eax, %esi
movl %eax, %eax
addq %rax, %r13
movq -0x40(%rbp), %rbx
movq -0x30(%rbp), %rcx
leaq 0x2(%rcx), %rdi
movq -0x38(%rbp), %rdx
movb (%rdx), %al
cmpl $0xf, %esi
movq -0x80(%rbp), %r11
jb 0x10901
addb $0xf, %al
movb %al, (%rdx)
leal -0xf(%rsi), %eax
cmpl $0x1fe, %eax            # imm = 0x1FE
jb 0x10910
leal -0x20d(%rsi), %r15d
movl $0x80808081, %eax       # imm = 0x80808081
imulq %rax, %r15
shrq $0x28, %r15
leal (%r15,%r15), %ebx
leal 0x2(,%r15,2), %edx
movq %rsi, -0x38(%rbp)
movl $0xff, %esi
callq 0x2190
movq -0x80(%rbp), %r11
shll $0x9, %r15d
movl %ebx, %eax
subl %r15d, %eax
movq -0x68(%rbp), %r15
movq -0x38(%rbp), %rcx
addl %ecx, %eax
addl $0xfffffdf3, %eax       # imm = 0xFFFFFDF3
movq -0x30(%rbp), %rcx
leaq (%rcx,%rbx), %rdi
addq $0x4, %rdi
movq -0x40(%rbp), %rbx
movq -0x48(%rbp), %r9
jmp 0x10918
addb %sil, %al
movb %al, (%rdx)
movq -0x48(%rbp), %r9
movq -0x68(%rbp), %r15
jmp 0x1092f
movq -0x48(%rbp), %r9
movq -0x68(%rbp), %r15
cmpl $0xff, %eax
jb 0x1092a
addl $0xffffff01, %eax       # imm = 0xFFFFFF01
movb $-0x1, (%rdi)
incq %rdi
movb %al, (%rdi)
incq %rdi
movq %rdi, -0x30(%rbp)
cmpq -0x78(%rbp), %r13
ja 0x109f2
leaq -0x2(%r13), %rax
movq -0x2(%r13), %rcx
movabsq $0xcf1bbcdcbb, %rdx     # imm = 0xCF1BBCDCBB
imulq %rdx, %rcx
shrq $0x1c, %rcx
movl $0xfff, %edi            # imm = 0xFFF
andl %edi, %ecx
movq -0x88(%rbp), %rsi
subl %esi, %eax
movl %eax, (%rbx,%rcx,4)
movq (%r13), %rax
imulq %rdx, %rax
shrq $0x1c, %rax
andl %edi, %eax
movl (%rbx,%rax,4), %ecx
leaq (%rsi,%rcx), %r8
cmpq %r9, %r8
movl $0x0, %r12d
cmovbq %r11, %r12
movq %r9, %rdx
cmovbq -0x70(%rbp), %rdx
movq %rdx, -0x50(%rbp)
movl %r13d, %edx
subl %esi, %edx
movl %edx, (%rbx,%rax,4)
leaq (%rsi,%rcx), %rax
addq $0xffff, %rax           # imm = 0xFFFF
cmpq %r13, %rax
jb 0x109cd
movl (%r8,%r12), %eax
cmpl (%r13), %eax
jne 0x109cd
movq -0x30(%rbp), %rax
leaq 0x1(%rax), %rdx
movb $0x0, (%rax)
movq %rax, -0x38(%rbp)
jmp 0x107e7
leaq 0x1(%r13), %r15
movq 0x1(%r13), %r14
movabsq $0xcf1bbcdcbb, %rax     # imm = 0xCF1BBCDCBB
imulq %rax, %r14
shrq $0x1c, %r14
andl $0xfff, %r14d           # imm = 0xFFF
xorl %ecx, %ecx
jmp 0x109fe
movl $0x4, %ecx
movq -0x60(%rbp), %r8
movq %r13, %r15
testl %ecx, %ecx
je 0x10620
addl $-0x3, %ecx
cmpl $0x1, %ecx
ja 0x10aee
movl -0x54(%rbp), %ebx
movq -0x98(%rbp), %r15
movq -0x90(%rbp), %r12
movq -0x30(%rbp), %rcx
addq %r9, %r12
subq %r13, %r12
cmpq $0xf, %r12
jb 0x10a9c
leaq -0xf(%r12), %rax
movb $-0x10, (%rcx)
leaq 0x1(%rcx), %rdi
cmpq $0xff, %rax
jb 0x10a95
leaq -0x10e(%r12), %rax
movq %rcx, -0x30(%rbp)
movabsq $-0x7f7f7f7f7f7f7f7f, %rcx # imm = 0x8080808080808081
mulq %rcx
movq %rdx, %r14
shrq $0x7, %r14
leaq 0x1(%r14), %rdx
movl $0xff, %esi
callq 0x2190
movq %r14, %rax
shlq $0x8, %rax
movq -0x30(%rbp), %rcx
leaq (%r14,%rcx), %rdi
addq $0x2, %rdi
subq %rax, %r14
leaq (%r12,%r14), %rax
addq $-0x10e, %rax           # imm = 0xFEF2
movb %al, (%rdi)
movq %rdi, %rcx
jmp 0x10aa4
movl %r12d, %eax
shlb $0x4, %al
movb %al, (%rcx)
incq %rcx
movq %rcx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rcx, %r14
callq 0x2240
movq %r14, %rax
addl %r12d, %eax
subl %r15d, %eax
movq -0x48(%rbp), %r9
movq -0x40(%rbp), %rcx
movq %r9, 0x4008(%rcx)
movl %ebx, 0x4018(%rcx)
addl %ebx, 0x4000(%rcx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
movl -0x54(%rbp), %ebx
jmp 0x10ac5