; LLVM IR from SudeErzurumlu/Gauss-Seidel :: C (gauss_seidel)

; 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: nounwind uwtable
define dso_local i32 @gauss_seidel(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef %3, i32 noundef %4, ptr noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store double %3, ptr %11, align 8, !tbaa !11
  store i32 %4, ptr %12, align 4, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %24 = load i32, ptr %10, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = mul i64 %25, 8
  %27 = call noalias ptr @malloc(i64 noundef %26) #6
  store ptr %27, ptr %14, align 8, !tbaa !5
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %6
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %15, align 4
  br label %173

31:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %42, %31
  %33 = load i32, ptr %16, align 4, !tbaa !9
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %45

37:                                               ; preds = %32
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds double, ptr %38, i64 %40
  store double 0.000000e+00, ptr %41, align 8, !tbaa !11
  br label %42

42:                                               ; preds = %37
  %43 = load i32, ptr %16, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %16, align 4, !tbaa !9
  br label %32, !llvm.loop !13

45:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %166, %45
  %47 = load i32, ptr %17, align 4, !tbaa !9
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 5, ptr %15, align 4
  br label %169

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %67, %51
  %53 = load i32, ptr %18, align 4, !tbaa !9
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

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

57:                                               ; preds = %52
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = load i32, ptr %18, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %58, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !11
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = load i32, ptr %18, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %63, i64 %65
  store double %62, ptr %66, align 8, !tbaa !11
  br label %67

67:                                               ; preds = %57
  %68 = load i32, ptr %18, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %18, align 4, !tbaa !9
  br label %52, !llvm.loop !15

70:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %129, %70
  %72 = load i32, ptr %19, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %132

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = load i32, ptr %19, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !11
  store double %81, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %110, %76
  %83 = load i32, ptr %21, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %113

87:                                               ; preds = %82
  %88 = load i32, ptr %19, align 4, !tbaa !9
  %89 = load i32, ptr %21, align 4, !tbaa !9
  %90 = icmp ne i32 %88, %89
  br i1 %90, label %91, label %109

91:                                               ; preds = %87
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i32, ptr %19, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i32, ptr %21, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = load i32, ptr %21, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr %101, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = load double, ptr %20, align 8, !tbaa !11
  %107 = fneg double %100
  %108 = call double @llvm.fmuladd.f64(double %107, double %105, double %106)
  store double %108, ptr %20, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %91, %87
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %21, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %21, align 4, !tbaa !9
  br label %82, !llvm.loop !16

113:                                              ; preds = %86
  %114 = load double, ptr %20, align 8, !tbaa !11
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = load i32, ptr %19, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i32, ptr %19, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !11
  %124 = fdiv double %114, %123
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load i32, ptr %19, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  store double %124, ptr %128, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %129

129:                                              ; preds = %113
  %130 = load i32, ptr %19, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %19, align 4, !tbaa !9
  br label %71, !llvm.loop !17

132:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store double 0.000000e+00, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %153, %132
  %134 = load i32, ptr %23, align 4, !tbaa !9
  %135 = load i32, ptr %10, align 4, !tbaa !9
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 17, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %156

138:                                              ; preds = %133
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = load i32, ptr %23, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds double, ptr %139, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !11
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = load i32, ptr %23, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds double, ptr %144, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !11
  %149 = fsub double %143, %148
  %150 = call double @llvm.fabs.f64(double %149)
  %151 = load double, ptr %22, align 8, !tbaa !11
  %152 = fadd double %151, %150
  store double %152, ptr %22, align 8, !tbaa !11
  br label %153

153:                                              ; preds = %138
  %154 = load i32, ptr %23, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %23, align 4, !tbaa !9
  br label %133, !llvm.loop !18

156:                                              ; preds = %137
  %157 = load double, ptr %22, align 8, !tbaa !11
  %158 = load double, ptr %11, align 8, !tbaa !11
  %159 = fcmp olt double %157, %158
  br i1 %159, label %160, label %162

160:                                              ; preds = %156
  %161 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %161) #5
  store i32 0, ptr %7, align 4
  store i32 1, ptr %15, align 4
  br label %163

