#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 */
double pythag2(double const, double const);
double sqrt(double);
int intersection_circle_segment(double radius, const double seg0[2],
                                const double segd[2], double isect[4],
                                double t_[2]) {
  int i;
  double seg1[2] = {seg0[0] + segd[0], seg0[1] + segd[1]};
  double r[2] = {pythag2(seg0[0], seg0[1]) / radius,
                 pythag2(seg1[0], seg1[1]) / radius};
  double s = pythag2(segd[0], segd[1]) / radius;
  if (r[0] < 1 && r[1] < 1) {
    return 0;
  }
  double isl2 = 1. / (s * s);
  double seg_dot = (seg0[0] * segd[0] + seg0[1] * segd[1]) / (radius * radius);
  double disc = (seg_dot * seg_dot * isl2 - (r[0] * r[0] - 1)) * isl2;
  double t0 = -seg_dot * isl2;
  double t[2];
  if (disc < 0) {
    return 0;
  } else {
    int c = 0;
    disc = sqrt(disc);
    t[0] = t0 - disc;
    t[1] = t0 + disc;
    for (i = 0; i < 2; ++i) {
      if (0 < t[i] && t[i] < 1) {
        isect[2 * c + 0] = seg0[0] + t[i] * segd[0];
        isect[2 * c + 1] = seg0[1] + t[i] * segd[1];
        if (NULL != t_) {
          t_[c] = t[i];
          t_[c] = t[i];
        }
        ++c;
      }
    }
    return c;
  }
}


