#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 *);
int /*<<< orphan*/ system(char *);
int main() {
  int C, Q;
  scanf("%d %d", &C, &Q);
  if (C == 1)
    printf("Total: R$ %.2lf\n", Q * 4.00);
  else if (C == 2)
    printf("Total: R$ %.2lf\n", Q * 4.50);
  else if (C == 3)
    printf("Total: R$ %.2lf\n", Q * 5.00);
  else if (C == 4)
    printf("Total: R$ %.2lf\n", Q * 2.00);
  else if (C == 5)
    printf("Total: R$ %.2lf\n", Q * 1.50);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    1183 <main+0x53>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xeb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
jmp    1252 <main+0x122>
cmpl   $0x2,-0x8(%rbp)
jne    11b3 <main+0x83>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe7e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
jmp    124d <main+0x11d>
cmpl   $0x3,-0x8(%rbp)
jne    11e3 <main+0xb3>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe46(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe55(%rip),%rdi
call   1040 <printf@plt>
jmp    1248 <main+0x118>
cmpl   $0x4,-0x8(%rbp)
jne    1213 <main+0xe3>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe0e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe25(%rip),%rdi
call   1040 <printf@plt>
jmp    1243 <main+0x113>
cmpl   $0x5,-0x8(%rbp)
jne    123e <main+0x10e>
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xdd6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xdf5(%rip),%rdi
call   1040 <printf@plt>
jmp    1243 <main+0x113>
jmp    1248 <main+0x118>
jmp    124d <main+0x11d>
jmp    1252 <main+0x122>
lea    0xde6(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     1174 <main+0x44>
cltq
lea    0xec6(%rip),%rcx
cvtsi2sdl (%rsp),%xmm0
mulsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9c(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [17 x i8] c"Total: R$ %.2lf\0A\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fmul double %9, 4.000000e+00
%11 = fptosi double %10 to i32
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %53
13: ; preds = %0
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i32, i32* %3
%18 = sitofp i32 %17 to double
%19 = fmul double %18, 4.500000e+00
%20 = fptosi double %19 to i32
%21 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %52
22: ; preds = %13
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 3
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = load i32, i32* %3
%27 = sitofp i32 %26 to double
%28 = fmul double %27, 5.000000e+00
%29 = fptosi double %28 to i32
%30 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %29)
br label %51
31: ; preds = %22
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 4
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = load i32, i32* %3
%36 = sitofp i32 %35 to double
%37 = fmul double %36, 2.000000e+00
%38 = fptosi double %37 to i32
%39 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %38)
br label %50
40: ; preds = %31
%41 = load i32, i32* %2
%42 = icmp eq i32 %41, 5
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load i32, i32* %3
%45 = sitofp i32 %44 to double
%46 = fmul double %45, 1.500000e+00
%47 = fptosi double %46 to i32
%48 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %43, %40
br label %50
50: ; preds = %49, %34
br label %51
51: ; preds = %50, %25
br label %52
52: ; preds = %51, %16
br label %53
53: ; preds = %52, %7
%54 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [17 x i8] c"Total: R$ %.2lf\0A\00"
@.str.2 = [6 x i8] c"pause\00"
@switch.table.main = [5 x double] [double 4.000000e+00, double 4.500000e+00, double 5.000000e+00, double 2.000000e+00, double 1.500000e+00]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = add i32 %6, -1
%8 = icmp ult i32 %7, 5
br i1 %8, label %9, label %18
9: ; preds = %0
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds [5 x double], [5 x double]* @switch.table.main, i64 0, i64 %10
%12 = load double, double* %11
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to double
%15 = fmul double %12, %14
%16 = fptosi double %15 to i32
%17 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %0, %9
%19 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}