162:                                              ; preds = %156
  store i32 0, ptr %15, align 4
  br label %163

163:                                              ; preds = %162, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  %164 = load i32, ptr %15, align 4
  switch i32 %164, label %169 [
    i32 0, label %165
  ]

165:                                              ; preds = %163
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %17, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %17, align 4, !tbaa !9
  br label %46, !llvm.loop !19

169:                                              ; preds = %163, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  %170 = load i32, ptr %15, align 4
  switch i32 %170, label %173 [
    i32 5, label %171
  ]

171:                                              ; preds = %169
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %172) #5
  store i32 1, ptr %7, align 4
  store i32 1, ptr %15, align 4
  br label %173

173:                                              ; preds = %171, %169, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %174 = load i32, ptr %7, align 4
  ret i32 %174
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(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 "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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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/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}
!19 = distinct !{!19, !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: nounwind uwtable
define dso_local noundef i32 @gauss_seidel(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i32 noundef %2, double noundef %3, i32 noundef %4, ptr nocapture noundef %5) local_unnamed_addr #0 {
  %7 = sext i32 %2 to i64
  %8 = shl nsw i64 %7, 3
  %9 = tail call noalias ptr @malloc(i64 noundef %8) #6
  %10 = icmp eq ptr %9, null
  br i1 %10, label %78, label %.preheader73

.preheader73:                                     ; preds = %6
  %11 = icmp sgt i32 %2, 0
  br i1 %11, label %.preheader72, label %.preheader72.thread

.preheader72:                                     ; preds = %.preheader73
  %12 = zext nneg i32 %2 to i64
  %13 = shl nuw nsw i64 %12, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 %13, i1 false), !tbaa !5
  %.not85 = icmp sgt i32 %4, 0
  br i1 %.not85, label %.preheader71.us.preheader, label %.critedge69

.preheader72.thread:                              ; preds = %.preheader73
  %.not85125 = icmp slt i32 %4, 1
  %14 = fcmp ule double %3, 0.000000e+00
  %or.cond = or i1 %.not85125, %14
  br i1 %or.cond, label %.critedge69, label %.sink.split

.preheader71.us.preheader:                        ; preds = %.preheader72
  %15 = zext nneg i32 %2 to i64
  %16 = shl nuw nsw i64 %15, 3
  %17 = add nsw i64 %15, -1
  %xtraiter = and i64 %15, 1
  %18 = icmp eq i64 %17, 0
  %unroll_iter = and i64 %15, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %xtraiter127 = and i64 %15, 1
  %19 = icmp eq i64 %17, 0
  %unroll_iter130 = and i64 %15, 2147483646
  %lcmp.mod128.not = icmp eq i64 %xtraiter127, 0
  br label %.preheader70.us

.critedge.us.unr-lcssa:                           ; preds = %.lr.ph84.us, %.lr.ph84.us.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph84.us.preheader ], [ %41, %.lr.ph84.us ]
  %indvars.iv119.unr = phi i64 [ 0, %.lr.ph84.us.preheader ], [ %indvars.iv.next120.1, %.lr.ph84.us ]
  %.05482.us.unr = phi double [ 0.000000e+00, %.lr.ph84.us.preheader ], [ %41, %.lr.ph84.us ]
  br i1 %lcmp.mod128.not, label %.critedge.us, label %.lr.ph84.us.epil

.lr.ph84.us.epil:                                 ; preds = %.critedge.us.unr-lcssa
  %20 = getelementptr inbounds double, ptr %5, i64 %indvars.iv119.unr
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds double, ptr %9, i64 %indvars.iv119.unr
  %23 = load double, ptr %22, align 8, !tbaa !5
  %24 = fsub double %21, %23
  %25 = tail call double @llvm.fabs.f64(double %24)
  %26 = fadd double %.05482.us.unr, %25
  br label %.critedge.us

