#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 EXIT_SUCCESS;
int get_biggest(int, int);
int multiply(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char **argv) {
  int x, y, z;
  x = 7;
  y = 3;
  z = multiply(x, y);
  printf("%d * %d = %d\n", x, y, z);
  z = get_biggest(x, y);
  printf("Biggest of %d and %d is %d\n", x, y, z);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x7,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <multiply@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <get_biggest@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
mov    $0x3,%esi
call   1030 <multiply@plt>
lea    0xeb9(%rip),%rdi
mov    $0x7,%esi
mov    $0x3,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
mov    $0x7,%edi
mov    $0x3,%esi
call   1050 <get_biggest@plt>
lea    0xea0(%rip),%rdi
mov    $0x7,%esi
mov    $0x3,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%d * %d = %d\0A\00"
@.str.1 = [28 x i8] c"Biggest of %d and %d is %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 7, i32* %6
store i32 3, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = call i32 @multiply(i32 %9, i32 %10)
store i32 %11, i32* %8
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @get_biggest(i32 %16, i32 %17)
store i32 %18, i32* %8
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %20, i32 %21)
%23 = load i32, i32* @EXIT_SUCCESS
ret i32 %23
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d * %d = %d\0A\00"
@.str.1 = [28 x i8] c"Biggest of %d and %d is %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @multiply(i32 7, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 7, i32 3, i32 %3)
%5 = tail call i32 @get_biggest(i32 7, i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 7, i32 3, i32 %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}