#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 /*<<< orphan*/ getch();
int /*<<< orphan*/ pow(double, double);
int /*<<< orphan*/ pow10(double);
int /*<<< orphan*/ printf(char *, double, double, ...);
main() {
  double x, y;
  x = 2.0;
  y = 3.0;
  printf("%lf raised to %lf is %lf\n", x, y, pow(x, y));
  printf("10 raised to %lf is %lf\n", x, pow10(x));
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1060 <pow@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    %eax,%esi
lea    0xe78(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <pow10@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
lea    0xe67(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getch@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xeb7(%rip),%xmm0
movsd  0xeb7(%rip),%xmm1
call   1060 <pow@plt>
lea    0xeb3(%rip),%rdi
movsd  0xe9b(%rip),%xmm0
movsd  0xe9b(%rip),%xmm1
mov    %eax,%esi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0xe82(%rip),%xmm0
call   1030 <pow10@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
lea    0xe99(%rip),%rdi
movsd  0xe67(%rip),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%lf raised to %lf is %lf\0A\00"
@.str.1 = [25 x i8] c"10 raised to %lf is %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
store double 2.000000e+00, double* %1
store double 3.000000e+00, double* %2
%3 = load double, double* %1
%4 = load double, double* %2
%5 = load double, double* %1
%6 = load double, double* %2
%7 = call i32 @pow(double %5, double %6)
%8 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double %3, double %4, i32 %7)
%9 = load double, double* %1
%10 = load double, double* %1
%11 = call i32 @pow10(double %10)
%12 = sitofp i32 %11 to double
%13 = call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), double %9, double %12)
%14 = call i32 (...) @getch()
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"%lf raised to %lf is %lf\0A\00"
@.str.1 = [25 x i8] c"10 raised to %lf is %lf\0A\00"
define i32 @main() {
%1 = tail call i32 @pow(double 2.000000e+00, double 3.000000e+00)
%2 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double 2.000000e+00, double 3.000000e+00, i32 %1)
%3 = tail call i32 @pow10(double 2.000000e+00)
%4 = sitofp i32 %3 to double
%5 = tail call i32 (i8*, double, double, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+00, double %4)
%6 = tail call i32 (...) @getch()
ret i32 0
}