; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (statistics)

; 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.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13studentttest1EPNS_9ae_vectorEldPdS2_S2_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #1 {
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i8, align 1
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store double %2, ptr %10, align 8, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  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 1, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  store double 0.000000e+00, ptr %29, align 8, !tbaa !11
  %30 = load i64, ptr %9, align 8, !tbaa !9
  %31 = icmp sle i64 %30, 0
  br i1 %31, label %32, label %36

32:                                               ; preds = %7
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  store double 1.000000e+00, ptr %33, align 8, !tbaa !11
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  store double 1.000000e+00, ptr %34, align 8, !tbaa !11
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  store double 1.000000e+00, ptr %35, align 8, !tbaa !11
  store i32 1, ptr %26, align 4
  br label %204

36:                                               ; preds = %7
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %37, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = getelementptr inbounds double, ptr %39, i64 0
  %41 = load double, ptr %40, align 8, !tbaa !11
  store double %41, ptr %17, align 8, !tbaa !11
  store i8 1, ptr %19, align 1, !tbaa !14
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %42

42:                                               ; preds = %66, %36
  %43 = load i64, ptr %15, align 8, !tbaa !9
  %44 = load i64, ptr %9, align 8, !tbaa !9
  %45 = sub nsw i64 %44, 1
  %46 = icmp sle i64 %43, %45
  br i1 %46, label %47, label %69

47:                                               ; preds = %42
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %48, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = load i64, ptr %15, align 8, !tbaa !9
  %52 = getelementptr inbounds double, ptr %50, i64 %51
  %53 = load double, ptr %52, align 8, !tbaa !11
  store double %53, ptr %18, align 8, !tbaa !11
  %54 = load double, ptr %16, align 8, !tbaa !11
  %55 = load double, ptr %18, align 8, !tbaa !11
  %56 = fadd double %54, %55
  store double %56, ptr %16, align 8, !tbaa !11
  %57 = load i8, ptr %19, align 1, !tbaa !14, !range !16, !noundef !17
  %58 = trunc i8 %57 to i1
  br i1 %58, label %59, label %63

59:                                               ; preds = %47
  %60 = load double, ptr %18, align 8, !tbaa !11
  %61 = load double, ptr %17, align 8, !tbaa !11
  %62 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %60, double noundef %61)
  br label %63

63:                                               ; preds = %59, %47
  %64 = phi i1 [ false, %47 ], [ %62, %59 ]
  %65 = zext i1 %64 to i8
  store i8 %65, ptr %19, align 1, !tbaa !14
  br label %66

66:                                               ; preds = %63
  %67 = load i64, ptr %15, align 8, !tbaa !9
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %15, align 8, !tbaa !9
  br label %42, !llvm.loop !18

69:                                               ; preds = %42
  %70 = load i8, ptr %19, align 1, !tbaa !14, !range !16, !noundef !17
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %74

72:                                               ; preds = %69
  %73 = load double, ptr %17, align 8, !tbaa !11
  store double %73, ptr %16, align 8, !tbaa !11
  br label %79

74:                                               ; preds = %69
  %75 = load double, ptr %16, align 8, !tbaa !11
  %76 = load i64, ptr %9, align 8, !tbaa !9
  %77 = sitofp i64 %76 to double
  %78 = fdiv double %75, %77
  store double %78, ptr %16, align 8, !tbaa !11
  br label %79

79:                                               ; preds = %74, %72
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  store double 0.000000e+00, ptr %21, align 8, !tbaa !11
  %80 = load i64, ptr %9, align 8, !tbaa !9
  %81 = icmp ne i64 %80, 1
  br i1 %81, label %82, label %148

82:                                               ; preds = %79
  %83 = load i8, ptr %19, align 1, !tbaa !14, !range !16, !noundef !17
  %84 = trunc i8 %83 to i1
  br i1 %84, label %148, label %85

85:                                               ; preds = %82
  store double 0.000000e+00, ptr %22, align 8, !tbaa !11
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %104, %85
  %87 = load i64, ptr %15, align 8, !tbaa !9
  %88 = load i64, ptr %9, align 8, !tbaa !9
  %89 = sub nsw i64 %88, 1
  %90 = icmp sle i64 %87, %89
  br i1 %90, label %91, label %107

91:                                               ; preds = %86
  %92 = load double, ptr %22, align 8, !tbaa !11
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %93, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !13
  %96 = load i64, ptr %15, align 8, !tbaa !9
  %97 = getelementptr inbounds double, ptr %95, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !11
  %99 = load double, ptr %16, align 8, !tbaa !11
  %100 = fsub double %98, %99
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %100, ptr noundef %101)
  %103 = fadd double %92, %102
  store double %103, ptr %22, align 8, !tbaa !11
  br label %104

