#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*/ printf(char *, ...);
void main() {
  int large(int, int);
  int a[10] = {1, 3, 5, 7, 9, 8, 6, 4, 2, 0},
      b[10] = {5, 3, 8, 9, -1, -3, 5, 6, 0, 4}, i, compare, n = 0, m = 0, k = 0,
      count = 10;
  printf("array a:\n");
  for (i = 0; i < count; i++) {
    printf("%3d ", a[i]);
  }
  printf("\narray a:\n");
  for (i = 0; i < count; i++) {
    printf("%3d ", b[i]);
  }
  for (i = 0; i < count; i++) {
    compare = large(a[i], b[i]);
    if (compare == 1)
      n++;
    else if (compare == 0)
      m++;
    else
      k++;
  }
  printf("\na[i] > b[i] %d times\na[i] = b[i] %d times\na[i] < b[i] %d times\n",
         n, m, k);
  if (n > k)
    printf("array a is larger than array b");
  else if (n == k)
    printf("array a is equal to array b");
  else
    printf("array a is smaller than array b");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x30(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x60(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0xa,-0x78(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    11c6 <main+0x96>
movslq -0x64(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1196 <main+0x66>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    120b <main+0xdb>
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11db <main+0xab>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1287 <main+0x157>
movslq -0x64(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edi
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
call   1050 <large@plt>
mov    %eax,-0x68(%rbp)
cmpl   $0x1,-0x68(%rbp)
jne    124e <main+0x11e>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1274 <main+0x144>
cmpl   $0x0,-0x68(%rbp)
jne    1266 <main+0x136>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    126f <main+0x13f>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1274 <main+0x144>
jmp    1279 <main+0x149>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1212 <main+0xe2>
mov    -0x6c(%rbp),%esi
mov    -0x70(%rbp),%edx
mov    -0x74(%rbp),%ecx
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jle    12bd <main+0x18d>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ef <main+0x1bf>
mov    -0x6c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jne    12dc <main+0x1ac>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ea <main+0x1ba>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ef <main+0x1bf>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xfb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rbx
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffffd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd77(%rip),%r12
lea    0xda0(%rip),%r13
xor    %r14d,%r14d
xor    %ebx,%ebx
xor    %r15d,%r15d
jmp    12ae <main+0x17e>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14d
add    $0x4,%rbp
cmp    $0x28,%rbp
je     12d5 <main+0x1a5>
mov    0x0(%rbp,%r12,1),%edi
mov    0x0(%rbp,%r13,1),%esi
call   1050 <large@plt>
test   %eax,%eax
je     12d0 <main+0x1a0>
cmp    $0x1,%eax
jne    12a0 <main+0x170>
add    $0x1,%r15d
jmp    12a4 <main+0x174>
nopl   0x0(%rax)
add    $0x1,%ebx
jmp    12a4 <main+0x174>
lea    0xd81(%rip),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %r14d,%r15d
lea    0xdc8(%rip),%rax
lea    0xddd(%rip),%rcx
cmove  %rax,%rcx
lea    0xd97(%rip),%rdi
cmovle %rcx,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 3, i32 5, i32 7, i32 9, i32 8, i32 6, i32 4, i32 2, i32 0]
@__const.main.b = [10 x i32] [i32 5, i32 3, i32 8, i32 9, i32 -1, i32 -3, i32 5, i32 6, i32 0, i32 4]
@.str = [10 x i8] c"array a:\0A\00"
@.str.1 = [5 x i8] c"%3d \00"
@.str.2 = [11 x i8] c"\0Aarray a:\0A\00"
@.str.3 = [65 x i8] c"\0Aa[i] > b[i] %d times\0Aa[i] = b[i] %d times\0Aa[i] < b[i] %d times\0A\00"
@.str.4 = [31 x i8] c"array a is larger than array b\00"
@.str.5 = [28 x i8] c"array a is equal to array b\00"
@.str.6 = [32 x i8] c"array a is smaller than array b\00"
define void @main() {
%1 = alloca [10 x i32]
%2 = alloca [10 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = bitcast [10 x i32]* %1 to i8*
%10 = bitcast [10 x i32]* %2 to i8*
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 10, i32* %8
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %12
12: ; preds = %22, %0
%13 = load i32, i32* %3
%14 = load i32, i32* %8
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %16
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %12
25: ; preds = %12
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %27
27: ; preds = %37, %25
%28 = load i32, i32* %3
%29 = load i32, i32* %8
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %31
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %27
40: ; preds = %27
store i32 0, i32* %3
br label %41
41: ; preds = %71, %40
%42 = load i32, i32* %3
%43 = load i32, i32* %8
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %74
45: ; preds = %41
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = call i32 @large(i32 %49, i32 %53)
store i32 %54, i32* %4
%55 = load i32, i32* %4
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %60
57: ; preds = %45
%58 = load i32, i32* %5
%59 = add nsw i32 %58, 1
store i32 %59, i32* %5
br label %70
60: ; preds = %45
%61 = load i32, i32* %4
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %66
63: ; preds = %60
%64 = load i32, i32* %6
%65 = add nsw i32 %64, 1
store i32 %65, i32* %6
br label %69
66: ; preds = %60
%67 = load i32, i32* %7
%68 = add nsw i32 %67, 1
store i32 %68, i32* %7
br label %69
69: ; preds = %66, %63
br label %70
70: ; preds = %69, %57
br label %71
71: ; preds = %70
%72 = load i32, i32* %3
%73 = add nsw i32 %72, 1
store i32 %73, i32* %3
br label %41
74: ; preds = %41
%75 = load i32, i32* %5
%76 = load i32, i32* %6
%77 = load i32, i32* %7
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0), i32 %75, i32 %76, i32 %77)
%79 = load i32, i32* %5
%80 = load i32, i32* %7
%81 = icmp sgt i32 %79, %80
br i1 %81, label %82, label %84
82: ; preds = %74
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %93
84: ; preds = %74
%85 = load i32, i32* %5
%86 = load i32, i32* %7
%87 = icmp eq i32 %85, %86
br i1 %87, label %88, label %90
88: ; preds = %84
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
br label %92
90: ; preds = %84
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
br label %92
92: ; preds = %90, %88
br label %93
93: ; preds = %92, %82
ret void
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 3, i32 5, i32 7, i32 9, i32 8, i32 6, i32 4, i32 2, i32 0]
@__const.main.b = [10 x i32] [i32 5, i32 3, i32 8, i32 9, i32 -1, i32 -3, i32 5, i32 6, i32 0, i32 4]
@.str.1 = [5 x i8] c"%3d \00"
@.str.3 = [65 x i8] c"\0Aa[i] > b[i] %d times\0Aa[i] = b[i] %d times\0Aa[i] < b[i] %d times\0A\00"
@.str.4 = [31 x i8] c"array a is larger than array b\00"
@.str.5 = [28 x i8] c"array a is equal to array b\00"
@.str.6 = [32 x i8] c"array a is smaller than array b\00"
@str = [9 x i8] c"array a:\00"
@str.7 = [10 x i8] c"\0Aarray a:\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 7)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 9)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 8)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 6)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 2)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 3)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 8)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 9)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 -3)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 6)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 0)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
br label %23
23: ; preds = %0, %39
%24 = phi i64 [ 0, %0 ], [ %43, %39 ]
%25 = phi i32 [ 0, %0 ], [ %42, %39 ]
%26 = phi i32 [ 0, %0 ], [ %41, %39 ]
%27 = phi i32 [ 0, %0 ], [ %40, %39 ]
%28 = getelementptr inbounds [10 x i32], [10 x i32]* @__const.main.a, i64 0, i64 %24
%29 = load i32, i32* %28
%30 = getelementptr inbounds [10 x i32], [10 x i32]* @__const.main.b, i64 0, i64 %24
%31 = load i32, i32* %30
%32 = tail call i32 @large(i32 %29, i32 %31)
switch i32 %32, label %37 [
i32 1, label %33
i32 0, label %35
]
33: ; preds = %23
%34 = add nsw i32 %27, 1
br label %39
35: ; preds = %23
%36 = add nsw i32 %26, 1
br label %39
37: ; preds = %23
%38 = add nsw i32 %25, 1
br label %39
39: ; preds = %33, %37, %35
%40 = phi i32 [ %34, %33 ], [ %27, %35 ], [ %27, %37 ]
%41 = phi i32 [ %26, %33 ], [ %36, %35 ], [ %26, %37 ]
%42 = phi i32 [ %25, %33 ], [ %25, %35 ], [ %38, %37 ]
%43 = add nuw nsw i64 %24, 1
%44 = icmp eq i64 %43, 10
br i1 %44, label %45, label %23
45: ; preds = %39
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0), i32 %40, i32 %41, i32 %42)
%47 = icmp sgt i32 %40, %42
%48 = icmp eq i32 %40, %42
%49 = select i1 %48, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0)
%50 = select i1 %47, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %49
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %50)
ret void
}