#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 *, double);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  scanf("%d %d", &x, &y);
  if (x == 1)
    printf("Total: R$ %.2lf\n", 4.00 * y);
  if (x == 2)
    printf("Total: R$ %.2lf\n", 4.50 * y);
  if (x == 3)
    printf("Total: R$ %.2lf\n", 5.00 * y);
  if (x == 4)
    printf("Total: R$ %.2lf\n", 2.00 * y);
  if (x == 5)
    printf("Total: R$ %.2lf\n", 1.50 * y);
  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    116a <main+0x4a>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xea6(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    1191 <main+0x71>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe87(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x3,-0x8(%rbp)
jne    11b8 <main+0x98>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe68(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x4,-0x8(%rbp)
jne    11df <main+0xbf>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe49(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,-0x8(%rbp)
jne    1206 <main+0xe6>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe2a(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe2d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x1,%eax
je     1176 <main+0x56>
cmp    $0x2,%eax
je     1198 <main+0x78>
cmp    $0x3,%eax
je     11bd <main+0x9d>
cmp    $0x4,%eax
je     11e6 <main+0xc6>
cmp    $0x5,%eax
jne    1172 <main+0x52>
xorps  %xmm0,%xmm0
cvtsi2sdl (%rsp),%xmm0
mulsd  0xeb2(%rip),%xmm0
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
cvtsi2sdl (%rsp),%xmm0
mulsd  0xe7d(%rip),%xmm0
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x2,%eax
jne    1143 <main+0x23>
xorps  %xmm0,%xmm0
cvtsi2sdl (%rsp),%xmm0
mulsd  0xe60(%rip),%xmm0
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x3,%eax
jne    1148 <main+0x28>
xorps  %xmm0,%xmm0
cvtsi2sdl (%rsp),%xmm0
mulsd  0xe43(%rip),%xmm0
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x4,%eax
jne    1151 <main+0x31>
xorps  %xmm0,%xmm0
cvtsi2sdl (%rsp),%xmm0
addsd  %xmm0,%xmm0
lea    0xe2d(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cmp    $0x5,%eax
je     1156 <main+0x36>
jmp    1172 <main+0x52>

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