#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 *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  float rendimento, rendimento_total, valor_dep, taxa, soma, soma_taxa;
  int mes;
  printf("\nDigite o valor do depósito\n");
  scanf("%f", &valor_dep);
  printf("\nDigite a quantidade de meses\n");
  scanf("%d", &mes);
  printf("\nDigite a taxa de juros\n");
  scanf("%f", &taxa);
  soma_taxa = taxa / 100;
  rendimento = valor_dep * mes * soma_taxa;
  rendimento_total = valor_dep + rendimento;
  printf("\nO rendimento é de R$%.2f reais e o rendimento total é de R$%.2f "
         "reais.",
         rendimento, rendimento_total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
movss  0xe64(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm0
cvtsi2ssl -0x20(%rbp),%xmm1
mulss  %xmm1,%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe7b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9d(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf12(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x8(%rsp),%xmm0
divss  0xe61(%rip),%xmm0
movss  0xc(%rsp),%xmm1
cvtsi2ssl 0x4(%rsp),%xmm2
mulss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
cvtss2sd %xmm1,%xmm1
lea    0xe41(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"\0ADigite o valor do dep\C3\B3sito\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [31 x i8] c"\0ADigite a quantidade de meses\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [25 x i8] c"\0ADigite a taxa de juros\0A\00"
@.str.5 = [74 x i8] c"\0AO rendimento \C3\A9 de R$%.2f reais e o rendimento total \C3\A9 de R$%.2f reais.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%15 = load float, float* %5
%16 = fdiv float %15, 1.000000e+02
store float %16, float* %7
%17 = load float, float* %4
%18 = load i32, i32* %8
%19 = sitofp i32 %18 to float
%20 = fmul float %17, %19
%21 = load float, float* %7
%22 = fmul float %20, %21
store float %22, float* %2
%23 = load float, float* %4
%24 = load float, float* %2
%25 = fadd float %23, %24
store float %25, float* %3
%26 = load float, float* %2
%27 = fpext float %26 to double
%28 = load float, float* %3
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0), double %27, double %29)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.5 = [74 x i8] c"\0AO rendimento \C3\A9 de R$%.2f reais e o rendimento total \C3\A9 de R$%.2f reais.\00"
@str = [29 x i8] c"\0ADigite o valor do dep\C3\B3sito\00"
@str.6 = [30 x i8] c"\0ADigite a quantidade de meses\00"
@str.7 = [24 x i8] c"\0ADigite a taxa de juros\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca i32
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.6, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%13 = load float, float* %2
%14 = fdiv float %13, 1.000000e+02
%15 = load float, float* %1
%16 = load i32, i32* %3
%17 = sitofp i32 %16 to float
%18 = fmul float %15, %17
%19 = fmul float %14, %18
%20 = fadd float %15, %19
%21 = fpext float %19 to double
%22 = fpext float %20 to double
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.5, i64 0, i64 0), double %21, double %22)
ret i32 0
}