#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*/ e_1_15();
double pow(double, double);
double power(double, double);
int /*<<< orphan*/ printf(char *, double, double, double);
int main(void) {
  double x = 5;
  double y = 19;
  printf("pow(%.0f, %.0f) = %.0f\n\n", x, y, pow(x, y));
  for (int i = 0; i < 10; ++i) {
    x = 2;
    y = i + 1;
    printf("power(%.0f, %.0f) = %.0f\n", x, y, power(x, y));
    x = -5;
    printf("power(%.0f, %.0f) = %.0f\n\n", x, y, power(x, y));
  }
  e_1_15();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1060 <pow@plt>
movsd  -0x30(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    1265 <main+0x125>
movsd  0xe5a(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <power@plt>
movsd  -0x50(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
lea    0xe30(%rip),%rdi
call   1040 <printf@plt>
movsd  0xdfa(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <power@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
lea    0xe01(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ac <main+0x6c>
mov    $0x0,%al
call   1050 <e_1_15@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xee9(%rip),%rdi
movsd  0xeb9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
movsd  0xeb9(%rip),%xmm2
call   1040 <printf@plt>
mov    $0x1,%ebp
lea    0xed9(%rip),%r14
lea    0xeec(%rip),%rbx
nop
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xe93(%rip),%xmm0
call   1030 <power@plt>
movaps %xmm0,%xmm2
mov    %r14,%rdi
movsd  0xe80(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <printf@plt>
movsd  0xe75(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <power@plt>
movaps %xmm0,%xmm2
mov    %rbx,%rdi
movsd  0xe5c(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0xb,%ebp
jne    1170 <main+0x40>
xor    %eax,%eax
call   1050 <e_1_15@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"pow(%.0f, %.0f) = %.0f\0A\0A\00"
@.str.1 = [26 x i8] c"power(%.0f, %.0f) = %.0f\0A\00"
@.str.2 = [27 x i8] c"power(%.0f, %.0f) = %.0f\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store i32 0, i32* %1
store double 5.000000e+00, double* %2
store double 1.900000e+01, double* %3
%5 = load double, double* %2
%6 = load double, double* %3
%7 = load double, double* %2
%8 = load double, double* %3
%9 = call double @pow(double %7, double %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %5, double %6, double %9)
store i32 0, i32* %4
br label %11
11: ; preds = %30, %0
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %33
14: ; preds = %11
store double 2.000000e+00, double* %2
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = sitofp i32 %16 to double
store double %17, double* %3
%18 = load double, double* %2
%19 = load double, double* %3
%20 = load double, double* %2
%21 = load double, double* %3
%22 = call double @power(double %20, double %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %18, double %19, double %22)
store double -5.000000e+00, double* %2
%24 = load double, double* %2
%25 = load double, double* %3
%26 = load double, double* %2
%27 = load double, double* %3
%28 = call double @power(double %26, double %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %24, double %25, double %28)
br label %30
30: ; preds = %14
%31 = load i32, i32* %4
%32 = add nsw i32 %31, 1
store i32 %32, i32* %4
br label %11
33: ; preds = %11
%34 = call i32 (...) @e_1_15()
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"pow(%.0f, %.0f) = %.0f\0A\0A\00"
@.str.1 = [26 x i8] c"power(%.0f, %.0f) = %.0f\0A\00"
@.str.2 = [27 x i8] c"power(%.0f, %.0f) = %.0f\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, double 1.900000e+01, double 0x42B158E460913D00)
br label %4
2: ; preds = %4
%3 = tail call i32 (...) @e_1_15()
ret i32 0
4: ; preds = %0, %4
%5 = phi i32 [ 0, %0 ], [ %6, %4 ]
%6 = add nuw nsw i32 %5, 1
%7 = sitofp i32 %6 to double
%8 = tail call double @power(double 2.000000e+00, double %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double 2.000000e+00, double %7, double %8)
%10 = tail call double @power(double -5.000000e+00, double %7)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double -5.000000e+00, double %7, double %10)
%12 = icmp eq i32 %6, 10
br i1 %12, label %2, label %4
}