#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*/ printf(char *, float);
int main(int argc, char *argv[]) {
  float depInicial = 500.00;
  float pMes = depInicial + 0.01 * depInicial;
  float segMes = pMes + 0.01 * pMes;
  float terMes = segMes + 0.01 * segMes;
  printf("Saldo atualizado = %.2f\n", terMes);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeba(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe64(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Saldo atualizado = %.2f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 %0, i32* %3
store i8** %1, i8*** %4
store float 5.000000e+02, float* %5
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = load float, float* %5
%12 = fpext float %11 to double
%13 = call double @llvm.fmuladd.f64(double 1.000000e-02, double %12, double %10)
%14 = fptrunc double %13 to float
store float %14, float* %6
%15 = load float, float* %6
%16 = fpext float %15 to double
%17 = load float, float* %6
%18 = fpext float %17 to double
%19 = call double @llvm.fmuladd.f64(double 1.000000e-02, double %18, double %16)
%20 = fptrunc double %19 to float
store float %20, float* %7
%21 = load float, float* %7
%22 = fpext float %21 to double
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = call double @llvm.fmuladd.f64(double 1.000000e-02, double %24, double %22)
%26 = fptrunc double %25 to float
store float %26, float* %8
%27 = load float, float* %8
%28 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), float %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Saldo atualizado = %.2f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), float 0x4080193440000000)
ret i32 0
}