; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/SHORT/COOK72/Problem E/E.ll (Z19GaussianEliminationv)

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

@sz = external dso_local global i32, align 4
@m = external dso_local global [43 x [43 x double]], align 16
@f = external dso_local global [43 x double], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19GaussianEliminationv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %142, %0
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = load i32, ptr @sz, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  br label %145

16:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %17 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %17, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %18 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %18, ptr %4, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %45, %16
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = load i32, ptr @sz, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  store i32 5, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %48

24:                                               ; preds = %19
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %26
  %28 = load i32, ptr %1, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [43 x double], ptr %27, i64 0, i64 %29
  %31 = load double, ptr %30, align 8, !tbaa !9
  %32 = call noundef double @_ZSt3absd(double noundef %31)
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %34
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [43 x double], ptr %35, i64 0, i64 %37
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = call noundef double @_ZSt3absd(double noundef %39)
  %41 = fcmp ogt double %32, %40
  br i1 %41, label %42, label %44

42:                                               ; preds = %24
  %43 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %43, ptr %3, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %42, %24
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %4, align 4, !tbaa !5
  br label %19, !llvm.loop !11

48:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %67, %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr @sz, align 4, !tbaa !5
  %52 = icmp sle i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %70

54:                                               ; preds = %49
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [43 x double], ptr %57, i64 0, i64 %59
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %62
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [43 x double], ptr %63, i64 0, i64 %65
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 8 dereferenceable(8) %66) #4
  br label %67

67:                                               ; preds = %54
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %5, align 4, !tbaa !5
  br label %49, !llvm.loop !13

70:                                               ; preds = %53
  %71 = load i32, ptr %1, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %72
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %75
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %76) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %77 = load i32, ptr %1, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %138, %70
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = load i32, ptr @sz, align 4, !tbaa !5
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 11, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %141

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %86
  %88 = load i32, ptr %1, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [43 x double], ptr %87, i64 0, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = load i32, ptr %1, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %93
  %95 = load i32, ptr %1, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [43 x double], ptr %94, i64 0, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !9
  %99 = fdiv double %91, %98
  store double %99, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %123, %84
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = load i32, ptr @sz, align 4, !tbaa !5
  %103 = icmp sle i32 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  store i32 14, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %126

105:                                              ; preds = %100
  %106 = load double, ptr %7, align 8, !tbaa !9
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %108
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [43 x double], ptr %109, i64 0, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !9
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %115
  %117 = load i32, ptr %8, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [43 x double], ptr %116, i64 0, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !9
  %121 = fneg double %106
  %122 = call double @llvm.fmuladd.f64(double %121, double %113, double %120)
  store double %122, ptr %119, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %105
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %8, align 4, !tbaa !5
  br label %100, !llvm.loop !14

126:                                              ; preds = %104
  %127 = load double, ptr %7, align 8, !tbaa !9
  %128 = load i32, ptr %1, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !9
  %132 = load i32, ptr %6, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = fneg double %127
  %137 = call double @llvm.fmuladd.f64(double %136, double %131, double %135)
  store double %137, ptr %134, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %138

138:                                              ; preds = %126
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %6, align 4, !tbaa !5
  br label %79, !llvm.loop !15

141:                                              ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %1, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %1, align 4, !tbaa !5
  br label %11, !llvm.loop !16

145:                                              ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %146 = load i32, ptr @sz, align 4, !tbaa !5
  store i32 %146, ptr %9, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %193, %145
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = icmp sgt i32 %148, 0
  br i1 %149, label %151, label %150

150:                                              ; preds = %147
  store i32 17, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %196

151:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %152 = load i32, ptr %9, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %10, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %177, %151
  %155 = load i32, ptr %10, align 4, !tbaa !5
  %156 = load i32, ptr @sz, align 4, !tbaa !5
  %157 = icmp sle i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 20, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %180

159:                                              ; preds = %154
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %161
  %163 = load i32, ptr %10, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [43 x double], ptr %162, i64 0, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !9
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !9
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %172
  %174 = load double, ptr %173, align 8, !tbaa !9
  %175 = fneg double %166
  %176 = call double @llvm.fmuladd.f64(double %175, double %170, double %174)
  store double %176, ptr %173, align 8, !tbaa !9
  br label %177

177:                                              ; preds = %159
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %10, align 4, !tbaa !5
  br label %154, !llvm.loop !17

