#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 fabs(double);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
void ini64(double *to, double dly) {
  if (fabs(dly) < 1e-99)
    return (void)(to[0] = 1.0, memset(to + 1, 0, 504));
  if (fabs(dly - 1.0) < 1e-14)
    return (void)(to[0] = 0.0, to[1] = 1.0, memset(to + 2, 0, 496));
  double z = (1.0 - dly) / (1.0 + dly), y = 1.0 - z * z;
  to[0] = z;
  int i;
  for (i = 1; i < 64; i++)
    to[i] = y, y *= -z;
}


x86 assembly (clang, -O0):
<ini64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xeb9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    117a <ini64+0x5a>
mov    -0x8(%rbp),%rax
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
xor    %esi,%esi
mov    $0x1f8,%edx
call   1030 <memset@plt>
jmp    1298 <ini64+0x178>
movsd  -0x10(%rbp),%xmm0
movsd  0xe89(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe6c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11db <ini64+0xbb>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xe53(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
xor    %esi,%esi
mov    $0x1f0,%edx
call   1030 <memset@plt>
jmp    1298 <ini64+0x178>
movsd  0xe2d(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xe20(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xde5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x24(%rbp)
cmpl   $0x40,-0x24(%rbp)
jge    1298 <ini64+0x178>
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1248 <ini64+0x128>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini64>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
call   1040 <fabs@plt>
test   %eax,%eax
jle    11be <ini64+0x9e>
movsd  0xebd(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
call   1040 <fabs@plt>
test   %eax,%eax
jle    11cd <ini64+0xad>
movsd  0xeae(%rip),%xmm0
movapd %xmm0,%xmm2
movsd  0x8(%rsp),%xmm1
subsd  %xmm1,%xmm2
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movapd 0xe98(%rip),%xmm1
xorpd  %xmm2,%xmm1
movsd  %xmm2,(%rbx)
mulsd  %xmm2,%xmm2
subsd  %xmm2,%xmm0
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x8(%rbx,%rax,8)
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rbx,%rax,8)
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rbx,%rax,8)
mulsd  %xmm1,%xmm0
add    $0x3,%rax
cmp    $0x3f,%rax
jne    1190 <ini64+0x70>
add    $0x10,%rsp
pop    %rbx
ret
mov    $0x1f8,%edx
mov    $0x1,%ecx
mov    %rbx,%rax
jmp    11e2 <ini64+0xc2>
movq   $0x0,(%rbx)
lea    0x8(%rbx),%rax
mov    $0x1f0,%edx
mov    $0x2,%ecx
movabs $0x3ff0000000000000,%rsi
mov    %rsi,(%rax)
lea    (%rbx,%rcx,8),%rdi
xor    %esi,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @ini64(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
store double* %0, double** %3
store double %1, double* %4
%8 = load double, double* %4
%9 = call i32 @fabs(double %8)
%10 = sitofp i32 %9 to double
%11 = fcmp olt double %10, 1.000000e-99
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i64 0
store double 1.000000e+00, double* %14
%15 = load double*, double** %3
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = call i32 @memset(double* %16, i32 0, i32 504)
br label %61
18: ; preds = %2
%19 = load double, double* %4
%20 = fsub double %19, 1.000000e+00
%21 = call i32 @fabs(double %20)
%22 = sitofp i32 %21 to double
%23 = fcmp olt double %22, 0x3D06849B86A12B9B
br i1 %23, label %24, label %32
24: ; preds = %18
%25 = load double*, double** %3
%26 = getelementptr inbounds double, double* %25, i64 0
store double 0.000000e+00, double* %26
%27 = load double*, double** %3
%28 = getelementptr inbounds double, double* %27, i64 1
store double 1.000000e+00, double* %28
%29 = load double*, double** %3
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = call i32 @memset(double* %30, i32 0, i32 496)
br label %61
32: ; preds = %18
%33 = load double, double* %4
%34 = fsub double 1.000000e+00, %33
%35 = load double, double* %4
%36 = fadd double 1.000000e+00, %35
%37 = fdiv double %34, %36
store double %37, double* %5
%38 = load double, double* %5
%39 = load double, double* %5
%40 = fneg double %38
%41 = call double @llvm.fmuladd.f64(double %40, double %39, double 1.000000e+00)
store double %41, double* %6
%42 = load double, double* %5
%43 = load double*, double** %3
%44 = getelementptr inbounds double, double* %43, i64 0
store double %42, double* %44
store i32 1, i32* %7
br label %45
45: ; preds = %58, %32
%46 = load i32, i32* %7
%47 = icmp slt i32 %46, 64
br i1 %47, label %48, label %61
48: ; preds = %45
%49 = load double, double* %6
%50 = load double*, double** %3
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %49, double* %53
%54 = load double, double* %5
%55 = fneg double %54
%56 = load double, double* %6
%57 = fmul double %56, %55
store double %57, double* %6
br label %58
58: ; preds = %48
%59 = load i32, i32* %7
%60 = add nsw i32 %59, 1
store i32 %60, i32* %7
br label %45
61: ; preds = %12, %24, %45
ret void
}

LLVM IR (-O2):
define void @ini64(double* %0, double %1) {
%3 = tail call i32 @fabs(double %1)
%4 = icmp slt i32 %3, 1
br i1 %4, label %30, label %5
5: ; preds = %2
%6 = fadd double %1, -1.000000e+00
%7 = tail call i32 @fabs(double %6)
%8 = icmp slt i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %5
store double 0.000000e+00, double* %0
%10 = getelementptr inbounds double, double* %0, i64 1
br label %30
11: ; preds = %5
%12 = fsub double 1.000000e+00, %1
%13 = fadd double %1, 1.000000e+00
%14 = fdiv double %12, %13
%15 = fneg double %14
%16 = tail call double @llvm.fmuladd.f64(double %15, double %14, double 1.000000e+00)
store double %14, double* %0
br label %17
17: ; preds = %17, %11
%18 = phi i64 [ 1, %11 ], [ %28, %17 ]
%19 = phi double [ %16, %11 ], [ %27, %17 ]
%20 = getelementptr inbounds double, double* %0, i64 %18
store double %19, double* %20
%21 = fmul double %19, %15
%22 = add nuw nsw i64 %18, 1
%23 = getelementptr inbounds double, double* %0, i64 %22
store double %21, double* %23
%24 = fmul double %21, %15
%25 = add nuw nsw i64 %18, 2
%26 = getelementptr inbounds double, double* %0, i64 %25
store double %24, double* %26
%27 = fmul double %24, %15
%28 = add nuw nsw i64 %18, 3
%29 = icmp eq i64 %28, 64
br i1 %29, label %36, label %17
30: ; preds = %2, %9
%31 = phi double* [ %10, %9 ], [ %0, %2 ]
%32 = phi i64 [ 2, %9 ], [ 1, %2 ]
%33 = phi i32 [ 496, %9 ], [ 504, %2 ]
store double 1.000000e+00, double* %31
%34 = getelementptr inbounds double, double* %0, i64 %32
%35 = tail call i32 @memset(double* %34, i32 0, i32 %33)
br label %36
36: ; preds = %17, %30
ret void
}