#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 */
double pow(int, float);
int /*<<< orphan*/ printf(char *, float, double);
int main() {
  float ex;
  for (ex = -1.0; ex < 1.0; ex += 0.2) {
    printf("2 to the %.1f power is %.2f\n", ex, pow(2, ex));
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebb(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11a7 <main+0x87>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe7b(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movss  0xed7(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
lea    0xeef(%rip),%rbx
mov    %rbx,%rdi
movss  0xeb8(%rip),%xmm0
call   1030 <printf@plt>
movss  0xeaf(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe97(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe8e(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe76(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe6d(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe55(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe4c(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe34(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe2b(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe13(%rip),%xmm0
call   1030 <printf@plt>
movss  0xe0a(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xdf2(%rip),%xmm0
call   1030 <printf@plt>
movss  0xde9(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xdd1(%rip),%xmm0
call   1030 <printf@plt>
movss  0xdc8(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xdb0(%rip),%xmm0
call   1030 <printf@plt>
movss  0xda7(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd8f(%rip),%xmm0
call   1030 <printf@plt>
movss  0xd86(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xd6e(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"2 to the %.1f power is %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float -1.000000e+00, float* %2
br label %3
3: ; preds = %12, %0
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fcmp olt double %5, 1.000000e+00
br i1 %6, label %7, label %17
7: ; preds = %3
%8 = load float, float* %2
%9 = load float, float* %2
%10 = call double @pow(i32 2, float %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float %8, double %10)
br label %12
12: ; preds = %7
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fadd double %14, 2.000000e-01
%16 = fptrunc double %15 to float
store float %16, float* %2
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"2 to the %.1f power is %.2f\0A\00"
define i32 @main() {
%1 = tail call double @pow(i32 2, float -1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float -1.000000e+00, double %1)
%3 = tail call double @pow(i32 2, float 0xBFE99999A0000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0xBFE99999A0000000, double %3)
%5 = tail call double @pow(i32 2, float 0xBFE3333340000000)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0xBFE3333340000000, double %5)
%7 = tail call double @pow(i32 2, float 0xBFD99999C0000000)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0xBFD99999C0000000, double %7)
%9 = tail call double @pow(i32 2, float 0xBFC99999E0000000)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0xBFC99999E0000000, double %9)
%11 = tail call double @pow(i32 2, float 0xBE619999A0000000)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0xBE619999A0000000, double %11)
%13 = tail call double @pow(i32 2, float 0x3FC9999960000000)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0x3FC9999960000000, double %13)
%15 = tail call double @pow(i32 2, float 0x3FD9999980000000)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0x3FD9999980000000, double %15)
%17 = tail call double @pow(i32 2, float 0x3FE3333320000000)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0x3FE3333320000000, double %17)
%19 = tail call double @pow(i32 2, float 0x3FE9999980000000)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0x3FE9999980000000, double %19)
%21 = tail call double @pow(i32 2, float 0x3FEFFFFFE0000000)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), float 0x3FEFFFFFE0000000, double %21)
ret i32 0
}