#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*/ abort();
int adder(int, int);
int main(int argc, char **argv) {
  int i;
  int total = argc;
  for (i = 0; i < 20; i++)
    total = adder(total, i);
  if (total != (190 + argc))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1169 <main+0x49>
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <adder@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1143 <main+0x23>
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0xbe,%ecx
cmp    %ecx,%eax
je     1184 <main+0x64>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x5,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x6,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x8,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x9,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0xa,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0xb,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0xc,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0xd,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0xe,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0xf,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x10,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x11,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x12,%esi
call   1040 <adder@plt>
mov    %eax,%edi
mov    $0x13,%esi
call   1040 <adder@plt>
add    $0xbe,%ebx
cmp    %ebx,%eax
jne    121c <main+0xfc>
xor    %eax,%eax
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
store i32 %8, i32* %7
store i32 0, i32* %6
br label %9
9: ; preds = %16, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 20
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = call i32 @adder(i32 %13, i32 %14)
store i32 %15, i32* %7
br label %16
16: ; preds = %12
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %9
19: ; preds = %9
%20 = load i32, i32* %7
%21 = load i32, i32* %4
%22 = add nsw i32 190, %21
%23 = icmp ne i32 %20, %22
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 (...) @abort()
unreachable
26: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @adder(i32 %0, i32 0)
%4 = tail call i32 @adder(i32 %3, i32 1)
%5 = tail call i32 @adder(i32 %4, i32 2)
%6 = tail call i32 @adder(i32 %5, i32 3)
%7 = tail call i32 @adder(i32 %6, i32 4)
%8 = tail call i32 @adder(i32 %7, i32 5)
%9 = tail call i32 @adder(i32 %8, i32 6)
%10 = tail call i32 @adder(i32 %9, i32 7)
%11 = tail call i32 @adder(i32 %10, i32 8)
%12 = tail call i32 @adder(i32 %11, i32 9)
%13 = tail call i32 @adder(i32 %12, i32 10)
%14 = tail call i32 @adder(i32 %13, i32 11)
%15 = tail call i32 @adder(i32 %14, i32 12)
%16 = tail call i32 @adder(i32 %15, i32 13)
%17 = tail call i32 @adder(i32 %16, i32 14)
%18 = tail call i32 @adder(i32 %17, i32 15)
%19 = tail call i32 @adder(i32 %18, i32 16)
%20 = tail call i32 @adder(i32 %19, i32 17)
%21 = tail call i32 @adder(i32 %20, i32 18)
%22 = tail call i32 @adder(i32 %21, i32 19)
%23 = add nsw i32 %0, 190
%24 = icmp eq i32 %22, %23
br i1 %24, label %27, label %25
25: ; preds = %2
%26 = tail call i32 (...) @abort()
unreachable
27: ; preds = %2
ret i32 0
}