#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 bar(unsigned int);
int foo(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned val1 = 0x00000076;
  unsigned val2 = 0x87654321;
  unsigned val3 = 0x000000c9;
  unsigned val4 = 0xEDCBA987;
  printf("%10s %12s\n", "foo()", "bar()");
  printf("%#.8x - %#.8x\n", foo(val1), bar(val1));
  printf("%#.8x - %#.8x\n", foo(val2), bar(val2));
  printf("%#.8x - %#.8x\n", foo(val3), bar(val3));
  printf("%#.8x - %#.8x\n", foo(val4), bar(val4));
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x76,-0x8(%rbp)
movl   $0x87654321,-0xc(%rbp)
movl   $0xc9,-0x10(%rbp)
movl   $0xedcba987,-0x14(%rbp)
lea    0xe9e(%rip),%rdi
lea    0xea2(%rip),%rsi
lea    0xea1(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    -0x24(%rbp),%esi
mov    %eax,%edx
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <bar@plt>
mov    -0x20(%rbp),%esi
mov    %eax,%edx
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <bar@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <bar@plt>
mov    -0x18(%rbp),%esi
mov    %eax,%edx
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dca(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xec9(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x76,%edi
call   1050 <foo@plt>
mov    %eax,%ebp
mov    $0x76,%edi
call   1030 <bar@plt>
lea    0xeab(%rip),%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x87654321,%edi
call   1050 <foo@plt>
mov    %eax,%ebp
mov    $0x87654321,%edi
call   1030 <bar@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xc9,%edi
call   1050 <foo@plt>
mov    %eax,%ebp
mov    $0xc9,%edi
call   1030 <bar@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xedcba987,%edi
call   1050 <foo@plt>
mov    %eax,%ebp
mov    $0xedcba987,%edi
call   1030 <bar@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%10s %12s\0A\00"
@.str.1 = [6 x i8] c"foo()\00"
@.str.2 = [6 x i8] c"bar()\00"
@.str.3 = [15 x i8] c"%#.8x - %#.8x\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 118, i32* %2
store i32 -2023406815, i32* %3
store i32 201, i32* %4
store i32 -305419897, i32* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 @foo(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @bar(i32 %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %8, i32 %10)
%12 = load i32, i32* %3
%13 = call i32 @foo(i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @bar(i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %13, i32 %15)
%17 = load i32, i32* %4
%18 = call i32 @foo(i32 %17)
%19 = load i32, i32* %4
%20 = call i32 @bar(i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %18, i32 %20)
%22 = load i32, i32* %5
%23 = call i32 @foo(i32 %22)
%24 = load i32, i32* %5
%25 = call i32 @bar(i32 %24)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %23, i32 %25)
%27 = load i32, i32* @EXIT_SUCCESS
ret i32 %27
}

LLVM IR (-O2):
@.str = [11 x i8] c"%10s %12s\0A\00"
@.str.1 = [6 x i8] c"foo()\00"
@.str.2 = [6 x i8] c"bar()\00"
@.str.3 = [15 x i8] c"%#.8x - %#.8x\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @foo(i32 118)
%3 = tail call i32 @bar(i32 118)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %2, i32 %3)
%5 = tail call i32 @foo(i32 -2023406815)
%6 = tail call i32 @bar(i32 -2023406815)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %5, i32 %6)
%8 = tail call i32 @foo(i32 201)
%9 = tail call i32 @bar(i32 201)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %8, i32 %9)
%11 = tail call i32 @foo(i32 -305419897)
%12 = tail call i32 @bar(i32 -305419897)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}