#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 onlar(int a) {
  int on = a % 100;
  on /= 10;
  switch (on) {
  case 1:
    printf("on ");
    break;
  case 2:
    printf("yirmi ");
    break;
  case 3:
    printf("otuz ");
    break;
  case 4:
    printf("kirk ");
    break;
  case 5:
    printf("elli ");
    break;
  case 6:
    printf("atmis ");
    break;
  case 7:
    printf("yetmis ");
    break;
  case 8:
    printf("seksen ");
    break;
  case 9:
    printf("doksan ");
    break;
  }
}


x86 assembly (clang, -O0):
<onlar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    %ecx,%eax
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x8,%eax
ja     1215 <onlar+0x105>
mov    -0x10(%rbp),%rax
lea    0xe88(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <onlar+0x105>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onlar>:
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%ecx
movswl %cx,%eax
shr    $0xf,%ecx
shr    $0xa,%eax
add    %cl,%al
add    $0xff,%al
cmp    $0x8,%al
ja     115d <onlar+0x4d>
movsbq %al,%rax
lea    0xeeb(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"on \00"
@.str.1 = [7 x i8] c"yirmi \00"
@.str.2 = [6 x i8] c"otuz \00"
@.str.3 = [6 x i8] c"kirk \00"
@.str.4 = [6 x i8] c"elli \00"
@.str.5 = [7 x i8] c"atmis \00"
@.str.6 = [8 x i8] c"yetmis \00"
@.str.7 = [8 x i8] c"seksen \00"
@.str.8 = [8 x i8] c"doksan \00"
define void @onlar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 100
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 10
store i32 %7, i32* %3
%8 = load i32, i32* %3
switch i32 %8, label %27 [
i32 1, label %9
i32 2, label %11
i32 3, label %13
i32 4, label %15
i32 5, label %17
i32 6, label %19
i32 7, label %21
i32 8, label %23
i32 9, label %25
]
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %27
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %27
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %27
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %27
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %27
19: ; preds = %1
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %27
21: ; preds = %1
%22 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %27
23: ; preds = %1
%24 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %27
25: ; preds = %1
%26 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %27
27: ; preds = %1, %25, %23, %21, %19, %17, %15, %13, %11, %9
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"on \00"
@.str.1 = [7 x i8] c"yirmi \00"
@.str.2 = [6 x i8] c"otuz \00"
@.str.3 = [6 x i8] c"kirk \00"
@.str.4 = [6 x i8] c"elli \00"
@.str.5 = [7 x i8] c"atmis \00"
@.str.6 = [8 x i8] c"yetmis \00"
@.str.7 = [8 x i8] c"seksen \00"
@.str.8 = [8 x i8] c"doksan \00"
@reltable.onlar = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.5 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.6 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.8 to i64), i64 ptrtoint ([9 x i32]* @reltable.onlar to i64)) to i32)]
define void @onlar(i32 %0) {
%2 = srem i32 %0, 100
%3 = trunc i32 %2 to i8
%4 = sdiv i8 %3, 10
%5 = add nsw i8 %4, -1
%6 = icmp ult i8 %5, 9
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = sext i8 %5 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.onlar to i8*), i64 %9)
%11 = tail call i32 @printf(i8* dereferenceable(1) %10)
br label %12
12: ; preds = %1, %7
ret void
}