#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, double);
int /*<<< orphan*/ scanf(char *, double *);
double sqrt(double);
int main() {
  double d;
  while (1) {
    double t;
    scanf("%lf", &d);
    t = sqrt(d);
    if (t > 1)
      printf("> 1: t: %lf, d:%lf\n", t, d);
    else if (t == 1)
      printf("t:%lf, d:%lf\n", t, d);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe95(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1190 <main+0x60>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
jmp    11c8 <main+0x98>
movsd  -0x18(%rbp),%xmm0
movsd  0xe63(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11c3 <main+0x93>
jp     11c3 <main+0x93>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
jmp    11c8 <main+0x98>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%r14
mov    %rsp,%rbx
lea    0xecb(%rip),%r15
lea    0xed8(%rip),%r12
jmp    116d <main+0x3d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsp),%xmm1
mov    %r15,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
ucomisd 0xe83(%rip),%xmm0
jb     1190 <main+0x60>
sqrtsd %xmm0,%xmm0
jmp    1195 <main+0x65>
nopl   (%rax)
call   1050 <sqrt@plt>
movsd  0xe63(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1160 <main+0x30>
ucomisd %xmm1,%xmm0
jne    116d <main+0x3d>
jp     116d <main+0x3d>
movsd  (%rsp),%xmm1
mov    %r12,%rdi
movsd  0xe45(%rip),%xmm0
call   1030 <printf@plt>
jmp    116d <main+0x3d>

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [20 x i8] c"> 1: t: %lf, d:%lf\0A\00"
@.str.2 = [14 x i8] c"t:%lf, d:%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %0, %22
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @sqrt(double %6)
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp ogt double %8, 1.000000e+00
br i1 %9, label %10, label %14
10: ; preds = %4
%11 = load double, double* %3
%12 = load double, double* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double %11, double %12)
br label %22
14: ; preds = %4
%15 = load double, double* %3
%16 = fcmp oeq double %15, 1.000000e+00
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load double, double* %3
%19 = load double, double* %2
%20 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %18, double %19)
br label %21
21: ; preds = %17, %14
br label %22
22: ; preds = %21, %10
br label %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [20 x i8] c"> 1: t: %lf, d:%lf\0A\00"
@.str.2 = [14 x i8] c"t:%lf, d:%lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
br label %3
3: ; preds = %13, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call double @sqrt(double %5)
%7 = fcmp ogt double %6, 1.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load double, double* %1
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double %6, double %9)
br label %13
11: ; preds = %3
%12 = fcmp oeq double %6, 1.000000e+00
br i1 %12, label %14, label %13
13: ; preds = %11, %14, %8
br label %3
14: ; preds = %11
%15 = load double, double* %1
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double 1.000000e+00, double %15)
br label %13
}