#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 */
float average(int, int, int, int, int, int, ...);
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char *argv[]) {
  float x;
  x = average(10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  printf("\nThe first average is %f.", x);
  x = average(5, 121, 206, 76, 31, 5);
  printf("\nThe second average is %f.\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x9,0x18(%rsp)
movl   $0xa,0x20(%rsp)
mov    $0x0,%al
call   1040 <average@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%r9d
mov    $0x79,%esi
mov    $0xce,%edx
mov    $0x4c,%ecx
mov    $0x1f,%r8d
mov    %r9d,%edi
mov    $0x0,%al
call   1040 <average@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
mov    $0xa,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
xor    %eax,%eax
push   $0xa
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1040 <average@plt>
add    $0x30,%rsp
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x79,%esi
mov    $0xce,%edx
mov    $0x4c,%ecx
mov    $0x1f,%r8d
mov    $0x5,%r9d
xor    %eax,%eax
call   1040 <average@plt>
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0AThe first average is %f.\00"
@.str.1 = [28 x i8] c"\0AThe second average is %f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call float (i32, i32, i32, i32, i32, i32, ...) @average(i32 10, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10)
store float %7, float* %6
%8 = load float, float* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %8)
%10 = call float (i32, i32, i32, i32, i32, i32, ...) @average(i32 5, i32 121, i32 206, i32 76, i32 31, i32 5)
store float %10, float* %6
%11 = load float, float* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AThe first average is %f.\00"
@.str.1 = [28 x i8] c"\0AThe second average is %f.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call float (i32, i32, i32, i32, i32, i32, ...) @average(i32 10, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %3)
%5 = tail call float (i32, i32, i32, i32, i32, i32, ...) @average(i32 5, i32 121, i32 206, i32 76, i32 31, i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), float %5)
ret i32 0
}