#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 atan(int);
int exp(int);
double pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  double e2p = pow(exp(1), 4 * atan(1));
  double p2e = pow(4 * atan(1), exp(1));
  printf("e^pi = %g\npi^e = %g\n\n", e2p, p2e);
  if (p2e > e2p)
    printf("pi^e is greater than e^pi\n");
  else
    printf("e^pi is greater than pi^e");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1050 <exp@plt>
mov    %eax,-0x20(%rbp)
mov    $0x1,%edi
call   1040 <atan@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%esi
shl    $0x2,%esi
call   1060 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <atan@plt>
shl    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x1,%edi
call   1050 <exp@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1060 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe4e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11dc <main+0x9c>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ea <main+0xaa>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%edi
call   1060 <exp@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1050 <atan@plt>
lea    0x0(,%rax,4),%esi
mov    %ebx,%edi
call   1070 <pow@plt>
movsd  %xmm0,(%rsp)
mov    $0x1,%edi
call   1050 <atan@plt>
lea    0x0(,%rax,4),%ebx
mov    $0x1,%edi
call   1060 <exp@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
lea    0xe4e(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
ucomisd (%rsp),%xmm0
jbe    11d9 <main+0x89>
lea    0xe5e(%rip),%rdi
call   1030 <puts@plt>
jmp    11e7 <main+0x97>
lea    0xe36(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"e^pi = %g\0Api^e = %g\0A\0A\00"
@.str.1 = [27 x i8] c"pi^e is greater than e^pi\0A\00"
@.str.2 = [26 x i8] c"e^pi is greater than pi^e\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @exp(i32 1)
%5 = call i32 @atan(i32 1)
%6 = mul nsw i32 4, %5
%7 = call double @pow(i32 %4, i32 %6)
store double %7, double* %2
%8 = call i32 @atan(i32 1)
%9 = mul nsw i32 4, %8
%10 = call i32 @exp(i32 1)
%11 = call double @pow(i32 %9, i32 %10)
store double %11, double* %3
%12 = load double, double* %2
%13 = load double, double* %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %12, double %13)
%15 = load double, double* %3
%16 = load double, double* %2
%17 = fcmp ogt double %15, %16
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %22
20: ; preds = %0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"e^pi = %g\0Api^e = %g\0A\0A\00"
@.str.2 = [26 x i8] c"e^pi is greater than pi^e\00"
@str = [26 x i8] c"pi^e is greater than e^pi\00"
define i32 @main() {
%1 = tail call i32 @exp(i32 1)
%2 = tail call i32 @atan(i32 1)
%3 = shl nsw i32 %2, 2
%4 = tail call double @pow(i32 %1, i32 %3)
%5 = tail call i32 @atan(i32 1)
%6 = shl nsw i32 %5, 2
%7 = tail call i32 @exp(i32 1)
%8 = tail call double @pow(i32 %6, i32 %7)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), double %4, double %8)
%10 = fcmp ogt double %8, %4
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %15
13: ; preds = %0
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
ret i32 0
}