#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*/ alu(int *, int *, int, int, int, int, int, int, int *, int *,
                       int *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
  int b[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
  int out[16];
  int zx = 0;
  int nx = 0;
  int zy = 0;
  int ny = 0;
  int f = 1;
  int no = 0;
  int zr = 0;
  int ng = 0;
  alu(a, b, zx, nx, zy, ny, f, no, out, &zr, &ng);
  int i = 0;
  for (i = 0; i < 16; i++) {
    printf("%d", out[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x120,%rsp
movl   $0x0,-0x14(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
movl   $0x1,-0x24(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
movl   $0x1,-0x64(%rbp)
movl   $0x0,-0xe4(%rbp)
movl   $0x0,-0xe8(%rbp)
movl   $0x0,-0xec(%rbp)
movl   $0x0,-0xf0(%rbp)
movl   $0x1,-0xf4(%rbp)
movl   $0x0,-0xf8(%rbp)
movl   $0x0,-0xfc(%rbp)
movl   $0x0,-0x100(%rbp)
lea    -0x60(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    -0xe4(%rbp),%edx
mov    -0xe8(%rbp),%ecx
mov    -0xec(%rbp),%r8d
mov    -0xf0(%rbp),%r9d
mov    -0xf4(%rbp),%r14d
mov    -0xf8(%rbp),%ebx
lea    -0xe0(%rbp),%r11
lea    -0xfc(%rbp),%r10
lea    -0x100(%rbp),%rax
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1050 <alu@plt>
movl   $0x0,-0x104(%rbp)
movl   $0x0,-0x104(%rbp)
cmpl   $0x10,-0x104(%rbp)
jge    127a <main+0x14a>
movslq -0x104(%rbp),%rax
mov    -0xe0(%rbp,%rax,4),%esi
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    123d <main+0x10d>
lea    0xd82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movl   $0x1,0xcc(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movl   $0x1,0x8c(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
sub    $0x8,%rsp
lea    0x10(%rsp),%rax
lea    0x14(%rsp),%rbx
lea    0x18(%rsp),%r10
lea    0x98(%rsp),%rdi
lea    0x58(%rsp),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rax
push   %rbx
push   %r10
push   $0x0
push   $0x1
call   1050 <alu@plt>
add    $0x30,%rsp
mov    0x10(%rsp),%esi
lea    0xe22(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i32]
%3 = alloca [16 x i32]
%4 = alloca [16 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %1
%14 = bitcast [16 x i32]* %2 to i8*
%15 = bitcast i8* %14 to [16 x i32]*
%16 = getelementptr inbounds [16 x i32], [16 x i32]* %15, i32 0, i32 15
store i32 1, i32* %16
%17 = bitcast [16 x i32]* %3 to i8*
%18 = bitcast i8* %17 to [16 x i32]*
%19 = getelementptr inbounds [16 x i32], [16 x i32]* %18, i32 0, i32 15
store i32 1, i32* %19
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 1, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
%20 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 0
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = load i32, i32* %8
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 0
%29 = call i32 @alu(i32* %20, i32* %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32* %28, i32* %11, i32* %12)
store i32 0, i32* %13
store i32 0, i32* %13
br label %30
30: ; preds = %39, %0
%31 = load i32, i32* %13
%32 = icmp slt i32 %31, 16
br i1 %32, label %33, label %42
33: ; preds = %30
%34 = load i32, i32* %13
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [16 x i32], [16 x i32]* %4, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %33
%40 = load i32, i32* %13
%41 = add nsw i32 %40, 1
store i32 %41, i32* %13
br label %30
42: ; preds = %30
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [16 x i32]
%2 = alloca [16 x i32]
%3 = alloca [16 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = bitcast [16 x i32]* %1 to i8*
%7 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 15
store i32 1, i32* %7
%8 = bitcast [16 x i32]* %2 to i8*
%9 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 15
store i32 1, i32* %9
%10 = bitcast [16 x i32]* %3 to i8*
%11 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%12 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%13 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 0
%14 = getelementptr inbounds [16 x i32], [16 x i32]* %2, i64 0, i64 0
%15 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 0
%16 = call i32 @alu(i32* %13, i32* %14, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32* %15, i32* %4, i32* %5)
%17 = load i32, i32* %15
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 1
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 2
%23 = load i32, i32* %22
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 3
%26 = load i32, i32* %25
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 4
%29 = load i32, i32* %28
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 5
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 6
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 7
%38 = load i32, i32* %37
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 8
%41 = load i32, i32* %40
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 9
%44 = load i32, i32* %43
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %44)
%46 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 10
%47 = load i32, i32* %46
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %47)
%49 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 11
%50 = load i32, i32* %49
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %50)
%52 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 12
%53 = load i32, i32* %52
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %53)
%55 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 13
%56 = load i32, i32* %55
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 14
%59 = load i32, i32* %58
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %59)
%61 = getelementptr inbounds [16 x i32], [16 x i32]* %3, i64 0, i64 15
%62 = load i32, i32* %61
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = call i32 @putchar(i32 10)
ret i32 0
}