// File: /workspace/github_c_makefile_star2_O2/keithnoguchi[P]pearls-in-action/0xb/main_test.c
// Function: main
int main(void)
{
	int fail = 0;
	int i = 0;

	printf("===================\n");
	printf("Column 0xb: Sorting\n");
	printf("===================\n");

	if (test_isort1_random(&i))
		fail++;
	if (test_isort2_random(&i))
		fail++;
	if (test_isort3_random(&i))
		fail++;
	if (test_qsort1_random(&i))
		fail++;
	if (test_qsort2_random(&i))
		fail++;
	if (test_qsort3_random(&i))
		fail++;
	if (test_qsort4_random(&i))
		fail++;
	if (test_qsort5_random(&i))
		fail++;
	if (test_qsort6_random(&i))
		fail++;
	if (test_isort1_identical(&i))
		fail++;
	if (test_isort2_identical(&i))
		fail++;
	if (test_isort3_identical(&i))
		fail++;
	if (test_qsort1_identical(&i))
		fail++;
	if (test_qsort2_identical(&i))
		fail++;
	if (test_qsort3_identical(&i))
		fail++;
	if (test_qsort4_identical(&i))
		fail++;
	if (test_qsort5_identical(&i))
		fail++;
	if (test_qsort6_identical(&i))
		fail++;
	if (test_isort1_sorted(&i))
		fail++;
	if (test_isort2_sorted(&i))
		fail++;
	if (test_isort3_sorted(&i))
		fail++;
	if (test_qsort1_sorted(&i))
		fail++;
	if (test_qsort2_sorted(&i))
		fail++;
	if (test_qsort3_sorted(&i))
		fail++;
	if (test_qsort4_sorted(&i))
		fail++;
	if (test_qsort5_sorted(&i))
		fail++;
	if (test_qsort6_sorted(&i))
		fail++;

	return fail;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
leaq 0x84(%rsp), %rbx
andl $0x0, (%rbx)
leaq 0x1e59(%rip), %r14      # 0x4018
movq %r14, %rdi
callq 0x2040
leaq 0x1e36(%rip), %rdi      # 0x4004
callq 0x2040
movq %r14, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2514
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
movq %rbx, %rdi
callq 0x273c
leal 0x1(%r14), %ecx
testl %eax, %eax
cmovel %r14d, %ecx
movl %ecx, 0x1c(%rsp)
movq %rbx, %rdi
callq 0x2968
movl %eax, 0x70(%rsp)
movq %rbx, %rdi
callq 0x2bdc
movl %eax, 0x60(%rsp)
movq %rbx, %rdi
callq 0x2e40
movl %eax, 0x50(%rsp)
movq %rbx, %rdi
callq 0x30f0
movl %eax, 0x40(%rsp)
movq %rbx, %rdi
callq 0x338c
movl %eax, 0x30(%rsp)
movq %rbx, %rdi
callq 0x362c
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
callq 0x3908
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
callq 0x26b5
movl %eax, 0x18(%rsp)
movq %rbx, %rdi
callq 0x28dd
movl %eax, 0x14(%rsp)
movq %rbx, %rdi
callq 0x2b09
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
callq 0x2d7d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2fe1
movl %eax, %r14d
movq %rbx, %rdi
callq 0x3291
movl %eax, %r15d
movq %rbx, %rdi
callq 0x352d
movl %eax, %r12d
movq %rbx, %rdi
callq 0x37cd
movl %eax, %r13d
movq %rbx, %rdi
callq 0x3aa9
movd %r15d, %xmm12
movd %r12d, %xmm0
movd %r13d, %xmm1
movd %eax, %xmm2
movd 0x14(%rsp), %xmm13
movd 0x10(%rsp), %xmm3
movd %ebp, %xmm4
movd %r14d, %xmm5
movss 0x30(%rsp), %xmm14
movss 0x20(%rsp), %xmm6
movss 0xc(%rsp), %xmm7
movss 0x18(%rsp), %xmm8
movss 0x70(%rsp), %xmm15
movss 0x60(%rsp), %xmm9
movss 0x50(%rsp), %xmm10
movss 0x40(%rsp), %xmm11
punpckldq %xmm0, %xmm12   # xmm12 = xmm12[0],xmm0[0],xmm12[1],xmm0[1]
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
punpcklqdq %xmm1, %xmm12   # xmm12 = xmm12[0],xmm1[0]
movdqa %xmm12, 0x70(%rsp)
punpckldq %xmm3, %xmm13   # xmm13 = xmm13[0],xmm3[0],xmm13[1],xmm3[1]
punpckldq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
punpcklqdq %xmm4, %xmm13   # xmm13 = xmm13[0],xmm4[0]
movdqa %xmm13, 0x60(%rsp)
unpcklps %xmm6, %xmm14           # xmm14 = xmm14[0],xmm6[0],xmm14[1],xmm6[1]
unpcklps %xmm8, %xmm7            # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
movlhps %xmm7, %xmm14           # xmm14 = xmm14[0],xmm7[0]
movaps %xmm14, 0x50(%rsp)
unpcklps %xmm9, %xmm15           # xmm15 = xmm15[0],xmm9[0],xmm15[1],xmm9[1]
unpcklps %xmm11, %xmm10          # xmm10 = xmm10[0],xmm11[0],xmm10[1],xmm11[1]
movlhps %xmm10, %xmm15          # xmm15 = xmm15[0],xmm10[0]
movaps %xmm15, 0x40(%rsp)
movq %rbx, %rdi
callq 0x26cd
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
callq 0x28f5
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
callq 0x2b21
movl %eax, %r15d
movq %rbx, %rdi
callq 0x2d95
movl %eax, %r12d
movq %rbx, %rdi
callq 0x2ff9
movl %eax, %r13d
movq %rbx, %rdi
callq 0x32a9
movl %eax, %ebp
movq %rbx, %rdi
callq 0x3545
movl %eax, %r14d
movq %rbx, %rdi
callq 0x37e5
movd %r13d, %xmm2
movd %ebp, %xmm0
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movd %r14d, %xmm0
movd %eax, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
movdqa %xmm2, 0x30(%rsp)
movd 0x20(%rsp), %xmm2
movd 0xc(%rsp), %xmm0
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movd %r15d, %xmm0
movd %r12d, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
movdqa %xmm2, 0x20(%rsp)
movq %rbx, %rdi
callq 0x3ac1
movdqa 0x40(%rsp), %xmm1
pxor %xmm3, %xmm3
pcmpeqd %xmm3, %xmm1
movdqa 0x50(%rsp), %xmm0
pcmpeqd %xmm3, %xmm0
packssdw %xmm0, %xmm1
movdqa 0x60(%rsp), %xmm2
pcmpeqd %xmm3, %xmm2
movdqa 0x70(%rsp), %xmm0
pcmpeqd %xmm3, %xmm0
packssdw %xmm0, %xmm2
packsswb %xmm2, %xmm1
pmovmskb %xmm1, %ecx
notl %ecx
movl %ecx, %edx
shrl %edx
andl $0x5555, %edx           # imm = 0x5555
subl %edx, %ecx
movl $0x3333, %edx           # imm = 0x3333
movl %ecx, %esi
andl %edx, %esi
shrl $0x2, %ecx
andl %edx, %ecx
addl %esi, %ecx
movl %ecx, %edx
shrl $0x4, %edx
addl %ecx, %edx
andl $0xf0f, %edx            # imm = 0xF0F
movl %edx, %esi
shrl $0x8, %esi
addl %edx, %esi
movl $0xff, %ecx
andl %ecx, %esi
movdqa 0x20(%rsp), %xmm0
pcmpeqd %xmm3, %xmm0
movdqa 0x30(%rsp), %xmm1
pcmpeqd %xmm3, %xmm1
packssdw %xmm1, %xmm0
packsswb %xmm0, %xmm0
pmovmskb %xmm0, %edx
notl %edx
andl %ecx, %edx
imull $0x8040201, %edx, %ecx  # imm = 0x8040201
shrl $0x3, %ecx
andl $0x11111111, %ecx       # imm = 0x11111111
imull $0x11111111, %ecx, %ecx # imm = 0x11111111
shrl $0x1c, %ecx
addl %esi, %ecx
cmpl $0x1, %eax
sbbl $-0x1, %ecx
addl 0x1c(%rsp), %ecx
movl %ecx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq