#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, float);
scalar_t__ scanf(char *, float *, float *, float *, float *);
float sqrt(float);
int main() {
  float d, x1, x2, y1, y2;
  while (scanf("%f%f%f%f", &x1, &y1, &x2, &y2) != EOF) {
    float a = (x1 - x2) * (x1 - x2);
    float b = (y1 - y2) * (y1 - y2);
    d = sqrt(a + b);
    printf("%.2lf\n", d);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x18(%rbp),%r8
call   1040 <scanf@plt>
mov    0x2e86(%rip),%rcx
cmp    (%rcx),%rax
je     11cf <main+0x9f>
movss  -0xc(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x18(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
call   1050 <sqrt@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebf(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x2e83(%rip),%r14
cmp    (%r14),%rax
jne    117b <main+0x4b>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe82(%rip),%r15
lea    0x14(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%rbp
jmp    11ca <main+0x9a>
nopl   0x0(%rax,%rax,1)
call   1050 <sqrt@plt>
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    %rbp,%r8
call   1040 <scanf@plt>
cmp    (%r14),%rax
je     116a <main+0x3a>
movss  0xc(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
movss  0x10(%rsp),%xmm2
unpcklps %xmm0,%xmm2
subps  %xmm2,%xmm1
mulps  %xmm1,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
addss  %xmm1,%xmm0
ucomiss 0xe00(%rip),%xmm0
jb     11a0 <main+0x70>
sqrtss %xmm0,%xmm0
jmp    11a5 <main+0x75>

LLVM IR (-O0):
@.str = [9 x i8] c"%f%f%f%f\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
br label %9
9: ; preds = %13, %0
%10 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %3, float* %5, float* %4, float* %6)
%11 = load i64, i64* @EOF
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %34
13: ; preds = %9
%14 = load float, float* %3
%15 = load float, float* %4
%16 = fsub float %14, %15
%17 = load float, float* %3
%18 = load float, float* %4
%19 = fsub float %17, %18
%20 = fmul float %16, %19
store float %20, float* %7
%21 = load float, float* %5
%22 = load float, float* %6
%23 = fsub float %21, %22
%24 = load float, float* %5
%25 = load float, float* %6
%26 = fsub float %24, %25
%27 = fmul float %23, %26
store float %27, float* %8
%28 = load float, float* %7
%29 = load float, float* %8
%30 = fadd float %28, %29
%31 = call float @sqrt(float %30)
store float %31, float* %2
%32 = load float, float* %2
%33 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %32)
br label %9
34: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f%f%f%f\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.2lf\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %1 to i8*
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
%9 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %3, float* %2, float* %4)
%10 = load i64, i64* @EOF
%11 = icmp eq i64 %9, %10
br i1 %11, label %31, label %12
12: ; preds = %0, %12
%13 = load float, float* %1
%14 = load float, float* %2
%15 = load float, float* %3
%16 = load float, float* %4
%17 = insertelement <2 x float> poison, float %13, i64 0
%18 = insertelement <2 x float> %17, float %15, i64 1
%19 = insertelement <2 x float> poison, float %14, i64 0
%20 = insertelement <2 x float> %19, float %16, i64 1
%21 = fsub <2 x float> %18, %20
%22 = fmul <2 x float> %21, %21
%23 = shufflevector <2 x float> %22, <2 x float> poison, <2 x i32> <i32 1, i32 undef>
%24 = fadd <2 x float> %22, %23
%25 = extractelement <2 x float> %24, i64 0
%26 = call float @sqrt(float %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %26)
%28 = call i64 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %3, float* %2, float* %4)
%29 = load i64, i64* @EOF
%30 = icmp eq i64 %28, %29
br i1 %30, label %31, label %12
31: ; preds = %12, %0
ret i32 0
}