180:                                              ; preds = %158
  %181 = load i32, ptr %9, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %182
  %184 = load i32, ptr %9, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [43 x double], ptr %183, i64 0, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = load i32, ptr %9, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !9
  %192 = fdiv double %191, %187
  store double %192, ptr %190, align 8, !tbaa !9
  br label %193

193:                                              ; preds = %180
  %194 = load i32, ptr %9, align 4, !tbaa !5
  %195 = add nsw i32 %194, -1
  store i32 %195, ptr %9, align 4, !tbaa !5
  br label %147, !llvm.loop !18

196:                                              ; preds = %150
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #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 @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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


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

@sz = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local global [43 x [43 x double]], align 16
@f = external dso_local global [43 x double], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z19GaussianEliminationv() local_unnamed_addr #0 {
  %1 = load i32, ptr @sz, align 4, !tbaa !5
  %.not78 = icmp slt i32 %1, 1
  br i1 %.not78, label %._crit_edge86, label %.preheader62

.loopexit:                                        ; preds = %._crit_edge73, %scalar.ph, %middle.block
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %indvar.next = add i32 %indvar, 1
  br i1 %.not5874.not, label %.preheader62, label %.preheader60, !llvm.loop !9

.preheader62:                                     ; preds = %0, %.loopexit
  %indvar = phi i32 [ %indvar.next, %.loopexit ], [ 0, %0 ]
  %2 = phi i32 [ %22, %.loopexit ], [ %1, %0 ]
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %.loopexit ], [ 2, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ 1, %0 ]
  %3 = sext i32 %2 to i64
  %.not5663 = icmp sgt i64 %indvars.iv, %3
  %4 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %.not5663, label %.preheader61, label %.lr.ph

.preheader60:                                     ; preds = %._crit_edge, %.loopexit
  %5 = icmp sgt i32 %22, 0
  br i1 %5, label %.preheader.preheader, label %._crit_edge86

.preheader.preheader:                             ; preds = %.preheader60
  %6 = zext nneg i32 %22 to i64
  %7 = zext nneg i32 %22 to i64
  br label %.preheader

.preheader61:                                     ; preds = %.lr.ph, %.preheader62
  %8 = phi i32 [ %2, %.preheader62 ], [ %18, %.lr.ph ]
  %.053.lcssa = phi i32 [ %4, %.preheader62 ], [ %.1, %.lr.ph ]
  %.not5766 = icmp slt i32 %8, 1
  %.pre116 = sext i32 %.053.lcssa to i64
  br i1 %.not5766, label %._crit_edge, label %.lr.ph68

.lr.ph:                                           ; preds = %.preheader62, %.lr.ph
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %.lr.ph ], [ %indvars.iv, %.preheader62 ]
  %.05364 = phi i32 [ %.1, %.lr.ph ], [ %4, %.preheader62 ]
  %9 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv89, i64 %indvars.iv
  %10 = load double, ptr %9, align 8, !tbaa !11
  %11 = tail call noundef double @_ZSt3absd(double noundef %10)
  %12 = sext i32 %.05364 to i64
  %13 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %12, i64 %indvars.iv
  %14 = load double, ptr %13, align 8, !tbaa !11
  %15 = tail call noundef double @_ZSt3absd(double noundef %14)
  %16 = fcmp ogt double %11, %15
  %17 = trunc nuw nsw i64 %indvars.iv89 to i32
  %.1 = select i1 %16, i32 %17, i32 %.05364
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %18 = load i32, ptr @sz, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not56.not = icmp slt i64 %indvars.iv89, %19
  br i1 %.not56.not, label %.lr.ph, label %.preheader61, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph68, %.preheader61
  %20 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %indvars.iv
  %21 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %.pre116
  tail call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @sz, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %.not5874.not = icmp slt i64 %indvars.iv, %23
  br i1 %.not5874.not, label %.lr.ph77, label %.preheader60

.lr.ph77:                                         ; preds = %._crit_edge
  %24 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv, i64 %indvars.iv
  %.not5969 = icmp slt i32 %22, 1
  br i1 %.not5969, label %.lr.ph77.split.us, label %.lr.ph72.preheader

