#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ array_test_ver2_4;
typedef int /*<<< orphan*/ array_test_ver2_3;
typedef int /*<<< orphan*/ array_test_ver2_2;
typedef int /*<<< orphan*/ array_test_ver2_1;
typedef int /*<<< orphan*/ array_test_ver1_4;
typedef int /*<<< orphan*/ array_test_ver1_3;
typedef int /*<<< orphan*/ array_test_ver1_2;
typedef int /*<<< orphan*/ array_test_ver1_1;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ memcmp(int *, int *, int);
int /*<<< orphan*/ sort_array_of_zeros_and_ones_ver1(int *, int);
int /*<<< orphan*/ sort_array_of_zeros_and_ones_ver2(int *, int);
int main() {
  int array_test_ver1_1[10] = {1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
  int array_expect_ver1_1[10] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
  sort_array_of_zeros_and_ones_ver1(array_test_ver1_1,
                                    sizeof(array_test_ver1_1) / sizeof(int));
  assert(memcmp(array_test_ver1_1, array_expect_ver1_1,
                sizeof(array_test_ver1_1)) == 0);
  int array_test_ver1_2[10] = {1, 0, 0, 1, 0, 0, 0, 0, 0, 0};
  int array_expect_ver1_2[10] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
  sort_array_of_zeros_and_ones_ver1(array_test_ver1_2,
                                    sizeof(array_test_ver1_2) / sizeof(int));
  assert(memcmp(array_test_ver1_2, array_expect_ver1_2,
                sizeof(array_test_ver1_2)) == 0);
  int array_test_ver1_3[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  int array_expect_ver1_3[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  sort_array_of_zeros_and_ones_ver1(array_test_ver1_3,
                                    sizeof(array_test_ver1_3) / sizeof(int));
  assert(memcmp(array_test_ver1_3, array_expect_ver1_3,
                sizeof(array_test_ver1_3)) == 0);
  int array_test_ver1_4[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
  int array_expect_ver1_4[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
  sort_array_of_zeros_and_ones_ver1(array_test_ver1_4,
                                    sizeof(array_test_ver1_4) / sizeof(int));
  assert(memcmp(array_test_ver1_4, array_expect_ver1_4,
                sizeof(array_test_ver1_4)) == 0);
  int array_test_ver2_1[10] = {1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
  int array_expect_ver2_1[10] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
  sort_array_of_zeros_and_ones_ver2(array_test_ver2_1,
                                    sizeof(array_test_ver2_1) / sizeof(int));
  assert(memcmp(array_test_ver2_1, array_expect_ver2_1,
                sizeof(array_test_ver2_1)) == 0);
  int array_test_ver2_2[10] = {1, 0, 0, 1, 0, 0, 0, 0, 0, 0};
  int array_expect_ver2_2[10] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1};
  sort_array_of_zeros_and_ones_ver2(array_test_ver2_2,
                                    sizeof(array_test_ver2_2) / sizeof(int));
  assert(memcmp(array_test_ver2_2, array_expect_ver2_2,
                sizeof(array_test_ver2_2)) == 0);
  int array_test_ver2_3[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  int array_expect_ver2_3[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
  sort_array_of_zeros_and_ones_ver1(array_test_ver2_3,
                                    sizeof(array_test_ver2_3) / sizeof(int));
  assert(memcmp(array_test_ver2_3, array_expect_ver2_3,
                sizeof(array_test_ver2_3)) == 0);
  int array_test_ver2_4[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
  int array_expect_ver2_4[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
  sort_array_of_zeros_and_ones_ver2(array_test_ver2_4,
                                    sizeof(array_test_ver2_4) / sizeof(int));
  assert(memcmp(array_test_ver2_4, array_expect_ver2_4,
                sizeof(array_test_ver2_4)) == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x300,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x1,-0x28(%rbp)
movl   $0x1,-0x24(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x48(%rbp)
movl   $0x1,-0x44(%rbp)
movl   $0x1,-0x40(%rbp)
movl   $0x1,-0x3c(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1050 <sort_array_of_zeros_and_ones_ver1@plt>
lea    -0x30(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x90(%rbp)
movl   $0x1,-0x84(%rbp)
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0xa0(%rbp)
movl   $0x1,-0x9c(%rbp)
lea    -0x90(%rbp),%rdi
mov    $0xa,%esi
call   1050 <sort_array_of_zeros_and_ones_ver1@plt>
lea    -0x90(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    -0xf0(%rbp),%rdi
mov    $0xa,%esi
call   1050 <sort_array_of_zeros_and_ones_ver1@plt>
lea    -0xf0(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x150(%rbp),%rdi
lea    0xd0f(%rip),%rsi
mov    $0x28,%edx
call   1070 <memcpy@plt>
lea    -0x180(%rbp),%rdi
lea    0xd27(%rip),%rsi
mov    $0x28,%edx
call   1070 <memcpy@plt>
lea    -0x150(%rbp),%rdi
mov    $0xa,%esi
call   1050 <sort_array_of_zeros_and_ones_ver1@plt>
lea    -0x150(%rbp),%rdi
lea    -0x180(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x1b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x1b0(%rbp)
movl   $0x1,-0x1ac(%rbp)
movl   $0x1,-0x1a8(%rbp)
movl   $0x1,-0x1a4(%rbp)
lea    -0x1e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x1c8(%rbp)
movl   $0x1,-0x1c4(%rbp)
movl   $0x1,-0x1c0(%rbp)
movl   $0x1,-0x1bc(%rbp)
lea    -0x1b0(%rbp),%rdi
mov    $0xa,%esi
call   1080 <sort_array_of_zeros_and_ones_ver2@plt>
lea    -0x1b0(%rbp),%rdi
lea    -0x1e0(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x210(%rbp)
movl   $0x1,-0x204(%rbp)
lea    -0x240(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movl   $0x1,-0x220(%rbp)
movl   $0x1,-0x21c(%rbp)
lea    -0x210(%rbp),%rdi
mov    $0xa,%esi
call   1080 <sort_array_of_zeros_and_ones_ver2@plt>
lea    -0x210(%rbp),%rdi
lea    -0x240(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x270(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    -0x2a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
lea    -0x270(%rbp),%rdi
mov    $0xa,%esi
call   1050 <sort_array_of_zeros_and_ones_ver1@plt>
lea    -0x270(%rbp),%rdi
lea    -0x2a0(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x2d0(%rbp),%rdi
lea    0xb6d(%rip),%rsi
mov    $0x28,%edx
call   1070 <memcpy@plt>
lea    -0x300(%rbp),%rdi
lea    0xb85(%rip),%rsi
mov    $0x28,%edx
call   1070 <memcpy@plt>
lea    -0x2d0(%rbp),%rdi
mov    $0xa,%esi
call   1080 <sort_array_of_zeros_and_ones_ver2@plt>
lea    -0x2d0(%rbp),%rdi
lea    -0x300(%rbp),%rsi
mov    $0x28,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
xor    %eax,%eax
add    $0x300,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x300,%rsp
xorps  %xmm1,%xmm1
movaps %xmm1,0x2e0(%rsp)
movq   $0x0,0x2f0(%rsp)
movaps 0xe96(%rip),%xmm0
movaps %xmm0,0x2d0(%rsp)
movaps %xmm1,0x2b0(%rsp)
movaps %xmm1,0x2a0(%rsp)
movups %xmm0,0x2b8(%rsp)
lea    0x2d0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <sort_array_of_zeros_and_ones_ver1@plt>
lea    0x2a0(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movq   $0x0,0x50(%rsp)
movl   $0x1,0x30(%rsp)
movl   $0x1,0x3c(%rsp)
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x270(%rsp)
movabs $0x100000001,%r15
mov    %r15,0x290(%rsp)
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <sort_array_of_zeros_and_ones_ver1@plt>
lea    0x270(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movq   $0x0,0x260(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movq   $0x0,0x230(%rsp)
lea    0x240(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <sort_array_of_zeros_and_ones_ver1@plt>
lea    0x210(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    0xd77(%rip),%r14
mov    %r14,0x200(%rsp)
movaps 0xd58(%rip),%xmm0
movaps %xmm0,0x1f0(%rsp)
movaps 0xd39(%rip),%xmm1
movaps %xmm1,0x1e0(%rsp)
mov    %r14,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm1,0x1b0(%rsp)
lea    0x1e0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <sort_array_of_zeros_and_ones_ver1@plt>
lea    0x1b0(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
xorps  %xmm1,%xmm1
movaps %xmm1,0x190(%rsp)
movq   $0x0,0x1a0(%rsp)
movaps 0xcb3(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps %xmm1,0x160(%rsp)
movaps %xmm1,0x150(%rsp)
movups %xmm0,0x168(%rsp)
lea    0x180(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1060 <sort_array_of_zeros_and_ones_ver2@plt>
lea    0x150(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x20(%rsp)
movl   $0x1,(%rsp)
movl   $0x1,0xc(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
mov    %r15,0x140(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1060 <sort_array_of_zeros_and_ones_ver2@plt>
lea    0x120(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movq   $0x0,0x110(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movq   $0x0,0xe0(%rsp)
lea    0xf0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <sort_array_of_zeros_and_ones_ver1@plt>
lea    0xc0(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    %r14,0xb0(%rsp)
movaps 0xb8a(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xb6b(%rip),%xmm1
movaps %xmm1,0x90(%rsp)
mov    %r14,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm1,0x60(%rsp)
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1060 <sort_array_of_zeros_and_ones_ver2@plt>
lea    0x60(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x28,%edx
call   1030 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x300,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.array_test_ver1_4 = [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1]
@__const.main.array_expect_ver1_4 = [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1]
@__const.main.array_test_ver2_4 = [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1]
@__const.main.array_expect_ver2_4 = [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
%8 = alloca [10 x i32]
%9 = alloca [10 x i32]
%10 = alloca [10 x i32]
%11 = alloca [10 x i32]
%12 = alloca [10 x i32]
%13 = alloca [10 x i32]
%14 = alloca [10 x i32]
%15 = alloca [10 x i32]
%16 = alloca [10 x i32]
%17 = alloca [10 x i32]
store i32 0, i32* %1
%18 = bitcast [10 x i32]* %2 to i8*
%19 = bitcast i8* %18 to [10 x i32]*
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %19, i32 0, i32 0
store i32 1, i32* %20
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %19, i32 0, i32 1
store i32 1, i32* %21
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %19, i32 0, i32 2
store i32 1, i32* %22
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %19, i32 0, i32 3
store i32 1, i32* %23
%24 = bitcast [10 x i32]* %3 to i8*
%25 = bitcast i8* %24 to [10 x i32]*
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %25, i32 0, i32 6
store i32 1, i32* %26
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %25, i32 0, i32 7
store i32 1, i32* %27
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %25, i32 0, i32 8
store i32 1, i32* %28
%29 = getelementptr inbounds [10 x i32], [10 x i32]* %25, i32 0, i32 9
store i32 1, i32* %29
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%31 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %30, i32 10)
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%34 = call i64 @memcmp(i32* %32, i32* %33, i32 40)
%35 = icmp eq i64 %34, 0
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = bitcast [10 x i32]* %4 to i8*
%39 = bitcast i8* %38 to [10 x i32]*
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %39, i32 0, i32 0
store i32 1, i32* %40
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %39, i32 0, i32 3
store i32 1, i32* %41
%42 = bitcast [10 x i32]* %5 to i8*
%43 = bitcast i8* %42 to [10 x i32]*
%44 = getelementptr inbounds [10 x i32], [10 x i32]* %43, i32 0, i32 8
store i32 1, i32* %44
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %43, i32 0, i32 9
store i32 1, i32* %45
%46 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%47 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %46, i32 10)
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%49 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%50 = call i64 @memcmp(i32* %48, i32* %49, i32 40)
%51 = icmp eq i64 %50, 0
%52 = zext i1 %51 to i32
%53 = call i32 @assert(i32 %52)
%54 = bitcast [10 x i32]* %6 to i8*
%55 = bitcast [10 x i32]* %7 to i8*
%56 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%57 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %56, i32 10)
%58 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%60 = call i64 @memcmp(i32* %58, i32* %59, i32 40)
%61 = icmp eq i64 %60, 0
%62 = zext i1 %61 to i32
%63 = call i32 @assert(i32 %62)
%64 = bitcast [10 x i32]* %8 to i8*
%65 = bitcast [10 x i32]* %9 to i8*
%66 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%67 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %66, i32 10)
%68 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 0
%70 = call i64 @memcmp(i32* %68, i32* %69, i32 40)
%71 = icmp eq i64 %70, 0
%72 = zext i1 %71 to i32
%73 = call i32 @assert(i32 %72)
%74 = bitcast [10 x i32]* %10 to i8*
%75 = bitcast i8* %74 to [10 x i32]*
%76 = getelementptr inbounds [10 x i32], [10 x i32]* %75, i32 0, i32 0
store i32 1, i32* %76
%77 = getelementptr inbounds [10 x i32], [10 x i32]* %75, i32 0, i32 1
store i32 1, i32* %77
%78 = getelementptr inbounds [10 x i32], [10 x i32]* %75, i32 0, i32 2
store i32 1, i32* %78
%79 = getelementptr inbounds [10 x i32], [10 x i32]* %75, i32 0, i32 3
store i32 1, i32* %79
%80 = bitcast [10 x i32]* %11 to i8*
%81 = bitcast i8* %80 to [10 x i32]*
%82 = getelementptr inbounds [10 x i32], [10 x i32]* %81, i32 0, i32 6
store i32 1, i32* %82
%83 = getelementptr inbounds [10 x i32], [10 x i32]* %81, i32 0, i32 7
store i32 1, i32* %83
%84 = getelementptr inbounds [10 x i32], [10 x i32]* %81, i32 0, i32 8
store i32 1, i32* %84
%85 = getelementptr inbounds [10 x i32], [10 x i32]* %81, i32 0, i32 9
store i32 1, i32* %85
%86 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i64 0, i64 0
%87 = call i32 @sort_array_of_zeros_and_ones_ver2(i32* %86, i32 10)
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i64 0, i64 0
%89 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i64 0, i64 0
%90 = call i64 @memcmp(i32* %88, i32* %89, i32 40)
%91 = icmp eq i64 %90, 0
%92 = zext i1 %91 to i32
%93 = call i32 @assert(i32 %92)
%94 = bitcast [10 x i32]* %12 to i8*
%95 = bitcast i8* %94 to [10 x i32]*
%96 = getelementptr inbounds [10 x i32], [10 x i32]* %95, i32 0, i32 0
store i32 1, i32* %96
%97 = getelementptr inbounds [10 x i32], [10 x i32]* %95, i32 0, i32 3
store i32 1, i32* %97
%98 = bitcast [10 x i32]* %13 to i8*
%99 = bitcast i8* %98 to [10 x i32]*
%100 = getelementptr inbounds [10 x i32], [10 x i32]* %99, i32 0, i32 8
store i32 1, i32* %100
%101 = getelementptr inbounds [10 x i32], [10 x i32]* %99, i32 0, i32 9
store i32 1, i32* %101
%102 = getelementptr inbounds [10 x i32], [10 x i32]* %12, i64 0, i64 0
%103 = call i32 @sort_array_of_zeros_and_ones_ver2(i32* %102, i32 10)
%104 = getelementptr inbounds [10 x i32], [10 x i32]* %12, i64 0, i64 0
%105 = getelementptr inbounds [10 x i32], [10 x i32]* %13, i64 0, i64 0
%106 = call i64 @memcmp(i32* %104, i32* %105, i32 40)
%107 = icmp eq i64 %106, 0
%108 = zext i1 %107 to i32
%109 = call i32 @assert(i32 %108)
%110 = bitcast [10 x i32]* %14 to i8*
%111 = bitcast [10 x i32]* %15 to i8*
%112 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 0
%113 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %112, i32 10)
%114 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 0
%115 = getelementptr inbounds [10 x i32], [10 x i32]* %15, i64 0, i64 0
%116 = call i64 @memcmp(i32* %114, i32* %115, i32 40)
%117 = icmp eq i64 %116, 0
%118 = zext i1 %117 to i32
%119 = call i32 @assert(i32 %118)
%120 = bitcast [10 x i32]* %16 to i8*
%121 = bitcast [10 x i32]* %17 to i8*
%122 = getelementptr inbounds [10 x i32], [10 x i32]* %16, i64 0, i64 0
%123 = call i32 @sort_array_of_zeros_and_ones_ver2(i32* %122, i32 10)
%124 = getelementptr inbounds [10 x i32], [10 x i32]* %16, i64 0, i64 0
%125 = getelementptr inbounds [10 x i32], [10 x i32]* %17, i64 0, i64 0
%126 = call i64 @memcmp(i32* %124, i32* %125, i32 40)
%127 = icmp eq i64 %126, 0
%128 = zext i1 %127 to i32
%129 = call i32 @assert(i32 %128)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array_expect_ver2_4 = [10 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
%8 = alloca [10 x i32]
%9 = alloca [10 x i32]
%10 = alloca [10 x i32]
%11 = alloca [10 x i32]
%12 = alloca [10 x i32]
%13 = alloca [10 x i32]
%14 = alloca [10 x i32]
%15 = alloca [10 x i32]
%16 = alloca [10 x i32]
%17 = bitcast [10 x i32]* %1 to i8*
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%19 = bitcast i32* %18 to i8*
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%21 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %21
%22 = bitcast [10 x i32]* %2 to i8*
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 6
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %24
%25 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %20, i32 10)
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%27 = call i64 @memcmp(i32* %20, i32* %26, i32 40)
%28 = icmp eq i64 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = bitcast [10 x i32]* %3 to i8*
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
store i32 1, i32* %32
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 3
store i32 1, i32* %33
%34 = bitcast [10 x i32]* %4 to i8*
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 8
store i32 1, i32* %35
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 9
store i32 1, i32* %36
%37 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %32, i32 10)
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%39 = call i64 @memcmp(i32* %32, i32* %38, i32 40)
%40 = icmp eq i64 %39, 0
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = bitcast [10 x i32]* %5 to i8*
%44 = bitcast [10 x i32]* %6 to i8*
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 0
%46 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %45, i32 10)
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%48 = call i64 @memcmp(i32* %45, i32* %47, i32 40)
%49 = icmp eq i64 %48, 0
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = bitcast [10 x i32]* %7 to i8*
%53 = bitcast [10 x i32]* %8 to i8*
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%55 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %54, i32 10)
%56 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%57 = call i64 @memcmp(i32* %54, i32* %56, i32 40)
%58 = icmp eq i64 %57, 0
%59 = zext i1 %58 to i32
%60 = call i32 @assert(i32 %59)
%61 = bitcast [10 x i32]* %9 to i8*
%62 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 4
%63 = bitcast i32* %62 to i8*
%64 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 0
%65 = bitcast [10 x i32]* %9 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %65
%66 = bitcast [10 x i32]* %10 to i8*
%67 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i64 0, i64 6
%68 = bitcast i32* %67 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %68
%69 = call i32 @sort_array_of_zeros_and_ones_ver2(i32* %64, i32 10)
%70 = getelementptr inbounds [10 x i32], [10 x i32]* %10, i64 0, i64 0
%71 = call i64 @memcmp(i32* %64, i32* %70, i32 40)
%72 = icmp eq i64 %71, 0
%73 = zext i1 %72 to i32
%74 = call i32 @assert(i32 %73)
%75 = bitcast [10 x i32]* %11 to i8*
%76 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i64 0, i64 0
store i32 1, i32* %76
%77 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i64 0, i64 3
store i32 1, i32* %77
%78 = bitcast [10 x i32]* %12 to i8*
%79 = getelementptr inbounds [10 x i32], [10 x i32]* %12, i64 0, i64 8
store i32 1, i32* %79
%80 = getelementptr inbounds [10 x i32], [10 x i32]* %12, i64 0, i64 9
store i32 1, i32* %80
%81 = call i32 @sort_array_of_zeros_and_ones_ver2(i32* %76, i32 10)
%82 = getelementptr inbounds [10 x i32], [10 x i32]* %12, i64 0, i64 0
%83 = call i64 @memcmp(i32* %76, i32* %82, i32 40)
%84 = icmp eq i64 %83, 0
%85 = zext i1 %84 to i32
%86 = call i32 @assert(i32 %85)
%87 = bitcast [10 x i32]* %13 to i8*
%88 = bitcast [10 x i32]* %14 to i8*
%89 = getelementptr inbounds [10 x i32], [10 x i32]* %13, i64 0, i64 0
%90 = call i32 @sort_array_of_zeros_and_ones_ver1(i32* %89, i32 10)
%91 = getelementptr inbounds [10 x i32], [10 x i32]* %14, i64 0, i64 0
%92 = call i64 @memcmp(i32* %89, i32* %91, i32 40)
%93 = icmp eq i64 %92, 0
%94 = zext i1 %93 to i32
%95 = call i32 @assert(i32 %94)
%96 = bitcast [10 x i32]* %15 to i8*
%97 = bitcast [10 x i32]* %16 to i8*
%98 = getelementptr inbounds [10 x i32], [10 x i32]* %15, i64 0, i64 0
%99 = call i32 @sort_array_of_zeros_and_ones_ver2(i32* %98, i32 10)
%100 = getelementptr inbounds [10 x i32], [10 x i32]* %16, i64 0, i64 0
%101 = call i64 @memcmp(i32* %98, i32* %100, i32 40)
%102 = icmp eq i64 %101, 0
%103 = zext i1 %102 to i32
%104 = call i32 @assert(i32 %103)
ret i32 0
}