#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 *);
void SizeViolin(double boardLength) {
  int indicator = 0;
  if (boardLength >= 280 && boardLength < 300) {
    indicator = 1;
  }
  if (boardLength >= 300 && boardLength < 320) {
    indicator = 2;
  }
  if (boardLength >= 320 && boardLength < 340) {
    indicator = 3;
  }
  if (boardLength >= 340 && boardLength < 350) {
    indicator = 4;
  }
  if (boardLength >= 350 && boardLength <= 360) {
    indicator = 5;
  }
  switch (indicator) {
  case 1:
    printf("1/4\n\n");
    break;
  case 2:
    printf("1/2\n\n");
    break;
  case 3:
    printf("3/4\n\n");
    break;
  case 4:
    printf("7/8\n\n");
    break;
  case 5:
    printf("4/4\n\n");
    break;
  default:
    printf("Niewymiarowe skrzypce\n\n");
    break;
  }
}


x86 assembly (clang, -O0):
<SizeViolin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1155 <SizeViolin+0x45>
movsd  0xec5(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1155 <SizeViolin+0x45>
movl   $0x1,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1186 <SizeViolin+0x76>
movsd  0xe9c(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1186 <SizeViolin+0x76>
movl   $0x2,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11b7 <SizeViolin+0xa7>
movsd  0xe73(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11b7 <SizeViolin+0xa7>
movl   $0x3,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe54(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11e8 <SizeViolin+0xd8>
movsd  0xe4a(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11e8 <SizeViolin+0xd8>
movl   $0x4,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe2b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1219 <SizeViolin+0x109>
movsd  0xe21(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1219 <SizeViolin+0x109>
movl   $0x5,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4,%eax
ja     1297 <SizeViolin+0x187>
mov    -0x18(%rbp),%rax
lea    0xdf7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
jmp    12a3 <SizeViolin+0x193>
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
jmp    12a3 <SizeViolin+0x193>
lea    0xde5(%rip),%rdi
call   1030 <printf@plt>
jmp    12a3 <SizeViolin+0x193>
lea    0xdda(%rip),%rdi
call   1030 <printf@plt>
jmp    12a3 <SizeViolin+0x193>
lea    0xdcf(%rip),%rdi
call   1030 <printf@plt>
jmp    12a3 <SizeViolin+0x193>
lea    0xdc4(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SizeViolin>:
ucomisd 0xee8(%rip),%xmm0
setb   %al
movsd  0xee5(%rip),%xmm1
ucomisd %xmm0,%xmm1
setbe  %cl
or     %al,%cl
movzbl %cl,%eax
neg    %eax
movsd  0xed7(%rip),%xmm2
ucomisd %xmm0,%xmm2
mov    $0x1,%ecx
cmovbe %eax,%ecx
ucomisd %xmm1,%xmm0
cmovb  %eax,%ecx
movsd  0xec4(%rip),%xmm1
ucomisd %xmm0,%xmm1
mov    $0x2,%eax
cmovbe %ecx,%eax
ucomisd %xmm2,%xmm0
cmovb  %ecx,%eax
movsd  0xeb1(%rip),%xmm2
ucomisd %xmm0,%xmm2
mov    $0x3,%ecx
cmovbe %eax,%ecx
ucomisd %xmm1,%xmm0
cmovb  %eax,%ecx
movsd  0xe9e(%rip),%xmm1
ucomisd %xmm0,%xmm1
mov    $0x4,%eax
cmovb  %ecx,%eax
ucomisd %xmm2,%xmm0
cmovb  %ecx,%eax
cmp    $0x4,%eax
ja     11b7 <SizeViolin+0xa7>
cltq
lea    0xeb5(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <puts@plt>
lea    0xe8b(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"1/4\0A\0A\00"
@.str.1 = [6 x i8] c"1/2\0A\0A\00"
@.str.2 = [6 x i8] c"3/4\0A\0A\00"
@.str.3 = [6 x i8] c"7/8\0A\0A\00"
@.str.4 = [6 x i8] c"4/4\0A\0A\00"
@.str.5 = [24 x i8] c"Niewymiarowe skrzypce\0A\0A\00"
define void @SizeViolin(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
store i32 0, i32* %3
%4 = load double, double* %2
%5 = fcmp oge double %4, 2.800000e+02
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp olt double %7, 3.000000e+02
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %3
br label %10
10: ; preds = %9, %6, %1
%11 = load double, double* %2
%12 = fcmp oge double %11, 3.000000e+02
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load double, double* %2
%15 = fcmp olt double %14, 3.200000e+02
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 2, i32* %3
br label %17
17: ; preds = %16, %13, %10
%18 = load double, double* %2
%19 = fcmp oge double %18, 3.200000e+02
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load double, double* %2
%22 = fcmp olt double %21, 3.400000e+02
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 3, i32* %3
br label %24
24: ; preds = %23, %20, %17
%25 = load double, double* %2
%26 = fcmp oge double %25, 3.400000e+02
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load double, double* %2
%29 = fcmp olt double %28, 3.500000e+02
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 4, i32* %3
br label %31
31: ; preds = %30, %27, %24
%32 = load double, double* %2
%33 = fcmp oge double %32, 3.500000e+02
br i1 %33, label %34, label %38
34: ; preds = %31
%35 = load double, double* %2
%36 = fcmp ole double %35, 3.600000e+02
br i1 %36, label %37, label %38
37: ; preds = %34
store i32 5, i32* %3
br label %38
38: ; preds = %37, %34, %31
%39 = load i32, i32* %3
switch i32 %39, label %50 [
i32 1, label %40
i32 2, label %42
i32 3, label %44
i32 4, label %46
i32 5, label %48
]
40: ; preds = %38
%41 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %52
42: ; preds = %38
%43 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %52
44: ; preds = %38
%45 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %52
46: ; preds = %38
%47 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %52
48: ; preds = %38
%49 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %52
50: ; preds = %38
%51 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
br label %52
52: ; preds = %50, %48, %46, %44, %42, %40
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"4/4\0A\00"
@str.6 = [5 x i8] c"7/8\0A\00"
@str.7 = [5 x i8] c"3/4\0A\00"
@str.8 = [5 x i8] c"1/2\0A\00"
@str.9 = [5 x i8] c"1/4\0A\00"
@str.10 = [23 x i8] c"Niewymiarowe skrzypce\0A\00"
@reltable.SizeViolin = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.9 to i64), i64 ptrtoint ([5 x i32]* @reltable.SizeViolin to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.8 to i64), i64 ptrtoint ([5 x i32]* @reltable.SizeViolin to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.7 to i64), i64 ptrtoint ([5 x i32]* @reltable.SizeViolin to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.6 to i64), i64 ptrtoint ([5 x i32]* @reltable.SizeViolin to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str to i64), i64 ptrtoint ([5 x i32]* @reltable.SizeViolin to i64)) to i32)]
define void @SizeViolin(double %0) {
%2 = fcmp ult double %0, 2.800000e+02
%3 = fcmp uge double %0, 3.000000e+02
%4 = fcmp oge double %0, 3.000000e+02
%5 = fcmp olt double %0, 3.200000e+02
%6 = and i1 %4, %5
%7 = fcmp oge double %0, 3.200000e+02
%8 = fcmp olt double %0, 3.400000e+02
%9 = and i1 %7, %8
%10 = fcmp oge double %0, 3.400000e+02
%11 = fcmp olt double %0, 3.500000e+02
%12 = and i1 %10, %11
%13 = fcmp oge double %0, 3.500000e+02
%14 = fcmp ole double %0, 3.600000e+02
%15 = and i1 %13, %14
%16 = or i1 %2, %3
%17 = sext i1 %16 to i32
%18 = select i1 %6, i32 1, i32 %17
%19 = select i1 %9, i32 2, i32 %18
%20 = select i1 %12, i32 3, i32 %19
%21 = select i1 %15, i32 4, i32 %20
%22 = icmp ult i32 %21, 5
br i1 %22, label %23, label %27
23: ; preds = %1
%24 = sext i32 %21 to i64
%25 = shl i64 %24, 2
%26 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.SizeViolin to i8*), i64 %25)
br label %27
27: ; preds = %1, %23
%28 = phi i8* [ %26, %23 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.10, i64 0, i64 0), %1 ]
%29 = tail call i32 @puts(i8* dereferenceable(1) %28)
ret void
}