#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 add(int, int);
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int a, b, c, d, e;
  int i, f;
  f = 1;
  for (i = 7; i > 0; i = i - 1) {
    f = f * add(add(1, add(add(2, add(add(i, 0), 1)), -5)), 1);
  }
  print_int(f);
  print_string("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x1c(%rbp)
movl   $0x7,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    11b5 <main+0x85>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    %eax,%esi
mov    $0x2,%edi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    %eax,%esi
mov    $0x1,%edi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1146 <main+0x16>
mov    -0x1c(%rbp),%edi
call   1050 <print_int@plt>
lea    0xe3c(%rip),%rdi
call   1040 <print_string@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x7,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    %eax,%ebp
mov    $0x6,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
imul   %eax,%ebp
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    %eax,%ebx
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
imul   %eax,%ebx
imul   %ebp,%ebx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    %eax,%ebp
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
imul   %eax,%ebp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
mov    $0x2,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0xfffffffb,%esi
call   1030 <add@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <add@plt>
imul   %eax,%ebp
imul   %ebx,%ebp
mov    %ebp,%edi
call   1050 <print_int@plt>
lea    0xcaf(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <print_string@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 1, i32* %7
store i32 7, i32* %6
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %6
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %8
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = call i32 @add(i32 %13, i32 0)
%15 = call i32 @add(i32 %14, i32 1)
%16 = call i32 @add(i32 2, i32 %15)
%17 = call i32 @add(i32 %16, i32 -5)
%18 = call i32 @add(i32 1, i32 %17)
%19 = call i32 @add(i32 %18, i32 1)
%20 = mul nsw i32 %12, %19
store i32 %20, i32* %7
br label %21
21: ; preds = %11
%22 = load i32, i32* %6
%23 = sub nsw i32 %22, 1
store i32 %23, i32* %6
br label %8
24: ; preds = %8
%25 = load i32, i32* %7
%26 = call i32 @print_int(i32 %25)
%27 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @add(i32 7, i32 0)
%2 = tail call i32 @add(i32 %1, i32 1)
%3 = tail call i32 @add(i32 2, i32 %2)
%4 = tail call i32 @add(i32 %3, i32 -5)
%5 = tail call i32 @add(i32 1, i32 %4)
%6 = tail call i32 @add(i32 %5, i32 1)
%7 = tail call i32 @add(i32 6, i32 0)
%8 = tail call i32 @add(i32 %7, i32 1)
%9 = tail call i32 @add(i32 2, i32 %8)
%10 = tail call i32 @add(i32 %9, i32 -5)
%11 = tail call i32 @add(i32 1, i32 %10)
%12 = tail call i32 @add(i32 %11, i32 1)
%13 = mul nsw i32 %12, %6
%14 = tail call i32 @add(i32 5, i32 0)
%15 = tail call i32 @add(i32 %14, i32 1)
%16 = tail call i32 @add(i32 2, i32 %15)
%17 = tail call i32 @add(i32 %16, i32 -5)
%18 = tail call i32 @add(i32 1, i32 %17)
%19 = tail call i32 @add(i32 %18, i32 1)
%20 = mul nsw i32 %19, %13
%21 = tail call i32 @add(i32 4, i32 0)
%22 = tail call i32 @add(i32 %21, i32 1)
%23 = tail call i32 @add(i32 2, i32 %22)
%24 = tail call i32 @add(i32 %23, i32 -5)
%25 = tail call i32 @add(i32 1, i32 %24)
%26 = tail call i32 @add(i32 %25, i32 1)
%27 = mul nsw i32 %26, %20
%28 = tail call i32 @add(i32 3, i32 0)
%29 = tail call i32 @add(i32 %28, i32 1)
%30 = tail call i32 @add(i32 2, i32 %29)
%31 = tail call i32 @add(i32 %30, i32 -5)
%32 = tail call i32 @add(i32 1, i32 %31)
%33 = tail call i32 @add(i32 %32, i32 1)
%34 = mul nsw i32 %33, %27
%35 = tail call i32 @add(i32 2, i32 0)
%36 = tail call i32 @add(i32 %35, i32 1)
%37 = tail call i32 @add(i32 2, i32 %36)
%38 = tail call i32 @add(i32 %37, i32 -5)
%39 = tail call i32 @add(i32 1, i32 %38)
%40 = tail call i32 @add(i32 %39, i32 1)
%41 = mul nsw i32 %40, %34
%42 = tail call i32 @add(i32 1, i32 0)
%43 = tail call i32 @add(i32 %42, i32 1)
%44 = tail call i32 @add(i32 2, i32 %43)
%45 = tail call i32 @add(i32 %44, i32 -5)
%46 = tail call i32 @add(i32 1, i32 %45)
%47 = tail call i32 @add(i32 %46, i32 1)
%48 = mul nsw i32 %47, %41
%49 = tail call i32 @print_int(i32 %48)
%50 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}