#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 getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float VCD, TD, ICMS, PLE, VP, VR;
  printf("\n ** Calculo do valor de uma compra em Dolares ** \n\n");
  printf("Informe o valor da compra, em dolares, em reais: ");
  scanf("%f", &VCD);
  printf("Informe a taxa de Dolar no dia da compra: ");
  scanf("%f", &TD);
  printf("Informe o valor do ICMS: ");
  scanf("%f", &ICMS);
  printf("Informe o percentual de lucro da empresa: ");
  scanf("%f", &PLE);
  VR = VCD * TD;
  VP = VR + VR * ICMS / 100.0 + VR * PLE / 100.0;
  printf("\nO valor a ser pago é: %f Reais.\n\n", VP);
  printf("<< Marco Tulio >>\n");
  getchar(), getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf14(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe14(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xdf6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf8d(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm1
shufps $0x0,%xmm0,%xmm0
movss  (%rsp),%xmm2
movss  0x4(%rsp),%xmm3
unpcklps %xmm2,%xmm3
mulps  %xmm0,%xmm3
cvtps2pd %xmm3,%xmm0
divpd  0xe0e(%rip),%xmm0
addsd  %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"\0A ** Calculo do valor de uma compra em Dolares ** \0A\0A\00"
@.str.1 = [50 x i8] c"Informe o valor da compra, em dolares, em reais: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [43 x i8] c"Informe a taxa de Dolar no dia da compra: \00"
@.str.4 = [26 x i8] c"Informe o valor do ICMS: \00"
@.str.5 = [43 x i8] c"Informe o percentual de lucro da empresa: \00"
@.str.6 = [36 x i8] c"\0AO valor a ser pago \C3\A9: %f Reais.\0A\0A\00"
@.str.7 = [19 x i8] c"<< Marco Tulio >>\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
%16 = load float, float* %1
%17 = load float, float* %2
%18 = fmul float %16, %17
store float %18, float* %6
%19 = load float, float* %6
%20 = fpext float %19 to double
%21 = load float, float* %6
%22 = load float, float* %3
%23 = fmul float %21, %22
%24 = fpext float %23 to double
%25 = fdiv double %24, 1.000000e+02
%26 = fadd double %20, %25
%27 = load float, float* %6
%28 = load float, float* %4
%29 = fmul float %27, %28
%30 = fpext float %29 to double
%31 = fdiv double %30, 1.000000e+02
%32 = fadd double %26, %31
%33 = fptrunc double %32 to float
store float %33, float* %5
%34 = load float, float* %5
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), double %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0))
%38 = call i32 (...) @getchar()
%39 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [50 x i8] c"Informe o valor da compra, em dolares, em reais: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [43 x i8] c"Informe a taxa de Dolar no dia da compra: \00"
@.str.4 = [26 x i8] c"Informe o valor do ICMS: \00"
@.str.5 = [43 x i8] c"Informe o percentual de lucro da empresa: \00"
@.str.6 = [36 x i8] c"\0AO valor a ser pago \C3\A9: %f Reais.\0A\0A\00"
@str = [52 x i8] c"\0A ** Calculo do valor de uma compra em Dolares ** \0A\00"
@str.8 = [18 x i8] c"<< Marco Tulio >>\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
%18 = load float, float* %1
%19 = load float, float* %2
%20 = fmul float %18, %19
%21 = fpext float %20 to double
%22 = load float, float* %3
%23 = load float, float* %4
%24 = insertelement <2 x float> poison, float %20, i64 0
%25 = shufflevector <2 x float> %24, <2 x float> poison, <2 x i32> zeroinitializer
%26 = insertelement <2 x float> poison, float %22, i64 0
%27 = insertelement <2 x float> %26, float %23, i64 1
%28 = fmul <2 x float> %25, %27
%29 = fpext <2 x float> %28 to <2 x double>
%30 = fdiv <2 x double> %29, <double 1.000000e+02, double 1.000000e+02>
%31 = extractelement <2 x double> %30, i64 0
%32 = fadd double %31, %21
%33 = extractelement <2 x double> %30, i64 1
%34 = fadd double %32, %33
%35 = fptrunc double %34 to float
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), double %36)
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.8, i64 0, i64 0))
%39 = call i32 (...) @getchar()
%40 = call i32 (...) @getchar()
ret i32 0
}