#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int sira;
  printf("Kaçıncı sıradaki gezegenin adını öğrenmek istiyorsunuz?: ");
  scanf("%d", &sira);
  char *gezegen_adi;
  switch (sira) {
  case 1:
    gezegen_adi = "MERKÜR";
    break;
  case 2:
    gezegen_adi = "VENÜS";
    break;
  case 3:
    gezegen_adi = "DÜNYA";
    break;
  case 4:
    gezegen_adi = "MARS";
    break;
  case 5:
    gezegen_adi = "JÜPİTER";
    break;
  case 6:
    gezegen_adi = "SATÜRN";
    break;
  case 7:
    gezegen_adi = "URANÜS";
    break;
  case 8:
    gezegen_adi = "NEPTÜN";
    break;
  default:
    printf("Girdiginiz Sayı Mevcut Güneş Sisteminde Bir Gezegenle Temsil "
           "Edilmemektedir.");
    break;
  }
  if (sira < 9 && sira > 0) {
    printf("%d. Gezegenimizin adi %s ", sira, gezegen_adi);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1e(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x7,%eax
ja     11f6 <main+0xd6>
mov    -0x18(%rbp),%rax
lea    0xe93(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xee8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xee0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xed7(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xec3(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xebd(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xeb5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xead(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1204 <main+0xe4>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x9,-0x8(%rbp)
jge    122d <main+0x10d>
cmpl   $0x0,-0x8(%rbp)
jle    122d <main+0x10d>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    -0x1(%rsi),%eax
cmp    $0x8,%eax
jae    116c <main+0x4c>
cltq
lea    0xf97(%rip),%rcx
movslq (%rcx,%rax,4),%rdx
add    %rcx,%rdx
lea    0xf6f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    117a <main+0x5a>
lea    0xf0f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [66 x i8] c"Ka\C3\A7\C4\B1nc\C4\B1 s\C4\B1radaki gezegenin ad\C4\B1n\C4\B1 \C3\B6\C4\9Frenmek istiyorsunuz?: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [8 x i8] c"MERK\C3\9CR\00"
@.str.3 = [7 x i8] c"VEN\C3\9CS\00"
@.str.4 = [7 x i8] c"D\C3\9CNYA\00"
@.str.5 = [5 x i8] c"MARS\00"
@.str.6 = [10 x i8] c"J\C3\9CP\C4\B0TER\00"
@.str.7 = [8 x i8] c"SAT\C3\9CRN\00"
@.str.8 = [8 x i8] c"URAN\C3\9CS\00"
@.str.9 = [8 x i8] c"NEPT\C3\9CN\00"
@.str.10 = [80 x i8] c"Girdiginiz Say\C4\B1 Mevcut G\C3\BCne\C5\9F Sisteminde Bir Gezegenle Temsil Edilmemektedir.\00"
@.str.11 = [26 x i8] c"%d. Gezegenimizin adi %s \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
switch i32 %6, label %15 [
i32 1, label %7
i32 2, label %8
i32 3, label %9
i32 4, label %10
i32 5, label %11
i32 6, label %12
i32 7, label %13
i32 8, label %14
]
7: ; preds = %0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %17
8: ; preds = %0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %17
9: ; preds = %0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %17
10: ; preds = %0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %17
11: ; preds = %0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %17
12: ; preds = %0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %17
13: ; preds = %0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %17
14: ; preds = %0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %17
15: ; preds = %0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.10, i64 0, i64 0))
br label %17
17: ; preds = %15, %14, %13, %12, %11, %10, %9, %8, %7
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 9
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp sgt i32 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i32, i32* %2
%25 = load i8*, i8** %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %24, i8* %25)
br label %27
27: ; preds = %23, %20, %17
ret i32 0
}

LLVM IR (-O2):
@.str = [66 x i8] c"Ka\C3\A7\C4\B1nc\C4\B1 s\C4\B1radaki gezegenin ad\C4\B1n\C4\B1 \C3\B6\C4\9Frenmek istiyorsunuz?: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [8 x i8] c"MERK\C3\9CR\00"
@.str.3 = [7 x i8] c"VEN\C3\9CS\00"
@.str.4 = [7 x i8] c"D\C3\9CNYA\00"
@.str.5 = [5 x i8] c"MARS\00"
@.str.6 = [10 x i8] c"J\C3\9CP\C4\B0TER\00"
@.str.7 = [8 x i8] c"SAT\C3\9CRN\00"
@.str.8 = [8 x i8] c"URAN\C3\9CS\00"
@.str.9 = [8 x i8] c"NEPT\C3\9CN\00"
@.str.10 = [80 x i8] c"Girdiginiz Say\C4\B1 Mevcut G\C3\BCne\C5\9F Sisteminde Bir Gezegenle Temsil Edilmemektedir.\00"
@.str.11 = [26 x i8] c"%d. Gezegenimizin adi %s \00"
@reltable.main = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.2 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.8 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.9 to i64), i64 ptrtoint ([8 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -1
%7 = icmp ult i32 %6, 8
br i1 %7, label %13, label %8
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.10, i64 0, i64 0))
%10 = load i32, i32* %1
%11 = add i32 %10, -9
%12 = icmp ult i32 %11, -8
br label %18
13: ; preds = %0
%14 = sext i32 %6 to i64
%15 = shl i64 %14, 2
%16 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.main to i8*), i64 %15)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %5, i8* %16)
br label %18
18: ; preds = %8, %13
ret i32 0
}