#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 *, ...);
void main(void) {
  float vDup, taxapDia, vTot;
  int diasAtraso, numDup;
  printf("Insira o numero da duplciata: ");
  scanf("%i", &numDup);
  printf("Insira o valor da duplciata: ");
  scanf("%f", &vDup);
  printf("Insira os dias de atraso: ");
  scanf("%i", &diasAtraso);
  printf("Insira a taxa por dia: ");
  scanf("%f", &taxapDia);
  taxapDia = taxapDia / 100;
  vTot = vDup + diasAtraso * taxapDia;
  printf("Numero da Duplicata: %i, e o valor total: %.2f", numDup, vTot);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe4b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x14(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%r14
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x8(%rsp),%xmm0
divss  0xe49(%rip),%xmm0
movss  %xmm0,0x8(%rsp)
cvtsi2ssl 0x10(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  0x14(%rsp),%xmm1
mov    0xc(%rsp),%esi
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe9b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Insira o numero da duplciata: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [30 x i8] c"Insira o valor da duplciata: \00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [27 x i8] c"Insira os dias de atraso: \00"
@.str.5 = [24 x i8] c"Insira a taxa por dia: \00"
@.str.6 = [47 x i8] c"Numero da Duplicata: %i, e o valor total: %.2f\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %1)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %2)
%14 = load float, float* %2
%15 = fdiv float %14, 1.000000e+02
store float %15, float* %2
%16 = load float, float* %1
%17 = load i32, i32* %4
%18 = sitofp i32 %17 to float
%19 = load float, float* %2
%20 = call float @llvm.fmuladd.f32(float %18, float %19, float %16)
store float %20, float* %3
%21 = load i32, i32* %5
%22 = load float, float* %3
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i32 %21, double %23)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Insira o numero da duplciata: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [30 x i8] c"Insira o valor da duplciata: \00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [27 x i8] c"Insira os dias de atraso: \00"
@.str.5 = [24 x i8] c"Insira a taxa por dia: \00"
@.str.6 = [47 x i8] c"Numero da Duplicata: %i, e o valor total: %.2f\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 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), i32* %4)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 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), float* %1)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 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), i32* %3)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %2)
%17 = load float, float* %2
%18 = fdiv float %17, 1.000000e+02
store float %18, float* %2
%19 = load float, float* %1
%20 = load i32, i32* %3
%21 = sitofp i32 %20 to float
%22 = call float @llvm.fmuladd.f32(float %21, float %18, float %19)
%23 = load i32, i32* %4
%24 = fpext float %22 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i32 %23, double %24)
ret void
}