#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 *, double *);
void main() {
  const double m = 1.609;
  double x;
  float y;
  printf("Uzunluk giriniz (mil): ");
  scanf("%lf", &x);
  y = x * m;
  printf("----------------------------------------");
  printf("\nGirilen degeri %.2lf mil, %.2fkm- dir.", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xea5(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xec1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xeaf(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xecd(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Uzunluk giriniz (mil): \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [41 x i8] c"----------------------------------------\00"
@.str.3 = [40 x i8] c"\0AGirilen degeri %.2lf mil, %.2fkm- dir.\00"
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca float
store double 1.609000e+00, double* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = fmul double %6, 1.609000e+00
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%10 = load double, double* %2
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), double %10, double %12)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Uzunluk giriniz (mil): \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [41 x i8] c"----------------------------------------\00"
@.str.3 = [40 x i8] c"\0AGirilen degeri %.2lf mil, %.2fkm- dir.\00"
define void @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 1.609000e+00
%7 = fptrunc double %6 to float
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%9 = load double, double* %1
%10 = fpext float %7 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.3, i64 0, i64 0), double %9, double %10)
ret void
}