#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*/ exp(double);
double log(double);
int /*<<< orphan*/ printf(char *, int, double);
double sqrt(int /*<<< orphan*/);
int main(void) {
  double x = 0.75;
  double t1 = 0.50000025;
  int i, j;
  int n8 = 93 * 100;
  for (i = 0;; i++) {
    for (j = 0; j < n8; j++) {
      x = sqrt(exp(log(x) / t1));
    }
    printf("%d %f\n", i, x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x2454,-0x24(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11b8 <main+0x78>
movsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
divsd  -0x18(%rbp),%xmm0
call   1040 <exp@plt>
mov    %eax,%edi
call   1060 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    117e <main+0x3e>
mov    -0x1c(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1177 <main+0x37>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  0xeb0(%rip),%xmm1
xor    %ebx,%ebx
lea    0xeb7(%rip),%r14
nopl   0x0(%rax)
mov    $0x2454,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm1,%xmm0
call   1050 <log@plt>
divsd  0xe87(%rip),%xmm0
call   1040 <exp@plt>
mov    %eax,%edi
call   1060 <sqrt@plt>
movapd %xmm0,%xmm1
add    $0xffffffff,%ebp
jne    1170 <main+0x30>
mov    %r14,%rdi
mov    %ebx,%esi
movapd %xmm1,%xmm0
movsd  %xmm1,0x8(%rsp)
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
add    $0x1,%ebx
jmp    1160 <main+0x20>

LLVM IR (-O0):
@.str = [7 x i8] c"%d %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store double 7.500000e-01, double* %2
store double 0x3FE000008637BD06, double* %3
store i32 9300, i32* %6
store i32 0, i32* %4
br label %7
7: ; preds = %26, %0
store i32 0, i32* %5
br label %8
8: ; preds = %19, %7
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load double, double* %2
%14 = call double @log(double %13)
%15 = load double, double* %3
%16 = fdiv double %14, %15
%17 = call i32 @exp(double %16)
%18 = call double @sqrt(i32 %17)
store double %18, double* %2
br label %19
19: ; preds = %12
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
%23 = load i32, i32* %4
%24 = load double, double* %2
%25 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %23, double %24)
br label %26
26: ; preds = %22
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %f\0A\00"
define i32 @main() {
br label %1
1: ; preds = %13, %0
%2 = phi i32 [ 0, %0 ], [ %15, %13 ]
%3 = phi double [ 7.500000e-01, %0 ], [ %10, %13 ]
br label %4
4: ; preds = %1, %4
%5 = phi double [ %3, %1 ], [ %10, %4 ]
%6 = phi i32 [ 0, %1 ], [ %11, %4 ]
%7 = tail call double @log(double %5)
%8 = fdiv double %7, 0x3FE000008637BD06
%9 = tail call i32 @exp(double %8)
%10 = tail call double @sqrt(i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, 9300
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, double %10)
%15 = add nuw nsw i32 %2, 1
br label %1
}