#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 pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int marker = 1;
  int p, n;
  float r;
  for (n = 0; n <= 10; n++) {
    printf("For N = %d \n", n);
    for (p = 0; p <= 10000; p += 1000) {
      for (r = 0.09; r <= 0.21; r += 0.01) {
        if (marker-- == 1)
          printf("%5d \t", p);
        if (p == 0 && r >= 0.1)
          printf("%-6.2f \t \t", r);
        if (p > 0 && r <= 0.2)
          printf("%2.2f \t", p * (pow(1 + r, n)));
      }
      printf("\n");
      marker = 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jg     12ad <main+0x18d>
mov    -0x10(%rbp),%esi
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x2710,-0xc(%rbp)
jg     129a <main+0x17a>
movss  0xe8c(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe7e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1275 <main+0x155>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x1,%eax
jne    11b9 <main+0x99>
mov    -0xc(%rbp),%esi
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    11f5 <main+0xd5>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe3c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11f5 <main+0xd5>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jle    124d <main+0x12d>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe08(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     124d <main+0x12d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
movss  0xddc(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
cvttss2si %xmm0,%edi
mov    -0x10(%rbp),%esi
call   1040 <pow@plt>
mov    -0x18(%rbp),%esi
imul   %eax,%esi
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1252 <main+0x132>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdbd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1179 <main+0x59>
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3e8,%eax
mov    %eax,-0xc(%rbp)
jmp    115f <main+0x3f>
jmp    129f <main+0x17f>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeee(%rip),%r14
lea    0xef4(%rip),%r15
lea    0xefe(%rip),%r12
lea    0xeec(%rip),%r13
xor    %ebp,%ebp
jmp    116c <main+0x3c>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0xb,%ebp
je     1269 <main+0x139>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %ebx,%ebx
jmp    119a <main+0x6a>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x3e8(%rbx),%eax
cmp    $0x2329,%ebx
mov    %eax,%ebx
jae    1160 <main+0x30>
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
test   %ebx,%ebx
je     11c5 <main+0x95>
mov    $0x1,%edi
mov    %ebp,%esi
call   1050 <pow@plt>
imul   %ebx,%eax
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0xe3b(%rip),%xmm2
movss  0xe2b(%rip),%xmm0
jmp    1220 <main+0xf0>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
movapd %xmm2,%xmm0
mov    $0x1,%al
movsd  %xmm2,(%rsp)
call   1040 <printf@plt>
movsd  (%rsp),%xmm2
addsd  0xe20(%rip),%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  0xe12(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     1180 <main+0x50>
test   %ebx,%ebx
jne    122e <main+0xfe>
ucomisd 0xde4(%rip),%xmm2
jae    11e0 <main+0xb0>
test   %ebx,%ebx
je     11f8 <main+0xc8>
movsd  0xdde(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     11f8 <main+0xc8>
addss  0xdbc(%rip),%xmm0
cvttss2si %xmm0,%edi
mov    %ebp,%esi
movsd  %xmm2,(%rsp)
call   1050 <pow@plt>
imul   %ebx,%eax
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11f3 <main+0xc3>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"For N = %d \0A\00"
@.str.1 = [6 x i8] c"%5d \09\00"
@.str.2 = [11 x i8] c"%-6.2f \09 \09\00"
@.str.3 = [8 x i8] c"%2.2f \09\00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %4
br label %6
6: ; preds = %66, %0
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 10
br i1 %8, label %9, label %69
9: ; preds = %6
%10 = load i32, i32* %4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 0, i32* %3
br label %12
12: ; preds = %62, %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 10000
br i1 %14, label %15, label %65
15: ; preds = %12
store float 0x3FB70A3D80000000, float* %5
br label %16
16: ; preds = %55, %15
%17 = load float, float* %5
%18 = fpext float %17 to double
%19 = fcmp ole double %18, 2.100000e-01
br i1 %19, label %20, label %60
20: ; preds = %16
%21 = load i32, i32* %2
%22 = add nsw i32 %21, -1
store i32 %22, i32* %2
%23 = icmp eq i32 %21, 1
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i32, i32* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %20
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %38
30: ; preds = %27
%31 = load float, float* %5
%32 = fpext float %31 to double
%33 = fcmp oge double %32, 1.000000e-01
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load float, float* %5
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %36)
br label %38
38: ; preds = %34, %30, %27
%39 = load i32, i32* %3
%40 = icmp sgt i32 %39, 0
br i1 %40, label %41, label %54
41: ; preds = %38
%42 = load float, float* %5
%43 = fpext float %42 to double
%44 = fcmp ole double %43, 2.000000e-01
br i1 %44, label %45, label %54
45: ; preds = %41
%46 = load i32, i32* %3
%47 = load float, float* %5
%48 = fadd float 1.000000e+00, %47
%49 = fptosi float %48 to i32
%50 = load i32, i32* %4
%51 = call i32 @pow(i32 %49, i32 %50)
%52 = mul nsw i32 %46, %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %45, %41, %38
br label %55
55: ; preds = %54
%56 = load float, float* %5
%57 = fpext float %56 to double
%58 = fadd double %57, 1.000000e-02
%59 = fptrunc double %58 to float
store float %59, float* %5
br label %16
60: ; preds = %16
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %2
br label %62
62: ; preds = %60
%63 = load i32, i32* %3
%64 = add nsw i32 %63, 1000
store i32 %64, i32* %3
br label %12
65: ; preds = %12
br label %66
66: ; preds = %65
%67 = load i32, i32* %4
%68 = add nsw i32 %67, 1
store i32 %68, i32* %4
br label %6
69: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"For N = %d \0A\00"
@.str.1 = [6 x i8] c"%5d \09\00"
@.str.2 = [11 x i8] c"%-6.2f \09 \09\00"
@.str.3 = [8 x i8] c"%2.2f \09\00"
define i32 @main() {
br label %1
1: ; preds = %0, %39
%2 = phi i32 [ 0, %0 ], [ %40, %39 ]
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %4
4: ; preds = %35, %1
%5 = phi i32 [ 0, %1 ], [ %37, %35 ]
%6 = icmp ne i32 %5, 0
%7 = icmp eq i32 %5, 0
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %5)
br i1 %7, label %13, label %9
9: ; preds = %4
%10 = tail call i32 @pow(i32 1, i32 %2)
%11 = mul nsw i32 %10, %5
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %4, %9
br label %14
14: ; preds = %13, %30
%15 = phi double [ %33, %30 ], [ 0x3FB99999A0000000, %13 ]
%16 = phi float [ %32, %30 ], [ 0x3FB99999A0000000, %13 ]
%17 = fcmp ult double %15, 1.000000e-01
%18 = select i1 %6, i1 true, i1 %17
br i1 %18, label %21, label %19
19: ; preds = %14
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %15)
br label %30
21: ; preds = %14
%22 = fcmp ugt double %15, 2.000000e-01
%23 = select i1 %7, i1 true, i1 %22
br i1 %23, label %30, label %24
24: ; preds = %21
%25 = fadd float %16, 1.000000e+00
%26 = fptosi float %25 to i32
%27 = tail call i32 @pow(i32 %26, i32 %2)
%28 = mul nsw i32 %27, %5
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %19, %21, %24
%31 = fadd double %15, 1.000000e-02
%32 = fptrunc double %31 to float
%33 = fpext float %32 to double
%34 = fcmp ugt double %33, 2.100000e-01
br i1 %34, label %35, label %14
35: ; preds = %30
%36 = tail call i32 @putchar(i32 10)
%37 = add nuw nsw i32 %5, 1000
%38 = icmp ult i32 %5, 9001
br i1 %38, label %4, label %39
39: ; preds = %35
%40 = add nuw nsw i32 %2, 1
%41 = icmp eq i32 %40, 11
br i1 %41, label %42, label %1
42: ; preds = %39
ret i32 0
}