// File: /workspace/github_c_makefile_star2_O3/ender672[P]liboil/oil_resample.c
// Function: oil_scale_out
void oil_scale_out(struct oil_scale *os, unsigned char *out)
{
	int i, sl_len;
	float *in[4];

	if (os->out_height <= os->in_height) {
		yscale_out(os->sums_y, os->out_width, out, os->cs);
	} else {
		sl_len = OIL_CMP(os->cs) * os->out_width;
		for (i=0; i<4; i++) {
			in[i] = get_rb_line(os, (os->in_pos + i) % 4);
		}
		yscale_up(in, sl_len, os->coeffs_y + os->out_pos * 4, out,
			os->cs);
		os->borders_y[os->in_pos - 1] -= 1;
	}

	os->out_pos++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movl 0x4(%rdi), %eax
cmpl (%rdi), %eax
movq %rdi, 0x50(%rsp)
jle 0x2901
movl 0x10(%rdi), %esi
movzbl %sil, %edx
imull 0xc(%rdi), %edx
movd 0x14(%rdi), %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
movd %edx, %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
movq 0x2a19(%rip), %xmm2     # 0x5100
xorl %eax, %eax
movdqa 0x2a1f(%rip), %xmm3     # 0x5110
pshufd $0xf5, %xmm1, %xmm4     # xmm4 = xmm1[1,1,3,3]
movq 0x48(%rdi), %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa 0x2a18(%rip), %xmm6     # 0x5120
movdqa %xmm0, %xmm7
paddd %xmm2, %xmm7
movdqa %xmm7, %xmm8
psrad $0x1f, %xmm8
psrld $0x1e, %xmm8
paddd %xmm7, %xmm8
pand %xmm3, %xmm8
psubd %xmm8, %xmm7
movdqa %xmm1, %xmm8
pmuludq %xmm7, %xmm8
pshufd $0xe8, %xmm8, %xmm8     # xmm8 = xmm8[0,2,2,3]
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
pmuludq %xmm4, %xmm7
pshufd $0xe8, %xmm7, %xmm7     # xmm7 = xmm7[0,2,2,3]
punpckldq %xmm7, %xmm8    # xmm8 = xmm8[0],xmm7[0],xmm8[1],xmm7[1]
pxor %xmm7, %xmm7
pcmpgtd %xmm8, %xmm7
punpckldq %xmm7, %xmm8    # xmm8 = xmm8[0],xmm7[0],xmm8[1],xmm7[1]
psllq $0x2, %xmm8
paddq %xmm5, %xmm8
movdqa %xmm8, 0x10(%rsp,%rax,8)
addq $0x2, %rax
paddd %xmm6, %xmm2
cmpq $0x4, %rax
jne 0x2708
movq 0x20(%rdi), %rax
movslq 0x18(%rdi), %rcx
shlq $0x2, %rcx
leal -0x1(%rsi), %r8d
cmpl $0x3, %r8d
ja 0x2945
leaq 0x29f2(%rip), %rsi      # 0x5194
movslq (%rsi,%r8,4), %r8
addq %rsi, %r8
jmpq *%r8
testl %edx, %edx
jle 0x2f43
movl %edx, %edx
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
xorl %r10d, %r10d
leaq 0x40(%rsp), %r11
leaq 0x3c(%rsp), %rbx
pxor %xmm0, %xmm0
movss 0x2969(%rip), %xmm1     # 0x514c
movss 0x2955(%rip), %xmm2     # 0x5140
movss 0x295d(%rip), %xmm3     # 0x5150
movss 0x2959(%rip), %xmm4     # 0x5154
movss (%rax,%rcx,4), %xmm5
movss 0x4(%rax,%rcx,4), %xmm6
movss 0x8(%rax,%rcx,4), %xmm7
movss 0xc(%rax,%rcx,4), %xmm8
movb $0x1, %bpl
movq %r11, %r15
xorl %r12d, %r12d
orq %r10, %r12
movss (%r13,%r12,4), %xmm9
mulss %xmm6, %xmm9
movss (%rsi,%r12,4), %xmm10
mulss %xmm5, %xmm10
addss %xmm9, %xmm10
movss (%r8,%r12,4), %xmm9
mulss %xmm7, %xmm9
addss %xmm10, %xmm9
movss (%r9,%r12,4), %xmm10
mulss %xmm8, %xmm10
addss %xmm9, %xmm10
movss %xmm10, (%r15)
movl $0x1, %r12d
movq %rbx, %r15
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x281c
movss 0x3c(%rsp), %xmm6
xorps %xmm7, %xmm7
maxss %xmm6, %xmm7
movaps %xmm1, %xmm5
cmpltss %xmm6, %xmm5
movaps %xmm5, %xmm6
andnps %xmm7, %xmm6
andps %xmm1, %xmm5
orps %xmm6, %xmm5
ucomiss %xmm0, %xmm5
movss 0x40(%rsp), %xmm6
jne 0x28a2
jnp 0x28ac
divss %xmm5, %xmm6
movss %xmm6, 0x40(%rsp)
xorps %xmm7, %xmm7
maxss %xmm6, %xmm7
mulss %xmm2, %xmm7
addss %xmm3, %xmm7
movaps %xmm1, %xmm8
cmpltss %xmm6, %xmm8
movaps %xmm8, %xmm6
andnps %xmm7, %xmm6
andps %xmm4, %xmm8
orps %xmm6, %xmm8
cvttss2si %xmm8, %ebp
mulss %xmm2, %xmm5
addss %xmm3, %xmm5
cvttss2si %xmm5, %r15d
movb %bpl, (%r14,%r10)
movb %r15b, 0x1(%r14,%r10)
addq $0x2, %r10
cmpq %rdx, %r10
jb 0x27fb
jmp 0x2f43
movq 0x40(%rdi), %r15
movl 0xc(%rdi), %r12d
movl 0x10(%rdi), %ecx
movzbl %cl, %eax
imull %r12d, %eax
cmpl $0x2, %ecx
jle 0x2a12
leal -0x3(%rcx), %edx
cmpl $0x2, %edx
jb 0x2b2b
cmpl $0x104, %ecx            # imm = 0x104
je 0x2c3f
cmpl $0x204, %ecx            # imm = 0x204
je 0x2b4d
jmp 0x2f4f
cmpl $0x104, %esi            # imm = 0x104
je 0x2bd9
cmpl $0x204, %esi            # imm = 0x204
jne 0x2f43
testl %edx, %edx
jle 0x2f43
movl %edx, %edx
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
xorl %r10d, %r10d
movss 0x27ba(%rip), %xmm0     # 0x5140
movss 0x27c2(%rip), %xmm1     # 0x5150
movss 0x27b6(%rip), %xmm2     # 0x514c
movss 0x27b6(%rip), %xmm3     # 0x5154
movss 0x4(%rax,%rcx,4), %xmm4
mulss (%rbx,%r10,4), %xmm4
movss (%rax,%rcx,4), %xmm5
mulss (%rsi,%r10,4), %xmm5
addss %xmm4, %xmm5
movss 0x8(%rax,%rcx,4), %xmm4
mulss (%r8,%r10,4), %xmm4
addss %xmm5, %xmm4
movss 0xc(%rax,%rcx,4), %xmm5
mulss (%r9,%r10,4), %xmm5
addss %xmm4, %xmm5
xorps %xmm4, %xmm4
maxss %xmm5, %xmm4
mulss %xmm0, %xmm4
addss %xmm1, %xmm4
movaps %xmm2, %xmm6
cmpltss %xmm5, %xmm6
movaps %xmm6, %xmm5
andnps %xmm4, %xmm5
andps %xmm3, %xmm6
orps %xmm5, %xmm6
cvttss2si %xmm6, %r11d
movb %r11b, (%r14,%r10)
incq %r10
cmpq %r10, %rdx
jne 0x299e
jmp 0x2f43
cmpl $0x1, %ecx
je 0x2b4d
cmpl $0x2, %ecx
jne 0x2f4f
testl %r12d, %r12d
jle 0x2f4f
addq $0x1c, %r15
xorl %eax, %eax
xorps %xmm0, %xmm0
movss 0x270e(%rip), %xmm1     # 0x514c
movss 0x26fa(%rip), %xmm2     # 0x5140
movss 0x2702(%rip), %xmm3     # 0x5150
movss 0x26fe(%rip), %xmm4     # 0x5154
xorl %ecx, %ecx
movss -0x1c(%r15), %xmm6
movss -0xc(%r15), %xmm7
xorps %xmm8, %xmm8
maxss %xmm7, %xmm8
movaps %xmm1, %xmm5
cmpltss %xmm7, %xmm5
movaps %xmm5, %xmm7
andnps %xmm8, %xmm7
andps %xmm1, %xmm5
orps %xmm7, %xmm5
movaps %xmm6, %xmm7
divss %xmm5, %xmm7
movaps %xmm5, %xmm8
cmpneqss %xmm0, %xmm8
andps %xmm8, %xmm7
andnps %xmm6, %xmm8
orps %xmm7, %xmm8
xorps %xmm6, %xmm6
maxss %xmm8, %xmm6
mulss %xmm2, %xmm6
addss %xmm3, %xmm6
movaps %xmm1, %xmm7
cmpltss %xmm8, %xmm7
movaps %xmm7, %xmm8
andnps %xmm6, %xmm8
andps %xmm4, %xmm7
orps %xmm8, %xmm7
cvttss2si %xmm7, %edx
movb %dl, (%r14,%rcx,2)
movsd -0x18(%r15), %xmm6
movsd %xmm6, -0x1c(%r15)
movss -0x10(%r15), %xmm6
movss %xmm6, -0x14(%r15)
movl %eax, -0x10(%r15)
mulss %xmm2, %xmm5
addss %xmm3, %xmm5
cvttss2si %xmm5, %edx
movb %dl, 0x1(%r14,%rcx,2)
movsd -0x8(%r15), %xmm5
movsd %xmm5, -0xc(%r15)
movss (%r15), %xmm5
movss %xmm5, -0x4(%r15)
movl %eax, (%r15)
addq $0x20, %r15
incq %rcx
cmpl %ecx, %r12d
jne 0x2a58
jmp 0x2f4f
testl %eax, %eax
jle 0x2f4f
cmpb $0x0, 0x4986(%rip)      # 0x74c0
jne 0x2c62
movss 0x2600(%rip), %xmm0     # 0x5148
jmp 0x2c6a
testl %eax, %eax
jle 0x2f4f
movl %eax, %eax
xorl %ecx, %ecx
movss 0x25df(%rip), %xmm0     # 0x5140
movss 0x25e7(%rip), %xmm1     # 0x5150
movss 0x25db(%rip), %xmm2     # 0x514c
movss 0x25db(%rip), %xmm3     # 0x5154
movss (%r15), %xmm4
xorps %xmm5, %xmm5
maxss %xmm4, %xmm5
mulss %xmm0, %xmm5
addss %xmm1, %xmm5
movaps %xmm2, %xmm6
cmpltss %xmm4, %xmm6
movaps %xmm6, %xmm4
andnps %xmm5, %xmm4
andps %xmm3, %xmm6
orps %xmm4, %xmm6
cvttss2si %xmm6, %edx
movb %dl, (%r14,%rcx)
movsd 0x4(%r15), %xmm4
movsd %xmm4, (%r15)
movss 0xc(%r15), %xmm4
movss %xmm4, 0x8(%r15)
movl $0x0, 0xc(%r15)
addq $0x10, %r15
incq %rcx
cmpq %rcx, %rax
jne 0x2b79
jmp 0x2f4f
testl %edx, %edx
jle 0x2f43
cmpb $0x0, 0x48d8(%rip)      # 0x74c0
jne 0x2cbd
movss 0x2552(%rip), %xmm0     # 0x5148
jmp 0x2cc5
testl %edx, %edx
jle 0x2f43
cmpb $0x0, 0x48b6(%rip)      # 0x74c0
jne 0x2e18
movss 0x2530(%rip), %xmm0     # 0x5148
jmp 0x2e20
testl %edx, %edx
jle 0x2f43
cmpb $0x0, 0x4894(%rip)      # 0x74c0
jne 0x2e9a
movss 0x250e(%rip), %xmm0     # 0x5148
jmp 0x2ea2
testl %r12d, %r12d
jle 0x2f4f
cmpb $0x0, 0x4871(%rip)      # 0x74c0
jne 0x2f66
movss 0x24eb(%rip), %xmm0     # 0x5148
jmp 0x2f6e
movss 0x24da(%rip), %xmm0     # 0x5144
movq 0xc85f(%rip), %rcx      # 0xf4d0
movl %eax, %eax
xorl %edx, %edx
movss (%r15), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %esi
movslq %esi, %rsi
movb (%rcx,%rsi), %sil
movb %sil, (%r14,%rdx)
movsd 0x4(%r15), %xmm1
movsd %xmm1, (%r15)
movss 0xc(%r15), %xmm1
movss %xmm1, 0x8(%r15)
movl $0x0, 0xc(%r15)
addq $0x10, %r15
incq %rdx
cmpq %rdx, %rax
jne 0x2c75
jmp 0x2f4f
movss 0x247f(%rip), %xmm0     # 0x5144
movq 0xc804(%rip), %rsi      # 0xf4d0
movl %edx, %edx
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movq 0x28(%rsp), %r10
xorl %r11d, %r11d
pxor %xmm1, %xmm1
movss 0x245b(%rip), %xmm2     # 0x514c
movss 0x2447(%rip), %xmm3     # 0x5140
movss 0x244f(%rip), %xmm4     # 0x5150
movq %r14, %rbx
movss (%rax,%rcx,4), %xmm5
movss 0x4(%rax,%rcx,4), %xmm6
movss 0x8(%rax,%rcx,4), %xmm7
movss 0xc(%rax,%rcx,4), %xmm8
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
shufps $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
shufps $0x0, %xmm7, %xmm7      # xmm7 = xmm7[0,0,0,0]
shufps $0x0, %xmm8, %xmm8      # xmm8 = xmm8[0,0,0,0]
movups (%r13,%r11,4), %xmm9
mulps %xmm5, %xmm9
movups (%r8,%r11,4), %xmm5
mulps %xmm6, %xmm5
addps %xmm9, %xmm5
movups (%r9,%r11,4), %xmm6
mulps %xmm7, %xmm6
addps %xmm5, %xmm6
movups (%r10,%r11,4), %xmm5
mulps %xmm8, %xmm5
addps %xmm6, %xmm5
movaps %xmm5, 0x40(%rsp)
movss 0x4c(%rsp), %xmm6
xorps %xmm7, %xmm7
maxss %xmm6, %xmm7
movaps %xmm2, %xmm5
cmpltss %xmm6, %xmm5
movaps %xmm5, %xmm6
andnps %xmm7, %xmm6
andps %xmm2, %xmm5
orps %xmm6, %xmm5
movaps %xmm5, %xmm6
cmpneqps %xmm2, %xmm6
movaps %xmm5, %xmm7
cmpneqps %xmm1, %xmm7
andps %xmm6, %xmm7
movd %xmm7, %ebp
xorl %r15d, %r15d
movss 0x40(%rsp,%r15,4), %xmm6
testb $0x1, %bpl
je 0x2dd4
divss %xmm5, %xmm6
xorps %xmm7, %xmm7
maxss %xmm6, %xmm7
movaps %xmm2, %xmm8
cmpltss %xmm6, %xmm8
movaps %xmm8, %xmm6
andnps %xmm7, %xmm6
andps %xmm2, %xmm8
orps %xmm6, %xmm8
movss %xmm8, 0x40(%rsp,%r15,4)
movaps %xmm8, %xmm6
mulss %xmm0, %xmm6
cvttss2si %xmm6, %r12d
movslq %r12d, %r12
movb (%rsi,%r12), %r12b
movb %r12b, (%rbx,%r15)
incq %r15
cmpq $0x3, %r15
jne 0x2d98
mulss %xmm3, %xmm5
addss %xmm4, %xmm5
cvttss2si %xmm5, %ebp
movb %bpl, 0x3(%r14,%r11)
addq $0x4, %r11
addq $0x4, %rbx
cmpq %rdx, %r11
jb 0x2d04
jmp 0x2f43
movss 0x2324(%rip), %xmm0     # 0x5144
movq 0xc6a9(%rip), %rsi      # 0xf4d0
movl %edx, %edx
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movq 0x28(%rsp), %r10
xorl %r11d, %r11d
movss 0x4(%rax,%rcx,4), %xmm1
mulss (%r8,%r11,4), %xmm1
movss (%rax,%rcx,4), %xmm2
mulss (%r15,%r11,4), %xmm2
addss %xmm1, %xmm2
movss 0x8(%rax,%rcx,4), %xmm1
mulss (%r9,%r11,4), %xmm1
addss %xmm2, %xmm1
movss 0xc(%rax,%rcx,4), %xmm2
mulss (%r10,%r11,4), %xmm2
addss %xmm1, %xmm2
mulss %xmm0, %xmm2
cvttss2si %xmm2, %ebx
movslq %ebx, %rbx
movb (%rsi,%rbx), %bl
movb %bl, (%r14,%r11)
incq %r11
cmpq %r11, %rdx
jne 0x2e40
jmp 0x2f43
movss 0x22a2(%rip), %xmm0     # 0x5144
movq 0xc627(%rip), %rsi      # 0xf4d0
movl %edx, %edx
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r8
movq 0x20(%rsp), %r9
movq 0x28(%rsp), %r10
xorl %r11d, %r11d
movq %r14, %rbx
xorl %r15d, %r15d
movss 0x4(%rax,%rcx,4), %xmm1
mulss (%r8,%r15,4), %xmm1
movss (%rax,%rcx,4), %xmm2
mulss (%r13,%r15,4), %xmm2
addss %xmm1, %xmm2
movss 0x8(%rax,%rcx,4), %xmm1
mulss (%r9,%r15,4), %xmm1
addss %xmm2, %xmm1
movss 0xc(%rax,%rcx,4), %xmm2
mulss (%r10,%r15,4), %xmm2
addss %xmm1, %xmm2
mulss %xmm0, %xmm2
cvttss2si %xmm2, %ebp
movslq %ebp, %r12
movb (%rsi,%r12), %bpl
movb %bpl, (%rbx,%r15)
incq %r15
cmpq $0x3, %r15
jne 0x2ec8
movb $0x0, 0x3(%r14,%r11)
addq $0x4, %r11
addq $0x4, %rbx
addq $0x10, %r10
addq $0x10, %r9
addq $0x10, %r8
addq $0x10, %r13
cmpq %rdx, %r11
jb 0x2ec5
movq 0x38(%rdi), %rax
movslq 0x14(%rdi), %rcx
decl -0x4(%rax,%rcx,4)
movq 0x50(%rsp), %rax
incl 0x18(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movss 0x21d6(%rip), %xmm0     # 0x5144
movss %xmm0, 0xc(%rsp)
movq 0xc555(%rip), %r13      # 0xf4d0
leaq 0xc(%r15), %rbp
xorl %ebx, %ebx
movss 0x21c3(%rip), %xmm5     # 0x514c
movss 0x30(%r15), %xmm1
xorps %xmm2, %xmm2
maxss %xmm1, %xmm2
movaps %xmm5, %xmm0
cmpltss %xmm1, %xmm0
movaps %xmm0, %xmm1
andnps %xmm2, %xmm1
andps %xmm5, %xmm0
orps %xmm1, %xmm0
ucomiss 0x21a7(%rip), %xmm0     # 0x5158
jne 0x2fb5
jnp 0x2fd1
xorl %eax, %eax
movss (%r15,%rax), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%r15,%rax)
addq $0x10, %rax
cmpq $0x30, %rax
jne 0x2fb7
movq %rbp, %rax
xorl %ecx, %ecx
movss 0xc(%rsp), %xmm4
movss -0xc(%rax), %xmm1
xorps %xmm2, %xmm2
maxss %xmm1, %xmm2
movaps %xmm5, %xmm3
cmpltss %xmm1, %xmm3
movaps %xmm3, %xmm1
andnps %xmm2, %xmm1
andps %xmm5, %xmm3
orps %xmm1, %xmm3
mulss %xmm4, %xmm3
cvttss2si %xmm3, %edx
movslq %edx, %rdx
movb (%r13,%rdx), %dl
movb %dl, (%r14,%rcx)
movsd -0x8(%rax), %xmm1
movsd %xmm1, -0xc(%rax)
movss (%rax), %xmm1
movss %xmm1, -0x4(%rax)
movl $0x0, (%rax)
incq %rcx
addq $0x10, %rax
cmpq $0x3, %rcx
jne 0x2fdc
mulss 0x2102(%rip), %xmm0     # 0x5140
callq 0x1070
movss 0x2101(%rip), %xmm5     # 0x514c
cvttss2si %xmm0, %eax
movb %al, 0x3(%r14)
movsd 0x34(%r15), %xmm0
movsd %xmm0, 0x30(%r15)
movss 0x3c(%r15), %xmm0
movss %xmm0, 0x38(%r15)
movl $0x0, 0x3c(%r15)
addq $0x40, %r15
addq $0x4, %r14
incl %ebx
addq $0x40, %rbp
cmpl %r12d, %ebx
jne 0x2f89
jmp 0x2f4f