104:                                              ; preds = %91
  %105 = load i64, ptr %15, align 8, !tbaa !9
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %15, align 8, !tbaa !9
  br label %86, !llvm.loop !20

107:                                              ; preds = %86
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %124, %107
  %109 = load i64, ptr %15, align 8, !tbaa !9
  %110 = load i64, ptr %9, align 8, !tbaa !9
  %111 = sub nsw i64 %110, 1
  %112 = icmp sle i64 %109, %111
  br i1 %112, label %113, label %127

113:                                              ; preds = %108
  %114 = load double, ptr %23, align 8, !tbaa !11
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %115, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !13
  %118 = load i64, ptr %15, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = load double, ptr %16, align 8, !tbaa !11
  %122 = fsub double %120, %121
  %123 = fadd double %114, %122
  store double %123, ptr %23, align 8, !tbaa !11
  br label %124

124:                                              ; preds = %113
  %125 = load i64, ptr %15, align 8, !tbaa !9
  %126 = add nsw i64 %125, 1
  store i64 %126, ptr %15, align 8, !tbaa !9
  br label %108, !llvm.loop !21

127:                                              ; preds = %108
  %128 = load double, ptr %23, align 8, !tbaa !11
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %128, ptr noundef %129)
  %131 = load i64, ptr %9, align 8, !tbaa !9
  %132 = sitofp i64 %131 to double
  %133 = fdiv double %130, %132
  store double %133, ptr %23, align 8, !tbaa !11
  %134 = load double, ptr %22, align 8, !tbaa !11
  %135 = load double, ptr %23, align 8, !tbaa !11
  %136 = fsub double %134, %135
  %137 = load i64, ptr %9, align 8, !tbaa !9
  %138 = sub nsw i64 %137, 1
  %139 = sitofp i64 %138 to double
  %140 = fdiv double %136, %139
  store double %140, ptr %20, align 8, !tbaa !11
  %141 = load double, ptr %20, align 8, !tbaa !11
  %142 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %141, double noundef 0.000000e+00)
  br i1 %142, label %143, label %144

143:                                              ; preds = %127
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  br label %144

144:                                              ; preds = %143, %127
  %145 = load double, ptr %20, align 8, !tbaa !11
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %145, ptr noundef %146)
  store double %147, ptr %21, align 8, !tbaa !11
  br label %148

148:                                              ; preds = %144, %82, %79
  %149 = load double, ptr %21, align 8, !tbaa !11
  %150 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %149, double noundef 0.000000e+00)
  br i1 %150, label %151, label %176

151:                                              ; preds = %148
  %152 = load double, ptr %16, align 8, !tbaa !11
  %153 = load double, ptr %10, align 8, !tbaa !11
  %154 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %152, double noundef %153)
  br i1 %154, label %155, label %157

155:                                              ; preds = %151
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  store double 1.000000e+00, ptr %156, align 8, !tbaa !11
  br label %159

157:                                              ; preds = %151
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  store double 0.000000e+00, ptr %158, align 8, !tbaa !11
  br label %159

159:                                              ; preds = %157, %155
  %160 = load double, ptr %16, align 8, !tbaa !11
  %161 = load double, ptr %10, align 8, !tbaa !11
  %162 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %160, double noundef %161)
  br i1 %162, label %163, label %165

163:                                              ; preds = %159
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  store double 1.000000e+00, ptr %164, align 8, !tbaa !11
  br label %167

165:                                              ; preds = %159
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  store double 0.000000e+00, ptr %166, align 8, !tbaa !11
  br label %167

167:                                              ; preds = %165, %163
  %168 = load double, ptr %16, align 8, !tbaa !11
  %169 = load double, ptr %10, align 8, !tbaa !11
  %170 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %168, double noundef %169)
  br i1 %170, label %171, label %173

171:                                              ; preds = %167
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  store double 1.000000e+00, ptr %172, align 8, !tbaa !11
  br label %175

173:                                              ; preds = %167
  %174 = load ptr, ptr %13, align 8, !tbaa !5
  store double 0.000000e+00, ptr %174, align 8, !tbaa !11
  br label %175

175:                                              ; preds = %173, %171
  store i32 1, ptr %26, align 4
  br label %204

