#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) {
  printf("\n ** Preço de Custo e Venda de uma receita de pão francês ** \n\n");
  float qkf, vkf, qld, vld, qkwh, vkwh, vimp, Imposto, PC, PV;
  printf("Informe a quantidade de quilos de farinha: ");
  scanf("%f", &qkf);
  printf("Informe o valor do quilo da farinha: ");
  scanf("%f", &vkf);
  printf("Informe a quantidade de litros d'agua: ");
  scanf("%f", &qld);
  printf("Informe o valor do litro d'agua: ");
  scanf("%f", &vld);
  printf("Informe a quantidade de Quilowatts hora de energia: ");
  scanf("%f", &qkwh);
  printf("Informe o valor do Quilowatt hora: ");
  scanf("%f", &vkwh);
  printf("Informe o valor percentual do imposto: ");
  scanf("%f", &vimp);
  Imposto = (qkf * vkf + qld * vld + qkwh * vkwh) * vimp / 100.0;
  PC = qkf * vkf + qld * vld + qkwh * vkwh + Imposto;
  PV = PC * 1.30;
  printf("\nO preço de custo do pão é: %.2f Reais.\n", PC);
  printf("O preço de venda do pão é: %.2f Reais.\n", PV);
  printf("\n\n<<Marco Tulio>>\n");
  getchar(), getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mulss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdb1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd53(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebe(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xedb(%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    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rbx
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xefe(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0x1c(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mulss  0x10(%rsp),%xmm1
mulss  0x18(%rsp),%xmm0
movss  0xc(%rsp),%xmm2
mulss  0x8(%rsp),%xmm2
addss  %xmm1,%xmm0
addss  %xmm0,%xmm2
movss  0x4(%rsp),%xmm0
mulss  %xmm2,%xmm0
divss  0xdad(%rip),%xmm0
addss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xda5(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rsp)
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xece(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [67 x i8] c"\0A ** Pre\C3\A7o de Custo e Venda de uma receita de p\C3\A3o franc\C3\AAs ** \0A\0A\00"
@.str.1 = [44 x i8] c"Informe a quantidade de quilos de farinha: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [38 x i8] c"Informe o valor do quilo da farinha: \00"
@.str.4 = [40 x i8] c"Informe a quantidade de litros d'agua: \00"
@.str.5 = [34 x i8] c"Informe o valor do litro d'agua: \00"
@.str.6 = [53 x i8] c"Informe a quantidade de Quilowatts hora de energia: \00"
@.str.7 = [36 x i8] c"Informe o valor do Quilowatt hora: \00"
@.str.8 = [40 x i8] c"Informe o valor percentual do imposto: \00"
@.str.9 = [44 x i8] c"\0AO pre\C3\A7o de custo do p\C3\A3o \C3\A9: %.2f Reais.\0A\00"
@.str.10 = [43 x i8] c"O pre\C3\A7o de venda do p\C3\A3o \C3\A9: %.2f Reais.\0A\00"
@.str.11 = [19 x i8] c"\0A\0A<<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 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %6)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %7)
%26 = load float, float* %1
%27 = load float, float* %2
%28 = load float, float* %3
%29 = load float, float* %4
%30 = fmul float %28, %29
%31 = call float @llvm.fmuladd.f32(float %26, float %27, float %30)
%32 = load float, float* %5
%33 = load float, float* %6
%34 = call float @llvm.fmuladd.f32(float %32, float %33, float %31)
%35 = load float, float* %7
%36 = fmul float %34, %35
%37 = fpext float %36 to double
%38 = fdiv double %37, 1.000000e+02
%39 = fptrunc double %38 to float
store float %39, float* %8
%40 = load float, float* %1
%41 = load float, float* %2
%42 = load float, float* %3
%43 = load float, float* %4
%44 = fmul float %42, %43
%45 = call float @llvm.fmuladd.f32(float %40, float %41, float %44)
%46 = load float, float* %5
%47 = load float, float* %6
%48 = call float @llvm.fmuladd.f32(float %46, float %47, float %45)
%49 = load float, float* %8
%50 = fadd float %48, %49
store float %50, float* %9
%51 = load float, float* %9
%52 = fpext float %51 to double
%53 = fmul double %52, 1.300000e+00
%54 = fptrunc double %53 to float
store float %54, float* %10
%55 = load float, float* %9
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), double %56)
%58 = load float, float* %10
%59 = fpext float %58 to double
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), double %59)
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0))
%62 = call i32 (...) @getchar()
%63 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"Informe a quantidade de quilos de farinha: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [38 x i8] c"Informe o valor do quilo da farinha: \00"
@.str.4 = [40 x i8] c"Informe a quantidade de litros d'agua: \00"
@.str.5 = [34 x i8] c"Informe o valor do litro d'agua: \00"
@.str.6 = [53 x i8] c"Informe a quantidade de Quilowatts hora de energia: \00"
@.str.7 = [36 x i8] c"Informe o valor do Quilowatt hora: \00"
@.str.8 = [40 x i8] c"Informe o valor percentual do imposto: \00"
@.str.9 = [44 x i8] c"\0AO pre\C3\A7o de custo do p\C3\A3o \C3\A9: %.2f Reais.\0A\00"
@.str.10 = [43 x i8] c"O pre\C3\A7o de venda do p\C3\A3o \C3\A9: %.2f Reais.\0A\00"
@str = [66 x i8] c"\0A ** Pre\C3\A7o de Custo e Venda de uma receita de p\C3\A3o franc\C3\AAs ** \0A\00"
@str.12 = [18 x i8] c"\0A\0A<<Marco Tulio>>\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str, i64 0, i64 0))
%9 = bitcast float* %1 to i8*
%10 = bitcast float* %2 to i8*
%11 = bitcast float* %3 to i8*
%12 = bitcast float* %4 to i8*
%13 = bitcast float* %5 to i8*
%14 = bitcast float* %6 to i8*
%15 = bitcast float* %7 to i8*
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %1)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %2)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %3)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %4)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%27 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %6)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0))
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %7)
%30 = load float, float* %1
%31 = load float, float* %2
%32 = load float, float* %3
%33 = load float, float* %4
%34 = fmul float %32, %33
%35 = call float @llvm.fmuladd.f32(float %30, float %31, float %34)
%36 = load float, float* %5
%37 = load float, float* %6
%38 = call float @llvm.fmuladd.f32(float %36, float %37, float %35)
%39 = load float, float* %7
%40 = fmul float %38, %39
%41 = fdiv float %40, 1.000000e+02
%42 = fadd float %38, %41
%43 = fpext float %42 to double
%44 = fmul double %43, 1.300000e+00
%45 = fptrunc double %44 to float
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), double %43)
%47 = fpext float %45 to double
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.10, i64 0, i64 0), double %47)
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.12, i64 0, i64 0))
%50 = call i32 (...) @getchar()
%51 = call i32 (...) @getchar()
ret i32 0
}