#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 /*<<< orphan*/ scanf(char *, float *);
int main() {
  float quilosFarinha, valorFarinha, litrosAgua, valorAgua, horasEnergia,
      valorEnergia, percentualImposto;
  scanf("%f", &quilosFarinha);
  scanf("%f", &valorFarinha);
  scanf("%f", &litrosAgua);
  scanf("%f", &valorAgua);
  scanf("%f", &horasEnergia);
  scanf("%f", &valorEnergia);
  scanf("%f", &percentualImposto);
  float custoFarinha = quilosFarinha * valorFarinha;
  float custoAgua = litrosAgua * valorAgua;
  float custoEnergia = horasEnergia * valorEnergia;
  float custoTotal = custoFarinha + custoAgua + custoEnergia;
  custoTotal = custoTotal * (1 + percentualImposto / 100);
  float valorVenda = custoTotal * 1.3f;
  printf("PRECO DE CUSTO = %.2f\n", custoTotal);
  printf("PRECO DE VENDA = %.2f\n", valorVenda);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xedd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xecd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebd(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xead(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9d(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe8d(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe7d(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x20(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
addss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movss  0xe1d(%rip),%xmm1
divss  %xmm1,%xmm2
movss  0xe0d(%rip),%xmm1
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xdf4(%rip),%xmm0
mulss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xded(%rip),%rdi
call   1030 <printf@plt>
movss  -0x30(%rbp),%xmm0
lea    0xdf3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xee0(%rip),%rbx
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
mulss  0x18(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
mulss  0x10(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  0xc(%rsp),%xmm2
mulss  0x8(%rsp),%xmm2
movss  0x4(%rsp),%xmm0
divss  0xe43(%rip),%xmm0
addss  0xe3f(%rip),%xmm0
addss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
movss  0xe33(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe35(%rip),%rdi
movss  (%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [23 x i8] c"PRECO DE CUSTO = %.2f\0A\00"
@.str.2 = [23 x i8] c"PRECO DE VENDA = %.2f\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 = alloca float
%12 = alloca float
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %5)
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%20 = load float, float* %1
%21 = load float, float* %2
%22 = fmul float %20, %21
store float %22, float* %8
%23 = load float, float* %3
%24 = load float, float* %4
%25 = fmul float %23, %24
store float %25, float* %9
%26 = load float, float* %5
%27 = load float, float* %6
%28 = fmul float %26, %27
store float %28, float* %10
%29 = load float, float* %8
%30 = load float, float* %9
%31 = fadd float %29, %30
%32 = load float, float* %10
%33 = fadd float %31, %32
store float %33, float* %11
%34 = load float, float* %11
%35 = load float, float* %7
%36 = fdiv float %35, 1.000000e+02
%37 = fadd float 1.000000e+00, %36
%38 = fmul float %34, %37
store float %38, float* %11
%39 = load float, float* %11
%40 = fmul float %39, 0x3FF4CCCCC0000000
store float %40, float* %12
%41 = load float, float* %11
%42 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), float %41)
%43 = load float, float* %12
%44 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), float %43)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [23 x i8] c"PRECO DE CUSTO = %.2f\0A\00"
@.str.2 = [23 x i8] c"PRECO DE VENDA = %.2f\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 = bitcast float* %1 to i8*
%9 = bitcast float* %2 to i8*
%10 = bitcast float* %3 to i8*
%11 = bitcast float* %4 to i8*
%12 = bitcast float* %5 to i8*
%13 = bitcast float* %6 to i8*
%14 = bitcast float* %7 to i8*
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %5)
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %6)
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %7)
%22 = load float, float* %1
%23 = load float, float* %2
%24 = fmul float %22, %23
%25 = load float, float* %3
%26 = load float, float* %4
%27 = fmul float %25, %26
%28 = load float, float* %5
%29 = load float, float* %6
%30 = fmul float %28, %29
%31 = fadd float %24, %27
%32 = fadd float %31, %30
%33 = load float, float* %7
%34 = fdiv float %33, 1.000000e+02
%35 = fadd float %34, 1.000000e+00
%36 = fmul float %32, %35
%37 = fmul float %36, 0x3FF4CCCCC0000000
%38 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), float %36)
%39 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), float %37)
ret i32 0
}