// File: /workspace/github_c_makefile_star2_O2/ender672[P]liboil/oil_resample.c
// Function: oil_scale_in
void oil_scale_in(struct oil_scale *os, unsigned char *in)
{
	float *tmp, *coeffs;

	tmp = os->rb;
	if (os->out_height > os->in_height) {
		tmp = get_rb_line(os, os->in_pos % 4);
	}

	if (os->out_width <= os->in_width) {
		oil_xscale_down(in, tmp, os->out_width, os->cs,
			os->coeffs_x, os->borders_x);
		os->borders_y[os->out_pos] -= 1;
	} else {
		oil_xscale_up(in, os->in_width, tmp, os->cs,
			os->coeffs_x, os->borders_x);
	}

	if (os->out_height <= os->in_height) {
		coeffs = os->coeffs_y + os->in_pos * 4;
		yscale_down(tmp, os->out_width, coeffs, os->sums_y, os->cs);
	}

	os->in_pos++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq 0x48(%rdi), %rsi
movl 0x4(%rdi), %eax
cmpl (%rdi), %eax
jle 0x191f
pushq $0x4
popq %rcx
movl 0xc(%rdi), %r8d
movl 0x14(%rdi), %eax
cltd
idivl %ecx
movzbl 0x10(%rdi), %eax
imull %r8d, %eax
imull %edx, %eax
cltq
leaq (%rsi,%rax,4), %rsi
movq %rsi, 0x8(%rsp)
jmp 0x1928
movq %rsi, 0x8(%rsp)
movl 0xc(%rdi), %r8d
movl 0x8(%rdi), %r9d
movl 0x10(%rdi), %eax
movq 0x28(%rdi), %r15
movq %rdi, 0x78(%rsp)
movq 0x30(%rdi), %rcx
movq %rcx, 0x10(%rsp)
cmpl %r9d, %r8d
jle 0x1a02
movq %r9, %rsi
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
ja 0x1ac4
leaq 0x3764(%rip), %rax      # 0x50c4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
movq %rsi, %rdi
xorps %xmm1, %xmm1
movss 0x3702(%rip), %xmm0     # 0x5080
xorl %ecx, %ecx
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movq 0x8(%rsp), %rdx
cmpq %rdi, %rcx
je 0x22ae
movzbl (%r14,%rcx), %esi
cvtsi2ss %esi, %xmm4
divss %xmm0, %xmm4
movq 0x10(%rsp), %rsi
movl (%rsi,%rcx,4), %esi
testl %esi, %esi
cmovlel %eax, %esi
subl $0x1, %esi
jb 0x19f4
movss 0x4(%r15), %xmm5
mulss %xmm2, %xmm5
movss (%r15), %xmm6
mulss %xmm1, %xmm6
addss %xmm5, %xmm6
movss 0x8(%r15), %xmm5
mulss %xmm3, %xmm5
addss %xmm6, %xmm5
movss 0xc(%r15), %xmm6
mulss %xmm4, %xmm6
addss %xmm5, %xmm6
movss %xmm6, (%rdx)
addq $0x4, %rdx
addq $0x10, %r15
jmp 0x19ae
incq %rcx
movaps %xmm2, %xmm1
movaps %xmm3, %xmm2
movaps %xmm4, %xmm3
jmp 0x198b
movq %r8, %rdx
leal -0x1(%rax), %ecx
cmpl $0x3, %ecx
ja 0x1b83
leaq 0x369c(%rip), %rax      # 0x50b4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r12
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movaps %xmm0, (%r12)
leaq 0xda94(%rip), %r13      # 0xf4d0
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rbp
je 0x229e
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movl (%rax,%rbp,4), %ebx
testl %ebx, %ebx
movl $0x0, %eax
cmovlel %eax, %ebx
subl $0x1, %ebx
jb 0x1a8b
movzbl (%r14), %eax
movss (%r13,%rax,4), %xmm0
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e9b
incq %r14
addq $0x10, %r15
jmp 0x1a67
movss 0x30(%rsp), %xmm0
movq (%rsp), %rax
movss %xmm0, (%rax)
movsd 0x34(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movss 0x3c(%rsp), %xmm0
movss %xmm0, 0x38(%rsp)
andl $0x0, 0x3c(%rsp)
addq $0x4, %rax
incq %rbp
movq 0x18(%rsp), %rdx
jmp 0x1a48
cmpl $0x104, %eax            # imm = 0x104
je 0x1c5a
cmpl $0x204, %eax            # imm = 0x204
jne 0x22ae
xorps %xmm0, %xmm0
leaq 0x3c(%rsp), %rax
movaps %xmm0, 0x24(%rax)
movaps %xmm0, 0x14(%rax)
movaps %xmm0, 0x4(%rax)
movaps %xmm0, -0xc(%rax)
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
movq %rsi, (%rsp)
pushq $0x4
popq %rbp
movq 0x8(%rsp), %r13
cmpq (%rsp), %rbx
je 0x22ae
leaq 0x3c(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x1b4d
movzbl (%r14,%rcx), %edx
cvtsi2ss %edx, %xmm0
divss 0x3553(%rip), %xmm0     # 0x5080
movsd -0x8(%rax), %xmm1
movsd %xmm1, -0xc(%rax)
movss (%rax), %xmm1
movss %xmm1, -0x4(%rax)
movss %xmm0, (%rax)
incq %rcx
addq $0x10, %rax
jmp 0x1b16
xorl %r12d, %r12d
movq 0x10(%rsp), %rax
cmpl (%rax,%rbx,4), %r12d
jge 0x1b7a
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2ef9
addq $0x10, %r13
addq $0x10, %r15
incl %r12d
jmp 0x1b50
addq $0x4, %r14
incq %rbx
jmp 0x1b05
cmpl $0x104, %eax            # imm = 0x104
je 0x1d43
cmpl $0x204, %eax            # imm = 0x204
jne 0x229e
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
movaps %xmm0, (%rax)
leaq 0xd912(%rip), %r13      # 0xf4d0
movq 0x8(%rsp), %rbx
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rcx
je 0x229e
movq %rbx, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax,%rcx,4), %eax
xorl %r12d, %r12d
testl %eax, %eax
cmovlel %r12d, %eax
movl %eax, (%rsp)
cmpl (%rsp), %r12d
je 0x1c2f
leaq 0x30(%rsp), %rbx
xorl %ebp, %ebp
cmpq $0x4, %rbp
je 0x1c22
movzbl (%r14,%rbp), %eax
movss (%r13,%rax,4), %xmm0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e9b
incq %rbp
addq $0x10, %rbx
jmp 0x1bfc
addq $0x4, %r14
addq $0x10, %r15
incl %r12d
jmp 0x1bef
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x2ebc
addq $0x10, %rbx
movq 0x28(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdx
jmp 0x1bc8
xorps %xmm0, %xmm0
leaq 0x3c(%rsp), %rax
movaps %xmm0, 0x24(%rax)
movaps %xmm0, 0x14(%rax)
movaps %xmm0, 0x4(%rax)
movaps %xmm0, -0xc(%rax)
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
movq %rsi, (%rsp)
pushq $0x4
popq %rbp
leaq 0x5429(%rip), %rsi      # 0x70b0
movq 0x8(%rsp), %r13
cmpq (%rsp), %rbx
je 0x22ae
movzbl 0x3(%r14), %eax
cvtsi2ss %eax, %xmm0
divss 0x33d9(%rip), %xmm0     # 0x5080
movsd 0x64(%rsp), %xmm1
movsd %xmm1, 0x60(%rsp)
movss 0x6c(%rsp), %xmm1
movss %xmm1, 0x68(%rsp)
movss %xmm0, 0x6c(%rsp)
leaq 0x3c(%rsp), %rax
pushq $-0x3
popq %rcx
testq %rcx, %rcx
je 0x1d03
movss 0x6c(%rsp), %xmm0
movzbl 0x3(%r14,%rcx), %edx
mulss (%rsi,%rdx,4), %xmm0
movsd -0x8(%rax), %xmm1
movsd %xmm1, -0xc(%rax)
movss (%rax), %xmm1
movss %xmm1, -0x4(%rax)
movss %xmm0, (%rax)
incq %rcx
addq $0x10, %rax
jmp 0x1ccd
xorl %r12d, %r12d
movq 0x10(%rsp), %rax
cmpl (%rax,%rbx,4), %r12d
jge 0x1d30
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2ef9
addq $0x10, %r13
addq $0x10, %r15
incl %r12d
jmp 0x1d06
addq $0x4, %r14
incq %rbx
leaq 0x5372(%rip), %rsi      # 0x70b0
jmp 0x1c8c
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, -0x10(%rax)
movaps %xmm0, -0x20(%rax)
movaps %xmm0, -0x30(%rax)
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
leaq 0x5348(%rip), %rbp      # 0x70b0
movq 0x8(%rsp), %rbx
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rcx
je 0x229e
movq %rbx, 0x80(%rsp)
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movl (%rax,%rcx,4), %eax
xorl %ebx, %ebx
testl %eax, %eax
cmovlel %ebx, %eax
movl %eax, 0x28(%rsp)
cmpl 0x28(%rsp), %ebx
je 0x1e08
movzbl 0x3(%r14), %eax
leaq 0xd723(%rip), %rcx      # 0xf4d0
movss (%rcx,%rax,4), %xmm0
movss %xmm0, (%rsp)
pushq $-0x3
popq %r12
leaq 0x30(%rsp), %r13
testq %r12, %r12
je 0x1dea
movzbl 0x3(%r14,%r12), %eax
movss (%rbp,%rax,4), %xmm0
mulss (%rsp), %xmm0
movq %r15, %rdi
movq %r13, %rsi
callq 0x2e9b
addq $0x10, %r13
incq %r12
jmp 0x1dc0
movss (%rsp), %xmm0
movq %r15, %rdi
leaq 0x60(%rsp), %rsi
callq 0x2e9b
addq $0x4, %r14
addq $0x10, %r15
incl %ebx
jmp 0x1d9b
movq 0x80(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x2ebc
addq $0x10, %rbx
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdx
jmp 0x1d72
xorps %xmm0, %xmm0
leaq 0x38(%rsp), %rax
movaps %xmm0, 0x18(%rax)
movaps %xmm0, 0x8(%rax)
movaps %xmm0, -0x8(%rax)
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
movq %rsi, (%rsp)
pushq $0x3
popq %rbp
leaq 0x5251(%rip), %rsi      # 0x70b0
movq 0x8(%rsp), %r13
cmpq (%rsp), %rbx
je 0x22ae
leaq 0x38(%rsp), %rax
pushq $-0x3
popq %rcx
testq %rcx, %rcx
je 0x1ea7
movzbl 0x3(%r14,%rcx), %edx
movsd (%rax), %xmm0
movss -0x4(%rax), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movss (%rsi,%rdx,4), %xmm2
shufps $0xd4, %xmm0, %xmm2     # xmm2 = xmm2[0,1],xmm0[1,3]
shufps $0x28, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[2,0]
movaps %xmm1, -0x8(%rax)
incq %rcx
addq $0x10, %rax
jmp 0x1e76
xorl %r12d, %r12d
movq 0x10(%rsp), %rax
cmpl (%rax,%rbx,4), %r12d
jge 0x1ed4
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2ef9
addq $0xc, %r13
addq $0x10, %r15
incl %r12d
jmp 0x1eaa
addq $0x3, %r14
incq %rbx
leaq 0x51ce(%rip), %rsi      # 0x70b0
jmp 0x1e64
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
leaq 0x51ab(%rip), %rbp      # 0x70b0
movq 0x8(%rsp), %rbx
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rcx
je 0x229e
movq %rbx, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax,%rcx,4), %eax
xorl %r13d, %r13d
testl %eax, %eax
cmovlel %r13d, %eax
movl %eax, (%rsp)
cmpl (%rsp), %r13d
je 0x1f77
pushq $-0x3
popq %r12
leaq 0x30(%rsp), %rbx
testq %r12, %r12
je 0x1f6a
movzbl 0x3(%r14,%r12), %eax
movss (%rbp,%rax,4), %xmm0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e9b
addq $0x10, %rbx
incq %r12
jmp 0x1f45
addq $0x3, %r14
addq $0x10, %r15
incl %r13d
jmp 0x1f36
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
pushq $0x3
popq %rdx
callq 0x2ebc
addq $0xc, %rbx
movq 0x28(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdx
jmp 0x1f0f
xorps %xmm0, %xmm0
leaq 0x38(%rsp), %rax
movaps %xmm0, 0x18(%rax)
movaps %xmm0, 0x8(%rax)
movaps %xmm0, -0x8(%rax)
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
movq %rsi, (%rsp)
pushq $0x3
popq %rbp
leaq 0x50e5(%rip), %rsi      # 0x70b0
movq 0x8(%rsp), %r13
cmpq (%rsp), %rbx
je 0x22ae
leaq 0x38(%rsp), %rax
pushq $-0x3
popq %rcx
testq %rcx, %rcx
je 0x2013
movzbl 0x3(%r14,%rcx), %edx
movsd (%rax), %xmm0
movss -0x4(%rax), %xmm1
movlhps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movss (%rsi,%rdx,4), %xmm2
shufps $0xd4, %xmm0, %xmm2     # xmm2 = xmm2[0,1],xmm0[1,3]
shufps $0x28, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[2,0]
movaps %xmm1, -0x8(%rax)
incq %rcx
addq $0x10, %rax
jmp 0x1fe2
xorl %r12d, %r12d
movq 0x10(%rsp), %rax
cmpl (%rax,%rbx,4), %r12d
jge 0x2045
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2ef9
andl $0x0, 0xc(%r13)
addq $0x10, %r13
addq $0x10, %r15
incl %r12d
jmp 0x2016
addq $0x4, %r14
incq %rbx
leaq 0x505d(%rip), %rsi      # 0x70b0
jmp 0x1fd0
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %edx
leaq 0x5037(%rip), %rbp      # 0x70b0
movq 0x8(%rsp), %rbx
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rcx
je 0x229e
movq %rbx, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax,%rcx,4), %eax
xorl %r13d, %r13d
testl %eax, %eax
cmovlel %r13d, %eax
movl %eax, (%rsp)
cmpl (%rsp), %r13d
je 0x20eb
pushq $-0x3
popq %r12
leaq 0x30(%rsp), %rbx
testq %r12, %r12
je 0x20de
movzbl 0x3(%r14,%r12), %eax
movss (%rbp,%rax,4), %xmm0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2e9b
addq $0x10, %rbx
incq %r12
jmp 0x20b9
addq $0x4, %r14
addq $0x10, %r15
incl %r13d
jmp 0x20aa
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
pushq $0x3
popq %rdx
callq 0x2ebc
addq $0x10, %rbx
movq 0x28(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdx
jmp 0x2083
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
movq %rsi, (%rsp)
pushq $0x2
popq %rbp
movq 0x8(%rsp), %r13
cmpq (%rsp), %rbx
je 0x22ae
movzbl 0x1(%r14), %eax
cvtsi2ss %eax, %xmm0
divss 0x2f2d(%rip), %xmm0     # 0x5080
movsd 0x44(%rsp), %xmm1
movsd %xmm1, 0x40(%rsp)
movss 0x4c(%rsp), %xmm1
movss %xmm1, 0x48(%rsp)
movss %xmm0, 0x4c(%rsp)
movzbl (%r14), %eax
leaq 0xd354(%rip), %rcx      # 0xf4d0
mulss (%rcx,%rax,4), %xmm0
movsd 0x34(%rsp), %xmm1
movsd %xmm1, 0x30(%rsp)
movss 0x3c(%rsp), %xmm1
movss %xmm1, 0x38(%rsp)
movss %xmm0, 0x3c(%rsp)
xorl %r12d, %r12d
movq 0x10(%rsp), %rax
cmpl (%rax,%rbx,4), %r12d
jge 0x21cc
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x2ef9
addq $0x8, %r13
addq $0x10, %r15
incl %r12d
jmp 0x21a2
addq $0x2, %r14
incq %rbx
jmp 0x2138
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r12
movaps %xmm0, (%r12)
movaps %xmm0, -0x10(%r12)
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
leaq 0x30(%rsp), %r13
leaq 0xd2d2(%rip), %rbx      # 0xf4d0
xorl %ecx, %ecx
movq 0x8(%rsp), %rbp
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rcx
je 0x229e
movq %rbp, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax,%rcx,4), %ebp
testl %ebp, %ebp
movl $0x0, %eax
cmovlel %eax, %ebp
subl $0x1, %ebp
jb 0x2275
movzbl 0x1(%r14), %eax
movss (%rbx,%rax,4), %xmm1
movss %xmm1, (%rsp)
movzbl (%r14), %eax
movss (%rbx,%rax,4), %xmm0
mulss %xmm1, %xmm0
movq %r15, %rdi
movq %r13, %rsi
callq 0x2e9b
movss (%rsp), %xmm0
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e9b
addq $0x2, %r14
addq $0x10, %r15
jmp 0x222f
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
pushq $0x2
popq %rdx
callq 0x2ebc
addq $0x8, %rbp
movq 0x28(%rsp), %rcx
incq %rcx
movq 0x18(%rsp), %rdx
jmp 0x220a
movq 0x78(%rsp), %rcx
movq 0x38(%rcx), %rax
movslq 0x18(%rcx), %rcx
decl (%rax,%rcx,4)
movq 0x78(%rsp), %rcx
movl 0x4(%rcx), %eax
cmpl (%rcx), %eax
jle 0x22d4
movq 0x78(%rsp), %rax
incl 0x14(%rax)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x78(%rsp), %rax
movslq 0x14(%rax), %r14
shlq $0x4, %r14
addq 0x20(%rax), %r14
movq 0x40(%rax), %r15
movzbl 0x10(%rax), %ebx
imull 0xc(%rax), %ebx
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
cmpq %r12, %rbx
je 0x22ba
movq 0x8(%rsp), %rax
movss (%rax,%r12,4), %xmm0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e9b
addq $0x10, %r15
incq %r12
jmp 0x22fa