// File: /workspace/github_c_makefile_star2_O3/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 0x8f77
testl %r8d, %r8d
je 0x8ca7
testl %edx, %edx
je 0x8f77
movq %rsi, %r9
movslq %edx, %rax
leaq (%rdi,%rax), %r11
movslq %r8d, %rcx
leaq (%rsi,%rcx), %r10
leaq -0x10(%rdi,%rax), %rdx
leaq -0x20(%rsi,%rcx), %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x28(%rsp)
movq %rdi, %rbp
movq %rsi, %r15
cmpl $0x40, %r8d
movq %rsi, (%rsp)
movq %r10, 0x18(%rsp)
movq %r11, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
jl 0x8f23
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), %rbp
movq %r9, %r15
movq 0x8(%rsp), %r8
movq %rdi, 0x30(%rsp)
leaq 0x1(%rbp), %r12
movzbl (%rbp), %r14d
movl %r14d, %ebx
shrl $0x4, %ebx
cmpl $0xf, %ebx
jne 0x8b51
movq 0x48(%rsp), %rbx
cmpq %rbx, %r12
jae 0x8f4a
leaq 0x10(%rbp), %rax
addq $0x2, %rbp
xorl %edx, %edx
movq %rbp, %rcx
movb -0xf(%rax), %sil
movzbl %sil, %esi
incq %r12
leaq -0xe(%rax), %rdi
addl %esi, %edx
cmpq %rbx, %rdi
setb %dil
cmpb $-0x1, %sil
sete %sil
incq %rax
incq %rcx
testb %sil, %dil
jne 0x8ac4
movl %edx, %ebp
leaq 0xf(%rbp), %rbx
movq %r15, %r13
addq %rbx, %r13
jb 0x8c9b
negq %rcx
cmpq %rcx, %rbx
ja 0x8c9b
cmpq %r8, %r13
ja 0x8da1
addq %rax, %rbp
cmpq 0x40(%rsp), %rbp
ja 0x8c84
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 0x8b26
movq 0x30(%rsp), %rdi
jmp 0x8b6f
leaq (%r15,%rbx), %r13
cmpq 0x50(%rsp), %r12
ja 0x8da1
movups (%r12), %xmm0
movups %xmm0, (%r15)
addq %r12, %rbx
movq %rbx, %rbp
movzwl (%rbp), %ecx
addq $0x2, %rbp
movq %r13, %rsi
subq %rcx, %rsi
andl $0xf, %r14d
cmpq $0xf, %r14
jne 0x8bdd
cmpq %r9, %rsi
movq 0x38(%rsp), %rbx
jb 0x8caf
xorl %eax, %eax
leaq 0x1(%rbp), %r12
cmpq %rbx, %r12
jae 0x8f4a
movzbl (%rbp), %edx
addl %edx, %eax
movq %r12, %rbp
cmpl $0xff, %edx
je 0x8b97
movl %eax, %r15d
pushq $-0x10
popq %rax
subq %r15, %rax
cmpq %r13, %rax
jb 0x8f4a
leaq (%r15,%r13), %rax
addq $0x13, %rax
addq $0x13, %r15
cmpq %rdi, %rax
jb 0x8c20
jmp 0x8c90
leaq (%r14,%r13), %r15
addq $0x4, %r15
addq $0x4, %r14
cmpq %rdi, %r15
jae 0x8e74
cmpq %r9, %rsi
jb 0x8c1a
cmpw $0x8, %cx
jb 0x8c1a
movq (%rsi), %rax
movq %rax, (%r13)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%r13)
movzwl 0x10(%rsi), %eax
movw %ax, 0x10(%r13)
jmp 0x8a91
movq %rbp, %r12
movq %r14, %r15
cmpq %r9, %rsi
jb 0x8f4a
addq %r13, %r15
cmpw $0x10, %cx
jb 0x8c5f
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 0x8c38
movq %r12, %rbp
jmp 0x8a91
movq %r13, %rdi
movq %r15, %rdx
callq 0xeae5
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movq (%rsp), %r9
jmp 0x8c57
addq $-0xf, %rax
movq %rax, %r12
jmp 0x8da1
movq %r12, %rbp
movq %r15, %r14
jmp 0x8e74
addq $-0xf, %rax
movq %rax, %r12
jmp 0x8f4a
xorl %r12d, %r12d
jmp 0x8f77
movq %rbp, %r12
jmp 0x8f4a
movl %eax, %ebx
cmpq %rdx, %r12
jae 0x8d9d
cmpq %rdi, %r15
ja 0x8d9d
movups (%r12), %xmm0
movups %xmm0, (%r15)
addq %rbx, %r15
andl $0xf, %r14d
leaq (%r12,%rbx), %rbp
addq $0x2, %rbp
movzwl -0x2(%rbp), %eax
movzwl %ax, %ecx
movq %r15, %rsi
subq %rcx, %rsi
cmpl $0xf, %r14d
je 0x8e30
cmpw $0x8, %ax
jb 0x8e30
cmpq %r9, %rsi
jb 0x8e30
addq %rbx, %r12
movq (%rsi), %rax
movq %rax, (%r15)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%r15)
movzwl 0x10(%rsi), %eax
movw %ax, 0x10(%r15)
addq %r14, %r15
addq $0x4, %r15
movzbl 0x2(%r12), %r14d
addq $0x3, %r12
movl %r14d, %eax
shrl $0x4, %eax
cmpl $0xf, %eax
jne 0x8cb7
leaq -0xf(%r11), %rcx
cmpq %rcx, %r12
jae 0x8f4a
leaq 0x1(%r12), %rax
xorl %edx, %edx
movb (%r12), %sil
movzbl %sil, %esi
incq %r12
addl %esi, %edx
cmpq %rcx, %r12
setb %dil
cmpb $-0x1, %sil
sete %sil
incq %rax
testb %sil, %dil
jne 0x8d5b
movl %edx, %ebx
addq $0xf, %rbx
movq %r15, %rcx
addq %rbx, %rcx
jb 0x8f4a
negq %rax
cmpq %rax, %rbx
ja 0x8f4a
leaq (%r15,%rbx), %r13
leaq -0xc(%r10), %rcx
leaq (%r12,%rbx), %rbp
leaq -0x8(%r11), %rax
cmpq %rcx, %r13
ja 0x8dd0
cmpq %rax, %rbp
ja 0x8dd0
movq (%r12), %rax
movq %rax, (%r15)
addq $0x8, %r15
addq $0x8, %r12
cmpq %r13, %r15
jb 0x8db7
movq %r13, %r15
jmp 0x8e1e
cmpq %rax, %rbp
seta %al
cmpq %r11, %rbp
setne %cl
testb %cl, %al
jne 0x8f4a
cmpq %r10, %r13
ja 0x8f59
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1190
movq 0x18(%rsp), %r10
addq %rbx, %r15
cmpq %r10, %r13
je 0x8f6d
movq 0x10(%rsp), %r11
cmpq %r11, %rbp
movq (%rsp), %r9
je 0x8f71
movzwl (%rbp), %ecx
addq $0x2, %rbp
movq %r15, %rsi
subq %rcx, %rsi
andl $0xf, %r14d
movq %r15, %r13
cmpl $0xf, %r14d
jne 0x8e70
leaq -0x4(%r11), %rdx
xorl %eax, %eax
movq %rbp, %r12
incq %rbp
cmpq %rdx, %rbp
jae 0x8f47
movzbl (%r12), %edi
addl %edi, %eax
cmpl $0xff, %edi
je 0x8e3f
movl %eax, %r14d
addq $0xf, %r14
movq %r13, %rax
addq %r14, %rax
jb 0x8f47
addq $0x4, %r14
cmpq %r9, %rsi
jb 0x8caf
leaq (%r14,%r13), %r15
leaq -0xc(%r10), %rax
cmpq %rax, %r15
jbe 0x8ebc
movq %r10, %rdx
subq %r13, %rdx
cmpq %rdx, %r14
cmovbq %r14, %rdx
leaq (%rsi,%rdx), %rax
leaq (%rdx,%r13), %r15
cmpq %r13, %rax
jbe 0x8f03
cmpq %r13, %r10
je 0x8f19
movb (%rsi), %al
incq %rsi
movb %al, (%r13)
incq %r13
cmpq %r15, %r13
jb 0x8ea9
jmp 0x8f19
cmpl $0x7, %ecx
jbe 0x8f89
movq (%rsi), %rax
movq %rax, (%r13)
addq $0x8, %rsi
movq %rsi, %rax
movq (%rax), %rcx
movq %rcx, 0x8(%r13)
cmpq $0x11, %r14
jb 0x8efc
addq $0x10, %r13
addq $0x8, %rax
movq (%rax), %rcx
movq %rcx, (%r13)
addq $0x8, %r13
addq $0x8, %rax
cmpq %r15, %r13
jb 0x8ee8
movq 0x20(%rsp), %rdx
jmp 0x8f23
movq %r13, %rdi
callq 0x1140
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movq (%rsp), %r9
cmpq %r10, %r15
movq 0x20(%rsp), %rdx
je 0x8f54
movzbl (%rbp), %r14d
movq %rbp, %r12
incq %r12
movl %r14d, %eax
shrl $0x4, %eax
cmpl $0xf, %eax
je 0x8d47
movq 0x8(%rsp), %rdi
jmp 0x8cb7
incq %r12
notl %r12d
addl 0x28(%rsp), %r12d
jmp 0x8f77
movq %r10, %r15
jmp 0x8f71
movq %r10, %rdx
subq %r15, %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %r10, %r15
callq 0x1190
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, (%r13)
movb (%rsi), %al
movb %al, (%r13)
movb 0x1(%rsi), %al
movb %al, 0x1(%r13)
movb 0x2(%rsi), %al
movb %al, 0x2(%r13)
movb 0x3(%rsi), %al
movb %al, 0x3(%r13)
shll $0x2, %ecx
leaq 0x93dd(%rip), %rax      # 0x12390
movl (%rcx,%rax), %edx
leaq (%rsi,%rdx), %rax
movl (%rsi,%rdx), %edx
movl %edx, 0x4(%r13)
leaq 0x93e8(%rip), %rdx      # 0x123b0
movslq (%rcx,%rdx), %rcx
subq %rcx, %rax
jmp 0x8ed3