#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*/ f(int);
int sum(int i, int j, int k, int y, int c, int x) {
  f(3);
  int i1 = 1;
  int i2 = 2;
  int i3 = 3;
  int i4 = 4;
  int i5 = 5;
  int i6 = 6;
  int i7 = 7;
  int i8 = 8;
  int i9 = 9;
  int i10 = 10;
  int i11 = 11;
  int i12 = 12;
  int i13 = 13;
  int i14 = 14;
  int i15 = 15;
  int i16 = 16;
  int i17 = 17;
  int i18 = 18;
  int i19 = 19;
  int i20 = 20;
  return i + j + k + y + c + x;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    $0x3,%edi
call   1030 <f@plt>
movl   $0x1,-0x1c(%rbp)
movl   $0x2,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
movl   $0x5,-0x2c(%rbp)
movl   $0x6,-0x30(%rbp)
movl   $0x7,-0x34(%rbp)
movl   $0x8,-0x38(%rbp)
movl   $0x9,-0x3c(%rbp)
movl   $0xa,-0x40(%rbp)
movl   $0xb,-0x44(%rbp)
movl   $0xc,-0x48(%rbp)
movl   $0xd,-0x4c(%rbp)
movl   $0xe,-0x50(%rbp)
movl   $0xf,-0x54(%rbp)
movl   $0x10,-0x58(%rbp)
movl   $0x11,-0x5c(%rbp)
movl   $0x12,-0x60(%rbp)
movl   $0x13,-0x64(%rbp)
movl   $0x14,-0x68(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x3,%edi
call   1030 <f@plt>
add    %ebx,%ebp
add    %r13d,%ebp
add    %r12d,%ebp
add    %r15d,%ebp
add    %r14d,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%33 = call i32 @f(i32 3)
store i32 1, i32* %13
store i32 2, i32* %14
store i32 3, i32* %15
store i32 4, i32* %16
store i32 5, i32* %17
store i32 6, i32* %18
store i32 7, i32* %19
store i32 8, i32* %20
store i32 9, i32* %21
store i32 10, i32* %22
store i32 11, i32* %23
store i32 12, i32* %24
store i32 13, i32* %25
store i32 14, i32* %26
store i32 15, i32* %27
store i32 16, i32* %28
store i32 17, i32* %29
store i32 18, i32* %30
store i32 19, i32* %31
store i32 20, i32* %32
%34 = load i32, i32* %7
%35 = load i32, i32* %8
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %9
%38 = add nsw i32 %36, %37
%39 = load i32, i32* %10
%40 = add nsw i32 %38, %39
%41 = load i32, i32* %11
%42 = add nsw i32 %40, %41
%43 = load i32, i32* %12
%44 = add nsw i32 %42, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @f(i32 3)
%8 = add nsw i32 %1, %0
%9 = add nsw i32 %8, %2
%10 = add nsw i32 %9, %3
%11 = add nsw i32 %10, %4
%12 = add nsw i32 %11, %5
ret i32 %12
}