#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 *);
void main() {
  const double i = 2.54, c = 10;
  int x;
  float l, j;
  printf("Uzunluk (inc) : ");
  scanf("%d", &x);
  l = x * i;
  j = l * c;
  printf("---------------------------");
  printf("\n1 inc =%.2fcm =%.1fmm", l, j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  0xe9b(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe75(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe81(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cvtsi2sdl 0xc(%rsp),%xmm0
mulsd  0xeaf(%rip),%xmm0
cvtsd2ss %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
mulss  0xe9e(%rip),%xmm1
movss  %xmm1,0x8(%rsp)
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
lea    0xeaa(%rip),%rdi
movsd  0x10(%rsp),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Uzunluk (inc) : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"---------------------------\00"
@.str.3 = [23 x i8] c"\0A1 inc =%.2fcm =%.1fmm\00"
define void @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca i32
%4 = alloca float
%5 = alloca float
store double 2.540000e+00, double* %1
store double 1.000000e+01, double* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fmul double %9, 2.540000e+00
%11 = fptrunc double %10 to float
store float %11, float* %4
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = fmul double %13, 1.000000e+01
%15 = fptrunc double %14 to float
store float %15, float* %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%17 = load float, float* %4
%18 = fpext float %17 to double
%19 = load float, float* %5
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %18, double %20)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Uzunluk (inc) : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"---------------------------\00"
@.str.3 = [23 x i8] c"\0A1 inc =%.2fcm =%.1fmm\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 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 = sitofp i32 %5 to double
%7 = fmul double %6, 2.540000e+00
%8 = fptrunc double %7 to float
%9 = fpext float %8 to double
%10 = fmul float %8, 1.000000e+01
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%12 = fpext float %10 to double
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %9, double %12)
ret void
}