// File: /workspace/github_c_makefile_star2_O3/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, %r15d
movq %rdx, %r14
movq %rsi, %rbx
movl 0x4018(%rdi), %esi
addq 0x4008(%rdi), %rsi
cmpq %rbx, %rsi
cmovaq %rbx, %rsi
movq %rdi, -0x58(%rbp)
callq 0xfeae
xorl %eax, %eax
cmpl $0x7e000000, %r15d      # imm = 0x7E000000
ja 0x1049f
movslq %r15d, %rax
leaq (%rbx,%rax), %rcx
movq %rcx, -0xa0(%rbp)
movq %r14, -0x60(%rbp)
movq %r14, %r8
movq %rbx, %r12
movl %r15d, -0x44(%rbp)
cmpl $0xd, %r15d
movq -0x58(%rbp), %r10
jae 0x10021
movq -0xa0(%rbp), %r14
subq %r12, %r14
cmpq $0xf, %r14
jb 0x10475
leaq -0xf(%r14), %rax
movb $-0x10, (%r8)
leaq 0x1(%r8), %rdi
cmpq $0xff, %rax
jb 0x10017
leaq -0x10e(%r14), %rax
movabsq $-0x7f7f7f7f7f7f7f7f, %rcx # imm = 0x8080808080808081
mulq %rcx
movq %rdx, %r13
shrq $0x7, %r13
leaq 0x1(%r13), %rdx
movl $0xff, %esi
movq %r8, %r15
callq 0x2190
movq %r13, %rax
shlq $0x8, %rax
leaq (%r15,%r13), %rdi
addq $0x2, %rdi
subq %rax, %r13
leaq (%r14,%r13), %rax
addq $-0x10e, %rax           # imm = 0xFEF2
movb %al, (%rdi)
movq %rdi, %r8
jmp 0x1047e
movl 0x4018(%r10), %edx
movq 0x4008(%r10), %r11
movl 0x4000(%r10), %edi
movabsq $0xcf1bbcdcbb, %rsi     # imm = 0xCF1BBCDCBB
movq (%rbx), %rcx
imulq %rsi, %rcx
shrq $0x1c, %rcx
andl $0xfff, %ecx            # imm = 0xFFF
movl %edi, (%r10,%rcx,4)
movq -0x60(%rbp), %r8
movq %rbx, %r12
cmpl $0xd, -0x44(%rbp)
je 0xffa7
movq %rdi, %rsi
addq %r11, %rdx
movq %rdx, -0xa8(%rbp)
subq %rbx, %rdx
movq %rdx, -0x80(%rbp)
leaq (%rbx,%rax), %rcx
addq $-0xc, %rcx
movq %rcx, -0x68(%rbp)
addq %rbx, %rax
addq $-0x5, %rax
movq %rax, -0x30(%rbp)
movq %rdi, %rcx
negq %rcx
movq %rbx, %rax
subq %rdi, %rax
movq %rax, -0x70(%rbp)
leaq 0x2(%rbx), %rax
addq %rbx, %rcx
movq %rcx, -0x78(%rbp)
notq %rsi
addq %rbx, %rsi
movq %rsi, -0x98(%rbp)
movq %rbx, %r12
movq -0x60(%rbp), %r8
movq %rbx, -0x40(%rbp)
movq %r11, -0x50(%rbp)
movq %r8, -0x38(%rbp)
leaq 0x1(%r12), %r15
movq 0x1(%r12), %rdx
movl $0x41, %ecx
movl $0x1, %esi
movq %rax, %rdi
movabsq $0xcf1bbcdcbb, %rax     # imm = 0xCF1BBCDCBB
imulq %rax, %rdx
shrq $0x1c, %rdx
movl %edx, %r8d
andl $0xfff, %r8d            # imm = 0xFFF
movl (%r10,%r8,4), %eax
movq (%rdi), %rdx
movl %r15d, %r9d
movq -0x70(%rbp), %r14
subl %r14d, %r9d
movl %r9d, (%r10,%r8,4)
leaq (%r14,%rax), %r8
addq $0xffff, %r8            # imm = 0xFFFF
cmpq %r15, %r8
jb 0x10144
movq -0x70(%rbp), %r8
leaq (%r8,%rax), %r13
cmpq %rbx, %r13
movl $0x0, %r14d
cmovbq -0x80(%rbp), %r14
movl (%r13,%r14), %r8d
cmpl (%r15), %r8d
je 0x10163
movl %esi, %eax
addq %rdi, %rax
leal 0x1(%rcx), %r8d
shrl $0x6, %ecx
movl %ecx, %esi
movl %r8d, %ecx
movq %rdi, %r15
cmpq -0x68(%rbp), %rax
jbe 0x100e0
jmp 0x104ca
cmpq %rbx, %r13
cmovbq %r11, %rbx
cmpq %r12, %r15
movq -0x38(%rbp), %r8
jbe 0x101bb
leaq (%r14,%r13), %rcx
cmpq %rbx, %rcx
jbe 0x101bb
leaq (%r14,%rax), %rdx
addq -0x98(%rbp), %rdx
xorl %ecx, %ecx
movb -0x1(%r15,%rcx), %sil
cmpb (%rdx,%rcx), %sil
jne 0x101c1
leaq (%r15,%rcx), %rdi
decq %rdi
leaq -0x1(%rcx), %rsi
cmpq %r12, %rdi
jbe 0x101af
addq %rdx, %rcx
cmpq %rbx, %rcx
movq %rsi, %rcx
ja 0x10189
addq %rsi, %r15
addq -0x78(%rbp), %rax
addq %rsi, %rax
jmp 0x101cb
movq -0x30(%rbp), %rcx
jmp 0x101d2
addq %rcx, %r15
addq -0x78(%rbp), %rax
addq %rcx, %rax
movq -0x30(%rbp), %rcx
movq %rax, %r13
movq %r15, %rdx
subq %r12, %rdx
leaq 0x1(%r8), %rdi
cmpl $0xf, %edx
jb 0x10274
leal -0xf(%rdx), %eax
movb $-0x10, (%r8)
cmpl $0xff, %eax
jl 0x1026d
movl $0x1fd, %ecx            # imm = 0x1FD
cmpl %ecx, %eax
cmovael %ecx, %eax
addl %r12d, %eax
negl %eax
leal (%r15,%rax), %ecx
addl $0xef, %ecx
movl $0x80808081, %eax       # imm = 0x80808081
imulq %rax, %rcx
shrq $0x27, %rcx
movq %rcx, -0x88(%rbp)
movq %rdx, -0x90(%rbp)
leaq 0x1(%rcx), %rdx
movl $0xff, %esi
callq 0x2190
movq -0x90(%rbp), %rdx
movq -0x38(%rbp), %r8
movq -0x50(%rbp), %r11
movq -0x88(%rbp), %rsi
movl %esi, %eax
shll $0x8, %eax
movl %esi, %ecx
subl %eax, %ecx
leaq (%r8,%rsi), %rdi
addq $0x2, %rdi
movl %r15d, %eax
subl %r12d, %eax
addl %ecx, %eax
addl $0xfffffef2, %eax       # imm = 0xFFFFFEF2
movq -0x30(%rbp), %rcx
movb %al, (%rdi)
incq %rdi
jmp 0x1027c
movl %edx, %eax
shlb $0x4, %al
movb %al, (%r8)
movl %edx, %edx
addq %rdi, %rdx
movq (%r12), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
addq $0x8, %r12
cmpq %rdx, %rdi
jb 0x10281
movq %r8, -0x38(%rbp)
movq %r15, %r12
movl %r12d, %eax
subl %r13d, %eax
movq %rdx, %r15
movw %ax, (%rdx)
cmpq %r11, %rbx
je 0x102cc
leaq 0x4(%r12), %rdi
addq $0x4, %r13
movq %r13, %rsi
movq %rcx, %rdx
callq 0x135af
movl %eax, %r13d
addl $0x4, %eax
addq %rax, %r12
jmp 0x1030f
leaq (%r14,%r13), %rax
movq -0xa8(%rbp), %rbx
subq %rax, %rbx
addq %r12, %rbx
cmpq %rcx, %rbx
cmovaq %rcx, %rbx
leaq 0x4(%r12), %rdi
leaq (%r14,%r13), %rsi
addq $0x4, %rsi
movq %rbx, %rdx
movq %rcx, %r14
callq 0x135af
movl %eax, %r13d
leal 0x4(%r13), %eax
addq %rax, %r12
cmpq %rbx, %r12
je 0x1043e
movq -0x40(%rbp), %rbx
leaq 0x2(%r15), %r8
movq -0x38(%rbp), %rcx
movb (%rcx), %al
cmpl $0xf, %r13d
movq -0x58(%rbp), %r10
jb 0x1039e
addb $0xf, %al
movb %al, (%rcx)
leal -0xf(%r13), %eax
cmpl $0x1fe, %eax            # imm = 0x1FE
jb 0x1037f
leal -0x20d(%r13), %ebx
movl $0x80808081, %eax       # imm = 0x80808081
imulq %rax, %rbx
shrq $0x28, %rbx
leal (%rbx,%rbx), %r14d
leaq 0x2(%r14), %rdx
movq %r8, %rdi
movl $0xff, %esi
callq 0x2190
movq -0x58(%rbp), %r10
shll $0x9, %ebx
movl %r14d, %eax
subl %ebx, %eax
movq -0x40(%rbp), %rbx
addl %r13d, %eax
addl $0xfffffdf3, %eax       # imm = 0xFFFFFDF3
leaq (%r15,%r14), %r8
addq $0x4, %r8
movq -0x50(%rbp), %r11
cmpl $0xff, %eax
jb 0x10396
addl $0xffffff01, %eax       # imm = 0xFFFFFF01
movb $-0x1, (%r8)
incq %r8
movb %al, (%r8)
incq %r8
jmp 0x103a7
addb %r13b, %al
movb %al, (%rcx)
movq -0x50(%rbp), %r11
cmpq -0x68(%rbp), %r12
ja 0xffa7
leaq -0x2(%r12), %rax
movq -0x2(%r12), %rcx
movabsq $0xcf1bbcdcbb, %rdx     # imm = 0xCF1BBCDCBB
imulq %rdx, %rcx
shrq $0x1c, %rcx
movl $0xfff, %edi            # imm = 0xFFF
andl %edi, %ecx
movq -0x70(%rbp), %rsi
subl %esi, %eax
movl %eax, (%r10,%rcx,4)
movq (%r12), %rax
imulq %rdx, %rax
shrq $0x1c, %rax
andl %edi, %eax
movl (%r10,%rax,4), %ecx
leaq (%rsi,%rcx), %r13
cmpq %rbx, %r13
movl $0x0, %r14d
cmovbq -0x80(%rbp), %r14
cmovbq %r11, %rbx
movl %r12d, %edx
subl %esi, %edx
movl %edx, (%r10,%rax,4)
leaq (%rsi,%rcx), %rax
addq $0xffff, %rax           # imm = 0xFFFF
cmpq %r12, %rax
jb 0x1045d
movl (%r13,%r14), %eax
cmpl (%r12), %eax
jne 0x1045d
leaq 0x1(%r8), %rdx
movb $0x0, (%r8)
movq %r8, -0x38(%rbp)
movq -0x30(%rbp), %rcx
jmp 0x1029c
movq %r12, %rdi
movq -0x40(%rbp), %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x135af
addl %eax, %r13d
movl %eax, %eax
addq %rax, %r12
jmp 0x10313
leaq 0x2(%r12), %rax
cmpq -0x68(%rbp), %rax
movq -0x40(%rbp), %rbx
jbe 0x100c8
jmp 0xffa7
movl %r14d, %eax
shlb $0x4, %al
movb %al, (%r8)
incq %r8
movq %r8, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r8, %r15
callq 0x2240
movq %r15, %rax
addl %r14d, %eax
subl -0x60(%rbp), %eax
movl -0x44(%rbp), %r15d
movq -0x58(%rbp), %rcx
movq %rbx, 0x4008(%rcx)
movl %r15d, 0x4018(%rcx)
addl %r15d, 0x4000(%rcx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %r8
jmp 0xffa7