; LLVM IR from ryanlayer/giggle :: src/kfunc.ll (kt_fisher_exact)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._hgacc_t = type { i64, i64, i64, i64, x86_fp80 }

; Function Attrs: nounwind uwtable
declare dso_local x86_fp80 @_hypergeo_acc(i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local x86_fp80 @_kt_fisher_exact(i64 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca x86_fp80, align 16
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca x86_fp80, align 16
  %21 = alloca x86_fp80, align 16
  %22 = alloca x86_fp80, align 16
  %23 = alloca x86_fp80, align 16
  %24 = alloca %struct._hgacc_t, align 16
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i32, align 4
  store i64 %0, ptr %9, align 8, !tbaa !5
  store i64 %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %29 = load i64, ptr %9, align 8, !tbaa !5
  %30 = load i64, ptr %10, align 8, !tbaa !5
  %31 = add nsw i64 %29, %30
  store i64 %31, ptr %25, align 8, !tbaa !5
  %32 = load i64, ptr %9, align 8, !tbaa !5
  %33 = load i64, ptr %11, align 8, !tbaa !5
  %34 = add nsw i64 %32, %33
  store i64 %34, ptr %26, align 8, !tbaa !5
  %35 = load i64, ptr %9, align 8, !tbaa !5
  %36 = load i64, ptr %10, align 8, !tbaa !5
  %37 = add nsw i64 %35, %36
  %38 = load i64, ptr %11, align 8, !tbaa !5
  %39 = add nsw i64 %37, %38
  %40 = load i64, ptr %12, align 8, !tbaa !5
  %41 = add nsw i64 %39, %40
  store i64 %41, ptr %27, align 8, !tbaa !5
  %42 = load i64, ptr %26, align 8, !tbaa !5
  %43 = load i64, ptr %25, align 8, !tbaa !5
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %45, label %47

45:                                               ; preds = %7
  %46 = load i64, ptr %26, align 8, !tbaa !5
  br label %49

47:                                               ; preds = %7
  %48 = load i64, ptr %25, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %47, %45
  %50 = phi i64 [ %46, %45 ], [ %48, %47 ]
  store i64 %50, ptr %18, align 8, !tbaa !5
  %51 = load i64, ptr %25, align 8, !tbaa !5
  %52 = load i64, ptr %26, align 8, !tbaa !5
  %53 = add nsw i64 %51, %52
  %54 = load i64, ptr %27, align 8, !tbaa !5
  %55 = sub nsw i64 %53, %54
  store i64 %55, ptr %19, align 8, !tbaa !5
  %56 = load i64, ptr %19, align 8, !tbaa !5
  %57 = icmp slt i64 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %49
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %58, %49
  %60 = load ptr, ptr %14, align 8, !tbaa !9
  store x86_fp80 0xK3FFF8000000000000000, ptr %60, align 16, !tbaa !11
  %61 = load ptr, ptr %13, align 8, !tbaa !9
  store x86_fp80 0xK3FFF8000000000000000, ptr %61, align 16, !tbaa !11
  %62 = load ptr, ptr %15, align 8, !tbaa !9
  store x86_fp80 0xK3FFF8000000000000000, ptr %62, align 16, !tbaa !11
  %63 = load i64, ptr %19, align 8, !tbaa !5
  %64 = load i64, ptr %18, align 8, !tbaa !5
  %65 = icmp eq i64 %63, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %59
  store x86_fp80 0xK3FFF8000000000000000, ptr %8, align 16
  store i32 1, ptr %28, align 4
  br label %192

67:                                               ; preds = %59
  %68 = load i64, ptr %9, align 8, !tbaa !5
  %69 = load i64, ptr %25, align 8, !tbaa !5
  %70 = load i64, ptr %26, align 8, !tbaa !5
  %71 = load i64, ptr %27, align 8, !tbaa !5
  %72 = call x86_fp80 @_hypergeo_acc(i64 noundef %68, i64 noundef %69, i64 noundef %70, i64 noundef %71, ptr noundef %24)
  store x86_fp80 %72, ptr %21, align 16, !tbaa !11
  %73 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %74 = fcmp olt x86_fp80 %73, 0xK3D66C3F490AA77BD6000
  br i1 %74, label %75, label %76

75:                                               ; preds = %67
  store x86_fp80 0xK3D66C3F490AA77BD6000, ptr %21, align 16, !tbaa !11
  br label %76

76:                                               ; preds = %75, %67
  %77 = load i64, ptr %19, align 8, !tbaa !5
  %78 = call x86_fp80 @_hypergeo_acc(i64 noundef %77, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %24)
  store x86_fp80 %78, ptr %20, align 16, !tbaa !11
  store x86_fp80 0xK00000000000000000000, ptr %22, align 16, !tbaa !11
  %79 = load i64, ptr %19, align 8, !tbaa !5
  %80 = add nsw i64 %79, 1
  store i64 %80, ptr %16, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %98, %76
  %82 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %83 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %84 = fmul x86_fp80 0xK3FFEFFFFFFD50CE23800, %83
  %85 = fcmp olt x86_fp80 %82, %84
  br i1 %85, label %86, label %90

86:                                               ; preds = %81
  %87 = load i64, ptr %16, align 8, !tbaa !5
  %88 = load i64, ptr %18, align 8, !tbaa !5
  %89 = icmp sle i64 %87, %88
  br label %90

90:                                               ; preds = %86, %81
  %91 = phi i1 [ false, %81 ], [ %89, %86 ]
  br i1 %91, label %92, label %101

92:                                               ; preds = %90
  %93 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %94 = load x86_fp80, ptr %22, align 16, !tbaa !11
  %95 = fadd x86_fp80 %94, %93
  store x86_fp80 %95, ptr %22, align 16, !tbaa !11
  %96 = load i64, ptr %16, align 8, !tbaa !5
  %97 = call x86_fp80 @_hypergeo_acc(i64 noundef %96, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %24)
  store x86_fp80 %97, ptr %20, align 16, !tbaa !11
  br label %98

98:                                               ; preds = %92
  %99 = load i64, ptr %16, align 8, !tbaa !5
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %16, align 8, !tbaa !5
  br label %81, !llvm.loop !13

101:                                              ; preds = %90
  %102 = load i64, ptr %16, align 8, !tbaa !5
  %103 = add nsw i64 %102, -1
  store i64 %103, ptr %16, align 8, !tbaa !5
  %104 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %105 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %106 = fmul x86_fp80 0xK3FFF80000015798EE000, %105
  %107 = fcmp olt x86_fp80 %104, %106
  br i1 %107, label %108, label %112

108:                                              ; preds = %101
  %109 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %110 = load x86_fp80, ptr %22, align 16, !tbaa !11
  %111 = fadd x86_fp80 %110, %109
  store x86_fp80 %111, ptr %22, align 16, !tbaa !11
  br label %115

112:                                              ; preds = %101
  %113 = load i64, ptr %16, align 8, !tbaa !5
  %114 = add nsw i64 %113, -1
  store i64 %114, ptr %16, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %112, %108
  %116 = load i64, ptr %18, align 8, !tbaa !5
  %117 = call x86_fp80 @_hypergeo_acc(i64 noundef %116, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %24)
  store x86_fp80 %117, ptr %20, align 16, !tbaa !11
  store x86_fp80 0xK00000000000000000000, ptr %23, align 16, !tbaa !11
  %118 = load i64, ptr %18, align 8, !tbaa !5
  %119 = sub nsw i64 %118, 1
  store i64 %119, ptr %17, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %136, %115
  %121 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %122 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %123 = fmul x86_fp80 0xK3FFEFFFFFFD50CE23800, %122
  %124 = fcmp olt x86_fp80 %121, %123
  br i1 %124, label %125, label %128

125:                                              ; preds = %120
  %126 = load i64, ptr %17, align 8, !tbaa !5
  %127 = icmp sge i64 %126, 0
  br label %128

128:                                              ; preds = %125, %120
  %129 = phi i1 [ false, %120 ], [ %127, %125 ]
  br i1 %129, label %130, label %139

130:                                              ; preds = %128
  %131 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %132 = load x86_fp80, ptr %23, align 16, !tbaa !11
  %133 = fadd x86_fp80 %132, %131
  store x86_fp80 %133, ptr %23, align 16, !tbaa !11
  %134 = load i64, ptr %17, align 8, !tbaa !5
  %135 = call x86_fp80 @_hypergeo_acc(i64 noundef %134, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef %24)
  store x86_fp80 %135, ptr %20, align 16, !tbaa !11
  br label %136

136:                                              ; preds = %130
  %137 = load i64, ptr %17, align 8, !tbaa !5
  %138 = add nsw i64 %137, -1
  store i64 %138, ptr %17, align 8, !tbaa !5
  br label %120, !llvm.loop !15

139:                                              ; preds = %128
  %140 = load i64, ptr %17, align 8, !tbaa !5
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %17, align 8, !tbaa !5
  %142 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %143 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %144 = fmul x86_fp80 0xK3FFF80000015798EE000, %143
  %145 = fcmp olt x86_fp80 %142, %144
  br i1 %145, label %146, label %150

146:                                              ; preds = %139
  %147 = load x86_fp80, ptr %20, align 16, !tbaa !11
  %148 = load x86_fp80, ptr %23, align 16, !tbaa !11
  %149 = fadd x86_fp80 %148, %147
  store x86_fp80 %149, ptr %23, align 16, !tbaa !11
  br label %153

150:                                              ; preds = %139
  %151 = load i64, ptr %17, align 8, !tbaa !5
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %17, align 8, !tbaa !5
  br label %153

153:                                              ; preds = %150, %146
  %154 = load x86_fp80, ptr %22, align 16, !tbaa !11
  %155 = load x86_fp80, ptr %23, align 16, !tbaa !11
  %156 = fadd x86_fp80 %154, %155
  %157 = load ptr, ptr %15, align 8, !tbaa !9
  store x86_fp80 %156, ptr %157, align 16, !tbaa !11
  %158 = load ptr, ptr %15, align 8, !tbaa !9
  %159 = load x86_fp80, ptr %158, align 16, !tbaa !11
  %160 = fcmp ogt x86_fp80 %159, 0xK3FFF8000000000000000
  br i1 %160, label %161, label %163

161:                                              ; preds = %153
  %162 = load ptr, ptr %15, align 8, !tbaa !9
  store x86_fp80 0xK3FFF8000000000000000, ptr %162, align 16, !tbaa !11
  br label %163

163:                                              ; preds = %161, %153
  %164 = load i64, ptr %16, align 8, !tbaa !5
  %165 = load i64, ptr %9, align 8, !tbaa !5
  %166 = sub nsw i64 %164, %165
  %167 = call i64 @llvm.abs.i64(i64 %166, i1 true)
  %168 = load i64, ptr %17, align 8, !tbaa !5
  %169 = load i64, ptr %9, align 8, !tbaa !5
  %170 = sub nsw i64 %168, %169
  %171 = call i64 @llvm.abs.i64(i64 %170, i1 true)
  %172 = icmp slt i64 %167, %171
  br i1 %172, label %173, label %181

173:                                              ; preds = %163
  %174 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %175 = fcmp une x86_fp80 %174, 0xK00000000000000000000
  br i1 %175, label %176, label %181

176:                                              ; preds = %173
  %177 = load x86_fp80, ptr %22, align 16, !tbaa !11
  %178 = fsub x86_fp80 0xK3FFF8000000000000000, %177
  %179 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %180 = fadd x86_fp80 %178, %179
  store x86_fp80 %180, ptr %23, align 16, !tbaa !11
  br label %186

181:                                              ; preds = %173, %163
  %182 = load x86_fp80, ptr %23, align 16, !tbaa !11
  %183 = fsub x86_fp80 0xK3FFF8000000000000000, %182
  %184 = load x86_fp80, ptr %21, align 16, !tbaa !11
  %185 = fadd x86_fp80 %183, %184
  store x86_fp80 %185, ptr %22, align 16, !tbaa !11
  br label %186

186:                                              ; preds = %181, %176
  %187 = load x86_fp80, ptr %22, align 16, !tbaa !11
  %188 = load ptr, ptr %13, align 8, !tbaa !9
  store x86_fp80 %187, ptr %188, align 16, !tbaa !11
  %189 = load x86_fp80, ptr %23, align 16, !tbaa !11
  %190 = load ptr, ptr %14, align 8, !tbaa !9
  store x86_fp80 %189, ptr %190, align 16, !tbaa !11
  %191 = load x86_fp80, ptr %21, align 16, !tbaa !11
  store x86_fp80 %191, ptr %8, align 16
  store i32 1, ptr %28, align 4
  br label %192

192:                                              ; preds = %186, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %193 = load x86_fp80, ptr %8, align 16
  ret x86_fp80 %193
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.abs.i64(i64, i1 immarg) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._hgacc_t = type { i64, i64, i64, i64, x86_fp80 }

; Function Attrs: nounwind uwtable
declare dso_local x86_fp80 @_hypergeo_acc(i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local x86_fp80 @_kt_fisher_exact(i64 noundef %0, i64 noundef %1, i64 noundef %2, i64 noundef %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 {
  %8 = alloca %struct._hgacc_t, align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #4
  %9 = add nsw i64 %1, %0
  %10 = add nsw i64 %2, %0
  %11 = add nsw i64 %9, %2
  %12 = add nsw i64 %11, %3
  %13 = tail call i64 @llvm.smin.i64(i64 %10, i64 %9)
  %14 = add nsw i64 %10, %9
  %15 = sub i64 %14, %12
  %spec.store.select = tail call i64 @llvm.smax.i64(i64 %15, i64 0)
  store x86_fp80 0xK3FFF8000000000000000, ptr %5, align 16, !tbaa !5
  store x86_fp80 0xK3FFF8000000000000000, ptr %4, align 16, !tbaa !5
  store x86_fp80 0xK3FFF8000000000000000, ptr %6, align 16, !tbaa !5
  %16 = icmp eq i64 %spec.store.select, %13
  br i1 %16, label %57, label %17

17:                                               ; preds = %7
  %18 = call x86_fp80 @_hypergeo_acc(i64 noundef %0, i64 noundef %9, i64 noundef %10, i64 noundef %12, ptr noundef nonnull %8)
  %19 = fcmp olt x86_fp80 %18, 0xK3D66C3F490AA77BD6000
  %.088 = select i1 %19, x86_fp80 0xK3D66C3F490AA77BD6000, x86_fp80 %18
  %20 = call x86_fp80 @_hypergeo_acc(i64 noundef %spec.store.select, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %8)
  %21 = fmul x86_fp80 %.088, 0xK3FFEFFFFFFD50CE23800
  %22 = fcmp olt x86_fp80 %20, %21
  %23 = icmp slt i64 %spec.store.select, %13
  %24 = and i1 %22, %23
  br i1 %24, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17, %.lr.ph
  %.078.in94 = phi i64 [ %.078, %.lr.ph ], [ %spec.store.select, %17 ]
  %.08393 = phi x86_fp80 [ %25, %.lr.ph ], [ 0xK00000000000000000000, %17 ]
  %.08692 = phi x86_fp80 [ %26, %.lr.ph ], [ %20, %17 ]
  %.078 = add nuw nsw i64 %.078.in94, 1
  %25 = fadd x86_fp80 %.08692, %.08393
  %26 = call x86_fp80 @_hypergeo_acc(i64 noundef %.078, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %8)
  %27 = fcmp olt x86_fp80 %26, %21
  %28 = icmp slt i64 %.078, %13
  %29 = and i1 %27, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %17
  %.086.lcssa = phi x86_fp80 [ %20, %17 ], [ %26, %.lr.ph ]
  %.083.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %17 ], [ %25, %.lr.ph ]
  %.078.in.lcssa = phi i64 [ %spec.store.select, %17 ], [ %.078, %.lr.ph ]
  %30 = fmul x86_fp80 %.088, 0xK3FFF80000015798EE000
  %31 = fcmp uge x86_fp80 %.086.lcssa, %30
  %32 = fadd x86_fp80 %.086.lcssa, %.083.lcssa
  %.184 = select i1 %31, x86_fp80 %.083.lcssa, x86_fp80 %32
  %33 = sext i1 %31 to i64
  %34 = call x86_fp80 @_hypergeo_acc(i64 noundef %13, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %8)
  %35 = fcmp olt x86_fp80 %34, %21
  %36 = icmp sgt i64 %13, 0
  %37 = and i1 %35, %36
  br i1 %37, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %._crit_edge, %.lr.ph102
  %.079.in100 = phi i64 [ %.079, %.lr.ph102 ], [ %13, %._crit_edge ]
  %.08199 = phi x86_fp80 [ %38, %.lr.ph102 ], [ 0xK00000000000000000000, %._crit_edge ]
  %.18798 = phi x86_fp80 [ %39, %.lr.ph102 ], [ %34, %._crit_edge ]
  %.079 = add nsw i64 %.079.in100, -1
  %38 = fadd x86_fp80 %.18798, %.08199
  %39 = call x86_fp80 @_hypergeo_acc(i64 noundef %.079, i64 noundef 0, i64 noundef 0, i64 noundef 0, ptr noundef nonnull %8)
  %40 = fcmp olt x86_fp80 %39, %21
  %41 = icmp ugt i64 %.079.in100, 1
  %42 = and i1 %40, %41
  br i1 %42, label %.lr.ph102, label %._crit_edge103, !llvm.loop !11

._crit_edge103:                                   ; preds = %.lr.ph102, %._crit_edge
  %.187.lcssa = phi x86_fp80 [ %34, %._crit_edge ], [ %39, %.lr.ph102 ]
  %.081.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %._crit_edge ], [ %38, %.lr.ph102 ]
  %.079.in.lcssa = phi i64 [ %13, %._crit_edge ], [ %.079, %.lr.ph102 ]
  %43 = fcmp uge x86_fp80 %.187.lcssa, %30
  %44 = fadd x86_fp80 %.187.lcssa, %.081.lcssa
  %.182 = select i1 %43, x86_fp80 %.081.lcssa, x86_fp80 %44
  %45 = zext i1 %43 to i64
  %46 = fadd x86_fp80 %.184, %.182
  %47 = fcmp ogt x86_fp80 %46, 0xK3FFF8000000000000000
  %storemerge = select i1 %47, x86_fp80 0xK3FFF8000000000000000, x86_fp80 %46
  store x86_fp80 %storemerge, ptr %6, align 16, !tbaa !5
  %.1 = sub i64 %33, %0
  %48 = add i64 %.1, %.078.in.lcssa
  %49 = call i64 @llvm.abs.i64(i64 %48, i1 true)
  %.180 = sub i64 %45, %0
  %50 = add i64 %.180, %.079.in.lcssa
  %51 = call i64 @llvm.abs.i64(i64 %50, i1 true)
  %52 = icmp ult i64 %49, %51
  %53 = fsub x86_fp80 0xK3FFF8000000000000000, %.184
  %54 = fadd x86_fp80 %.088, %53
  %55 = fsub x86_fp80 0xK3FFF8000000000000000, %.182
  %56 = fadd x86_fp80 %.088, %55
  %.285 = select i1 %52, x86_fp80 %.184, x86_fp80 %56
  %.2 = select i1 %52, x86_fp80 %54, x86_fp80 %.182
  store x86_fp80 %.285, ptr %4, align 16, !tbaa !5
  store x86_fp80 %.2, ptr %5, align 16, !tbaa !5
  br label %57

57:                                               ; preds = %7, %._crit_edge103
  %.0 = phi x86_fp80 [ %.088, %._crit_edge103 ], [ 0xK3FFF8000000000000000, %7 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #4
  ret x86_fp80 %.0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.abs.i64(i64, i1 immarg) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass