#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 */
double hipotenus_bul(double, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  printf("Hipotenus hesabi icin kenarlari giriniz\n");
  double kenar_bir, kenar_iki;
  printf("Ilk kenari giriniz: ");
  scanf("%lf", &kenar_bir);
  printf("Ikinci kenari giriniz: ");
  scanf("%lf", &kenar_iki);
  double hipotenus;
  hipotenus = hipotenus_bul(kenar_bir, kenar_iki);
  printf("%9s%12s%12s\n", "Kenar Bir", "Kenar Iki", "Hipotenus");
  printf("%.2f%16.2f%12.2f", kenar_bir, kenar_iki, hipotenus);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1050 <hipotenus_bul@plt>
movsd  %xmm0,-0x20(%rbp)
lea    0xeb6(%rip),%rdi
lea    0xebc(%rip),%rsi
lea    0xebf(%rip),%rdx
lea    0xec2(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    0xeaf(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeaf(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe9f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1060 <hipotenus_bul@plt>
movsd  %xmm0,0x18(%rsp)
lea    0xe85(%rip),%rdi
lea    0xe8b(%rip),%rsi
lea    0xe8e(%rip),%rdx
lea    0xe91(%rip),%rcx
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xe81(%rip),%rdi
movsd  0x18(%rsp),%xmm2
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Hipotenus hesabi icin kenarlari giriniz\0A\00"
@.str.1 = [21 x i8] c"Ilk kenari giriniz: \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [24 x i8] c"Ikinci kenari giriniz: \00"
@.str.4 = [13 x i8] c"%9s%12s%12s\0A\00"
@.str.5 = [10 x i8] c"Kenar Bir\00"
@.str.6 = [10 x i8] c"Kenar Iki\00"
@.str.7 = [10 x i8] c"Hipotenus\00"
@.str.8 = [17 x i8] c"%.2f%16.2f%12.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %3)
%10 = load double, double* %2
%11 = load double, double* %3
%12 = call double @hipotenus_bul(double %10, double %11)
store double %12, double* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%14 = load double, double* %2
%15 = load double, double* %3
%16 = load double, double* %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %14, double %15, double %16)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"Ilk kenari giriniz: \00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [24 x i8] c"Ikinci kenari giriniz: \00"
@.str.4 = [13 x i8] c"%9s%12s%12s\0A\00"
@.str.5 = [10 x i8] c"Kenar Bir\00"
@.str.6 = [10 x i8] c"Kenar Iki\00"
@.str.7 = [10 x i8] c"Hipotenus\00"
@.str.8 = [17 x i8] c"%.2f%16.2f%12.2f\00"
@str = [40 x i8] c"Hipotenus hesabi icin kenarlari giriniz\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %1)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%10 = load double, double* %1
%11 = load double, double* %2
%12 = call double @hipotenus_bul(double %10, double %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0))
%14 = load double, double* %1
%15 = load double, double* %2
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), double %14, double %15, double %12)
ret i32 0
}