#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 liuhui(int);
int /*<<< orphan*/ printf(char *, int);
double sqrt(int);
int main(int argc, char *argv[]) {
  printf("%.51f\n", sqrt(2 - sqrt(2 + sqrt(2 + sqrt(2 + sqrt(2 + 1))))) * 48.0);
  printf("DEBUG: %d\n", liuhui(17));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe95(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe7d(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe65(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
movsd  0xe48(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
mov    $0x11,%edi
call   1040 <liuhui@plt>
mov    %eax,%esi
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1050 <sqrt@plt>
addsd  0xebd(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
addsd  0xeac(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
addsd  0xe9b(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sqrt@plt>
movsd  0xe8a(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1050 <sqrt@plt>
mulsd  0xe7d(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x11,%edi
call   1040 <liuhui@plt>
lea    0xe6b(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.51f\0A\00"
@.str.1 = [11 x i8] c"DEBUG: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call double @sqrt(i32 3)
%7 = fadd double 2.000000e+00, %6
%8 = fptosi double %7 to i32
%9 = call double @sqrt(i32 %8)
%10 = fadd double 2.000000e+00, %9
%11 = fptosi double %10 to i32
%12 = call double @sqrt(i32 %11)
%13 = fadd double 2.000000e+00, %12
%14 = fptosi double %13 to i32
%15 = call double @sqrt(i32 %14)
%16 = fsub double 2.000000e+00, %15
%17 = fptosi double %16 to i32
%18 = call double @sqrt(i32 %17)
%19 = fmul double %18, 4.800000e+01
%20 = fptosi double %19 to i32
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = call i32 @liuhui(i32 17)
%23 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.51f\0A\00"
@.str.1 = [11 x i8] c"DEBUG: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @sqrt(i32 3)
%4 = fadd double %3, 2.000000e+00
%5 = fptosi double %4 to i32
%6 = tail call double @sqrt(i32 %5)
%7 = fadd double %6, 2.000000e+00
%8 = fptosi double %7 to i32
%9 = tail call double @sqrt(i32 %8)
%10 = fadd double %9, 2.000000e+00
%11 = fptosi double %10 to i32
%12 = tail call double @sqrt(i32 %11)
%13 = fsub double 2.000000e+00, %12
%14 = fptosi double %13 to i32
%15 = tail call double @sqrt(i32 %14)
%16 = fmul double %15, 4.800000e+01
%17 = fptosi double %16 to i32
%18 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = tail call i32 @liuhui(i32 17)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %19)
ret i32 0
}