// File: /workspace/github_c_makefile_star2_O2/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_decompress_safe_partial
LZ4_FORCE_O2_GCC_PPC64LE
int LZ4_decompress_safe_partial(const char* src, char* dst, int compressedSize, int targetOutputSize, int dstCapacity)
{
    dstCapacity = MIN(targetOutputSize, dstCapacity);
    return LZ4_decompress_generic(src, dst, compressedSize, dstCapacity,
                                  endOnInputSize, partial_decode,
                                  noDict, (BYTE*)dst, NULL, 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpl %r8d, %ecx
cmovll %ecx, %r8d
pushq $-0x1
popq %r12
testq %rdi, %rdi
je 0x9e7f
testl %r8d, %r8d
je 0x9bc5
testl %edx, %edx
je 0x9e7f
movq %rsi, %r9
movslq %edx, %rax
leaq (%rdi,%rax), %r11
movslq %r8d, %rcx
leaq (%rsi,%rcx), %r10
leaq -0x10(%rdi,%rax), %r13
leaq -0x20(%rsi,%rcx), %rcx
movq %rdi, 0x28(%rsp)
movq %rdi, %r14
movq %rsi, %r12
cmpl $0x40, %r8d
movq %rcx, %r8
movq %rsi, (%rsp)
movq %r10, 0x18(%rsp)
movq %r11, 0x10(%rsp)
movq %r13, 0x20(%rsp)
movq %rcx, 0x8(%rsp)
jl 0x9e68
leaq -0x11(%r11), %rax
movq %rax, 0x50(%rsp)
leaq -0xf(%r11), %rax
movq %rax, 0x48(%rsp)
leaq -0x20(%r11), %rax
movq %rax, 0x40(%rsp)
leaq -0x40(%r10), %rdi
leaq -0x4(%r11), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %r14
movq %r9, %r15
movq %rdi, 0x30(%rsp)
leaq 0x1(%r14), %r12
movzbl (%r14), %ebx
movl %ebx, %ebp
shrl $0x4, %ebp
cmpl $0xf, %ebp
jne 0x9a6b
movq 0x48(%rsp), %r13
cmpq %r13, %r12
jae 0x9bcd
leaq 0x10(%r14), %rax
addq $0x2, %r14
xorl %edx, %edx
movq %r14, %rcx
movb -0xf(%rax), %sil
movzbl %sil, %esi
incq %r12
leaq -0xe(%rax), %rdi
addl %esi, %edx
cmpq %r13, %rdi
setb %dil
cmpb $-0x1, %sil
sete %sil
incq %rax
incq %rcx
testb %sil, %dil
jne 0x99dd
movl %edx, %r14d
leaq 0xf(%r14), %rbp
movq %r15, %r13
addq %rbp, %r13
jb 0x9bbc
negq %rcx
cmpq %rcx, %rbp
ja 0x9bbc
cmpq %r8, %r13
ja 0x9cbe
addq %rax, %r14
cmpq 0x40(%rsp), %r14
ja 0x9b9d
xorl %eax, %eax
movups (%r12,%rax), %xmm0
leaq (%r15,%rax), %rcx
addq $0x20, %rcx
movups %xmm0, -0x20(%rcx)
movups 0x10(%r12,%rax), %xmm0
movups %xmm0, -0x10(%rcx)
addq $0x20, %rax
cmpq %r13, %rcx
jb 0x9a40
movq 0x30(%rsp), %rdi
jmp 0x9a89
leaq (%r15,%rbp), %r13
cmpq 0x50(%rsp), %r12
ja 0x9cbe
movups (%r12), %xmm0
movups %xmm0, (%r15)
addq %r12, %rbp
movq %rbp, %r14
movzwl (%r14), %ecx
addq $0x2, %r14
movq %r13, %rsi
subq %rcx, %rsi
andl $0xf, %ebx
cmpq $0xf, %rbx
jne 0x9af6
cmpq %r9, %rsi
movq 0x38(%rsp), %rbx
jb 0x9bda
xorl %eax, %eax
leaq 0x1(%r14), %r12
cmpq %rbx, %r12
jae 0x9bcd
movzbl (%r14), %edx
addl %edx, %eax
movq %r12, %r14
cmpl $0xff, %edx
je 0x9ab0
movl %eax, %r15d
pushq $-0x10
popq %rax
subq %r15, %rax
cmpq %r13, %rax
jb 0x9bcd
leaq (%r15,%r13), %rax
addq $0x13, %rax
addq $0x13, %r15
cmpq %rdi, %rax
jb 0x9b39
jmp 0x9ba9
leaq (%rbx,%r13), %r15
addq $0x4, %r15
addq $0x4, %rbx
cmpq %rdi, %r15
jae 0x9baf
cmpq %r9, %rsi
jb 0x9b33
cmpw $0x8, %cx
jb 0x9b33
movq (%rsi), %rax
movq %rax, (%r13)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%r13)
movzwl 0x10(%rsi), %eax
movw %ax, 0x10(%r13)
jmp 0x99ac
movq %r14, %r12
movq %rbx, %r15
cmpq %r9, %rsi
jb 0x9bcd
addq %r13, %r15
cmpw $0x10, %cx
jb 0x9b78
pushq $0x10
popq %rax
subq %rcx, %rax
movups -0x10(%r13,%rax), %xmm0
movups %xmm0, (%r13)
movups (%r13,%rax), %xmm0
movups %xmm0, 0x10(%r13)
addq $0x20, %r13
cmpq %r15, %r13
jb 0x9b51
movq %r12, %r14
jmp 0x99ac
movq %r13, %rdi
movq %r15, %rdx
callq 0xcac1
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movq (%rsp), %r9
jmp 0x9b70
addq $-0xf, %rax
movq %rax, %r12
jmp 0x9cbe
movq %r12, %r14
movq %r15, %rbx
movq %r13, %r15
movq 0x20(%rsp), %r13
jmp 0x9dc6
addq $-0xf, %rax
movq %rax, %r12
jmp 0x9bcd
xorl %r12d, %r12d
jmp 0x9e7f
notl %r12d
addl 0x28(%rsp), %r12d
jmp 0x9e7f
movq %r14, %r12
jmp 0x9bcd
leaq 0x1(%r14), %r12
movzbl (%r14), %ebx
movl %ebx, %ebp
shrl $0x4, %ebp
cmpl $0xf, %ebp
je 0x9c68
cmpq %r13, %r12
jae 0x9cba
cmpq %r8, %r15
ja 0x9cba
movups (%r12), %xmm0
movups %xmm0, (%r15)
addq %rbp, %r15
andl $0xf, %ebx
leaq (%r12,%rbp), %r14
addq $0x2, %r14
movzwl -0x2(%r14), %eax
movzwl %ax, %ecx
movq %r15, %rsi
subq %rcx, %rsi
cmpq $0xf, %rbx
je 0x9d67
cmpw $0x8, %ax
jb 0x9d67
cmpq %r9, %rsi
jb 0x9d67
movq (%rsi), %rax
movq %rax, (%r15)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%r15)
movzwl 0x10(%rsi), %eax
movw %ax, 0x10(%r15)
addq %rbx, %r15
addq $0x4, %r15
jmp 0x9bdf
leaq -0xf(%r11), %rax
cmpq %rax, %r12
jae 0x9bcd
addq $0x2, %r14
xorl %ecx, %ecx
movb (%r12), %dl
movzbl %dl, %edx
incq %r12
addl %edx, %ecx
cmpq %rax, %r12
setb %sil
cmpb $-0x1, %dl
sete %dl
incq %r14
testb %dl, %sil
jne 0x9c7b
movl %ecx, %ebp
addq $0xf, %rbp
movq %r15, %rax
addq %rbp, %rax
jb 0x9bcd
negq %r14
cmpq %r14, %rbp
ja 0x9bcd
leaq (%r15,%rbp), %r13
leaq -0xc(%r10), %rdx
leaq (%r12,%rbp), %rax
leaq -0x8(%r11), %rcx
cmpq %rdx, %r13
ja 0x9ced
cmpq %rcx, %rax
ja 0x9ced
movq (%r12), %rcx
movq %rcx, (%r15)
addq $0x8, %r15
addq $0x8, %r12
cmpq %r13, %r15
jb 0x9cd4
movq %r13, %r15
jmp 0x9d4d
cmpq %rcx, %rax
seta %cl
cmpq %r11, %rax
setne %al
testb %al, %cl
jne 0x9bcd
movq %r10, %rax
subq %r15, %rax
cmpq %r10, %r13
cmovaq %rax, %rbp
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1190
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
addq %rbp, %r15
cmpq %r10, %r13
jae 0x9e75
addq %rbp, %r12
cmpq %r11, %r12
je 0x9e75
movq %r12, %rax
movq %r15, %r13
movq (%rsp), %r9
movq 0x8(%rsp), %r8
movzwl (%rax), %ecx
addq $0x2, %rax
movq %r13, %rsi
subq %rcx, %rsi
andl $0xf, %ebx
movq %rax, %r12
movq 0x20(%rsp), %r13
jmp 0x9d6a
movq %r14, %r12
cmpl $0xf, %ebx
jne 0x9dbf
leaq -0x4(%r11), %rax
xorl %edx, %edx
movb (%r12), %dil
movzbl %dil, %edi
incq %r12
addl %edi, %edx
cmpq %rax, %r12
setae %r8b
cmpb $-0x1, %dil
setne %dil
orb %r8b, %dil
cmpb $0x1, %dil
jne 0x9d75
movl %edx, %ebx
addq $0xf, %rbx
movq %r15, %rdx
addq %rbx, %rdx
setb %dl
cmpq %rax, %r12
jae 0x9bcd
testb %dl, %dl
movq 0x8(%rsp), %r8
jne 0x9bcd
addq $0x4, %rbx
movq %r12, %r14
cmpq %r9, %rsi
jb 0x9bda
leaq (%r15,%rbx), %r12
leaq -0xc(%r10), %rax
cmpq %rax, %r12
jbe 0x9e08
movq %r10, %rdx
subq %r15, %rdx
cmpq %rdx, %rbx
cmovbq %rbx, %rdx
leaq (%rsi,%rdx), %rax
leaq (%r15,%rdx), %r12
cmpq %r15, %rax
jbe 0x9e48
cmpq %r12, %r15
jae 0x9e63
movb (%rsi), %al
incq %rsi
movb %al, (%r15)
incq %r15
jmp 0x9df6
cmpl $0x7, %ecx
jbe 0x9e91
movq (%rsi), %rax
movq %rax, (%r15)
addq $0x8, %rsi
movq %rsi, %rax
movq (%rax), %rcx
movq %rcx, 0x8(%r15)
cmpq $0x11, %rbx
jb 0x9e68
addq $0x10, %r15
addq $0x8, %rax
movq (%rax), %rcx
movq %rcx, (%r15)
addq $0x8, %r15
addq $0x8, %rax
cmpq %r12, %r15
jb 0x9e33
jmp 0x9e68
movq %r15, %rdi
callq 0x1140
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movq (%rsp), %r9
cmpq %r10, %r12
je 0x9e70
movq %r12, %r15
jmp 0x9bdf
movq %r10, %r15
jmp 0x9e79
movq (%rsp), %r9
subl %r9d, %r15d
movl %r15d, %r12d
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0x0, (%r15)
movb (%rsi), %al
movb %al, (%r15)
movb 0x1(%rsi), %al
movb %al, 0x1(%r15)
movb 0x2(%rsi), %al
movb %al, 0x2(%r15)
movb 0x3(%rsi), %al
movb %al, 0x3(%r15)
shll $0x2, %ecx
leaq 0x54b7(%rip), %rax      # 0xf370
movl (%rcx,%rax), %edx
leaq (%rsi,%rdx), %rax
movl (%rsi,%rdx), %edx
movl %edx, 0x4(%r15)
leaq 0x54c2(%rip), %rdx      # 0xf390
movslq (%rcx,%rdx), %rcx
subq %rcx, %rax
jmp 0x9e1e