#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 */
struct EV_node {
  int dummy;
};

/* Variables and functions */
long _add(struct EV_node *);
struct EV_node *_buildList();
long _multiple(struct EV_node *);
long _recurseList(struct EV_node *);
int /*<<< orphan*/ printf(char *, long);
long _main() {
  struct EV_node *EV_list;
  long EV_product;
  long EV_sum;
  long EV_result;
  long EV_bigProduct;
  long EV_i;
  EV_i = 0;
  EV_bigProduct = 0;
  EV_list = _buildList();
  EV_product = _multiple(EV_list);
  EV_sum = _add(EV_list);
  EV_result = (EV_product - (EV_sum / 2));
  while ((EV_i < 10)) {
    EV_bigProduct = (EV_bigProduct + _recurseList(EV_list));
    EV_i = (EV_i + 1);
  }
  printf("%ld\n", (long)EV_bigProduct);
  while ((EV_bigProduct != 0)) {
    EV_bigProduct = (EV_bigProduct - 1);
  }
  printf("%ld\n", (long)EV_result);
  printf("%ld\n", (long)EV_bigProduct);
  return 0;
}


x86 assembly (clang, -O0):
<_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
mov    $0x0,%al
call   1060 <_buildList@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_multiple@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <_add@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0xa,-0x30(%rbp)
jge    11ec <_main+0x9c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <_recurseList@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11b1 <_main+0x61>
mov    -0x28(%rbp),%rsi
lea    0xe09(%rip),%rdi
call   1040 <printf@plt>
cmpq   $0x0,-0x28(%rbp)
je     1218 <_main+0xc8>
mov    -0x28(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11fc <_main+0xac>
mov    -0x20(%rbp),%rsi
lea    0xddd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xdcd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <_buildList@plt>
mov    %rax,%r12
mov    %rax,%rdi
call   1030 <_multiple@plt>
mov    %rax,%r15
mov    %r12,%rdi
call   1050 <_add@plt>
mov    %rax,%r14
mov    %r12,%rdi
call   1070 <_recurseList@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
mov    %r12,%rdi
call   1070 <_recurseList@plt>
add    %rax,%rbx
lea    0xe13(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r14,%rax
shr    $0x3f,%rax
add    %r14,%rax
sar    %rax
sub    %rax,%r15
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
mov    %r12,%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.EV_node = type { i32 }
@.str = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = alloca %struct.EV_node*
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 0, i64* %6
store i64 0, i64* %5
%7 = call %struct.EV_node* (...) @_buildList()
store %struct.EV_node* %7, %struct.EV_node** %1
%8 = load %struct.EV_node*, %struct.EV_node** %1
%9 = call i64 @_multiple(%struct.EV_node* %8)
store i64 %9, i64* %2
%10 = load %struct.EV_node*, %struct.EV_node** %1
%11 = call i64 @_add(%struct.EV_node* %10)
store i64 %11, i64* %3
%12 = load i64, i64* %2
%13 = load i64, i64* %3
%14 = sdiv i64 %13, 2
%15 = sub nsw i64 %12, %14
store i64 %15, i64* %4
br label %16
16: ; preds = %19, %0
%17 = load i64, i64* %6
%18 = icmp slt i64 %17, 10
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i64, i64* %5
%21 = load %struct.EV_node*, %struct.EV_node** %1
%22 = call i64 @_recurseList(%struct.EV_node* %21)
%23 = add nsw i64 %20, %22
store i64 %23, i64* %5
%24 = load i64, i64* %6
%25 = add nsw i64 %24, 1
store i64 %25, i64* %6
br label %16
26: ; preds = %16
%27 = load i64, i64* %5
%28 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %27)
br label %29
29: ; preds = %32, %26
%30 = load i64, i64* %5
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i64, i64* %5
%34 = sub nsw i64 %33, 1
store i64 %34, i64* %5
br label %29
35: ; preds = %29
%36 = load i64, i64* %4
%37 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %36)
%38 = load i64, i64* %5
%39 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %38)
ret i64 0
}

LLVM IR (-O2):
%struct.EV_node = type { i32 }
@.str = [5 x i8] c"%ld\0A\00"
define i64 @_main() {
%1 = tail call %struct.EV_node* (...) @_buildList()
%2 = tail call i64 @_multiple(%struct.EV_node* %1)
%3 = tail call i64 @_add(%struct.EV_node* %1)
%4 = tail call i64 @_recurseList(%struct.EV_node* %1)
%5 = tail call i64 @_recurseList(%struct.EV_node* %1)
%6 = add nsw i64 %5, %4
%7 = tail call i64 @_recurseList(%struct.EV_node* %1)
%8 = add nsw i64 %7, %6
%9 = tail call i64 @_recurseList(%struct.EV_node* %1)
%10 = add nsw i64 %9, %8
%11 = tail call i64 @_recurseList(%struct.EV_node* %1)
%12 = add nsw i64 %11, %10
%13 = tail call i64 @_recurseList(%struct.EV_node* %1)
%14 = add nsw i64 %13, %12
%15 = tail call i64 @_recurseList(%struct.EV_node* %1)
%16 = add nsw i64 %15, %14
%17 = tail call i64 @_recurseList(%struct.EV_node* %1)
%18 = add nsw i64 %17, %16
%19 = tail call i64 @_recurseList(%struct.EV_node* %1)
%20 = add nsw i64 %19, %18
%21 = tail call i64 @_recurseList(%struct.EV_node* %1)
%22 = add nsw i64 %21, %20
%23 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %22)
%24 = sdiv i64 %3, -2
%25 = add i64 %24, %2
%26 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %25)
%27 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 0)
ret i64 0
}