#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 desetice(int stevilo) {
  switch (stevilo) {
  case 0:
    return 0;
    break;
  case 10:
    return 3;
    break;
  case 20:
    return 6;
    break;
  case 30:
    return 6;
    break;
  case 40:
    return 5;
    break;
  case 50:
    return 5;
    break;
  case 60:
    return 5;
    break;
  case 70:
    return 7;
    break;
  case 80:
    return 6;
    break;
  case 90:
    return 6;
    break;
  }
  printf("DESETICE ERROR\n");
  return 0;
}


x86 assembly (clang, -O0):
<desetice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x5a,%rax
ja     11b8 <desetice+0xa8>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x3,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x6,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x6,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x5,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x5,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x5,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x7,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x6,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
movl   $0x6,-0x4(%rbp)
jmp    11cb <desetice+0xbb>
lea    0xfad(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<desetice>:
push   %rax
cmp    $0x5a,%edi
ja     1138 <desetice+0x28>
mov    %edi,%eax
mov    %edi,%ecx
lea    0xedf(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x6,%eax
pop    %rcx
ret
mov    $0x5,%eax
pop    %rcx
ret
lea    0x102d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x3,%eax
pop    %rcx
ret
mov    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"DESETICE ERROR\0A\00"
define i32 @desetice(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 0, label %5
i32 10, label %6
i32 20, label %7
i32 30, label %8
i32 40, label %9
i32 50, label %10
i32 60, label %11
i32 70, label %12
i32 80, label %13
i32 90, label %14
]
5: ; preds = %1
store i32 0, i32* %2
br label %17
6: ; preds = %1
store i32 3, i32* %2
br label %17
7: ; preds = %1
store i32 6, i32* %2
br label %17
8: ; preds = %1
store i32 6, i32* %2
br label %17
9: ; preds = %1
store i32 5, i32* %2
br label %17
10: ; preds = %1
store i32 5, i32* %2
br label %17
11: ; preds = %1
store i32 5, i32* %2
br label %17
12: ; preds = %1
store i32 7, i32* %2
br label %17
13: ; preds = %1
store i32 6, i32* %2
br label %17
14: ; preds = %1
store i32 6, i32* %2
br label %17
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %17
17: ; preds = %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@str = [15 x i8] c"DESETICE ERROR\00"
define i32 @desetice(i32 %0) {
switch i32 %0, label %11 [
i32 0, label %13
i32 10, label %2
i32 20, label %3
i32 30, label %4
i32 40, label %5
i32 50, label %6
i32 60, label %7
i32 70, label %8
i32 80, label %9
i32 90, label %10
]
2: ; preds = %1
br label %13
3: ; preds = %1
br label %13
4: ; preds = %1
br label %13
5: ; preds = %1
br label %13
6: ; preds = %1
br label %13
7: ; preds = %1
br label %13
8: ; preds = %1
br label %13
9: ; preds = %1
br label %13
10: ; preds = %1
br label %13
11: ; preds = %1
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %13
13: ; preds = %1, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%14 = phi i32 [ 0, %11 ], [ 6, %10 ], [ 6, %9 ], [ 7, %8 ], [ 5, %7 ], [ 5, %6 ], [ 5, %5 ], [ 6, %4 ], [ 6, %3 ], [ 3, %2 ], [ %0, %1 ]
ret i32 %14
}