.lr.ph72.preheader:                               ; preds = %.lr.ph77
  %25 = add nuw i32 %22, 1
  %wide.trip.count = zext i32 %25 to i64
  %26 = zext nneg i32 %22 to i64
  %min.iters.check129 = icmp eq i32 %22, 1
  %n.vec132 = and i64 %26, 2147483646
  %ind.end133 = or i64 %26, 1
  %cmp.n143 = icmp eq i64 %n.vec132, %26
  br label %.lr.ph72

.lr.ph77.split.us:                                ; preds = %.lr.ph77
  %27 = load double, ptr %24, align 8, !tbaa !11
  %28 = add nsw i32 %22, 1
  %reass.sub = sub i32 %22, %indvar
  %29 = add i32 %reass.sub, -2
  %30 = zext i32 %29 to i64
  %31 = add nuw nsw i64 %30, 1
  %min.iters.check = icmp eq i32 %29, 0
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph77.split.us
  %n.vec = and i64 %31, 8589934590
  %ind.end = add nuw i64 %indvars.iv98, %n.vec
  %broadcast.splatinsert = insertelement <2 x double> poison, double %27, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %indvars.iv98, %index
  %32 = add i64 %offset.idx, 1
  %33 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %offset.idx, i64 %indvars.iv
  %34 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %32, i64 %indvars.iv
  %35 = load double, ptr %33, align 8, !tbaa !11
  %36 = load double, ptr %34, align 8, !tbaa !11
  %37 = insertelement <2 x double> poison, double %35, i64 0
  %38 = insertelement <2 x double> %37, double %36, i64 1
  %39 = load double, ptr %20, align 8, !tbaa !11
  %broadcast.splatinsert125 = insertelement <2 x double> poison, double %39, i64 0
  %broadcast.splat126 = shufflevector <2 x double> %broadcast.splatinsert125, <2 x double> poison, <2 x i32> zeroinitializer
  %40 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %offset.idx
  %wide.load = load <2 x double>, ptr %40, align 8, !tbaa !11
  %41 = fneg <2 x double> %38
  %42 = fdiv <2 x double> %41, %broadcast.splat
  %43 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %42, <2 x double> %broadcast.splat126, <2 x double> %wide.load)
  store <2 x double> %43, ptr %40, align 8, !tbaa !11
  %index.next = add nuw i64 %index, 2
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %31, %n.vec
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph77.split.us
  %indvars.iv104.ph = phi i64 [ %indvars.iv98, %.lr.ph77.split.us ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %scalar.ph ], [ %indvars.iv104.ph, %scalar.ph.preheader ]
  %45 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv104, i64 %indvars.iv
  %46 = load double, ptr %45, align 8, !tbaa !11
  %47 = load double, ptr %20, align 8, !tbaa !11
  %48 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %indvars.iv104
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = fneg double %46
  %51 = fdiv double %50, %27
  %52 = tail call double @llvm.fmuladd.f64(double %51, double %47, double %49)
  store double %52, ptr %48, align 8, !tbaa !11
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %lftr.wideiv107 = trunc i64 %indvars.iv.next105 to i32
  %exitcond108.not = icmp eq i32 %28, %lftr.wideiv107
  br i1 %exitcond108.not, label %.loopexit, label %scalar.ph, !llvm.loop !17

.lr.ph68:                                         ; preds = %.preheader61, %.lr.ph68
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %.lr.ph68 ], [ 1, %.preheader61 ]
  %53 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv, i64 %indvars.iv92
  %54 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %.pre116, i64 %indvars.iv92
  tail call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %54) #4
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %55 = load i32, ptr @sz, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not57.not = icmp slt i64 %indvars.iv92, %56
  br i1 %.not57.not, label %.lr.ph68, label %._crit_edge, !llvm.loop !18

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %._crit_edge73
  %indvars.iv100 = phi i64 [ %indvars.iv98, %.lr.ph72.preheader ], [ %indvars.iv.next101, %._crit_edge73 ]
  %57 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv100, i64 %indvars.iv
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = load double, ptr %24, align 8, !tbaa !11
  %60 = fneg double %58
  %61 = fdiv double %60, %59
  br i1 %min.iters.check129, label %scalar.ph128.preheader, label %vector.ph130

scalar.ph128.preheader:                           ; preds = %middle.block127, %.lr.ph72
  %indvars.iv95.ph = phi i64 [ 1, %.lr.ph72 ], [ %ind.end133, %middle.block127 ]
  br label %scalar.ph128

