#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 */
double avg_of_two(int, int);
int max_of_two(int, int);
int /*<<< orphan*/ printf(char *, int, double);
void print_facts(int num1, int num2) {
  int larger;
  double the_avg;
  larger = max_of_two(num1, num2);
  the_avg = avg_of_two(num1, num2);
  printf("For the tow integers %d and %d, \n", num1, num2);
  printf("the larger is %d and the average is %g. \n", larger, the_avg);
}


x86 assembly (clang, -O0):
<print_facts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <max_of_two@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <avg_of_two@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%esi
cvtsi2sdl -0x8(%rbp),%xmm0
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_facts>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <max_of_two@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <avg_of_two@plt>
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
lea    0xe9f(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    %r14d,%esi
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"For the tow integers %d and %d, \0A\00"
@.str.1 = [42 x i8] c"the larger is %d and the average is %g. \0A\00"
define void @print_facts(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @max_of_two(i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call double @avg_of_two(i32 %10, i32 %11)
store double %12, double* %6
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to double
%16 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %13, double %15)
%17 = load i32, i32* %5
%18 = load double, double* %6
%19 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %17, double %18)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"For the tow integers %d and %d, \0A\00"
@.str.1 = [42 x i8] c"the larger is %d and the average is %g. \0A\00"
define void @print_facts(i32 %0, i32 %1) {
%3 = tail call i32 @max_of_two(i32 %0, i32 %1)
%4 = tail call double @avg_of_two(i32 %0, i32 %1)
%5 = sitofp i32 %1 to double
%6 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %0, double %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %3, double %4)
ret void
}