#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 *, int *, int *, float *);
int main() {
  int a, b, c, d;
  float e, f, Valor_a_paga;
  scanf("%d%d%f", &a, &b, &e);
  scanf("%d%d%f", &c, &d, &f);
  Valor_a_paga = b * e + d * f;
  printf("VALOR A PAGAR: R$ %.2f\n", Valor_a_paga);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
lea    0xeb2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <scanf@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
cvtsi2ssl -0x14(%rbp),%xmm1
mulss  -0x1c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rbx
lea    0x1c(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
call   1040 <scanf@plt>
cvtsi2ssl 0x14(%rsp),%xmm0
cvtsi2ssl 0x10(%rsp),%xmm1
mulss  0x8(%rsp),%xmm1
mulss  0xc(%rsp),%xmm0
addss  %xmm1,%xmm0
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d%d%f\00"
@.str.1 = [24 x i8] c"VALOR A PAGAR: R$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, float* %6)
%10 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %5, float* %7)
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to float
%13 = load float, float* %6
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to float
%16 = load float, float* %7
%17 = fmul float %15, %16
%18 = call float @llvm.fmuladd.f32(float %12, float %13, float %17)
store float %18, float* %8
%19 = load float, float* %8
%20 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), float %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%f\00"
@.str.1 = [24 x i8] c"VALOR A PAGAR: R$ %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = bitcast i32* %1 to i8*
%8 = bitcast i32* %2 to i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast float* %6 to i8*
%13 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, float* %5)
%14 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, float* %6)
%15 = load i32, i32* %2
%16 = sitofp i32 %15 to float
%17 = load float, float* %5
%18 = load i32, i32* %4
%19 = sitofp i32 %18 to float
%20 = load float, float* %6
%21 = fmul float %20, %19
%22 = call float @llvm.fmuladd.f32(float %16, float %17, float %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), float %22)
ret i32 0
}