#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 */

/* Variables and functions */
int /*<<< orphan*/ check(int *, scalar_t__);
scalar_t__ int_nd();
int main() {
  int a[10];
  if (int_nd())
    a[0] = 1;
  if (int_nd())
    a[1] = 1;
  if (int_nd())
    a[2] = 1;
  if (int_nd())
    a[3] = 1;
  if (int_nd())
    a[4] = 1;
  if (int_nd())
    a[5] = 1;
  if (int_nd())
    a[6] = 1;
  if (int_nd())
    a[7] = 1;
  if (int_nd())
    a[8] = 1;
  if (int_nd())
    a[9] = 1;
  check(&a[0], int_nd());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     1147 <main+0x27>
movl   $0x1,-0x30(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     115f <main+0x3f>
movl   $0x1,-0x2c(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     1177 <main+0x57>
movl   $0x1,-0x28(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     118f <main+0x6f>
movl   $0x1,-0x24(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     11a7 <main+0x87>
movl   $0x1,-0x20(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     11bf <main+0x9f>
movl   $0x1,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     11d7 <main+0xb7>
movl   $0x1,-0x18(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     11ef <main+0xcf>
movl   $0x1,-0x14(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     1207 <main+0xe7>
movl   $0x1,-0x10(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
cmp    $0x0,%rax
je     121f <main+0xff>
movl   $0x1,-0xc(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1040 <int_nd@plt>
mov    -0x38(%rbp),%rdi
mov    %rax,%rsi
call   1030 <check@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     1137 <main+0x17>
movl   $0x1,(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     114b <main+0x2b>
movl   $0x1,0x4(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     115f <main+0x3f>
movl   $0x1,0x8(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     1173 <main+0x53>
movl   $0x1,0xc(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     1187 <main+0x67>
movl   $0x1,0x10(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     119b <main+0x7b>
movl   $0x1,0x14(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     11af <main+0x8f>
movl   $0x1,0x18(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     11c3 <main+0xa3>
movl   $0x1,0x1c(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     11d7 <main+0xb7>
movl   $0x1,0x20(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
test   %rax,%rax
je     11eb <main+0xcb>
movl   $0x1,0x24(%rsp)
xor    %eax,%eax
call   1040 <int_nd@plt>
mov    %rsp,%rdi
mov    %rax,%rsi
call   1030 <check@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = call i64 (...) @int_nd()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
store i32 1, i32* %6
br label %7
7: ; preds = %5, %0
%8 = call i64 (...) @int_nd()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 1
store i32 1, i32* %11
br label %12
12: ; preds = %10, %7
%13 = call i64 (...) @int_nd()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 2
store i32 1, i32* %16
br label %17
17: ; preds = %15, %12
%18 = call i64 (...) @int_nd()
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 3
store i32 1, i32* %21
br label %22
22: ; preds = %20, %17
%23 = call i64 (...) @int_nd()
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 4
store i32 1, i32* %26
br label %27
27: ; preds = %25, %22
%28 = call i64 (...) @int_nd()
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 5
store i32 1, i32* %31
br label %32
32: ; preds = %30, %27
%33 = call i64 (...) @int_nd()
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 6
store i32 1, i32* %36
br label %37
37: ; preds = %35, %32
%38 = call i64 (...) @int_nd()
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 7
store i32 1, i32* %41
br label %42
42: ; preds = %40, %37
%43 = call i64 (...) @int_nd()
%44 = icmp ne i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 8
store i32 1, i32* %46
br label %47
47: ; preds = %45, %42
%48 = call i64 (...) @int_nd()
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 9
store i32 1, i32* %51
br label %52
52: ; preds = %50, %47
%53 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%54 = call i64 (...) @int_nd()
%55 = call i32 @check(i32* %53, i64 %54)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = tail call i64 (...) @int_nd()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 1, i32* %6
br label %7
7: ; preds = %5, %0
%8 = tail call i64 (...) @int_nd()
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 1, i32* %11
br label %12
12: ; preds = %10, %7
%13 = tail call i64 (...) @int_nd()
%14 = icmp eq i64 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 1, i32* %16
br label %17
17: ; preds = %15, %12
%18 = tail call i64 (...) @int_nd()
%19 = icmp eq i64 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
store i32 1, i32* %21
br label %22
22: ; preds = %20, %17
%23 = tail call i64 (...) @int_nd()
%24 = icmp eq i64 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
store i32 1, i32* %26
br label %27
27: ; preds = %25, %22
%28 = tail call i64 (...) @int_nd()
%29 = icmp eq i64 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %27
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
store i32 1, i32* %31
br label %32
32: ; preds = %30, %27
%33 = tail call i64 (...) @int_nd()
%34 = icmp eq i64 %33, 0
br i1 %34, label %37, label %35
35: ; preds = %32
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
store i32 1, i32* %36
br label %37
37: ; preds = %35, %32
%38 = tail call i64 (...) @int_nd()
%39 = icmp eq i64 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
store i32 1, i32* %41
br label %42
42: ; preds = %40, %37
%43 = tail call i64 (...) @int_nd()
%44 = icmp eq i64 %43, 0
br i1 %44, label %47, label %45
45: ; preds = %42
%46 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 1, i32* %46
br label %47
47: ; preds = %45, %42
%48 = tail call i64 (...) @int_nd()
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %47
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 1, i32* %51
br label %52
52: ; preds = %50, %47
%53 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%54 = tail call i64 (...) @int_nd()
%55 = call i32 @check(i32* %53, i64 %54)
ret i32 0
}