#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);
int /*<<< orphan*/ scanf(char *, int *, int *, double *);
int main() {
  int a[2], b[2];
  double c[2];
  scanf("%d %d %lf", &a[0], &b[0], &c[0]);
  scanf("%d %d %lf", &a[1], &b[1], &c[1]);
  printf("VALOR A PAGAR: R$ %.2lf\n", b[0] * c[0] + b[1] * c[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    0xebe(%rip),%rdi
call   1040 <scanf@plt>
lea    -0xc(%rbp),%rsi
add    $0x4,%rsi
lea    -0x14(%rbp),%rdx
add    $0x4,%rdx
lea    -0x30(%rbp),%rcx
add    $0x8,%rcx
lea    0xe9a(%rip),%rdi
call   1040 <scanf@plt>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xed4(%rip),%rbx
lea    0x28(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x2c(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x18(%rsp),%rcx
mov    %rbx,%rdi
call   1040 <scanf@plt>
cvtsi2sdl 0x8(%rsp),%xmm0
cvtsi2sdl 0xc(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

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