x86 assembly (clang, -O0):
<intersection_circle_segment>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
call   1030 <pythag2@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
call   1030 <pythag2@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
call   1030 <pythag2@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe33(%rip),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    11f7 <intersection_circle_segment+0xd7>
movsd  0xe20(%rip),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    11f7 <intersection_circle_segment+0xd7>
movl   $0x0,-0x4(%rbp)
jmp    145a <intersection_circle_segment+0x33a>
movsd  -0x68(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  0xdf7(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x20(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xd94(%rip),%xmm3
addsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x80(%rbp),%xmm0
jbe    12e4 <intersection_circle_segment+0x1c4>
movl   $0x0,-0x4(%rbp)
jmp    145a <intersection_circle_segment+0x33a>
movl   $0x0,-0xa4(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x34(%rbp)
cmpl   $0x2,-0x34(%rbp)
jge    1451 <intersection_circle_segment+0x331>
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    143e <intersection_circle_segment+0x31e>
movslq -0x34(%rbp),%rax
movsd  0xca2(%rip),%xmm0
ucomisd -0xa0(%rbp,%rax,8),%xmm0
ff ff
jbe    143e <intersection_circle_segment+0x31e>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0xa4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0xa4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
xor    %eax,%eax
cmp    -0x30(%rbp),%rax
je     142f <intersection_circle_segment+0x30f>
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x34(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x30(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1443 <intersection_circle_segment+0x323>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    132e <intersection_circle_segment+0x20e>
mov    -0xa4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intersection_circle_segment>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
movaps %xmm0,(%rsp)
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  (%rsi),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x8(%rsi),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x28(%rsp)
call   1030 <pythag2@plt>
movapd %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
call   1030 <pythag2@plt>
unpcklpd 0x30(%rsp),%xmm0
movapd (%rsp),%xmm1
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
call   1030 <pythag2@plt>
movapd 0x10(%rsp),%xmm5
movapd %xmm5,%xmm1
cmpltpd 0xe49(%rip),%xmm1
movmskpd %xmm1,%ecx
xor    %eax,%eax
cmp    $0x3,%cl
je     130b <intersection_circle_segment+0x1eb>
movapd (%rsp),%xmm2
divsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm0
movsd  0xe45(%rip),%xmm4
movapd %xmm4,%xmm3
divsd  %xmm0,%xmm3
movsd  (%r12),%xmm1
movsd  0x8(%r12),%xmm0
mulsd  0x8(%rbx),%xmm0
mulsd  (%rbx),%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
unpckhpd %xmm5,%xmm5
mulsd  %xmm5,%xmm5
addsd  0xe0b(%rip),%xmm5
mulsd  %xmm3,%xmm0
subsd  %xmm5,%xmm0
mulsd  %xmm3,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
ja     130b <intersection_circle_segment+0x1eb>
xorpd  0xdd1(%rip),%xmm1
mulsd  %xmm1,%xmm3
ucomisd %xmm2,%xmm0
jb     124f <intersection_circle_segment+0x12f>
sqrtsd %xmm0,%xmm0
jmp    1266 <intersection_circle_segment+0x146>
movsd  %xmm3,(%rsp)
call   1040 <sqrt@plt>
movsd  0xdbf(%rip),%xmm4
movsd  (%rsp),%xmm3
movapd %xmm3,%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm0,%xmm3
xor    %eax,%eax
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    12bc <intersection_circle_segment+0x19c>
ucomisd %xmm1,%xmm4
jbe    12bc <intersection_circle_segment+0x19c>
movsd  (%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r12),%xmm2
movsd  %xmm2,(%r15)
movsd  0x8(%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x8(%r12),%xmm2
movsd  %xmm2,0x8(%r15)
mov    $0x1,%eax
test   %r14,%r14
je     12bc <intersection_circle_segment+0x19c>
movsd  %xmm1,(%r14)
ucomisd %xmm0,%xmm3
jbe    130b <intersection_circle_segment+0x1eb>
ucomisd %xmm3,%xmm4
jbe    130b <intersection_circle_segment+0x1eb>
lea    (%rax,%rax,1),%ecx
movsd  (%rbx),%xmm0
mulsd  %xmm3,%xmm0
addsd  (%r12),%xmm0
movsd  %xmm0,(%r15,%rcx,8)
movsd  0x8(%rbx),%xmm0
mulsd  %xmm3,%xmm0
addsd  0x8(%r12),%xmm0
lea    (%rax,%rax,1),%ecx
add    $0x1,%ecx
movsd  %xmm0,(%r15,%rcx,8)
test   %r14,%r14
je     1308 <intersection_circle_segment+0x1e8>
mov    %eax,%ecx
movsd  %xmm3,(%r14,%rcx,8)
add    $0x1,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @intersection_circle_segment(double %0, double* %1, double* %2, double* %3, double* %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca i32
%13 = alloca [2 x double]
%14 = alloca [2 x double]
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca [2 x double]
%21 = alloca i32
store double %0, double* %7
store double* %1, double** %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
%22 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 0
%23 = load double*, double** %8
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = load double*, double** %9
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
%29 = fadd double %25, %28
store double %29, double* %22
%30 = getelementptr inbounds double, double* %22, i64 1
%31 = load double*, double** %8
%32 = getelementptr inbounds double, double* %31, i64 1
%33 = load double, double* %32
%34 = load double*, double** %9
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
%37 = fadd double %33, %36
store double %37, double* %30
%38 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%39 = load double*, double** %8
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = load double*, double** %8
%43 = getelementptr inbounds double, double* %42, i64 1
%44 = load double, double* %43
%45 = call double @pythag2(double %41, double %44)
%46 = load double, double* %7
%47 = fdiv double %45, %46
store double %47, double* %38
%48 = getelementptr inbounds double, double* %38, i64 1
%49 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 0
%50 = load double, double* %49
%51 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 1
%52 = load double, double* %51
%53 = call double @pythag2(double %50, double %52)
%54 = load double, double* %7
%55 = fdiv double %53, %54
store double %55, double* %48
%56 = load double*, double** %9
%57 = getelementptr inbounds double, double* %56, i64 0
%58 = load double, double* %57
%59 = load double*, double** %9
%60 = getelementptr inbounds double, double* %59, i64 1
%61 = load double, double* %60
%62 = call double @pythag2(double %58, double %61)
%63 = load double, double* %7
%64 = fdiv double %62, %63
store double %64, double* %15
%65 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%66 = load double, double* %65
%67 = fcmp olt double %66, 1.000000e+00
br i1 %67, label %68, label %73
68: ; preds = %5
%69 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 1
%70 = load double, double* %69
%71 = fcmp olt double %70, 1.000000e+00
br i1 %71, label %72, label %73
72: ; preds = %68
store i32 0, i32* %6
br label %205
73: ; preds = %68, %5
%74 = load double, double* %15
%75 = load double, double* %15
%76 = fmul double %74, %75
%77 = fdiv double 1.000000e+00, %76
store double %77, double* %16
%78 = load double*, double** %8
%79 = getelementptr inbounds double, double* %78, i64 0
%80 = load double, double* %79
%81 = load double*, double** %9
%82 = getelementptr inbounds double, double* %81, i64 0
%83 = load double, double* %82
%84 = load double*, double** %8
%85 = getelementptr inbounds double, double* %84, i64 1
%86 = load double, double* %85
%87 = load double*, double** %9
%88 = getelementptr inbounds double, double* %87, i64 1
%89 = load double, double* %88
%90 = fmul double %86, %89
%91 = call double @llvm.fmuladd.f64(double %80, double %83, double %90)
%92 = load double, double* %7
%93 = load double, double* %7
%94 = fmul double %92, %93
%95 = fdiv double %91, %94
store double %95, double* %17
%96 = load double, double* %17
%97 = load double, double* %17
%98 = fmul double %96, %97
%99 = load double, double* %16
%100 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%101 = load double, double* %100
%102 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%103 = load double, double* %102
%104 = call double @llvm.fmuladd.f64(double %101, double %103, double -1.000000e+00)
%105 = fneg double %104
%106 = call double @llvm.fmuladd.f64(double %98, double %99, double %105)
%107 = load double, double* %16
%108 = fmul double %106, %107
store double %108, double* %18
%109 = load double, double* %17
%110 = fneg double %109
%111 = load double, double* %16
%112 = fmul double %110, %111
store double %112, double* %19
%113 = load double, double* %18
%114 = fcmp olt double %113, 0.000000e+00
br i1 %114, label %115, label %116
115: ; preds = %73
store i32 0, i32* %6
br label %205
116: ; preds = %73
store i32 0, i32* %21
%117 = load double, double* %18
%118 = call double @sqrt(double %117)
store double %118, double* %18
%119 = load double, double* %19
%120 = load double, double* %18
%121 = fsub double %119, %120
%122 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 0
store double %121, double* %122
%123 = load double, double* %19
%124 = load double, double* %18
%125 = fadd double %123, %124
%126 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 1
store double %125, double* %126
store i32 0, i32* %12
br label %127
127: ; preds = %200, %116
%128 = load i32, i32* %12
%129 = icmp slt i32 %128, 2
br i1 %129, label %130, label %203
130: ; preds = %127
%131 = load i32, i32* %12
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 %132
%134 = load double, double* %133
%135 = fcmp olt double 0.000000e+00, %134
br i1 %135, label %136, label %199
136: ; preds = %130
%137 = load i32, i32* %12
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 %138
%140 = load double, double* %139
%141 = fcmp olt double %140, 1.000000e+00
br i1 %141, label %142, label %199
142: ; preds = %136
%143 = load double*, double** %8
%144 = getelementptr inbounds double, double* %143, i64 0
%145 = load double, double* %144
%146 = load i32, i32* %12
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 %147
%149 = load double, double* %148
%150 = load double*, double** %9
%151 = getelementptr inbounds double, double* %150, i64 0
%152 = load double, double* %151
%153 = call double @llvm.fmuladd.f64(double %149, double %152, double %145)
%154 = load double*, double** %10
%155 = load i32, i32* %21
%156 = mul nsw i32 2, %155
%157 = add nsw i32 %156, 0
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double, double* %154, i64 %158
store double %153, double* %159
%160 = load double*, double** %8
%161 = getelementptr inbounds double, double* %160, i64 1
%162 = load double, double* %161
%163 = load i32, i32* %12
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 %164
%166 = load double, double* %165
%167 = load double*, double** %9
%168 = getelementptr inbounds double, double* %167, i64 1
%169 = load double, double* %168
%170 = call double @llvm.fmuladd.f64(double %166, double %169, double %162)
%171 = load double*, double** %10
%172 = load i32, i32* %21
%173 = mul nsw i32 2, %172
%174 = add nsw i32 %173, 1
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double, double* %171, i64 %175
store double %170, double* %176
%177 = load double*, double** %11
%178 = icmp ne double* null, %177
br i1 %178, label %179, label %196
179: ; preds = %142
%180 = load i32, i32* %12
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 %181
%183 = load double, double* %182
%184 = load double*, double** %11
%185 = load i32, i32* %21
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds double, double* %184, i64 %186
store double %183, double* %187
%188 = load i32, i32* %12
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 %189
%191 = load double, double* %190
%192 = load double*, double** %11
%193 = load i32, i32* %21
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double, double* %192, i64 %194
store double %191, double* %195
br label %196
196: ; preds = %179, %142
%197 = load i32, i32* %21
%198 = add nsw i32 %197, 1
store i32 %198, i32* %21
br label %199
199: ; preds = %196, %136, %130
br label %200
200: ; preds = %199
%201 = load i32, i32* %12
%202 = add nsw i32 %201, 1
store i32 %202, i32* %12
br label %127
203: ; preds = %127
%204 = load i32, i32* %21
store i32 %204, i32* %6
br label %205
205: ; preds = %203, %115, %72
%206 = load i32, i32* %6
ret i32 %206
}

LLVM IR (-O2):
define i32 @intersection_circle_segment(double %0, double* nocapture %1, double* nocapture %2, double* nocapture writeonly %3, double* writeonly %4) {
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fadd double %6, %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %2, i64 1
%12 = load double, double* %11
%13 = fadd double %10, %12
%14 = tail call double @pythag2(double %6, double %10)
%15 = tail call double @pythag2(double %8, double %13)
%16 = insertelement <2 x double> poison, double %15, i64 0
%17 = insertelement <2 x double> %16, double %14, i64 1
%18 = insertelement <2 x double> poison, double %0, i64 0
%19 = shufflevector <2 x double> %18, <2 x double> poison, <2 x i32> zeroinitializer
%20 = fdiv <2 x double> %17, %19
%21 = load double, double* %2
%22 = load double, double* %11
%23 = tail call double @pythag2(double %21, double %22)
%24 = fcmp olt <2 x double> %20, <double 1.000000e+00, double 1.000000e+00>
%25 = extractelement <2 x i1> %24, i64 0
%26 = extractelement <2 x i1> %24, i64 1
%27 = select i1 %26, i1 %25, i1 false
br i1 %27, label %89, label %28
28: ; preds = %5
%29 = fdiv double %23, %0
%30 = fmul double %29, %29
%31 = fdiv double 1.000000e+00, %30
%32 = load double, double* %1
%33 = load double, double* %2
%34 = load double, double* %9
%35 = load double, double* %11
%36 = fmul double %34, %35
%37 = tail call double @llvm.fmuladd.f64(double %32, double %33, double %36)
%38 = fmul double %0, %0
%39 = fdiv double %37, %38
%40 = fmul double %39, %39
%41 = extractelement <2 x double> %20, i64 1
%42 = tail call double @llvm.fmuladd.f64(double %41, double %41, double -1.000000e+00)
%43 = fneg double %42
%44 = tail call double @llvm.fmuladd.f64(double %40, double %31, double %43)
%45 = fmul double %31, %44
%46 = fneg double %39
%47 = fmul double %31, %46
%48 = fcmp olt double %45, 0.000000e+00
br i1 %48, label %89, label %49
49: ; preds = %28
%50 = tail call double @sqrt(double %45)
%51 = fsub double %47, %50
%52 = fadd double %47, %50
%53 = icmp eq double* %4, null
%54 = fcmp ogt double %51, 0.000000e+00
%55 = fcmp olt double %51, 1.000000e+00
%56 = and i1 %54, %55
br i1 %56, label %57, label %66
57: ; preds = %49
%58 = load double, double* %1
%59 = load double, double* %2
%60 = tail call double @llvm.fmuladd.f64(double %51, double %59, double %58)
store double %60, double* %3
%61 = load double, double* %9
%62 = load double, double* %11
%63 = tail call double @llvm.fmuladd.f64(double %51, double %62, double %61)
%64 = getelementptr inbounds double, double* %3, i64 1
store double %63, double* %64
br i1 %53, label %66, label %65
65: ; preds = %57
store double %51, double* %4
br label %66
66: ; preds = %57, %65, %49
%67 = phi i32 [ 0, %49 ], [ 1, %65 ], [ 1, %57 ]
%68 = fcmp ogt double %52, 0.000000e+00
%69 = fcmp olt double %52, 1.000000e+00
%70 = and i1 %68, %69
br i1 %70, label %71, label %89
71: ; preds = %66
%72 = load double, double* %1
%73 = load double, double* %2
%74 = tail call double @llvm.fmuladd.f64(double %52, double %73, double %72)
%75 = shl nuw nsw i32 %67, 1
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds double, double* %3, i64 %76
store double %74, double* %77
%78 = load double, double* %9
%79 = load double, double* %11
%80 = tail call double @llvm.fmuladd.f64(double %52, double %79, double %78)
%81 = or i32 %75, 1
%82 = zext i32 %81 to i64
%83 = getelementptr inbounds double, double* %3, i64 %82
store double %80, double* %83
br i1 %53, label %87, label %84
84: ; preds = %71
%85 = zext i32 %67 to i64
%86 = getelementptr inbounds double, double* %4, i64 %85
store double %52, double* %86
br label %87
87: ; preds = %84, %71
%88 = add nuw nsw i32 %67, 1
br label %89
89: ; preds = %28, %87, %66, %5
%90 = phi i32 [ 0, %5 ], [ 0, %28 ], [ %88, %87 ], [ %67, %66 ]
ret i32 %90
}