#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 *, double *);
int main(int argc, const char *argv[]) {
  double x;
  scanf("%lf", &x);
  if (x < 1)
    printf("%.2lf\n", x);
  else if (x < 10)
    printf("%.2lf\n", 2 * x - 1);
  else
    printf("%.2lf\n", 3 * x - 11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeeb(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeb2(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    116f <main+0x4f>
cvttsd2si -0x18(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xbe>
movsd  0xe91(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11ac <main+0x8c>
movsd  -0x18(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe8d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    11d9 <main+0xb9>
movsd  -0x18(%rbp),%xmm0
movsd  0xe57(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe53(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
jmp    11de <main+0xbe>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0xec3(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     116f <main+0x4f>
movsd  0xebd(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    115f <main+0x3f>
addsd  %xmm0,%xmm0
addsd  0xec3(%rip),%xmm0
jmp    116f <main+0x4f>
mulsd  0xea9(%rip),%xmm0
addsd  0xea9(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%8 = load double, double* %6
%9 = fcmp olt double %8, 1.000000e+00
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load double, double* %6
%12 = fptosi double %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %28
14: ; preds = %2
%15 = load double, double* %6
%16 = fcmp olt double %15, 1.000000e+01
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load double, double* %6
%19 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %18, double -1.000000e+00)
%20 = fptosi double %19 to i32
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %27
22: ; preds = %14
%23 = load double, double* %6
%24 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %23, double -1.100000e+01)
%25 = fptosi double %24 to i32
%26 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %22, %17
br label %28
28: ; preds = %27, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = fcmp olt double %6, 1.000000e+00
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = fcmp olt double %6, 1.000000e+01
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = call double @llvm.fmuladd.f64(double %6, double 2.000000e+00, double -1.000000e+00)
br label %14
12: ; preds = %8
%13 = call double @llvm.fmuladd.f64(double %6, double 3.000000e+00, double -1.100000e+01)
br label %14
14: ; preds = %2, %10, %12
%15 = phi double [ %11, %10 ], [ %13, %12 ], [ %6, %2 ]
%16 = fptosi double %15 to i32
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}