// File: /workspace/github_c_makefile_star2_O2/ender672[P]liboil/test.c
// Function: test_scale
static void test_scale(long in_width, long in_height,
	unsigned char **input_image, long out_width, long out_height,
	enum oil_colorspace cs)
{
	long i, out_row_stride;
	unsigned char **oil_output_image;
	long double **ref_output_image;

	out_row_stride = OIL_CMP(cs) * out_width;

	/* oil scaling */
	oil_output_image = alloc_2d_uchar(out_row_stride, out_height);
	do_oil_scale(input_image, in_width, in_height, oil_output_image,
		out_width, out_height, cs);

	/* reference scaling */
	ref_output_image = alloc_2d_ld(out_row_stride, out_height);
	ref_scale(input_image, in_width, in_height, ref_output_image, out_width,
		out_height, cs);

	/* compare the two */
	for (i=0; i<out_height; i++) {
		validate_scanline8(oil_output_image[i], ref_output_image[i],
			out_width, OIL_CMP(cs));
	}

	free_2d_uchar(oil_output_image, out_height);
	free_2d_ld(ref_output_image, out_height);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %r9d, %r12d
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %rbp
movq %rsi, 0x80(%rsp)
movq %rdi, 0x88(%rsp)
movzbl %r12b, %r15d
movq %r15, %rdi
imulq %rcx, %rdi
movq %rdi, 0x20(%rsp)
movq %r8, %rsi
callq 0x3166
movq %rax, 0xa8(%rsp)
leaq 0xe0(%rsp), %r13
movq %r13, %rdi
movq 0x80(%rsp), %rsi
movl %r14d, %edx
movq 0x88(%rsp), %rcx
movq %rbx, 0xb0(%rsp)
movl %ebx, %r8d
movq %r12, 0x30(%rsp)
movl %r12d, %r9d
callq 0x136c
xorl %ebx, %ebx
testq %r14, %r14
movl $0x0, %eax
movq %r14, 0x90(%rsp)
cmovgq %r14, %rax
movq %rax, 0x98(%rsp)
xorl %r14d, %r14d
cmpq 0x98(%rsp), %rbx
je 0x3298
movq %r13, %rdi
callq 0x18a9
testl %eax, %eax
je 0x327f
movq (%rbp,%r14,8), %rsi
incq %r14
movq %r13, %rdi
callq 0x18db
jmp 0x3261
movq 0xa8(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r13, %rdi
callq 0x231e
incq %rbx
jmp 0x3257
leaq 0xe0(%rsp), %rdi
callq 0x160b
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq 0x90(%rsp), %rsi
callq 0x3bc6
movq %rax, %r13
movq %r15, %r14
imulq 0x88(%rsp), %r14
movq %r14, %rdi
shlq $0x4, %rdi
callq 0x10f0
movq %rax, 0xa0(%rsp)
movq %rbx, %rdi
movq 0x80(%rsp), %rbx
movq %rbx, %rsi
callq 0x3bc6
movq %rax, %r12
xorl %eax, %eax
testq %r14, %r14
cmovleq %rax, %r14
movq %r14, 0xd0(%rsp)
xorl %r14d, %r14d
movq 0x88(%rsp), %rcx
testq %rcx, %rcx
movl $0x0, %eax
cmovgq %rcx, %rax
movq %rax, 0xc8(%rsp)
testq %rbx, %rbx
movl $0x0, %eax
cmovgq %rbx, %rax
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rbx
movl %r15d, %eax
shll $0x4, %eax
movq %rax, 0x58(%rsp)
fldt 0x1de3(%rip)            # 0x5130
fstpt 0x20(%rsp)
fldt 0x1df9(%rip)            # 0x5150
fstpt 0x38(%rsp)
fldt 0x1dff(%rip)            # 0x5160
fstpt 0x48(%rsp)
fldt 0x1e05(%rip)            # 0x5170
fstpt 0x64(%rsp)
cmpq 0x70(%rsp), %r14
je 0x367b
movq %rbx, %rax
xorl %ecx, %ecx
movq 0xd0(%rsp), %rsi
cmpq %rcx, %rsi
je 0x33bc
movq (%rbp,%r14,8), %rdx
movzbl (%rdx,%rcx), %edx
cvtsi2ss %edx, %xmm0
divss 0x1cdf(%rip), %xmm0     # 0x5080
movss %xmm0, 0xb8(%rsp)
flds 0xb8(%rsp)
fstpt (%rax)
incq %rcx
addq $0x10, %rax
jmp 0x3387
movq %r14, 0xd8(%rsp)
movq 0xc8(%rsp), %r14
movq 0x30(%rsp), %rax
subq $0x1, %r14
jb 0x3644
cmpl $0x104, %eax            # imm = 0x104
je 0x345e
cmpl $0x3, %eax
je 0x3403
cmpl $0x4, %eax
je 0x342f
cmpl $0x2, %eax
jne 0x363a
fldt 0x10(%rbx)
fldt (%rbx)
fmulp %st, %st(1)
fstpt (%rbx)
jmp 0x363a
fldt (%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x34a2
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
jmp 0x34aa
fldt (%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x351b
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
jmp 0x3523
fldt 0x30(%rbx)
fldt (%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
fld %st(1)
fstpt 0xbc(%rsp)
jae 0x359c
fstp %st(1)
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
fldt 0xbc(%rsp)
jmp 0x35a6
fldt 0x1c98(%rip)            # 0x5140
fdivrp %st, %st(1)
fstpt (%rbx)
fldt 0x10(%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x34d5
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
jmp 0x34dd
fldt 0x1c65(%rip)            # 0x5140
fdivrp %st, %st(1)
fstpt 0x10(%rbx)
fldt 0x20(%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x3509
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
jmp 0x3511
fldt 0x1c31(%rip)            # 0x5140
fdivrp %st, %st(1)
movq 0x30(%rsp), %rax
jmp 0x3637
fldt 0x1c1f(%rip)            # 0x5140
fdivrp %st, %st(1)
fstpt (%rbx)
fldt 0x10(%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x354e
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
jmp 0x3556
fldt 0x1bec(%rip)            # 0x5140
fdivrp %st, %st(1)
fstpt 0x10(%rbx)
fldt 0x20(%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x3582
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
jmp 0x358a
fldt 0x1bb8(%rip)            # 0x5140
fdivrp %st, %st(1)
movq 0x30(%rsp), %rax
fstpt 0x20(%rbx)
fldz
fstpt 0x30(%rbx)
jmp 0x363a
fldt 0x1b9e(%rip)            # 0x5140
fdivrp %st, %st(1)
fxch %st(1)
fmul %st, %st(1)
fxch %st(1)
fstpt (%rbx)
fldt 0x10(%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x35de
fstp %st(1)
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
fldt 0xbc(%rsp)
jmp 0x35e8
fldt 0x1b5c(%rip)            # 0x5140
fdivrp %st, %st(1)
fxch %st(1)
fmul %st, %st(1)
fxch %st(1)
fstpt 0x10(%rbx)
fldt 0x20(%rbx)
fldt 0x20(%rsp)
fucompi %st(1), %st
jae 0x3626
fstp %st(1)
fldt 0x38(%rsp)
faddp %st, %st(1)
fldt 0x48(%rsp)
fdivrp %st, %st(1)
fldt 0x64(%rsp)
fstpt 0x10(%rsp)
fstpt (%rsp)
callq 0x1100
fldt 0xbc(%rsp)
movq 0x30(%rsp), %rax
jmp 0x3635
fldt 0x1b14(%rip)            # 0x5140
fdivrp %st, %st(1)
movq 0x30(%rsp), %rax
fxch %st(1)
fmulp %st, %st(1)
fstpt 0x20(%rbx)
addq 0x58(%rsp), %rbx
jmp 0x33d1
movq 0xd8(%rsp), %r14
movq (%r12,%r14,8), %rdx
movq 0xa0(%rsp), %rbx
movq %rbx, %rdi
movq 0x88(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movq %r15, %r8
callq 0x3c4c
incq %r14
jmp 0x336f
movq 0x80(%rsp), %rdi
imulq %r15, %rdi
shlq $0x4, %rdi
callq 0x10f0
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rdi
imulq %r15, %rdi
shlq $0x4, %rdi
callq 0x10f0
xorl %ebx, %ebx
movq 0xb0(%rsp), %rcx
testq %rcx, %rcx
movl $0x0, %edx
cmovgq %rcx, %rdx
movq %rdx, 0x48(%rsp)
movq %rax, 0x38(%rsp)
movl %r15d, %r14d
shll $0x4, %r14d
xorl %eax, %eax
cmpq 0x48(%rsp), %rax
je 0x3778
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
xorl %ecx, %ecx
cmpq 0x70(%rsp), %rcx
je 0x3713
xorl %edx, %edx
cmpq %rdx, %r14
je 0x370b
movq (%r12,%rcx,8), %rsi
addq %rbx, %rsi
fldt (%rdx,%rsi)
fstpt (%rax,%rdx)
addq $0x10, %rdx
jmp 0x36f3
incq %rcx
addq %r14, %rax
jmp 0x36ea
movq 0x20(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x38(%rsp), %rbp
movq %rbp, %rdx
movq 0x90(%rsp), %rcx
movq %r15, %r8
callq 0x3c4c
xorl %ecx, %ecx
cmpq 0x98(%rsp), %rcx
je 0x3768
xorl %edx, %edx
cmpq %rdx, %r14
je 0x3760
fldt (%rbp,%rdx)
movq (%r13,%rcx,8), %rsi
addq %rbx, %rsi
fstpt (%rdx,%rsi)
addq $0x10, %rdx
jmp 0x3746
incq %rcx
addq %r14, %rbp
jmp 0x373a
movq 0x58(%rsp), %rax
incq %rax
addq %r14, %rbx
jmp 0x36d3
movq 0x20(%rsp), %rdi
callq 0x1030
movq 0x38(%rsp), %rdi
callq 0x1030
movl %r15d, %edx
shll $0x4, %edx
xorl %esi, %esi
movq 0x30(%rsp), %rcx
leal -0x1(%rcx), %edi
movq %rdx, 0x70(%rsp)
movq %rdi, 0x58(%rsp)
cmpq 0x98(%rsp), %rsi
je 0x3a39
movq 0x48(%rsp), %rbx
xorl %ebp, %ebp
movq %rsi, 0x20(%rsp)
subq $0x1, %rbx
jb 0x3a31
movq (%r13,%rsi,8), %r14
cmpl $0x3, %edi
ja 0x3807
leaq 0x19f5(%rip), %r8       # 0x51d0
movslq (%r8,%rdi,4), %rax
addq %r8, %rax
jmpq *%rax
fldt (%r14,%rbp)
fld1
fxch %st(1)
fucomi %st(1), %st
fld %st(0)
fcmovnb %st(2), %st
fstp %st(2)
fldz
fucomi %st(1), %st
fstp %st(1)
fcmovb %st(1), %st
fstp %st(1)
fstpt (%r14,%rbp)
jmp 0x3a29
cmpl $0x104, %ecx            # imm = 0x104
je 0x3895
cmpl $0x204, %ecx            # imm = 0x204
jne 0x3a29
fldt (%r14,%rbp)
fld1
fxch %st(1)
fucomi %st(1), %st
fld %st(0)
fcmovnb %st(2), %st
fldz
fucomi %st(2), %st
fstp %st(2)
fld %st(1)
fcmovb %st(1), %st
fstp %st(1)
fstpt (%r14,%rbp)
fldt 0x10(%r14,%rbp)
fucomi %st(2), %st
fld %st(0)
fcmovnb %st(3), %st
fxch %st(2)
fucomi %st(1), %st
fstp %st(1)
fld %st(0)
fcmovb %st(2), %st
fstp %st(2)
fxch %st(1)
fstpt 0x10(%r14,%rbp)
fldt 0x20(%r14,%rbp)
fucomi %st(2), %st
fld %st(0)
fcmovnb %st(3), %st
fxch %st(2)
fucomi %st(1), %st
fstp %st(1)
fld %st(0)
fcmovb %st(2), %st
fstp %st(2)
fxch %st(1)
fstpt 0x20(%r14,%rbp)
fldt 0x30(%r14,%rbp)
fucomi %st(2), %st
fld %st(0)
fcmovnb %st(3), %st
fstp %st(3)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
fcmovb %st(1), %st
fstp %st(1)
jmp 0x3982
fldt 0x30(%r14,%rbp)
fld1
fxch %st(1)
fucomi %st(1), %st
fld %st(0)
fcmovnb %st(2), %st
fstp %st(2)
fldz
fucomi %st(1), %st
fstp %st(1)
fld %st(0)
fcmovb %st(2), %st
fstp %st(2)
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
fldt (%r14,%rbp)
fld %st(1)
fstpt 0x38(%rsp)
jne 0x38ca
jnp 0x39da
fdiv %st(1), %st
fldt 0x10(%r14,%rbp)
fdiv %st(2), %st
fstpt 0x10(%r14,%rbp)
fldt 0x20(%r14,%rbp)
fdivp %st, %st(2)
fxch %st(1)
fstpt 0x20(%r14,%rbp)
jmp 0x39dc
fldt (%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
fstpt (%r14,%rbp)
fldt 0x10(%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
fstpt 0x10(%r14,%rbp)
fldt 0x20(%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
movq 0x58(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x30(%rsp), %rcx
fstpt 0x20(%r14,%rbp)
jmp 0x3a29
fldt (%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
fstpt (%r14,%rbp)
fldt 0x10(%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
fstpt 0x10(%r14,%rbp)
fldt 0x20(%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
movq 0x58(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x30(%rsp), %rcx
fstpt 0x20(%r14,%rbp)
fldz
fstpt 0x30(%r14,%rbp)
jmp 0x3a29
fldt 0x10(%r14,%rbp)
fld1
fxch %st(1)
fucomi %st(1), %st
fld %st(0)
fcmovnb %st(2), %st
fldz
fucomi %st(2), %st
fstp %st(2)
fld %st(1)
fcmovb %st(1), %st
fstp %st(1)
fucomi %st(1), %st
fldt (%r14,%rbp)
fld %st(0)
fdiv %st(2), %st
fxch %st(1)
fcmovne %st(1), %st
fcmovu %st(1), %st
fstp %st(1)
fucomi %st(3), %st
fld %st(0)
fcmovnb %st(4), %st
fstp %st(4)
fxch %st(2)
fucomi %st(2), %st
fstp %st(2)
fxch %st(1)
fcmovb %st(2), %st
fstp %st(2)
fxch %st(1)
fstpt (%r14,%rbp)
fstpt 0x10(%r14,%rbp)
jmp 0x3a29
fstp %st(1)
fstpt (%rsp)
callq 0x3fd0
fstpt (%r14,%rbp)
fldt 0x10(%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
fstpt 0x10(%r14,%rbp)
fldt 0x20(%r14,%rbp)
fstpt (%rsp)
callq 0x3fd0
fstpt 0x20(%r14,%rbp)
fldt 0x38(%rsp)
fstpt 0x30(%r14,%rbp)
movq 0x30(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq 0x20(%rsp), %rsi
movq 0x58(%rsp), %rdi
addq %rdx, %rbp
jmp 0x37c0
incq %rsi
jmp 0x37a6
movq 0xa0(%rsp), %rdi
callq 0x1030
movq %r12, %rdi
movq 0x80(%rsp), %rsi
callq 0x3c17
movl %r15d, %eax
shll $0x4, %eax
movq %rax, 0x58(%rsp)
fldt 0x1719(%rip)            # 0x5180
fstpt 0x70(%rsp)
xorl %ecx, %ecx
cmpq 0x98(%rsp), %rcx
je 0x3b5c
movq 0xa8(%rsp), %rax
movq (%rax,%rcx,8), %rbx
movq %rcx, 0x38(%rsp)
movq (%r13,%rcx,8), %r14
xorl %r12d, %r12d
cmpq 0xb0(%rsp), %r12
je 0x3b4f
movq %r14, 0x30(%rsp)
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x3b3a
fldt (%r14)
fmuls 0x15c5(%rip)            # 0x5080
fld %st(0)
fstpt 0x20(%rsp)
fstpt (%rsp)
callq 0x10e0
fldt 0x20(%rsp)
movzbl (%rbx,%rbp), %r9d
movw %r9w, 0x6e(%rsp)
fld %st(0)
fisubrs 0x6e(%rsp)
fabs
fadds 0x161a(%rip)            # 0x5100
fldt 0xbde4(%rip)            # 0xf8d0
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jbe 0x3afc
fld %st(0)
fstpt 0xbdd4(%rip)            # 0xf8d0
fldt 0x70(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x3b13
fstp %st(0)
incq %rbp
addq $0x10, %r14
jmp 0x3aa9
movq 0x34de(%rip), %rcx      # 0x6ff8
movq (%rcx), %rdi
fstpt (%rsp)
leaq 0x1761(%rip), %rsi      # 0x5288
movl %r12d, %edx
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0x10d0
fldz
jmp 0x3b08
incq %r12
addq %r15, %rbx
movq 0x30(%rsp), %r14
addq 0x58(%rsp), %r14
jmp 0x3a94
movq 0x38(%rsp), %rcx
incq %rcx
jmp 0x3a6d
movq 0xa8(%rsp), %rdi
movq 0x90(%rsp), %rbx
movq %rbx, %rsi
callq 0x3b91
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3c17
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq