#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 stotice(int stevilo) {
  switch (stevilo) {
  case 0:
    return 0;
    break;
  case 100:
    return 10;
    break;
  case 200:
    return 10;
    break;
  case 300:
    return 12;
    break;
  case 400:
    return 11;
    break;
  case 500:
    return 11;
    break;
  case 600:
    return 10;
    break;
  case 700:
    return 12;
    break;
  case 800:
    return 12;
    break;
  case 900:
    return 11;
    break;
  case 1000:
    return 11;
  }
  printf("STOTICE ERROR\n");
  return 0;
}


x86 assembly (clang, -O0):
<stotice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     11ea <stotice+0xda>
jmp    112e <stotice+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x64,%eax
je     11f6 <stotice+0xe6>
jmp    113f <stotice+0x2f>
mov    -0xc(%rbp),%eax
sub    $0xc8,%eax
je     1202 <stotice+0xf2>
jmp    1152 <stotice+0x42>
mov    -0xc(%rbp),%eax
sub    $0x12c,%eax
je     120e <stotice+0xfe>
jmp    1165 <stotice+0x55>
mov    -0xc(%rbp),%eax
sub    $0x190,%eax
je     121a <stotice+0x10a>
jmp    1178 <stotice+0x68>
mov    -0xc(%rbp),%eax
sub    $0x1f4,%eax
je     1226 <stotice+0x116>
jmp    118b <stotice+0x7b>
mov    -0xc(%rbp),%eax
sub    $0x258,%eax
je     1232 <stotice+0x122>
jmp    119e <stotice+0x8e>
mov    -0xc(%rbp),%eax
sub    $0x2bc,%eax
je     123e <stotice+0x12e>
jmp    11b1 <stotice+0xa1>
mov    -0xc(%rbp),%eax
sub    $0x320,%eax
je     124a <stotice+0x13a>
jmp    11c4 <stotice+0xb4>
mov    -0xc(%rbp),%eax
sub    $0x384,%eax
je     1256 <stotice+0x146>
jmp    11d7 <stotice+0xc7>
mov    -0xc(%rbp),%eax
sub    $0x3e8,%eax
je     1262 <stotice+0x152>
jmp    126e <stotice+0x15e>
movl   $0x0,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xa,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xa,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xc,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xb,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xb,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xa,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xc,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xc,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xb,-0x4(%rbp)
jmp    1281 <stotice+0x171>
movl   $0xb,-0x4(%rbp)
jmp    1281 <stotice+0x171>
lea    0xd8b(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stotice>:
mov    %edi,%eax
cmp    $0x1f3,%edi
jle    1138 <stotice+0x28>
cmp    $0x31f,%eax
jg     115a <stotice+0x4a>
cmp    $0x1f4,%eax
je     1154 <stotice+0x44>
cmp    $0x258,%eax
je     1184 <stotice+0x74>
cmp    $0x2bc,%eax
je     1175 <stotice+0x65>
jmp    118a <stotice+0x7a>
cmp    $0xc7,%eax
jle    117b <stotice+0x6b>
cmp    $0xc8,%eax
je     1184 <stotice+0x74>
cmp    $0x12c,%eax
je     1175 <stotice+0x65>
cmp    $0x190,%eax
jne    118a <stotice+0x7a>
mov    $0xb,%eax
ret
cmp    $0x320,%eax
je     1175 <stotice+0x65>
cmp    $0x384,%eax
je     116f <stotice+0x5f>
cmp    $0x3e8,%eax
jne    118a <stotice+0x7a>
mov    $0xb,%eax
ret
mov    $0xc,%eax
ret
test   %eax,%eax
je     119d <stotice+0x8d>
cmp    $0x64,%eax
jne    118a <stotice+0x7a>
mov    $0xa,%eax
ret
push   %rax
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"STOTICE ERROR\0A\00"
define i32 @stotice(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %16 [
i32 0, label %5
i32 100, label %6
i32 200, label %7
i32 300, label %8
i32 400, label %9
i32 500, label %10
i32 600, label %11
i32 700, label %12
i32 800, label %13
i32 900, label %14
i32 1000, label %15
]
5: ; preds = %1
store i32 0, i32* %2
br label %18
6: ; preds = %1
store i32 10, i32* %2
br label %18
7: ; preds = %1
store i32 10, i32* %2
br label %18
8: ; preds = %1
store i32 12, i32* %2
br label %18
9: ; preds = %1
store i32 11, i32* %2
br label %18
10: ; preds = %1
store i32 11, i32* %2
br label %18
11: ; preds = %1
store i32 10, i32* %2
br label %18
12: ; preds = %1
store i32 12, i32* %2
br label %18
13: ; preds = %1
store i32 12, i32* %2
br label %18
14: ; preds = %1
store i32 11, i32* %2
br label %18
15: ; preds = %1
store i32 11, i32* %2
br label %18
16: ; preds = %1
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %18
18: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@str = [14 x i8] c"STOTICE ERROR\00"
define i32 @stotice(i32 %0) {
switch i32 %0, label %12 [
i32 0, label %14
i32 100, label %2
i32 200, label %3
i32 300, label %4
i32 400, label %5
i32 500, label %6
i32 600, label %7
i32 700, label %8
i32 800, label %9
i32 900, label %10
i32 1000, label %11
]
2: ; preds = %1
br label %14
3: ; preds = %1
br label %14
4: ; preds = %1
br label %14
5: ; preds = %1
br label %14
6: ; preds = %1
br label %14
7: ; preds = %1
br label %14
8: ; preds = %1
br label %14
9: ; preds = %1
br label %14
10: ; preds = %1
br label %14
11: ; preds = %1
br label %14
12: ; preds = %1
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %1, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%15 = phi i32 [ 0, %12 ], [ 11, %11 ], [ 11, %10 ], [ 12, %9 ], [ 12, %8 ], [ 10, %7 ], [ 11, %6 ], [ 11, %5 ], [ 12, %4 ], [ 10, %3 ], [ 10, %2 ], [ %0, %1 ]
ret i32 %15
}