#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 *, int *);
double sqrt(double);
int main(void) {
  int n, p, i;
  double x, y, ans[1001][3];
  for (i = 2; i <= 1000; i++) {
    ans[i][0] = 0.0;
    ans[i][1] = 0.0;
    ans[i][2] = 0;
  }
  ans[1][0] = 1.0;
  ans[1][1] = 0.0;
  ans[1][2] = 1;
  while (1) {
    scanf("%d", &n);
    if (n == -1)
      break;
    if (ans[n][2] == 1) {
      printf("%lf\n%lf\n", ans[n][0], ans[n][1]);
    } else {
      p = n - 1;
      while (ans[p][2] == 0)
        p--;
      x = ans[p][0];
      y = ans[p][1];
      for (i = p + 1; i <= n; i++) {
        ans[i][0] = x - y / sqrt(x * x + y * y);
        ans[i][1] = y + x / sqrt(x * x + y * y);
        x = ans[i][0];
        y = ans[i][1];
        ans[i][2] = 1;
      }
      printf("%lf\n%lf\n", ans[n][0], ans[n][1]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x5e20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x3e8,-0x10(%rbp)
jg     11b1 <main+0x81>
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1149 <main+0x19>
movsd  0xe47(%rip),%xmm0
movsd  %xmm0,-0x5de8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x5de0(%rbp)
ff
movsd  0xe2c(%rip),%xmm0
movsd  %xmm0,-0x5dd8(%rbp)
ff
lea    0xe25(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xffffffff,-0x8(%rbp)
jne    11fb <main+0xcb>
jmp    1470 <main+0x340>
movslq -0x8(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
movsd  0xde6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1268 <main+0x138>
jp     1268 <main+0x138>
movslq -0x8(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
lea    0xdad(%rip),%rdi
call   1030 <printf@plt>
jmp    146b <main+0x33b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x10(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12a9 <main+0x179>
jp     12a9 <main+0x179>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1271 <main+0x141>
movslq -0xc(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movslq -0xc(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1432 <main+0x302>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x5e18(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x5e20(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  -0x5e20(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x5e18(%rbp),%xmm0
ff
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x5e08(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x5e10(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  -0x5e10(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x5e08(%rbp),%xmm0
ff
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0xbe1(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12e9 <main+0x1b9>
movslq -0x8(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0x8(%rbp),%rcx
lea    -0x5e00(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm1
lea    0xba5(%rip),%rdi
call   1030 <printf@plt>
jmp    11dc <main+0xac>
xor    %eax,%eax
add    $0x5e20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x5e18,%rsp
lea    0x70(%rsp),%rdi
mov    $0x5da8,%edx
xor    %esi,%esi
call   1040 <memset@plt>
movsd  0xe96(%rip),%xmm0
movupd %xmm0,0x58(%rsp)
movabs $0x3ff0000000000000,%r15
mov    %r15,0x68(%rsp)
lea    0xe82(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
cmp    $0xffffffff,%ebx
je     1360 <main+0x220>
lea    0xe67(%rip),%r14
lea    0xc(%rsp),%r12
movabs $0xffffffff00000000,%r13
ff ff ff
xorpd  %xmm2,%xmm2
jmp    11f8 <main+0xb8>
mov    %rbx,%r14
nopl   0x0(%rax)
lea    (%rax,%rax,2),%rax
movsd  0x40(%rsp,%rax,8),%xmm0
movsd  0x48(%rsp,%rax,8),%xmm1
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0xe29(%rip),%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
xorpd  %xmm2,%xmm2
mov    0xc(%rsp),%ebx
cmp    $0xffffffff,%ebx
je     1360 <main+0x220>
movslq %ebx,%rax
lea    (%rax,%rax,2),%rcx
movsd  0x50(%rsp,%rcx,8),%xmm0
ucomisd 0xdf3(%rip),%xmm0
jne    1211 <main+0xd1>
jnp    11c0 <main+0x80>
mov    %rax,%rsi
shl    $0x20,%rsi
movabs $0x100000000,%rdx
add    %rdx,%rsi
lea    0x1(%rax),%edi
lea    (%rsp,%rcx,8),%rdx
add    $0x40,%rdx
mov    %ebx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%ebp
add    %r13,%rsi
movsd  -0x8(%rdx),%xmm0
add    $0xffffffff,%edi
add    $0xffffffffffffffe8,%rdx
lea    -0x1(%rbp),%ecx
ucomisd %xmm2,%xmm0
jne    125c <main+0x11c>
jnp    1240 <main+0x100>
cmp    %edi,%ebx
jl     11c0 <main+0x80>
mov    %r14,%rbx
movupd (%rdx),%xmm3
movslq %ebp,%rax
lea    -0x1(%rax),%rbp
lea    (%rax,%rax,2),%rax
lea    0x50(%rsp),%rcx
lea    (%rcx,%rax,8),%r14
jmp    12d4 <main+0x194>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
unpcklpd %xmm0,%xmm1
movapd %xmm3,%xmm0
shufpd $0x1,%xmm3,%xmm0
divpd  %xmm1,%xmm0
movapd %xmm3,%xmm1
subpd  %xmm0,%xmm1
addpd  %xmm3,%xmm0
movsd  %xmm1,%xmm0
movupd %xmm0,-0x10(%r14)
mov    %r15,(%r14)
movslq 0xc(%rsp),%rax
add    $0x1,%rbp
add    $0x18,%r14
movapd %xmm0,%xmm3
cmp    %rax,%rbp
jge    11b9 <main+0x79>
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
mulsd  %xmm0,%xmm0
movapd %xmm3,%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm0,%xmm4
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
ucomisd %xmm2,%xmm4
movapd %xmm0,%xmm1
movapd %xmm3,0x20(%rsp)
jae    1332 <main+0x1f2>
movapd %xmm0,0x30(%rsp)
movapd %xmm4,%xmm0
movapd %xmm4,0x10(%rsp)
call   1060 <sqrt@plt>
movapd 0x10(%rsp),%xmm4
movapd 0x20(%rsp),%xmm3
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
movapd 0x30(%rsp),%xmm0
ucomisd %xmm2,%xmm4
jae    1290 <main+0x150>
movapd %xmm4,%xmm0
movapd %xmm1,0x10(%rsp)
call   1060 <sqrt@plt>
movapd 0x10(%rsp),%xmm1
movapd 0x20(%rsp),%xmm3
xorpd  %xmm2,%xmm2
jmp    1290 <main+0x150>
xor    %eax,%eax
add    $0x5e18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%lf\0A%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca [1001 x [3 x double]]
store i32 0, i32* %1
store i32 2, i32* %4
br label %8
8: ; preds = %24, %0
%9 = load i32, i32* %4
%10 = icmp sle i32 %9, 1000
br i1 %10, label %11, label %27
11: ; preds = %8
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %13
%15 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
store double 0.000000e+00, double* %15
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %17
%19 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 1
store double 0.000000e+00, double* %19
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %21
%23 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 2
store double 0.000000e+00, double* %23
br label %24
24: ; preds = %11
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %8
27: ; preds = %8
%28 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 1
%29 = getelementptr inbounds [3 x double], [3 x double]* %28, i64 0, i64 0
store double 1.000000e+00, double* %29
%30 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 1
%31 = getelementptr inbounds [3 x double], [3 x double]* %30, i64 0, i64 1
store double 0.000000e+00, double* %31
%32 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 1
%33 = getelementptr inbounds [3 x double], [3 x double]* %32, i64 0, i64 2
store double 1.000000e+00, double* %33
br label %34
34: ; preds = %27, %148
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%36 = load i32, i32* %2
%37 = icmp eq i32 %36, -1
br i1 %37, label %38, label %39
38: ; preds = %34
br label %149
39: ; preds = %34
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %41
%43 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 0, i64 2
%44 = load double, double* %43
%45 = fcmp oeq double %44, 1.000000e+00
br i1 %45, label %46, label %58
46: ; preds = %39
%47 = load i32, i32* %2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %48
%50 = getelementptr inbounds [3 x double], [3 x double]* %49, i64 0, i64 0
%51 = load double, double* %50
%52 = load i32, i32* %2
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %53
%55 = getelementptr inbounds [3 x double], [3 x double]* %54, i64 0, i64 1
%56 = load double, double* %55
%57 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %51, double %56)
br label %148
58: ; preds = %39
%59 = load i32, i32* %2
%60 = sub nsw i32 %59, 1
store i32 %60, i32* %3
br label %61
61: ; preds = %68, %58
%62 = load i32, i32* %3
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %63
%65 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 0, i64 2
%66 = load double, double* %65
%67 = fcmp oeq double %66, 0.000000e+00
br i1 %67, label %68, label %71
68: ; preds = %61
%69 = load i32, i32* %3
%70 = add nsw i32 %69, -1
store i32 %70, i32* %3
br label %61
71: ; preds = %61
%72 = load i32, i32* %3
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %73
%75 = getelementptr inbounds [3 x double], [3 x double]* %74, i64 0, i64 0
%76 = load double, double* %75
store double %76, double* %5
%77 = load i32, i32* %3
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %78
%80 = getelementptr inbounds [3 x double], [3 x double]* %79, i64 0, i64 1
%81 = load double, double* %80
store double %81, double* %6
%82 = load i32, i32* %3
%83 = add nsw i32 %82, 1
store i32 %83, i32* %4
br label %84
84: ; preds = %133, %71
%85 = load i32, i32* %4
%86 = load i32, i32* %2
%87 = icmp sle i32 %85, %86
br i1 %87, label %88, label %136
88: ; preds = %84
%89 = load double, double* %5
%90 = load double, double* %6
%91 = load double, double* %5
%92 = load double, double* %5
%93 = load double, double* %6
%94 = load double, double* %6
%95 = fmul double %93, %94
%96 = call double @llvm.fmuladd.f64(double %91, double %92, double %95)
%97 = call double @sqrt(double %96)
%98 = fdiv double %90, %97
%99 = fsub double %89, %98
%100 = load i32, i32* %4
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %101
%103 = getelementptr inbounds [3 x double], [3 x double]* %102, i64 0, i64 0
store double %99, double* %103
%104 = load double, double* %6
%105 = load double, double* %5
%106 = load double, double* %5
%107 = load double, double* %5
%108 = load double, double* %6
%109 = load double, double* %6
%110 = fmul double %108, %109
%111 = call double @llvm.fmuladd.f64(double %106, double %107, double %110)
%112 = call double @sqrt(double %111)
%113 = fdiv double %105, %112
%114 = fadd double %104, %113
%115 = load i32, i32* %4
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %116
%118 = getelementptr inbounds [3 x double], [3 x double]* %117, i64 0, i64 1
store double %114, double* %118
%119 = load i32, i32* %4
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %120
%122 = getelementptr inbounds [3 x double], [3 x double]* %121, i64 0, i64 0
%123 = load double, double* %122
store double %123, double* %5
%124 = load i32, i32* %4
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %125
%127 = getelementptr inbounds [3 x double], [3 x double]* %126, i64 0, i64 1
%128 = load double, double* %127
store double %128, double* %6
%129 = load i32, i32* %4
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %130
%132 = getelementptr inbounds [3 x double], [3 x double]* %131, i64 0, i64 2
store double 1.000000e+00, double* %132
br label %133
133: ; preds = %88
%134 = load i32, i32* %4
%135 = add nsw i32 %134, 1
store i32 %135, i32* %4
br label %84
136: ; preds = %84
%137 = load i32, i32* %2
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %138
%140 = getelementptr inbounds [3 x double], [3 x double]* %139, i64 0, i64 0
%141 = load double, double* %140
%142 = load i32, i32* %2
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %7, i64 0, i64 %143
%145 = getelementptr inbounds [3 x double], [3 x double]* %144, i64 0, i64 1
%146 = load double, double* %145
%147 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %141, double %146)
br label %148
148: ; preds = %136, %46
br label %34
149: ; preds = %38
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"%lf\0A%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x [3 x double]]
%3 = bitcast i32* %1 to i8*
%4 = bitcast [1001 x [3 x double]]* %2 to i8*
%5 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 2, i64 0
%6 = bitcast double* %5 to i8*
%7 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 1, i64 0
%8 = bitcast double* %7 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %8
%9 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 1, i64 2
store double 1.000000e+00, double* %9
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, -1
br i1 %12, label %69, label %13
13: ; preds = %0, %59
%14 = phi i32 [ %67, %59 ], [ %11, %0 ]
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %15, i64 2
%17 = load double, double* %16
%18 = fcmp oeq double %17, 1.000000e+00
br i1 %18, label %59, label %19
19: ; preds = %13, %19
%20 = phi i64 [ %21, %19 ], [ %15, %13 ]
%21 = add i64 %20, -1
%22 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %21, i64 2
%23 = load double, double* %22
%24 = fcmp oeq double %23, 0.000000e+00
br i1 %24, label %19, label %25
25: ; preds = %19
%26 = trunc i64 %20 to i32
%27 = icmp slt i32 %14, %26
br i1 %27, label %59, label %28
28: ; preds = %25
%29 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %21, i64 0
%30 = bitcast double* %29 to <2 x double>*
%31 = load <2 x double>, <2 x double>* %30
%32 = shl i64 %20, 32
%33 = ashr exact i64 %32, 32
br label %34
34: ; preds = %28, %34
%35 = phi i64 [ %33, %28 ], [ %53, %34 ]
%36 = phi <2 x double> [ %31, %28 ], [ %50, %34 ]
%37 = extractelement <2 x double> %36, i64 1
%38 = fmul double %37, %37
%39 = extractelement <2 x double> %36, i64 0
%40 = call double @llvm.fmuladd.f64(double %39, double %39, double %38)
%41 = call double @sqrt(double %40)
%42 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %35, i64 0
%43 = call double @sqrt(double %40)
%44 = shufflevector <2 x double> %36, <2 x double> undef, <2 x i32> <i32 1, i32 0>
%45 = insertelement <2 x double> poison, double %41, i64 0
%46 = insertelement <2 x double> %45, double %43, i64 1
%47 = fdiv <2 x double> %44, %46
%48 = fsub <2 x double> %36, %47
%49 = fadd <2 x double> %36, %47
%50 = shufflevector <2 x double> %48, <2 x double> %49, <2 x i32> <i32 0, i32 3>
%51 = bitcast double* %42 to <2 x double>*
store <2 x double> %50, <2 x double>* %51
%52 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %35, i64 2
store double 1.000000e+00, double* %52
%53 = add nsw i64 %35, 1
%54 = load i32, i32* %1
%55 = sext i32 %54 to i64
%56 = icmp slt i64 %35, %55
br i1 %56, label %34, label %57
57: ; preds = %34
%58 = sext i32 %54 to i64
br label %59
59: ; preds = %25, %57, %13
%60 = phi i64 [ %15, %13 ], [ %15, %25 ], [ %58, %57 ]
%61 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %60, i64 0
%62 = load double, double* %61
%63 = getelementptr inbounds [1001 x [3 x double]], [1001 x [3 x double]]* %2, i64 0, i64 %60, i64 1
%64 = load double, double* %63
%65 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %62, double %64)
%66 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%67 = load i32, i32* %1
%68 = icmp eq i32 %67, -1
br i1 %68, label %69, label %13
69: ; preds = %59, %0
ret i32 0
}