#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*/ ciag(double);
scalar_t__ pow(int, double);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  double i, n;
  for (i = 0; i < 50; i++) {
    printf("\n%.0lf\t %.0lf", i, pow(2, i) + pow(3, i));
    printf("\t %-10.0lf", ciag(i));
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11d1 <main+0xa1>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %rax,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x3,%edi
call   1040 <pow@plt>
mov    -0x28(%rbp),%rsi
movsd  -0x20(%rbp),%xmm0
add    %rax,%rsi
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <ciag@plt>
mov    %eax,%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xe46(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1147 <main+0x17>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xorpd  %xmm0,%xmm0
mov    $0x32,%ebp
lea    0xeb1(%rip),%r14
lea    0xeb8(%rip),%r15
xchg   %ax,%ax
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
movsd  (%rsp),%xmm0
call   1050 <pow@plt>
mov    %rax,%rbx
mov    $0x3,%edi
movsd  (%rsp),%xmm0
call   1050 <pow@plt>
add    %rax,%rbx
mov    %r14,%rdi
movsd  (%rsp),%xmm0
mov    %rbx,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
call   1060 <ciag@plt>
mov    %r15,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xe42(%rip),%xmm0
add    $0xffffffff,%ebp
jne    1160 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\0A%.0lf\09 %.0lf\00"
@.str.1 = [11 x i8] c"\09 %-10.0lf\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
br label %4
4: ; preds = %18, %0
%5 = load double, double* %2
%6 = fcmp olt double %5, 5.000000e+01
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load double, double* %2
%9 = load double, double* %2
%10 = call i64 @pow(i32 2, double %9)
%11 = load double, double* %2
%12 = call i64 @pow(i32 3, double %11)
%13 = add nsw i64 %10, %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %8, i64 %13)
%15 = load double, double* %2
%16 = call i32 @ciag(double %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %7
%19 = load double, double* %2
%20 = fadd double %19, 1.000000e+00
store double %20, double* %2
br label %4
21: ; preds = %4
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0A%.0lf\09 %.0lf\00"
@.str.1 = [11 x i8] c"\09 %-10.0lf\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %10, %1 ]
%3 = sitofp i32 %2 to double
%4 = tail call i64 @pow(i32 2, double %3)
%5 = tail call i64 @pow(i32 3, double %3)
%6 = add nsw i64 %5, %4
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %3, i64 %6)
%8 = tail call i32 @ciag(double %3)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 50
br i1 %11, label %12, label %1
12: ; preds = %1
%13 = tail call i32 @putchar(i32 10)
ret i32 0
}