.critedge.us:                                     ; preds = %.critedge.us.unr-lcssa, %.lr.ph84.us.epil
  %.lcssa = phi double [ %.lcssa.ph, %.critedge.us.unr-lcssa ], [ %26, %.lr.ph84.us.epil ]
  %27 = fcmp uge double %.lcssa, %3
  br i1 %27, label %42, label %.sink.split

.lr.ph84.us:                                      ; preds = %.lr.ph84.us.preheader, %.lr.ph84.us
  %indvars.iv119 = phi i64 [ %indvars.iv.next120.1, %.lr.ph84.us ], [ 0, %.lr.ph84.us.preheader ]
  %.05482.us = phi double [ %41, %.lr.ph84.us ], [ 0.000000e+00, %.lr.ph84.us.preheader ]
  %niter131 = phi i64 [ %niter131.next.1, %.lr.ph84.us ], [ 0, %.lr.ph84.us.preheader ]
  %28 = getelementptr inbounds double, ptr %5, i64 %indvars.iv119
  %29 = load double, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds double, ptr %9, i64 %indvars.iv119
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = fsub double %29, %31
  %33 = tail call double @llvm.fabs.f64(double %32)
  %34 = fadd double %.05482.us, %33
  %indvars.iv.next120 = or disjoint i64 %indvars.iv119, 1
  %35 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next120
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.next120
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = fsub double %36, %38
  %40 = tail call double @llvm.fabs.f64(double %39)
  %41 = fadd double %34, %40
  %indvars.iv.next120.1 = add nuw nsw i64 %indvars.iv119, 2
  %niter131.next.1 = add i64 %niter131, 2
  %niter131.ncmp.1 = icmp eq i64 %niter131.next.1, %unroll_iter130
  br i1 %niter131.ncmp.1, label %.critedge.us.unr-lcssa, label %.lr.ph84.us, !llvm.loop !9

.preheader70.us:                                  ; preds = %.preheader71.us.preheader, %42
  %.05986.us = phi i32 [ %43, %42 ], [ 0, %.preheader71.us.preheader ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %9, ptr align 8 %5, i64 %16, i1 false), !tbaa !5
  br label %.lr.ph79.us.us

42:                                               ; preds = %.critedge.us
  %43 = add nuw nsw i32 %.05986.us, 1
  %exitcond124.not = icmp eq i32 %43, %4
  br i1 %exitcond124.not, label %.critedge69, label %.preheader70.us, !llvm.loop !11

.lr.ph79.us.us:                                   ; preds = %._crit_edge.us.us, %.preheader70.us
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %._crit_edge.us.us ], [ 0, %.preheader70.us ]
  %44 = getelementptr inbounds double, ptr %1, i64 %indvars.iv114
  %45 = load double, ptr %44, align 8, !tbaa !5
  %46 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv114
  br i1 %18, label %._crit_edge.us.us.unr-lcssa, label %.lr.ph79.us.us.new

.lr.ph79.us.us.new:                               ; preds = %.lr.ph79.us.us, %64
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %64 ], [ 0, %.lr.ph79.us.us ]
  %.05677.us.us = phi double [ %.1.us.us.1, %64 ], [ %45, %.lr.ph79.us.us ]
  %niter = phi i64 [ %niter.next.1, %64 ], [ 0, %.lr.ph79.us.us ]
  %.not67.us.us = icmp eq i64 %indvars.iv114, %indvars.iv
  br i1 %.not67.us.us, label %55, label %47

47:                                               ; preds = %.lr.ph79.us.us.new
  %48 = load ptr, ptr %46, align 8, !tbaa !12
  %49 = getelementptr inbounds double, ptr %48, i64 %indvars.iv
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %5, i64 %indvars.iv
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = fneg double %50
  %54 = tail call double @llvm.fmuladd.f64(double %53, double %52, double %.05677.us.us)
  br label %55

