// File: /workspace/github_c_makefile_star2_O2/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 $0x68, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
movl 0x4018(%rdi), %esi
addq 0x4008(%rdi), %rsi
cmpq %r13, %rsi
cmovaq %r13, %rsi
callq 0xdcd6
xorl %eax, %eax
cmpl $0x7e000000, %ebx       # imm = 0x7E000000
ja 0xe190
movslq %ebx, %rax
leaq (%rax,%r13), %r12
movq %r15, %rdi
movq %r13, %rsi
cmpl $0xd, %ebx
movq %r15, -0x70(%rbp)
jb 0xe146
movl %ebx, -0x34(%rbp)
movl 0x4018(%r14), %ecx
movq 0x4008(%r14), %rdx
movq %rdx, -0x58(%rbp)
addq %rdx, %rcx
movq %rcx, -0x78(%rbp)
movq %rcx, %rbx
subq %r13, %rbx
leaq (%rax,%r13), %rcx
addq $-0xc, %rcx
movq %rcx, -0x68(%rbp)
leaq -0x5(%r13,%rax), %rax
movq %rax, -0x48(%rbp)
movl 0x4000(%r14), %eax
movq %r15, %rdx
movq %r13, %r15
subq %rax, %r15
movabsq $0xcf1bbcdcbb, %rsi     # imm = 0xCF1BBCDCBB
movq (%r13), %rcx
imulq %rsi, %rcx
shrq $0x1c, %rcx
andl $0xfff, %ecx            # imm = 0xFFF
movl %eax, (%r14,%rcx,4)
negq %rax
addq %r13, %rax
movq %rax, -0x60(%rbp)
pushq $0x40
popq %r9
pushq $0x1
popq %rax
movq %rdx, -0x30(%rbp)
movq %r13, %rsi
movq %r14, -0x88(%rbp)
movq %r13, -0x50(%rbp)
movq %r12, -0x40(%rbp)
movq %rbx, -0x80(%rbp)
leaq 0x1(%rsi), %rdi
movq 0x1(%rsi), %r8
movl %r9d, %edx
movl %eax, %r9d
addq %rdi, %r9
cmpq -0x68(%rbp), %r9
ja 0xe1b4
movabsq $0xcf1bbcdcbb, %rax     # imm = 0xCF1BBCDCBB
imulq %rax, %r8
shrq $0x1c, %r8
movl %r8d, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
movl (%r14,%rcx,4), %eax
movq (%r9), %r8
movl %edi, %r10d
subl %r15d, %r10d
movl %r10d, (%r14,%rcx,4)
leaq (%r15,%rax), %rcx
addq $0xffff, %rcx           # imm = 0xFFFF
cmpq %rdi, %rcx
jb 0xdec1
leaq (%r15,%rax), %r10
cmpq %r13, %r10
movl $0x0, %ecx
cmovbq %rbx, %rcx
movl (%r10,%rcx), %r11d
cmpl (%rdi), %r11d
je 0xdecd
movl %edx, %eax
shrl $0x6, %eax
incl %edx
movq %r9, %rdi
jmp 0xde5c
cmpq %r13, %r10
movq %r13, %rdx
cmovbq -0x58(%rbp), %rdx
leaq (%rcx,%rax), %r11
addq -0x60(%rbp), %r11
movl %edi, %r10d
shlb $0x4, %r10b
movl %esi, %r8d
shlb $0x4, %r8b
subb %r8b, %r10b
xorl %r8d, %r8d
leaq (%rdi,%r8), %r12
movq %r12, %r9
subq %rsi, %r9
jbe 0xdf1e
leaq (%r11,%r8), %rbx
cmpq %rdx, %rbx
jbe 0xdf1e
movb -0x1(%rdi,%r8), %bl
cmpb -0x1(%r11,%r8), %bl
jne 0xdf1e
decq %r8
addb $-0x10, %r10b
jmp 0xdef4
movl %edi, %r11d
subl %esi, %r11d
addl %r8d, %r11d
cmpl $0xf, %r11d
jb 0xdf5b
subl %esi, %edi
leal (%rdi,%r8), %r10d
addl $-0xf, %r10d
movq -0x30(%rbp), %rdi
movb $-0x10, (%rdi)
addq $0x2, %rdi
cmpl $0xff, %r10d
jl 0xdf68
movb $-0x1, -0x1(%rdi)
addl $0xffffff01, %r10d      # imm = 0xFFFFFF01
incq %rdi
jmp 0xdf42
movq -0x30(%rbp), %r11
leaq 0x1(%r11), %rdi
movb %r10b, (%r11)
jmp 0xdf6c
movb %r10b, -0x1(%rdi)
addq -0x60(%rbp), %rax
addq %r8, %rax
movl %r9d, %r14d
addq %rdi, %r14
movq (%rsi), %r8
movq %r8, (%rdi)
addq $0x8, %rdi
addq $0x8, %rsi
cmpq %r14, %rdi
jb 0xdf79
movq -0x30(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl %r12d, %esi
subl %eax, %esi
movw %si, (%r14)
cmpq -0x58(%rbp), %rdx
je 0xdfc2
leaq 0x4(%r12), %rdi
addq $0x4, %rax
movq %rax, %rsi
movq -0x48(%rbp), %rdx
callq 0x111df
movl %eax, %ebx
addl $0x4, %eax
addq %rax, %r12
jmp 0xe015
leaq (%rax,%rcx), %rdx
movq -0x78(%rbp), %r13
subq %rdx, %r13
addq %r12, %r13
movq -0x48(%rbp), %rdx
cmpq %rdx, %r13
cmovaq %rdx, %r13
leaq 0x4(%r12), %rdi
leaq (%rax,%rcx), %rsi
addq $0x4, %rsi
movq %r13, %rdx
callq 0x111df
movl %eax, %ebx
leal 0x4(%rbx), %eax
addq %rax, %r12
cmpq %r13, %r12
jne 0xe015
movq %r13, %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x111df
addl %eax, %ebx
movl %eax, %r12d
addq %r13, %r12
addq $0x2, %r14
movq -0x30(%rbp), %rcx
movb (%rcx), %al
cmpl $0xf, %ebx
jb 0xe068
addb $0xf, %al
movb %al, (%rcx)
addl $-0xf, %ebx
movq -0x50(%rbp), %r13
cmpl $0x1fe, %ebx            # imm = 0x1FE
jb 0xe048
orw $-0x1, (%r14)
addq $0x2, %r14
addl $0xfffffe02, %ebx       # imm = 0xFFFFFE02
jmp 0xe02f
cmpl $0xff, %ebx
jb 0xe05d
addl $0xffffff01, %ebx       # imm = 0xFFFFFF01
movb $-0x1, (%r14)
incq %r14
movb %bl, (%r14)
incq %r14
movq %r14, %rdi
jmp 0xe073
addb %bl, %al
movb %al, (%rcx)
movq %r14, %rdi
movq -0x50(%rbp), %r13
cmpq -0x68(%rbp), %r12
movq -0x88(%rbp), %r14
movq -0x80(%rbp), %rbx
ja 0xe13c
leaq -0x2(%r12), %rax
movq -0x2(%r12), %rcx
movabsq $0xcf1bbcdcbb, %rdx     # imm = 0xCF1BBCDCBB
imulq %rdx, %rcx
shrq $0x1c, %rcx
movl $0xfff, %r8d            # imm = 0xFFF
andl %r8d, %ecx
subl %r15d, %eax
movl %eax, (%r14,%rcx,4)
movq (%r12), %rsi
imulq %rdx, %rsi
shrq $0x1c, %rsi
andl %r8d, %esi
movl (%r14,%rsi,4), %r9d
leaq (%r15,%r9), %rax
cmpq %r13, %rax
movl $0x0, %ecx
cmovbq %rbx, %rcx
movq %r13, %rdx
cmovbq -0x58(%rbp), %rdx
movl %r12d, %r8d
subl %r15d, %r8d
movl %r8d, (%r14,%rsi,4)
leaq (%r15,%r9), %rsi
addq $0xffff, %rsi           # imm = 0xFFFF
cmpq %r12, %rsi
jb 0xe112
movl (%rax,%rcx), %esi
cmpl (%r12), %esi
pushq $0x40
popq %r9
jne 0xe129
leaq 0x1(%rdi), %r14
movb $0x0, (%rdi)
jmp 0xdf90
movq %rdi, -0x30(%rbp)
movq %r12, %rsi
movq -0x40(%rbp), %r12
pushq $0x40
popq %r9
pushq $0x1
popq %rax
jmp 0xde51
movq %rdi, -0x30(%rbp)
movq %r12, %rsi
movq -0x40(%rbp), %r12
pushq $0x1
popq %rax
jmp 0xde51
movq %r12, %rsi
movl -0x34(%rbp), %ebx
movq -0x40(%rbp), %r12
subq %rsi, %r12
cmpq $0xf, %r12
jb 0xe16d
leaq -0xf(%r12), %rax
movb $-0x10, (%rdi)
incq %rdi
cmpq $0xff, %rax
jb 0xe177
movb $-0x1, (%rdi)
addq $-0xff, %rax
jmp 0xe157
movl %r12d, %eax
shlb $0x4, %al
movb %al, (%rdi)
jmp 0xe179
movb %al, (%rdi)
incq %rdi
movq %r12, %rdx
movq %rdi, %r15
callq 0x2240
movq %r15, %rax
addl %r12d, %eax
subl -0x70(%rbp), %eax
movq %r13, 0x4008(%r14)
movl %ebx, 0x4018(%r14)
addl %ebx, 0x4000(%r14)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x34(%rbp), %ebx
movq -0x30(%rbp), %rdi
jmp 0xe146