#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 */
typedef int int16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int16_t n, q;
  scanf("%d %d", &n, &q);
  if (n == 1) {
    printf("Total: R$ %.2f\n", 4.00 * q);
  } else if (n == 2) {
    printf("Total: R$ %.2f\n", 4.50 * q);
  } else if (n == 3) {
    printf("Total: R$ %.2f\n", 5.00 * q);
  } else if (n == 4) {
    printf("Total: R$ %.2f\n", 2.00 * q);
  } else {
    printf("Total: R$ %.2f\n", 1.50 * q);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xef2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jne    116f <main+0x4f>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    121f <main+0xff>
cmpl   $0x2,-0x8(%rbp)
jne    119b <main+0x7b>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe92(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    121a <main+0xfa>
cmpl   $0x3,-0x8(%rbp)
jne    11c7 <main+0xa7>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe5e(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <main+0xf5>
cmpl   $0x4,-0x8(%rbp)
jne    11f3 <main+0xd3>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe2a(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
jmp    1210 <main+0xf0>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe00(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe23(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <main+0xf5>
jmp    121a <main+0xfa>
jmp    121f <main+0xff>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x3,%eax
ja     1151 <main+0x31>
cltq
lea    0xed6(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm1
jmp    1159 <main+0x39>
movsd  0xea7(%rip),%xmm1
cvtsi2sdl (%rsp),%xmm0
mulsd  %xmm1,%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [16 x i8] c"Total: R$ %.2f\0A\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 %12
7: ; preds = %0
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fmul double 4.000000e+00, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %10)
br label %44
12: ; preds = %0
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %3
%17 = sitofp i32 %16 to double
%18 = fmul double 4.500000e+00, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %18)
br label %43
20: ; preds = %12
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 3
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32, i32* %3
%25 = sitofp i32 %24 to double
%26 = fmul double 5.000000e+00, %25
%27 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %26)
br label %42
28: ; preds = %20
%29 = load i32, i32* %2
%30 = icmp eq i32 %29, 4
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = load i32, i32* %3
%33 = sitofp i32 %32 to double
%34 = fmul double 2.000000e+00, %33
%35 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %34)
br label %41
36: ; preds = %28
%37 = load i32, i32* %3
%38 = sitofp i32 %37 to double
%39 = fmul double 1.500000e+00, %38
%40 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %39)
br label %41
41: ; preds = %36, %31
br label %42
42: ; preds = %41, %23
br label %43
43: ; preds = %42, %15
br label %44
44: ; preds = %43, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [16 x i8] c"Total: R$ %.2f\0A\00"
@switch.table.main = [4 x double] [double 4.000000e+00, double 4.500000e+00, double 5.000000e+00, double 2.000000e+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, 4
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds [4 x double], [4 x double]* @switch.table.main, i64 0, i64 %10
%12 = load double, double* %11
br label %13
13: ; preds = %0, %9
%14 = phi double [ %12, %9 ], [ 1.500000e+00, %0 ]
%15 = load i32, i32* %2
%16 = sitofp i32 %15 to double
%17 = fmul double %14, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %17)
ret i32 0
}