; LLVM IR from ShahjalalShohag/code-library :: Graph Theory/Tuttes Theorem.ll (Z11determinantSt6vectorIS_IdSaIdEESaIS1_EE)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z11determinantSt6vectorIS_IdSaIdEESaIS1_EE(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %12 = call noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %13 = trunc i64 %12 to i32
  store i32 %13, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store double 1.000000e+00, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %176, %1
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  store i32 2, ptr %6, align 4
  br label %179

19:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %20 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %20, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %8, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %49, %19
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %52

28:                                               ; preds = %23
  %29 = load i32, ptr %8, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %30) #5
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %33) #5
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = call noundef double @_ZSt3absd(double noundef %35)
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %38) #5
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #5
  %43 = load double, ptr %42, align 8, !tbaa !11
  %44 = call noundef double @_ZSt3absd(double noundef %43)
  %45 = fcmp ogt double %36, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %28
  %47 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %47, ptr %7, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %46, %28
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %8, align 4, !tbaa !9
  br label %23, !llvm.loop !13

52:                                               ; preds = %27
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %54) #5
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #5
  %59 = load double, ptr %58, align 8, !tbaa !11
  %60 = call noundef double @_ZSt3absd(double noundef %59)
  %61 = fcmp olt double %60, 1.000000e-09
  br i1 %61, label %62, label %63

62:                                               ; preds = %52
  store double 0.000000e+00, ptr %4, align 8, !tbaa !11
  store i32 2, ptr %6, align 4
  br label %173

63:                                               ; preds = %52
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %65) #5
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %68) #5
  call void @_ZSt4swapIdSaIdEEvRSt6vectorIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(24) %69) #5
  %70 = load i32, ptr %5, align 4, !tbaa !9
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = icmp ne i32 %70, %71
  br i1 %72, label %73, label %76

73:                                               ; preds = %63
  %74 = load double, ptr %4, align 8, !tbaa !11
  %75 = fneg double %74
  store double %75, ptr %4, align 8, !tbaa !11
  br label %76

76:                                               ; preds = %73, %63
  %77 = load i32, ptr %5, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %78) #5
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %81) #5
  %83 = load double, ptr %82, align 8, !tbaa !11
  %84 = load double, ptr %4, align 8, !tbaa !11
  %85 = fmul double %84, %83
  store double %85, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %9, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %109, %76
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = load i32, ptr %3, align 4, !tbaa !9
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %112

93:                                               ; preds = %88
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %95) #5
  %97 = load i32, ptr %5, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #5
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = load i32, ptr %5, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %102) #5
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %105) #5
  %107 = load double, ptr %106, align 8, !tbaa !11
  %108 = fdiv double %107, %100
  store double %108, ptr %106, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %93
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %9, align 4, !tbaa !9
  br label %88, !llvm.loop !15

112:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %169, %112
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = load i32, ptr %3, align 4, !tbaa !9
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %113
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %172

118:                                              ; preds = %113
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = load i32, ptr %5, align 4, !tbaa !9
  %121 = icmp ne i32 %119, %120
  br i1 %121, label %122, label %168

122:                                              ; preds = %118
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %124) #5
  %126 = load i32, ptr %5, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %127) #5
  %129 = load double, ptr %128, align 8, !tbaa !11
  %130 = call noundef double @_ZSt3absd(double noundef %129)
  %131 = fcmp ogt double %130, 1.000000e-09
  br i1 %131, label %132, label %168

132:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %133 = load i32, ptr %5, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %11, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %164, %132
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = load i32, ptr %3, align 4, !tbaa !9
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %167

140:                                              ; preds = %135
  %141 = load i32, ptr %5, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %142) #5
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %145) #5
  %147 = load double, ptr %146, align 8, !tbaa !11
  %148 = load i32, ptr %10, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %149) #5
  %151 = load i32, ptr %5, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %150, i64 noundef %152) #5
  %154 = load double, ptr %153, align 8, !tbaa !11
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %156) #5
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %159) #5
  %161 = load double, ptr %160, align 8, !tbaa !11
  %162 = fneg double %147
  %163 = call double @llvm.fmuladd.f64(double %162, double %154, double %161)
  store double %163, ptr %160, align 8, !tbaa !11
  br label %164

164:                                              ; preds = %140
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %11, align 4, !tbaa !9
  br label %135, !llvm.loop !16

167:                                              ; preds = %139
  br label %168

168:                                              ; preds = %167, %122, %118
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %10, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %10, align 4, !tbaa !9
  br label %113, !llvm.loop !17

172:                                              ; preds = %117
  store i32 0, ptr %6, align 4
  br label %173

173:                                              ; preds = %172, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %174 = load i32, ptr %6, align 4
  switch i32 %174, label %179 [
    i32 0, label %175
  ]

175:                                              ; preds = %173
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %5, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %5, align 4, !tbaa !9
  br label %14, !llvm.loop !18

179:                                              ; preds = %173, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %180

180:                                              ; preds = %179
  %181 = load double, ptr %4, align 8, !tbaa !11
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret double %181
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdSaIdEEvRSt6vectorIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 #3 = { inlinehint mustprogress 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !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"

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_Z11determinantSt6vectorIS_IdSaIdEESaIS1_EE(ptr noundef nonnull %0) local_unnamed_addr #0 {
  %2 = tail call noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %3 = trunc i64 %2 to i32
  %4 = icmp sgt i32 %3, 0
  %smax = tail call i32 @llvm.smax.i32(i32 %3, i32 0)
  %wide.trip.count93 = zext nneg i32 %smax to i64
  %wide.trip.count = and i64 %2, 2147483647
  %exitcond94.not95 = icmp slt i32 %3, 1
  br i1 %exitcond94.not95, label %.thread, label %.lr.ph100

