#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 birler(int a) {
  int bir = a % 10;
  switch (bir) {
  case 1:
    printf("bir\n");
    break;
  case 2:
    printf("iki\n");
    break;
  case 3:
    printf("uc\n");
    break;
  case 4:
    printf("dort\n");
    break;
  case 5:
    printf("bes\n");
    break;
  case 6:
    printf("alti\n");
    break;
  case 7:
    printf("yedi\n");
    break;
  case 8:
    printf("sekiz\n");
    break;
  case 9:
    printf("dokuz\n");
    break;
  }
}


x86 assembly (clang, -O0):
<birler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    %ecx,%eax
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
add    %edx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     11fe <birler+0xee>
mov    -0x10(%rbp),%rax
lea    0xe9f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
jmp    11fe <birler+0xee>
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<birler>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
not    %ecx
add    %ecx,%eax
cmp    $0x8,%eax
ja     114a <birler+0x3a>
cltq
lea    0xeee(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [5 x i8] c"bir\0A\00"
@.str.1 = [5 x i8] c"iki\0A\00"
@.str.2 = [4 x i8] c"uc\0A\00"
@.str.3 = [6 x i8] c"dort\0A\00"
@.str.4 = [5 x i8] c"bes\0A\00"
@.str.5 = [6 x i8] c"alti\0A\00"
@.str.6 = [6 x i8] c"yedi\0A\00"
@.str.7 = [7 x i8] c"sekiz\0A\00"
@.str.8 = [7 x i8] c"dokuz\0A\00"
define void @birler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
switch i32 %6, label %25 [
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
i32 6, label %17
i32 7, label %19
i32 8, label %21
i32 9, label %23
]
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %25
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %25
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %25
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %25
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %25
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %25
19: ; preds = %1
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %25
21: ; preds = %1
%22 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %25
23: ; preds = %1
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %25
25: ; preds = %1, %23, %21, %19, %17, %15, %13, %11, %9, %7
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"dokuz\00"
@str.9 = [6 x i8] c"sekiz\00"
@str.10 = [5 x i8] c"yedi\00"
@str.11 = [5 x i8] c"alti\00"
@str.12 = [4 x i8] c"bes\00"
@str.13 = [5 x i8] c"dort\00"
@str.14 = [3 x i8] c"uc\00"
@str.15 = [4 x i8] c"iki\00"
@str.16 = [4 x i8] c"bir\00"
@reltable.birler = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.16 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.15 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @str.14 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.13 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @str.12 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.11 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @str.10 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str.9 to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @str to i64), i64 ptrtoint ([9 x i32]* @reltable.birler to i64)) to i32)]
define void @birler(i32 %0) {
%2 = srem i32 %0, 10
%3 = add nsw i32 %2, -1
%4 = icmp ult i32 %3, 9
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.birler to i8*), i64 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %1, %5
ret void
}