176:                                              ; preds = %148
  %177 = load double, ptr %16, align 8, !tbaa !11
  %178 = load double, ptr %10, align 8, !tbaa !11
  %179 = fsub double %177, %178
  %180 = load double, ptr %21, align 8, !tbaa !11
  %181 = load i64, ptr %9, align 8, !tbaa !9
  %182 = sitofp i64 %181 to double
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %182, ptr noundef %183)
  %185 = fdiv double %180, %184
  %186 = fdiv double %179, %185
  store double %186, ptr %24, align 8, !tbaa !11
  %187 = load i64, ptr %9, align 8, !tbaa !9
  %188 = sub nsw i64 %187, 1
  %189 = load double, ptr %24, align 8, !tbaa !11
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = call noundef double @_ZN11alglib_impl20studenttdistributionEldPNS_8ae_stateE(i64 noundef %188, double noundef %189, ptr noundef %190)
  store double %191, ptr %25, align 8, !tbaa !11
  %192 = load double, ptr %25, align 8, !tbaa !11
  %193 = load double, ptr %25, align 8, !tbaa !11
  %194 = fsub double 1.000000e+00, %193
  %195 = load ptr, ptr %14, align 8, !tbaa !5
  %196 = call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %192, double noundef %194, ptr noundef %195)
  %197 = fmul double 2.000000e+00, %196
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  store double %197, ptr %198, align 8, !tbaa !11
  %199 = load double, ptr %25, align 8, !tbaa !11
  %200 = load ptr, ptr %12, align 8, !tbaa !5
  store double %199, ptr %200, align 8, !tbaa !11
  %201 = load double, ptr %25, align 8, !tbaa !11
  %202 = fsub double 1.000000e+00, %201
  %203 = load ptr, ptr %13, align 8, !tbaa !5
  store double %202, ptr %203, align 8, !tbaa !11
  store i32 0, ptr %26, align 4
  br label %204

204:                                              ; preds = %176, %175, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 1, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %205 = load i32, ptr %26, align 4
  switch i32 %205, label %207 [
    i32 0, label %206
    i32 1, label %206
  ]

206:                                              ; preds = %204, %204
  ret void

207:                                              ; preds = %204
  unreachable
}

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #2

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #2

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #2

declare noundef double @_ZN11alglib_impl20studenttdistributionEldPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { "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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


; 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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl13studentttest1EPNS_9ae_vectorEldPdS2_S2_PNS_8ae_stateE(ptr nocapture noundef readonly %0, i64 noundef %1, double noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5, ptr noundef %6) local_unnamed_addr #0 {
  store double 0.000000e+00, ptr %3, align 8, !tbaa !5
  store double 0.000000e+00, ptr %4, align 8, !tbaa !5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  %8 = icmp slt i64 %1, 1
  br i1 %8, label %9, label %10

9:                                                ; preds = %7
  store double 1.000000e+00, ptr %3, align 8, !tbaa !5
  store double 1.000000e+00, ptr %4, align 8, !tbaa !5
  br label %85

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = load double, ptr %12, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %10, %21
  %.092 = phi i64 [ 0, %10 ], [ %23, %21 ]
  %.07691 = phi double [ 0.000000e+00, %10 ], [ %18, %21 ]
  %.08290 = phi i1 [ true, %10 ], [ %22, %21 ]
  %15 = load ptr, ptr %11, align 8, !tbaa !9
  %16 = getelementptr inbounds double, ptr %15, i64 %.092
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = fadd double %.07691, %17
  br i1 %.08290, label %19, label %21

19:                                               ; preds = %14
  %20 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %17, double noundef %13)
  br label %21

21:                                               ; preds = %19, %14
  %22 = phi i1 [ false, %14 ], [ %20, %19 ]
  %23 = add nuw nsw i64 %.092, 1
  %exitcond.not = icmp eq i64 %23, %1
  br i1 %exitcond.not, label %24, label %14, !llvm.loop !10

24:                                               ; preds = %21
  %25 = add nsw i64 %1, -1
  %26 = uitofp nneg i64 %1 to double
  %27 = fdiv double %18, %26
  %.177 = select i1 %22, double %13, double %27
  %.not = icmp eq i64 %1, 1
  %brmerge = or i1 %.not, %22
  br i1 %brmerge, label %70, label %.lr.ph

.lr.ph99:                                         ; preds = %.lr.ph
  %28 = load ptr, ptr %11, align 8, !tbaa !9
  %smax = tail call i64 @llvm.smax.i64(i64 %1, i64 1)
  %xtraiter = and i64 %smax, 3
  %29 = icmp slt i64 %1, 4
  br i1 %29, label %._crit_edge.unr-lcssa, label %.lr.ph99.new

.lr.ph99.new:                                     ; preds = %.lr.ph99
  %unroll_iter = and i64 %smax, 9223372036854775804
  br label %37

.lr.ph:                                           ; preds = %24, %.lr.ph
  %.195 = phi i64 [ %36, %.lr.ph ], [ 0, %24 ]
  %.07994 = phi double [ %35, %.lr.ph ], [ 0.000000e+00, %24 ]
  %30 = load ptr, ptr %11, align 8, !tbaa !9
  %31 = getelementptr inbounds double, ptr %30, i64 %.195
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = fsub double %32, %.177
  %34 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %33, ptr noundef %6)
  %35 = fadd double %.07994, %34
  %36 = add nuw nsw i64 %.195, 1
  %exitcond104.not = icmp eq i64 %36, %1
  br i1 %exitcond104.not, label %.lr.ph99, label %.lr.ph, !llvm.loop !12

