#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*/ kup();
int /*<<< orphan*/ logg();
int /*<<< orphan*/ max();
int /*<<< orphan*/ min();
int /*<<< orphan*/ mutlak();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Hangi islemi yapmak istiyorsaniz yanindaki rakami giriniz.\n1. Iki "
         "sayinin minimumunu bulma.\n2. Iki sayinin maximumunu bulma.\n3. "
         "Logaritma.\n4. Bir sayinin kupunu alma.\n5. Bir sayinin mutlak "
         "degerini alma.\nCikmak icin 1-5 disinda bir deger giriniz.\n");
  scanf("%d", &n);
  switch (n) {
  case 1:
    printf("%lf\n", min());
    break;
  case 2:
    printf("%lf\n", max());
    break;
  case 3:
    printf("%lf\n", logg());
    break;
  case 4:
    printf("%lf\n", kup());
    break;
  case 5:
    printf("%lf\n", mutlak());
    break;
  default:
    printf("Cikis yapiliyor.\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf78(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4,%eax
ja     1252 <main+0xe2>
mov    -0x10(%rbp),%rax
lea    0xe43(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <min@plt>
mov    %eax,%esi
lea    0xf39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1260 <main+0xf0>
mov    $0x0,%al
call   1050 <max@plt>
mov    %eax,%esi
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1260 <main+0xf0>
mov    $0x0,%al
call   1060 <logg@plt>
mov    %eax,%esi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1260 <main+0xf0>
mov    $0x0,%al
call   1090 <kup@plt>
mov    %eax,%esi
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1260 <main+0xf0>
mov    $0x0,%al
call   1080 <mutlak@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1260 <main+0xf0>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
lea    0xe80(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x4,%eax
ja     11c3 <main+0x43>
lea    0xe4f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
call   1050 <min@plt>
jmp    11f3 <main+0x73>
lea    0xf49(%rip),%rdi
call   1030 <puts@plt>
jmp    1203 <main+0x83>
xor    %eax,%eax
call   1060 <max@plt>
jmp    11f3 <main+0x73>
xor    %eax,%eax
call   1070 <logg@plt>
jmp    11f3 <main+0x73>
xor    %eax,%eax
call   10a0 <kup@plt>
jmp    11f3 <main+0x73>
xor    %eax,%eax
call   1090 <mutlak@plt>
lea    0xe1d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [248 x i8] c"Hangi islemi yapmak istiyorsaniz yanindaki rakami giriniz.\0A1. Iki sayinin minimumunu bulma.\0A2. Iki sayinin maximumunu bulma.\0A3. Logaritma.\0A4. Bir sayinin kupunu alma.\0A5. Bir sayinin mutlak degerini alma.\0ACikmak icin 1-5 disinda bir deger giriniz.\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%lf\0A\00"
@.str.3 = [18 x i8] c"Cikis yapiliyor.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([248 x i8], [248 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* %2)
%5 = load i32, i32* %2
switch i32 %5, label %21 [
i32 1, label %6
i32 2, label %9
i32 3, label %12
i32 4, label %15
i32 5, label %18
]
6: ; preds = %0
%7 = call i32 (...) @min()
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %7)
br label %23
9: ; preds = %0
%10 = call i32 (...) @max()
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %10)
br label %23
12: ; preds = %0
%13 = call i32 (...) @logg()
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %23
15: ; preds = %0
%16 = call i32 (...) @kup()
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %16)
br label %23
18: ; preds = %0
%19 = call i32 (...) @mutlak()
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %23
21: ; preds = %0
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %23
23: ; preds = %21, %18, %15, %12, %9, %6
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%lf\0A\00"
@str = [247 x i8] c"Hangi islemi yapmak istiyorsaniz yanindaki rakami giriniz.\0A1. Iki sayinin minimumunu bulma.\0A2. Iki sayinin maximumunu bulma.\0A3. Logaritma.\0A4. Bir sayinin kupunu alma.\0A5. Bir sayinin mutlak degerini alma.\0ACikmak icin 1-5 disinda bir deger giriniz.\00"
@str.4 = [17 x i8] c"Cikis yapiliyor.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([247 x i8], [247 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
switch i32 %5, label %21 [
i32 1, label %6
i32 2, label %9
i32 3, label %12
i32 4, label %15
i32 5, label %18
]
6: ; preds = %0
%7 = call i32 (...) @min()
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %7)
br label %23
9: ; preds = %0
%10 = call i32 (...) @max()
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %10)
br label %23
12: ; preds = %0
%13 = call i32 (...) @logg()
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %23
15: ; preds = %0
%16 = call i32 (...) @kup()
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %16)
br label %23
18: ; preds = %0
%19 = call i32 (...) @mutlak()
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %23
21: ; preds = %0
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.4, i64 0, i64 0))
br label %23
23: ; preds = %21, %18, %15, %12, %9, %6
ret i32 0
}