#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 */
float pow(float, int);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, float *);
float sqrt(float);
int main(void) {
  float x1, y1, x2, y2, potencia1, potencia2, total;
  scanf("%f %f", &x1, &y1);
  scanf("%f %f", &x2, &y2);
  potencia1 = (x1 - x2);
  potencia1 = pow(potencia1, 2);
  potencia2 = (y2 - y1);
  potencia2 = pow(potencia2, 2);
  total = sqrt(potencia1 + potencia2);
  printf("%.4f\n", total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
lea    0xe96(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xeb4(%rip),%rbx
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
subss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
movss  %xmm0,0xc(%rsp)
movss  0x10(%rsp),%xmm0
subss  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
addss  0xc(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     11b6 <main+0x76>
sqrtss %xmm0,%xmm0
jmp    11bb <main+0x7b>
call   1060 <sqrt@plt>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [6 x i8] c"%.4f\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
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %2, float* %3)
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %4, float* %5)
%11 = load float, float* %2
%12 = load float, float* %4
%13 = fsub float %11, %12
store float %13, float* %6
%14 = load float, float* %6
%15 = call float @pow(float %14, i32 2)
store float %15, float* %6
%16 = load float, float* %5
%17 = load float, float* %3
%18 = fsub float %16, %17
store float %18, float* %7
%19 = load float, float* %7
%20 = call float @pow(float %19, i32 2)
store float %20, float* %7
%21 = load float, float* %6
%22 = load float, float* %7
%23 = fadd float %21, %22
%24 = call float @sqrt(float %23)
store float %24, float* %8
%25 = load float, float* %8
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [6 x i8] c"%.4f\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 i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %3, float* %4)
%11 = load float, float* %1
%12 = load float, float* %3
%13 = fsub float %11, %12
%14 = call float @pow(float %13, i32 2)
%15 = load float, float* %4
%16 = load float, float* %2
%17 = fsub float %15, %16
%18 = call float @pow(float %17, i32 2)
%19 = fadd float %14, %18
%20 = call float @sqrt(float %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float %20)
ret i32 0
}