#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 *, double);
scalar_t__ scanf(char *, float *, float *, float *, float *);
scalar_t__ sqare(float);
double sqrt(scalar_t__);
int main(int argc, const char *argv[]) {
  float x1, y1, x2, y2;
  while (scanf("%f %f %f %f", &x1, &y1, &x2, &y2)) {
    printf("%.2f\n", sqrt(sqare(x1 - x2) + sqare(y1 - y2)));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     11bb <main+0x7b>
movss  -0x14(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
call   1050 <sqare@plt>
mov    %rax,-0x28(%rbp)
movss  -0x18(%rbp),%xmm0
subss  -0x20(%rbp),%xmm0
call   1050 <sqare@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    1156 <main+0x16>
xor    %eax,%eax
add    $0x30,%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    0xeab(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
test   %rax,%rax
je     11e5 <main+0xa5>
lea    0xe86(%rip),%r15
lea    0x14(%rsp),%r12
lea    0x10(%rsp),%r13
lea    0xc(%rsp),%rbx
lea    0x8(%rsp),%rbp
xchg   %ax,%ax
movss  0x14(%rsp),%xmm0
subss  0xc(%rsp),%xmm0
call   1050 <sqare@plt>
mov    %rax,%r14
movss  0x10(%rsp),%xmm0
subss  0x8(%rsp),%xmm0
call   1050 <sqare@plt>
add    %rax,%r14
mov    %r14,%rdi
call   1060 <sqrt@plt>
lea    0xe45(%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>
test   %rax,%rax
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%f %f %f %f\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = bitcast float* %3 to i8*
%8 = bitcast float* %4 to i8*
%9 = bitcast float* %5 to i8*
%10 = bitcast float* %6 to i8*
%11 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float* %3, float* %4, float* %5, float* %6)
%12 = icmp eq i64 %11, 0
br i1 %12, label %27, label %13
13: ; preds = %2, %13
%14 = load float, float* %3
%15 = load float, float* %5
%16 = fsub float %14, %15
%17 = call i64 @sqare(float %16)
%18 = load float, float* %4
%19 = load float, float* %6
%20 = fsub float %18, %19
%21 = call i64 @sqare(float %20)
%22 = add nsw i64 %21, %17
%23 = call double @sqrt(i64 %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %23)
%25 = call i64 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float* %3, float* %4, float* %5, float* %6)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %13
27: ; preds = %13, %2
ret i32 0
}