vector.ph130:                                     ; preds = %.lr.ph72
  %broadcast.splatinsert140 = insertelement <2 x double> poison, double %61, i64 0
  %broadcast.splat141 = shufflevector <2 x double> %broadcast.splatinsert140, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body135

vector.body135:                                   ; preds = %vector.body135, %vector.ph130
  %index136 = phi i64 [ 0, %vector.ph130 ], [ %index.next142, %vector.body135 ]
  %offset.idx137 = or disjoint i64 %index136, 1
  %62 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv, i64 %offset.idx137
  %wide.load138 = load <2 x double>, ptr %62, align 8, !tbaa !11
  %63 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv100, i64 %offset.idx137
  %wide.load139 = load <2 x double>, ptr %63, align 8, !tbaa !11
  %64 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat141, <2 x double> %wide.load138, <2 x double> %wide.load139)
  store <2 x double> %64, ptr %63, align 8, !tbaa !11
  %index.next142 = add nuw i64 %index136, 2
  %65 = icmp eq i64 %index.next142, %n.vec132
  br i1 %65, label %middle.block127, label %vector.body135, !llvm.loop !19

middle.block127:                                  ; preds = %vector.body135
  br i1 %cmp.n143, label %._crit_edge73, label %scalar.ph128.preheader

._crit_edge73:                                    ; preds = %scalar.ph128, %middle.block127
  %66 = load double, ptr %20, align 8, !tbaa !11
  %67 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %indvars.iv100
  %68 = load double, ptr %67, align 8, !tbaa !11
  %69 = tail call double @llvm.fmuladd.f64(double %61, double %66, double %68)
  store double %69, ptr %67, align 8, !tbaa !11
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next101 to i32
  %exitcond103.not = icmp eq i32 %25, %lftr.wideiv
  br i1 %exitcond103.not, label %.loopexit, label %.lr.ph72, !llvm.loop !20

scalar.ph128:                                     ; preds = %scalar.ph128.preheader, %scalar.ph128
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %scalar.ph128 ], [ %indvars.iv95.ph, %scalar.ph128.preheader ]
  %70 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv, i64 %indvars.iv95
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv100, i64 %indvars.iv95
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = tail call double @llvm.fmuladd.f64(double %61, double %71, double %73)
  store double %74, ptr %72, align 8, !tbaa !11
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge73, label %scalar.ph128, !llvm.loop !21

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge84
  %indvars.iv110 = phi i64 [ %6, %.preheader.preheader ], [ %indvars.iv.next111, %._crit_edge84 ]
  %.not55.not81 = icmp slt i64 %indvars.iv110, %7
  %75 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %indvars.iv110
  %.promoted = load double, ptr %75, align 8, !tbaa !11
  br i1 %.not55.not81, label %.lr.ph83, label %._crit_edge84

._crit_edge86:                                    ; preds = %._crit_edge84, %0, %.preheader60
  ret void

._crit_edge84:                                    ; preds = %.lr.ph83, %.preheader
  %76 = phi double [ %.promoted, %.preheader ], [ %88, %.lr.ph83 ]
  %77 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv110, i64 %indvars.iv110
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %indvars.iv110
  %80 = fdiv double %76, %78
  store double %80, ptr %79, align 8, !tbaa !11
  %indvars.iv.next111 = add nsw i64 %indvars.iv110, -1
  %81 = icmp sgt i64 %indvars.iv110, 1
  br i1 %81, label %.preheader, label %._crit_edge86, !llvm.loop !22

.lr.ph83:                                         ; preds = %.preheader, %.lr.ph83
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %.lr.ph83 ], [ %indvars.iv110, %.preheader ]
  %82 = phi double [ %88, %.lr.ph83 ], [ %.promoted, %.preheader ]
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %83 = getelementptr inbounds [43 x [43 x double]], ptr @m, i64 0, i64 %indvars.iv110, i64 %indvars.iv.next113
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds [43 x double], ptr @f, i64 0, i64 %indvars.iv.next113
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = fneg double %84
  %88 = tail call double @llvm.fmuladd.f64(double %87, double %86, double %82)
  store double %88, ptr %75, align 8, !tbaa !11
  %89 = trunc nuw i64 %indvars.iv.next113 to i32
  %.not55.not = icmp sgt i32 %22, %89
  br i1 %.not55.not, label %.lr.ph83, label %._crit_edge84, !llvm.loop !23
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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 <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10, !16, !15}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !15, !16}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !16, !15}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


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