// File: /workspace/github_c_makefile_star2_O0/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
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x118(%rbp)
movq %rsi, -0x120(%rbp)
movq %rdx, -0x128(%rbp)
movl %ecx, -0x12c(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movq 0x4008(%rax), %rax
movq -0x138(%rbp), %rcx
movl 0x4018(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
cmpq -0x120(%rbp), %rax
jbe 0x1b265
movq -0x120(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x118(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x1b0d0
movq -0x118(%rbp), %rsi
movq -0x120(%rbp), %rdx
movq -0x128(%rbp), %rcx
movl -0x12c(%rbp), %eax
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x1, -0x30(%rbp)
movl $0x2, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x4018(%rcx), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rax
movq 0x4008(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x4018(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
addq $-0xc, %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
addq $-0x5, %rax
movq %rax, -0xa0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movslq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq $0x0, -0xc0(%rbp)
cmpl $0x7e000000, -0x24(%rbp) # imm = 0x7E000000
jbe 0x1b3ac
movl $0x0, -0x4(%rbp)
jmp 0x1bd46
movl -0x34(%rbp), %eax
movl %eax, -0x154(%rbp)
testl %eax, %eax
je 0x1b3d5
jmp 0x1b3bb
movl -0x154(%rbp), %eax
subl $0x1, %eax
je 0x1b3e9
jmp 0x1b3c8
movl -0x154(%rbp), %eax
subl $0x2, %eax
je 0x1b423
jmp 0x1b3d7
jmp 0x1b3d7
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1b447
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x4000(%rcx), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x4018(%rcx), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
jmp 0x1b447
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x4000(%rcx), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpl $0x2, -0x30(%rbp)
jne 0x1b462
cmpl $0x1000b, -0x24(%rbp)   # imm = 0x1000B
jl 0x1b462
movl $0x0, -0x4(%rbp)
jmp 0x1bd46
cmpl $0xd, -0x24(%rbp)
jge 0x1b46d
jmp 0x1bbd3
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x58(%rbp), %rcx
callq 0x17d10
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x282d0
movl %eax, -0xb4(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x1, -0xdc(%rbp)
movl -0x3c(%rbp), %eax
shll $0x6, %eax
movl %eax, -0xe0(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0xe4(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0xdc(%rbp), %ecx
movq -0xd8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0xd8(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xe0(%rbp)
shrl $0x6, %eax
movl %eax, -0xdc(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x98(%rbp), %rax
seta %al
testb $0x1, %al
jne 0x1b521
jmp 0x1b526
jmp 0x1bbd3
movl -0xe4(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x58(%rbp), %rcx
callq 0x28300
movq %rax, -0xc8(%rbp)
cmpl $0x2, -0x34(%rbp)
jne 0x1b580
movq -0xc8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1b56b
movq -0x80(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1b57e
movq $0x0, -0xc0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1b580
movq -0xd8(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x282d0
movl %eax, -0xb4(%rbp)
movq -0x50(%rbp), %rdi
movl -0xe4(%rbp), %esi
movq -0x10(%rbp), %rdx
movl -0x30(%rbp), %ecx
movq -0x58(%rbp), %r8
callq 0x28380
cmpl $0x1, -0x38(%rbp)
jne 0x1b5cc
movq -0xc8(%rbp), %rcx
movb $0x1, %al
cmpq -0x68(%rbp), %rcx
movb %al, -0x155(%rbp)
jb 0x1b627
jmp 0x1b5ce
jmp 0x1b5ce
cmpl $0x2, -0x30(%rbp)
jne 0x1b5d6
jmp 0x1b5f2
movq -0xc8(%rbp), %rcx
addq $0xffff, %rcx           # imm = 0xFFFF
movb $0x1, %al
cmpq -0x50(%rbp), %rcx
movb %al, -0x155(%rbp)
jb 0x1b627
movq -0xc8(%rbp), %rdi
addq -0xc0(%rbp), %rdi
callq 0x28420
movl %eax, -0x15c(%rbp)
movq -0x50(%rbp), %rdi
callq 0x28420
movl %eax, %ecx
movl -0x15c(%rbp), %eax
cmpl %ecx, %eax
setne %al
movb %al, -0x155(%rbp)
movb -0x155(%rbp), %al
testb $0x1, %al
jne 0x1b4c0
jmp 0x1b637
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq -0x88(%rbp), %rcx
movb %al, -0x15d(%rbp)
jbe 0x1b691
movq -0xc8(%rbp), %rcx
addq -0xc0(%rbp), %rcx
xorl %eax, %eax
cmpq -0x60(%rbp), %rcx
movb %al, -0x15d(%rbp)
jbe 0x1b691
movq -0x50(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %rdx
subq $0x1, %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x15d(%rbp)
movb -0x15d(%rbp), %al
testb $0x1, %al
jne 0x1b69d
jmp 0x1b6c0
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
movq -0xc8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0xc8(%rbp)
jmp 0x1b637
movq -0x50(%rbp), %rax
movq -0x88(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0xe8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movq %rax, -0xd0(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1b74a
movq -0xa8(%rbp), %rax
movl -0xe8(%rbp), %ecx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, -0x168(%rbp)
movl -0xe8(%rbp), %eax
movl $0xff, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq -0x168(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0xb0(%rbp), %rax
seta %al
testb $0x1, %al
jne 0x1b73e
jmp 0x1b74a
movl $0x0, -0x4(%rbp)
jmp 0x1bd46
cmpl $0xf, -0xe8(%rbp)
jb 0x1b7c4
movl -0xe8(%rbp), %eax
subl $0xf, %eax
movl %eax, -0xec(%rbp)
movq -0xd0(%rbp), %rax
movb $-0x10, (%rax)
cmpl $0xff, -0xec(%rbp)
jl 0x1b7a3
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movb $-0x1, (%rax)
movl -0xec(%rbp), %eax
subl $0xff, %eax
movl %eax, -0xec(%rbp)
jmp 0x1b76c
movl -0xec(%rbp), %eax
movb %al, %cl
movq -0xa8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
movb %cl, (%rax)
jmp 0x1b7d8
movl -0xe8(%rbp), %eax
shll $0x4, %eax
movb %al, %cl
movq -0xd0(%rbp), %rax
movb %cl, (%rax)
movq -0xa8(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movl -0xe8(%rbp), %eax
addq %rax, %rdx
callq 0x28440
movl -0xe8(%rbp), %ecx
movq -0xa8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
movq -0x50(%rbp), %rax
movq -0xc8(%rbp), %rcx
subq %rcx, %rax
movzwl %ax, %esi
callq 0x284b0
movq -0xa8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xa8(%rbp)
cmpl $0x2, -0x34(%rbp)
jne 0x1b933
movq -0x60(%rbp), %rax
cmpq -0x70(%rbp), %rax
jne 0x1b933
movq -0xc0(%rbp), %rax
addq -0xc8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x50(%rbp), %rax
movq -0x78(%rbp), %rcx
movq -0xc8(%rbp), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0xa0(%rbp), %rax
jbe 0x1b8aa
movq -0xa0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x50(%rbp), %rdi
addq $0x4, %rdi
movq -0xc8(%rbp), %rsi
addq $0x4, %rsi
movq -0xf8(%rbp), %rdx
callq 0x28510
movl %eax, -0xf0(%rbp)
movl -0xf0(%rbp), %ecx
addl $0x4, %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0xf8(%rbp), %rax
jne 0x1b931
movq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x28510
movl %eax, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
addl -0xf0(%rbp), %eax
movl %eax, -0xf0(%rbp)
movl -0xfc(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
jmp 0x1b96e
movq -0x50(%rbp), %rdi
addq $0x4, %rdi
movq -0xc8(%rbp), %rsi
addq $0x4, %rsi
movq -0xa0(%rbp), %rdx
callq 0x28510
movl %eax, -0xf0(%rbp)
movl -0xf0(%rbp), %ecx
addl $0x4, %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1b9a9
movq -0xa8(%rbp), %rax
addq $0x6, %rax
movl -0xf0(%rbp), %ecx
shrl $0x8, %ecx
movl %ecx, %ecx
addq %rcx, %rax
cmpq -0xb0(%rbp), %rax
seta %al
testb $0x1, %al
jne 0x1b99d
jmp 0x1b9a9
movl $0x0, -0x4(%rbp)
jmp 0x1bd46
cmpl $0xf, -0xf0(%rbp)
jb 0x1ba79
movq -0xd0(%rbp), %rax
movzbl (%rax), %ecx
addl $0xf, %ecx
movb %cl, (%rax)
movl -0xf0(%rbp), %eax
subl $0xf, %eax
movl %eax, -0xf0(%rbp)
cmpl $0x1fe, -0xf0(%rbp)     # imm = 0x1FE
jb 0x1ba23
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movb $-0x1, (%rax)
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movb $-0x1, (%rax)
movl -0xf0(%rbp), %eax
subl $0x1fe, %eax            # imm = 0x1FE
movl %eax, -0xf0(%rbp)
jmp 0x1b9d4
cmpl $0xff, -0xf0(%rbp)
jb 0x1ba58
movl -0xf0(%rbp), %eax
subl $0xff, %eax
movl %eax, -0xf0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movb $-0x1, (%rax)
movl -0xf0(%rbp), %eax
movb %al, %cl
movq -0xa8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
movb %cl, (%rax)
jmp 0x1ba90
movl -0xf0(%rbp), %eax
movzbl %al, %edx
movq -0xd0(%rbp), %rax
movzbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x98(%rbp), %rax
jbe 0x1baad
jmp 0x1bbd3
movq -0x50(%rbp), %rdi
addq $-0x2, %rdi
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x58(%rbp), %rcx
callq 0x17d10
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x58(%rbp), %rcx
callq 0x286b0
movq %rax, -0xc8(%rbp)
cmpl $0x2, -0x34(%rbp)
jne 0x1bb1d
movq -0xc8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1bb08
movq -0x80(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1bb1b
movq $0x0, -0xc0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1bb1d
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x58(%rbp), %rcx
callq 0x17d10
cmpl $0x1, -0x38(%rbp)
jne 0x1bb46
movq -0xc8(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x1bb48
jmp 0x1bbb4
jmp 0x1bb48
movq -0xc8(%rbp), %rax
addq $0xffff, %rax           # imm = 0xFFFF
cmpq -0x50(%rbp), %rax
jb 0x1bbb4
movq -0xc8(%rbp), %rdi
addq -0xc0(%rbp), %rdi
callq 0x28420
movl %eax, -0x16c(%rbp)
movq -0x50(%rbp), %rdi
callq 0x28420
movl %eax, %ecx
movl -0x16c(%rbp), %eax
cmpl %ecx, %eax
jne 0x1bbb4
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movb $0x0, (%rax)
jmp 0x1b814
movq -0x50(%rbp), %rdi
addq $0x1, %rdi
movq %rdi, -0x50(%rbp)
movl -0x30(%rbp), %esi
callq 0x282d0
movl %eax, -0xb4(%rbp)
jmp 0x1b49f
movq -0x90(%rbp), %rax
movq -0x88(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x108(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1bc4d
movq -0xa8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
addq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x178(%rbp)
movq -0x108(%rbp), %rax
addq $0xff, %rax
subq $0xf, %rax
movl $0xff, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x178(%rbp), %rax
addq %rcx, %rax
movl -0x28(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x1bc4d
movl $0x0, -0x4(%rbp)
jmp 0x1bd46
cmpq $0xf, -0x108(%rbp)
jb 0x1bce2
movq -0x108(%rbp), %rax
subq $0xf, %rax
movq %rax, -0x110(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movb $-0x10, (%rax)
cmpq $0xff, -0x110(%rbp)
jb 0x1bcc0
movq -0xa8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa8(%rbp)
movb $-0x1, (%rax)
movq -0x110(%rbp), %rax
subq $0xff, %rax
movq %rax, -0x110(%rbp)
jmp 0x1bc85
movq -0x110(%rbp), %rax
movb %al, %cl
movq -0xa8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
movb %cl, (%rax)
jmp 0x1bd06
movq -0x108(%rbp), %rax
shlq $0x4, %rax
movb %al, %cl
movq -0xa8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xa8(%rbp)
movb %cl, (%rax)
movq -0xa8(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x108(%rbp), %rdx
callq 0x2250
movq -0x108(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x13c(%rbp)
movq -0x120(%rbp), %rcx
movq -0x138(%rbp), %rax
movq %rcx, 0x4008(%rax)
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %rax
movl %ecx, 0x4018(%rax)
movl -0x12c(%rbp), %ecx
movq -0x138(%rbp), %rax
addl 0x4000(%rax), %ecx
movl %ecx, 0x4000(%rax)
movl -0x13c(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nop