#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*/ hanoi_kuleleri(int, char, char, char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int disklerin_sayisi;
  printf("Cubukta kac disk oldugunu giriniz: ");
  scanf("%d", &disklerin_sayisi);
  char disklerin_bulundugu_cubuk_adi;
  printf("Disklerin bulundugu cubugun adini giriniz(1 karakter giriniz): ");
  scanf(" %c", &disklerin_bulundugu_cubuk_adi);
  char ara_tasima_cubugu_adi;
  printf("Ara tasima cubugunun adini giriniz(1 karakter giriniz): ");
  scanf(" %c", &ara_tasima_cubugu_adi);
  char disklerin_tasindigi_cubuk_adi;
  printf("Disklerin tasincagi cubugun adini giriniz(1 karakter giriniz): ");
  scanf(" %c", &disklerin_tasindigi_cubuk_adi);
  hanoi_kuleleri(disklerin_sayisi, disklerin_bulundugu_cubuk_adi,
                 ara_tasima_cubugu_adi, disklerin_tasindigi_cubuk_adi);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0xa(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0xb(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0x9(%rbp),%cl
mov    -0xa(%rbp),%al
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0xb(%rbp),%ecx
call   1040 <hanoi_kuleleri@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
lea    0xf00(%rip),%rbx
lea    0xb(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
lea    0xa(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf0c(%rip),%rdi
call   1030 <printf@plt>
lea    0x9(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
movsbl 0xb(%rsp),%esi
movsbl 0xa(%rsp),%edx
movsbl 0x9(%rsp),%ecx
call   1040 <hanoi_kuleleri@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Cubukta kac disk oldugunu giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [64 x i8] c"Disklerin bulundugu cubugun adini giriniz(1 karakter giriniz): \00"
@.str.3 = [4 x i8] c" %c\00"
@.str.4 = [57 x i8] c"Ara tasima cubugunun adini giriniz(1 karakter giriniz): \00"
@.str.5 = [64 x i8] c"Disklerin tasincagi cubugun adini giriniz(1 karakter giriniz): \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i32 0, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%10 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%12 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%14 = load i32, i32* %2
%15 = load i8, i8* %3
%16 = load i8, i8* %4
%17 = load i8, i8* %5
%18 = call i32 @hanoi_kuleleri(i32 %14, i8 signext %15, i8 signext %16, i8 signext %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Cubukta kac disk oldugunu giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [64 x i8] c"Disklerin bulundugu cubugun adini giriniz(1 karakter giriniz): \00"
@.str.3 = [4 x i8] c" %c\00"
@.str.4 = [57 x i8] c"Ara tasima cubugunun adini giriniz(1 karakter giriniz): \00"
@.str.5 = [64 x i8] c"Disklerin tasincagi cubugun adini giriniz(1 karakter giriniz): \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = bitcast i32* %1 to i8*
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%10 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %3)
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%14 = load i32, i32* %1
%15 = load i8, i8* %2
%16 = load i8, i8* %3
%17 = load i8, i8* %4
%18 = call i32 @hanoi_kuleleri(i32 %14, i8 signext %15, i8 signext %16, i8 signext %17)
ret i32 0
}