#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 */
unsigned int pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  unsigned int amount;
  unsigned int principal = 100000;
  double rate = 0.05;
  double year;
  unsigned int resto;
  printf("%4s%21s%30s\n", "Year", "Amount on deposit",
         "Tasso d'interesse annuo");
  for (year = 1; year <= 10; ++year) {
    amount = principal * pow(1.0 + rate, year);
    resto = amount % 100;
    amount = amount / 100;
    printf("%4.0f%18d.%d%28.0f\n", year, amount, resto, (rate * 100));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x186a0,-0xc(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xed6(%rip),%rdi
lea    0xedc(%rip),%rsi
lea    0xeda(%rip),%rdx
lea    0xee5(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe95(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     1209 <main+0xe9>
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
movsd  0xe6c(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1040 <pow@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
movsd  0xe39(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
lea    0xe71(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe06(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1173 <main+0x53>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf30(%rip),%rdi
lea    0xf36(%rip),%rsi
lea    0xf34(%rip),%rdx
lea    0xf3f(%rip),%rcx
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0xeb4(%rip),%xmm0
movsd  0xeb4(%rip),%xmm1
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
lea    0xf1e(%rip),%rbx
movsd  0xe92(%rip),%xmm1
mov    %rbx,%rdi
movsd  0xe7f(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe80(%rip),%xmm1
movsd  0xe60(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xe52(%rip),%xmm0
movsd  0xe42(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe43(%rip),%xmm1
movsd  0xe1b(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xe15(%rip),%xmm0
movsd  0xdfd(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xe06(%rip),%xmm1
movsd  0xdd6(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xdd8(%rip),%xmm0
movsd  0xdb8(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xd99(%rip),%xmm0
movsd  0xda1(%rip),%xmm1
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xd7b(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xd89(%rip),%xmm1
movsd  0xd51(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xd5b(%rip),%xmm0
movsd  0xd33(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xd4c(%rip),%xmm1
movsd  0xd0c(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xd1e(%rip),%xmm0
movsd  0xcee(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xd0f(%rip),%xmm1
movsd  0xcc7(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xce1(%rip),%xmm0
movsd  0xca9(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xcd2(%rip),%xmm1
movsd  0xc82(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xca4(%rip),%xmm0
movsd  0xc64(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0xc95(%rip),%xmm1
movsd  0xc3d(%rip),%xmm0
call   1040 <pow@plt>
imul   $0x186a0,%eax,%edx
imul   $0x51eb851f,%rdx,%rsi
shr    $0x25,%rsi
imul   $0x64,%esi,%eax
sub    %eax,%edx
mov    %rbx,%rdi
movsd  0xc67(%rip),%xmm0
movsd  0xc1f(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%4s%21s%30s\0A\00"
@.str.1 = [5 x i8] c"Year\00"
@.str.2 = [18 x i8] c"Amount on deposit\00"
@.str.3 = [24 x i8] c"Tasso d'interesse annuo\00"
@.str.4 = [20 x i8] c"%4.0f%18d.%d%28.0f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store i32 0, i32* %1
store i32 100000, i32* %3
store double 5.000000e-02, double* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
store double 1.000000e+00, double* %5
br label %8
8: ; preds = %28, %0
%9 = load double, double* %5
%10 = fcmp ole double %9, 1.000000e+01
br i1 %10, label %11, label %31
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load double, double* %4
%14 = fadd double 1.000000e+00, %13
%15 = load double, double* %5
%16 = call i32 @pow(double %14, double %15)
%17 = mul i32 %12, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = urem i32 %18, 100
store i32 %19, i32* %6
%20 = load i32, i32* %2
%21 = udiv i32 %20, 100
store i32 %21, i32* %2
%22 = load double, double* %5
%23 = load i32, i32* %2
%24 = load i32, i32* %6
%25 = load double, double* %4
%26 = fmul double %25, 1.000000e+02
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double %22, i32 %23, i32 %24, double %26)
br label %28
28: ; preds = %11
%29 = load double, double* %5
%30 = fadd double %29, 1.000000e+00
store double %30, double* %5
br label %8
31: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%4s%21s%30s\0A\00"
@.str.1 = [5 x i8] c"Year\00"
@.str.2 = [18 x i8] c"Amount on deposit\00"
@.str.3 = [24 x i8] c"Tasso d'interesse annuo\00"
@.str.4 = [20 x i8] c"%4.0f%18d.%d%28.0f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%2 = tail call i32 @pow(double 1.050000e+00, double 1.000000e+00)
%3 = mul i32 %2, 100000
%4 = urem i32 %3, 100
%5 = udiv i32 %3, 100
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 1.000000e+00, i32 %5, i32 %4, double 5.000000e+00)
%7 = tail call i32 @pow(double 1.050000e+00, double 2.000000e+00)
%8 = mul i32 %7, 100000
%9 = urem i32 %8, 100
%10 = udiv i32 %8, 100
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 2.000000e+00, i32 %10, i32 %9, double 5.000000e+00)
%12 = tail call i32 @pow(double 1.050000e+00, double 3.000000e+00)
%13 = mul i32 %12, 100000
%14 = urem i32 %13, 100
%15 = udiv i32 %13, 100
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 3.000000e+00, i32 %15, i32 %14, double 5.000000e+00)
%17 = tail call i32 @pow(double 1.050000e+00, double 4.000000e+00)
%18 = mul i32 %17, 100000
%19 = urem i32 %18, 100
%20 = udiv i32 %18, 100
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 4.000000e+00, i32 %20, i32 %19, double 5.000000e+00)
%22 = tail call i32 @pow(double 1.050000e+00, double 5.000000e+00)
%23 = mul i32 %22, 100000
%24 = urem i32 %23, 100
%25 = udiv i32 %23, 100
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 5.000000e+00, i32 %25, i32 %24, double 5.000000e+00)
%27 = tail call i32 @pow(double 1.050000e+00, double 6.000000e+00)
%28 = mul i32 %27, 100000
%29 = urem i32 %28, 100
%30 = udiv i32 %28, 100
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 6.000000e+00, i32 %30, i32 %29, double 5.000000e+00)
%32 = tail call i32 @pow(double 1.050000e+00, double 7.000000e+00)
%33 = mul i32 %32, 100000
%34 = urem i32 %33, 100
%35 = udiv i32 %33, 100
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 7.000000e+00, i32 %35, i32 %34, double 5.000000e+00)
%37 = tail call i32 @pow(double 1.050000e+00, double 8.000000e+00)
%38 = mul i32 %37, 100000
%39 = urem i32 %38, 100
%40 = udiv i32 %38, 100
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 8.000000e+00, i32 %40, i32 %39, double 5.000000e+00)
%42 = tail call i32 @pow(double 1.050000e+00, double 9.000000e+00)
%43 = mul i32 %42, 100000
%44 = urem i32 %43, 100
%45 = udiv i32 %43, 100
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 9.000000e+00, i32 %45, i32 %44, double 5.000000e+00)
%47 = tail call i32 @pow(double 1.050000e+00, double 1.000000e+01)
%48 = mul i32 %47, 100000
%49 = urem i32 %48, 100
%50 = udiv i32 %48, 100
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), double 1.000000e+01, i32 %50, i32 %49, double 5.000000e+00)
ret i32 0
}