#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 */
double pow(double, double);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("La diagonal vale: %.2f\n",
         ((4 - 1) > 0) && ((6 - 2) > 0)
             ? pow((pow((4 - 1), 2) + pow((6 - 2), 2)), 0.5)
             : 0);
  printf("La diagonal vale: %.2f\n",
         ((1 + 5 - 1) > 0) && ((2 + 5 - 2) > 0)
             ? pow((pow((1 + 5 - 1), 2) + pow((2 + 5 - 2), 2)), 0.5)
             : 0);
  printf("La diagonal vale: %.2f\n",
         ((3 - 1) > 0) && ((0 - 2) > 0)
             ? pow((pow((3 - 1), 2) + pow((0 - 2), 2)), 0.5)
             : 0);
  printf("La diagonal vale: %.2f\n",
         ((1 - 2) > 0) && ((4 - 2) > 0)
             ? pow((pow((1 - 2), 2) + pow((4 - 2), 2)), 0.5)
             : 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xef0(%rip),%xmm0
movsd  0xed8(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xece(%rip),%xmm0
movsd  0xebe(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
call   1040 <pow@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe84(%rip),%xmm0
movsd  0xe84(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  0xe6a(%rip),%xmm0
movsd  0xe6a(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe41(%rip),%xmm1
call   1040 <pow@plt>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
xorps  %xmm0,%xmm0
call   1030 <printf@plt>
lea    0xe42(%rip),%rdi
xorps  %xmm0,%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef8(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xed8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"La diagonal vale: %.2f\0A\00"
define i32 @main() {
%1 = call double @pow(double 3.000000e+00, double 2.000000e+00)
%2 = call double @pow(double 4.000000e+00, double 2.000000e+00)
%3 = fadd double %1, %2
%4 = call double @pow(double %3, double 5.000000e-01)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %4)
%6 = call double @pow(double 5.000000e+00, double 2.000000e+00)
%7 = call double @pow(double 5.000000e+00, double 2.000000e+00)
%8 = fadd double %6, %7
%9 = call double @pow(double %8, double 5.000000e-01)
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 0.000000e+00)
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 0.000000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"La diagonal vale: %.2f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 5.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 0x401C48C6001F0AC0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 0.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), double 0.000000e+00)
ret i32 0
}