.lr.ph100:                                        ; preds = %1, %._crit_edge70
  %.05598 = phi double [ %33, %._crit_edge70 ], [ 1.000000e+00, %1 ]
  %indvars.iv97 = phi i64 [ %indvars.iv.next, %._crit_edge70 ], [ 1, %1 ]
  %indvars.iv9096 = phi i64 [ %indvars.iv.next91, %._crit_edge70 ], [ 0, %1 ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv9096, 1
  %5 = trunc nuw i64 %indvars.iv.next91 to i32
  %6 = icmp slt i32 %5, %3
  %7 = trunc nuw nsw i64 %indvars.iv9096 to i32
  br i1 %6, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph100
  %.052.lcssa = phi i32 [ %7, %.lr.ph100 ], [ %.1, %.lr.ph ]
  %8 = sext i32 %.052.lcssa to i64
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %8) #4
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv9096) #4
  %11 = load double, ptr %10, align 8, !tbaa !5
  %12 = tail call noundef double @_ZSt3absd(double noundef %11)
  %13 = fcmp uge double %12, 1.000000e-09
  br i1 %13, label %25, label %.thread

.lr.ph:                                           ; preds = %.lr.ph100, %.lr.ph
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph ], [ %indvars.iv97, %.lr.ph100 ]
  %.05261 = phi i32 [ %.1, %.lr.ph ], [ %7, %.lr.ph100 ]
  %14 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv73) #4
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv9096) #4
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = tail call noundef double @_ZSt3absd(double noundef %16)
  %18 = sext i32 %.05261 to i64
  %19 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %18) #4
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv9096) #4
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = tail call noundef double @_ZSt3absd(double noundef %21)
  %23 = fcmp ogt double %17, %22
  %24 = trunc nuw i64 %indvars.iv73 to i32
  %.1 = select i1 %23, i32 %24, i32 %.05261
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next74 to i32
  %exitcond.not = icmp eq i32 %lftr.wideiv, %3
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

25:                                               ; preds = %._crit_edge
  %26 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv9096) #4
  %27 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %8) #4
  tail call void @_ZSt4swapIdSaIdEEvRSt6vectorIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %28 = zext i32 %.052.lcssa to i64
  %.not = icmp eq i64 %indvars.iv9096, %28
  %29 = fneg double %.05598
  %.156 = select i1 %.not, double %.05598, double %29
  %30 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv9096) #4
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %indvars.iv9096) #4
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = fmul double %.156, %32
  br i1 %6, label %.lr.ph65, label %.preheader60

.preheader60:                                     ; preds = %.lr.ph65, %25
  br i1 %4, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %.preheader60
  %34 = icmp sge i32 %5, %3
  br label %42

.lr.ph65:                                         ; preds = %25, %.lr.ph65
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %.lr.ph65 ], [ %indvars.iv97, %25 ]
  %35 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv9096) #4
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %indvars.iv9096) #4
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv9096) #4
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %indvars.iv76) #4
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = fdiv double %40, %37
  store double %41, ptr %39, align 8, !tbaa !5
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %lftr.wideiv79 = trunc i64 %indvars.iv.next77 to i32
  %exitcond80.not = icmp eq i32 %lftr.wideiv79, %3
  br i1 %exitcond80.not, label %.preheader60, label %.lr.ph65, !llvm.loop !11

42:                                               ; preds = %.lr.ph69, %.loopexit
  %indvars.iv86 = phi i64 [ 0, %.lr.ph69 ], [ %indvars.iv.next87, %.loopexit ]
  %.not58 = icmp eq i64 %indvars.iv86, %indvars.iv9096
  br i1 %.not58, label %.loopexit, label %43

43:                                               ; preds = %42
  %44 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv86) #4
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %indvars.iv9096) #4
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = tail call noundef double @_ZSt3absd(double noundef %46)
  %48 = fcmp ule double %47, 1.000000e-09
  %brmerge = or i1 %48, %34
  br i1 %brmerge, label %.loopexit, label %.lr.ph67

.lr.ph67:                                         ; preds = %43, %.lr.ph67
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.lr.ph67 ], [ %indvars.iv97, %43 ]
  %49 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv9096) #4
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv81) #4
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv86) #4
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %indvars.iv9096) #4
  %54 = load double, ptr %53, align 8, !tbaa !5
  %55 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv86) #4
  %56 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %indvars.iv81) #4
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fneg double %51
  %59 = tail call double @llvm.fmuladd.f64(double %58, double %54, double %57)
  store double %59, ptr %56, align 8, !tbaa !5
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %lftr.wideiv84 = trunc i64 %indvars.iv.next82 to i32
  %exitcond85.not = icmp eq i32 %lftr.wideiv84, %3
  br i1 %exitcond85.not, label %.loopexit, label %.lr.ph67, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph67, %43, %42
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count
  br i1 %exitcond89.not, label %._crit_edge70, label %42, !llvm.loop !13

._crit_edge70:                                    ; preds = %.loopexit, %.preheader60
  %indvars.iv.next = add nuw nsw i64 %indvars.iv97, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93
  br i1 %exitcond94.not, label %.thread, label %.lr.ph100

.thread:                                          ; preds = %._crit_edge70, %._crit_edge, %1
  %.3.ph = phi double [ 1.000000e+00, %1 ], [ %33, %._crit_edge70 ], [ 0.000000e+00, %._crit_edge ]
  ret double %.3.ph
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IdSaIdEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdSaIdEEvRSt6vectorIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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

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


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