#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(double, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  int yil;
  double miktar, anapara, oran;
  printf("Anaparayi giriniz: ");
  scanf("%lf", &anapara);
  printf("faiz oranını (0.faiz) şeklinde giriniz: ");
  scanf("%lf", &oran);
  printf("%4s%21s\n", "Yil", "Depozito Miktari");
  for (yil = 1; yil <= 10; yil++) {
    miktar = anapara * pow(1.0 + oran, yil);
    printf("%3d%21.2f\n", yil, miktar);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeca(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xec9(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     11fc <main+0xcc>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe46(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xe83(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119e <main+0x6e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xed3(%rip),%rdi
lea    0xed5(%rip),%rsi
lea    0xed2(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xe58(%rip),%xmm0
mov    $0x1,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
lea    0xeab(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xe18(%rip),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xddf(%rip),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xda6(%rip),%xmm0
mov    $0x4,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xd6d(%rip),%xmm0
mov    $0x5,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xd34(%rip),%xmm0
mov    $0x6,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xcfb(%rip),%xmm0
mov    $0x7,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xcc2(%rip),%xmm0
mov    $0x8,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xc89(%rip),%xmm0
mov    $0x9,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xc56(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
mov    $0xa,%edi
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Anaparayi giriniz: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [44 x i8] c"faiz oran\C4\B1n\C4\B1 (0.faiz) \C5\9Feklinde giriniz: \00"
@.str.3 = [9 x i8] c"%4s%21s\0A\00"
@.str.4 = [4 x i8] c"Yil\00"
@.str.5 = [17 x i8] c"Depozito Miktari\00"
@.str.6 = [11 x i8] c"%3d%21.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %2
br label %11
11: ; preds = %24, %0
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 10
br i1 %13, label %14, label %27
14: ; preds = %11
%15 = load double, double* %4
%16 = load double, double* %5
%17 = fadd double 1.000000e+00, %16
%18 = load i32, i32* %2
%19 = call double @pow(double %17, i32 %18)
%20 = fmul double %15, %19
store double %20, double* %3
%21 = load i32, i32* %2
%22 = load double, double* %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %21, double %22)
br label %24
24: ; preds = %14
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %11
27: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Anaparayi giriniz: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [44 x i8] c"faiz oran\C4\B1n\C4\B1 (0.faiz) \C5\9Feklinde giriniz: \00"
@.str.3 = [9 x i8] c"%4s%21s\0A\00"
@.str.4 = [4 x i8] c"Yil\00"
@.str.5 = [17 x i8] c"Depozito Miktari\00"
@.str.6 = [11 x i8] c"%3d%21.2f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%10 = load double, double* %1
%11 = load double, double* %2
%12 = fadd double %11, 1.000000e+00
%13 = call double @pow(double %12, i32 1)
%14 = fmul double %10, %13
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 1, double %14)
%16 = load double, double* %1
%17 = load double, double* %2
%18 = fadd double %17, 1.000000e+00
%19 = call double @pow(double %18, i32 2)
%20 = fmul double %16, %19
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 2, double %20)
%22 = load double, double* %1
%23 = load double, double* %2
%24 = fadd double %23, 1.000000e+00
%25 = call double @pow(double %24, i32 3)
%26 = fmul double %22, %25
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 3, double %26)
%28 = load double, double* %1
%29 = load double, double* %2
%30 = fadd double %29, 1.000000e+00
%31 = call double @pow(double %30, i32 4)
%32 = fmul double %28, %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 4, double %32)
%34 = load double, double* %1
%35 = load double, double* %2
%36 = fadd double %35, 1.000000e+00
%37 = call double @pow(double %36, i32 5)
%38 = fmul double %34, %37
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 5, double %38)
%40 = load double, double* %1
%41 = load double, double* %2
%42 = fadd double %41, 1.000000e+00
%43 = call double @pow(double %42, i32 6)
%44 = fmul double %40, %43
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 6, double %44)
%46 = load double, double* %1
%47 = load double, double* %2
%48 = fadd double %47, 1.000000e+00
%49 = call double @pow(double %48, i32 7)
%50 = fmul double %46, %49
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 7, double %50)
%52 = load double, double* %1
%53 = load double, double* %2
%54 = fadd double %53, 1.000000e+00
%55 = call double @pow(double %54, i32 8)
%56 = fmul double %52, %55
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 8, double %56)
%58 = load double, double* %1
%59 = load double, double* %2
%60 = fadd double %59, 1.000000e+00
%61 = call double @pow(double %60, i32 9)
%62 = fmul double %58, %61
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 9, double %62)
%64 = load double, double* %1
%65 = load double, double* %2
%66 = fadd double %65, 1.000000e+00
%67 = call double @pow(double %66, i32 10)
%68 = fmul double %64, %67
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 10, double %68)
ret i32 0
}