#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 *, double *, double *);
int main() {
  int choice;
  double money, year;
  scanf("%d %lf %lf", &choice, &year, &money);
  if (choice == 1 || choice == 3) {
    printf("%.2f", year * money);
  } else if (choice == 2) {
    printf("%.2f", year * money / 50);
  } else {
    double out = year * money / 50;
    if (out > 0.7 * money) {
      printf("%.2f\nreduce", 0.7 * money);
    } else {
      printf("%.2f", out);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
je     115b <main+0x3b>
cmpl   $0x3,-0x8(%rbp)
jne    1176 <main+0x56>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    1217 <main+0xf7>
cmpl   $0x2,-0x8(%rbp)
jne    11a7 <main+0x87>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe76(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe4f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe31(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    11fc <main+0xdc>
movsd  0xe1a(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
jmp    120d <main+0xed>
movsd  -0x20(%rbp),%xmm0
lea    0xe13(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xf2>
jmp    1217 <main+0xf7>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%ecx
and    $0xfffffffd,%ecx
cmp    $0x1,%ecx
jne    115b <main+0x3b>
movsd  0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
jmp    1193 <main+0x73>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
divsd  0xe8d(%rip),%xmm0
cmp    $0x2,%eax
je     1193 <main+0x73>
mulsd  0xe88(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1193 <main+0x73>
lea    0xe93(%rip),%rdi
movapd %xmm1,%xmm0
jmp    119a <main+0x7a>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d %lf %lf\00"
@.str.1 = [5 x i8] c"%.2f\00"
@.str.2 = [12 x i8] c"%.2f\0Areduce\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %2, double* %4, double* %3)
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %12, label %9
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 3
br i1 %11, label %12, label %17
12: ; preds = %9, %0
%13 = load double, double* %4
%14 = load double, double* %3
%15 = fmul double %13, %14
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %15)
br label %44
17: ; preds = %9
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %26
20: ; preds = %17
%21 = load double, double* %4
%22 = load double, double* %3
%23 = fmul double %21, %22
%24 = fdiv double %23, 5.000000e+01
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %24)
br label %43
26: ; preds = %17
%27 = load double, double* %4
%28 = load double, double* %3
%29 = fmul double %27, %28
%30 = fdiv double %29, 5.000000e+01
store double %30, double* %5
%31 = load double, double* %5
%32 = load double, double* %3
%33 = fmul double 0x3FE6666666666666, %32
%34 = fcmp ogt double %31, %33
br i1 %34, label %35, label %39
35: ; preds = %26
%36 = load double, double* %3
%37 = fmul double 0x3FE6666666666666, %36
%38 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %37)
br label %42
39: ; preds = %26
%40 = load double, double* %5
%41 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %40)
br label %42
42: ; preds = %39, %35
br label %43
43: ; preds = %42, %20
br label %44
44: ; preds = %43, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d %lf %lf\00"
@.str.1 = [5 x i8] c"%.2f\00"
@.str.2 = [12 x i8] c"%.2f\0Areduce\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %1, double* %3, double* %2)
%8 = load i32, i32* %1
%9 = and i32 %8, -3
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %16
11: ; preds = %0
%12 = load double, double* %3
%13 = load double, double* %2
%14 = fmul double %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %14)
br label %31
16: ; preds = %0
%17 = icmp eq i32 %8, 2
%18 = load double, double* %3
%19 = load double, double* %2
%20 = fmul double %18, %19
%21 = fdiv double %20, 5.000000e+01
br i1 %17, label %22, label %24
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %21)
br label %31
24: ; preds = %16
%25 = fmul double %19, 0x3FE6666666666666
%26 = fcmp ogt double %21, %25
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %25)
br label %31
29: ; preds = %24
%30 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %21)
br label %31
31: ; preds = %27, %29, %22, %11
ret i32 0
}