#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__ pow(double, int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *, double *);
double sqrt(scalar_t__);
int main(void) {
  double x, y, x2, y2, d, p1, p2;
  scanf("%lf%lf%lf%lf", &x, &y, &x2, &y2);
  p1 = x - x2;
  p2 = y - y2;
  d = sqrt((pow(p1, 2)) + (pow(p2, 2)));
  printf("%.4lf\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x48(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xeb4(%rip),%rdi
lea    0x28(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r8
call   1040 <scanf@plt>
movsd  0x28(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1060 <sqrt@plt>
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%lf%lf%lf%lf\00"
@.str.1 = [7 x i8] c"%.4lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %1 to i8*
%6 = bitcast double* %2 to i8*
%7 = bitcast double* %3 to i8*
%8 = bitcast double* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4)
%10 = load double, double* %1
%11 = load double, double* %3
%12 = fsub double %10, %11
%13 = load double, double* %2
%14 = load double, double* %4
%15 = fsub double %13, %14
%16 = call i64 @pow(double %12, i32 2)
%17 = call i64 @pow(double %15, i32 2)
%18 = add nsw i64 %17, %16
%19 = call double @sqrt(i64 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %19)
ret i32 0
}