55:                                               ; preds = %47, %.lr.ph79.us.us.new
  %.1.us.us = phi double [ %54, %47 ], [ %.05677.us.us, %.lr.ph79.us.us.new ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %.not67.us.us.1 = icmp eq i64 %indvars.iv114, %indvars.iv.next
  br i1 %.not67.us.us.1, label %64, label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %46, align 8, !tbaa !12
  %58 = getelementptr inbounds double, ptr %57, i64 %indvars.iv.next
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next
  %61 = load double, ptr %60, align 8, !tbaa !5
  %62 = fneg double %59
  %63 = tail call double @llvm.fmuladd.f64(double %62, double %61, double %.1.us.us)
  br label %64

64:                                               ; preds = %56, %55
  %.1.us.us.1 = phi double [ %63, %56 ], [ %.1.us.us, %55 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.us.unr-lcssa, label %.lr.ph79.us.us.new, !llvm.loop !14

._crit_edge.us.us.unr-lcssa:                      ; preds = %64, %.lr.ph79.us.us
  %.1.us.us.lcssa.ph = phi double [ poison, %.lr.ph79.us.us ], [ %.1.us.us.1, %64 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph79.us.us ], [ %indvars.iv.next.1, %64 ]
  %.05677.us.us.unr = phi double [ %45, %.lr.ph79.us.us ], [ %.1.us.us.1, %64 ]
  br i1 %lcmp.mod.not, label %._crit_edge.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.us.unr-lcssa
  %.not67.us.us.epil = icmp eq i64 %indvars.iv114, %indvars.iv.unr
  br i1 %.not67.us.us.epil, label %._crit_edge.us.us, label %65

65:                                               ; preds = %.epil.preheader
  %66 = load ptr, ptr %46, align 8, !tbaa !12
  %67 = getelementptr inbounds double, ptr %66, i64 %indvars.iv.unr
  %68 = load double, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.unr
  %70 = load double, ptr %69, align 8, !tbaa !5
  %71 = fneg double %68
  %72 = tail call double @llvm.fmuladd.f64(double %71, double %70, double %.05677.us.us.unr)
  br label %._crit_edge.us.us

._crit_edge.us.us:                                ; preds = %.epil.preheader, %65, %._crit_edge.us.us.unr-lcssa
  %.1.us.us.lcssa = phi double [ %.1.us.us.lcssa.ph, %._crit_edge.us.us.unr-lcssa ], [ %72, %65 ], [ %.05677.us.us.unr, %.epil.preheader ]
  %73 = load ptr, ptr %46, align 8, !tbaa !12
  %74 = getelementptr inbounds double, ptr %73, i64 %indvars.iv114
  %75 = load double, ptr %74, align 8, !tbaa !5
  %76 = fdiv double %.1.us.us.lcssa, %75
  %77 = getelementptr inbounds double, ptr %5, i64 %indvars.iv114
  store double %76, ptr %77, align 8, !tbaa !5
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next115, %15
  br i1 %exitcond118.not, label %.lr.ph84.us.preheader, label %.lr.ph79.us.us, !llvm.loop !15

.lr.ph84.us.preheader:                            ; preds = %._crit_edge.us.us
  br i1 %19, label %.critedge.us.unr-lcssa, label %.lr.ph84.us

.critedge69:                                      ; preds = %42, %.preheader72.thread, %.preheader72
  br label %.sink.split

.sink.split:                                      ; preds = %.critedge.us, %.preheader72.thread, %.critedge69
  %.3.ph = phi i32 [ 1, %.critedge69 ], [ 0, %.preheader72.thread ], [ 0, %.critedge.us ]
  tail call void @free(ptr noundef nonnull %9) #7
  br label %78

78:                                               ; preds = %.sink.split, %6
  %.3 = phi i32 [ -1, %6 ], [ %.3.ph, %.sink.split ]
  ret i32 %.3
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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