37:                                               ; preds = %37, %.lr.ph99.new
  %.298 = phi i64 [ 0, %.lr.ph99.new ], [ %57, %37 ]
  %.07897 = phi double [ 0.000000e+00, %.lr.ph99.new ], [ %56, %37 ]
  %niter = phi i64 [ 0, %.lr.ph99.new ], [ %niter.next.3, %37 ]
  %38 = getelementptr inbounds double, ptr %28, i64 %.298
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = fsub double %39, %.177
  %41 = fadd double %.07897, %40
  %42 = or disjoint i64 %.298, 1
  %43 = getelementptr inbounds double, ptr %28, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = fsub double %44, %.177
  %46 = fadd double %41, %45
  %47 = or disjoint i64 %.298, 2
  %48 = getelementptr inbounds double, ptr %28, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !5
  %50 = fsub double %49, %.177
  %51 = fadd double %46, %50
  %52 = or disjoint i64 %.298, 3
  %53 = getelementptr inbounds double, ptr %28, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !5
  %55 = fsub double %54, %.177
  %56 = fadd double %51, %55
  %57 = add nuw nsw i64 %.298, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %37, !llvm.loop !13

._crit_edge.unr-lcssa:                            ; preds = %37, %.lr.ph99
  %.lcssa.ph = phi double [ poison, %.lr.ph99 ], [ %56, %37 ]
  %.298.unr = phi i64 [ 0, %.lr.ph99 ], [ %57, %37 ]
  %.07897.unr = phi double [ 0.000000e+00, %.lr.ph99 ], [ %56, %37 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa, %.epil.preheader
  %.298.epil = phi i64 [ %62, %.epil.preheader ], [ %.298.unr, %._crit_edge.unr-lcssa ]
  %.07897.epil = phi double [ %61, %.epil.preheader ], [ %.07897.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.unr-lcssa ]
  %58 = getelementptr inbounds double, ptr %28, i64 %.298.epil
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = fsub double %59, %.177
  %61 = fadd double %.07897.epil, %60
  %62 = add nuw nsw i64 %.298.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %.epil.preheader, %._crit_edge.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %61, %.epil.preheader ]
  %63 = tail call noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef %.lcssa, ptr noundef %6)
  %64 = fdiv double %63, %26
  %65 = fsub double %35, %64
  %66 = uitofp nneg i64 %25 to double
  %67 = fdiv double %65, %66
  %68 = tail call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %67, double noundef 0.000000e+00)
  %.081 = select i1 %68, double 0.000000e+00, double %67
  %69 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %.081, ptr noundef %6)
  br label %70

70:                                               ; preds = %24, %._crit_edge
  %.080 = phi double [ %69, %._crit_edge ], [ 0.000000e+00, %24 ]
  %71 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %.080, double noundef 0.000000e+00)
  br i1 %71, label %72, label %76

72:                                               ; preds = %70
  %73 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %.177, double noundef %2)
  %. = select i1 %73, double 1.000000e+00, double 0.000000e+00
  store double %., ptr %3, align 8, !tbaa !5
  %74 = tail call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %.177, double noundef %2)
  %storemerge87 = select i1 %74, double 1.000000e+00, double 0.000000e+00
  store double %storemerge87, ptr %4, align 8, !tbaa !5
  %75 = tail call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %.177, double noundef %2)
  %storemerge88 = select i1 %75, double 1.000000e+00, double 0.000000e+00
  br label %85

76:                                               ; preds = %70
  %77 = fsub double %.177, %2
  %78 = tail call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %26, ptr noundef %6)
  %79 = fdiv double %.080, %78
  %80 = fdiv double %77, %79
  %81 = tail call noundef double @_ZN11alglib_impl20studenttdistributionEldPNS_8ae_stateE(i64 noundef %25, double noundef %80, ptr noundef %6)
  %82 = fsub double 1.000000e+00, %81
  %83 = tail call noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef %81, double noundef %82, ptr noundef %6)
  %84 = fmul double %83, 2.000000e+00
  store double %84, ptr %3, align 8, !tbaa !5
  store double %81, ptr %4, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %76, %72, %9
  %.sink = phi double [ %82, %76 ], [ %storemerge88, %72 ], [ 1.000000e+00, %9 ]
  store double %.sink, ptr %5, align 8, !tbaa !5
  ret void
}

declare noundef double @_ZN11alglib_impl6ae_sqrEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) local_unnamed_addr #1

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl10ae_minrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl20studenttdistributionEldPNS_8ae_stateE(i64 noundef, double noundef, ptr noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress 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 = { "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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}


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