; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_MatNd)

; 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._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.MatNd_overwriteDiag = external hidden unnamed_addr constant [20 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [71 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

declare void @print_trace() #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_overwriteDiag(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  br label %6

6:                                                ; preds = %2
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct._MatNd, ptr %7, i32 0, i32 1
  %9 = load i32, ptr %8, align 8, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct._MatNd, ptr %10, i32 0, i32 2
  %12 = load i32, ptr %11, align 4, !tbaa !13
  %13 = icmp eq i32 %9, %12
  br i1 %13, label %27, label %14

14:                                               ; preds = %6
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_overwriteDiag, i32 noundef 1126, ptr noundef @.str.87) #5
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._MatNd, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._MatNd, ptr %21, i32 0, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.88, i32 noundef %20, i32 noundef %23) #5
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

27:                                               ; preds = %6
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._MatNd, ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %45, label %35

35:                                               ; preds = %30
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_overwriteDiag, i32 noundef 1128, ptr noundef @.str.89) #5
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._MatNd, ptr %39, i32 0, i32 2
  %41 = load i32, ptr %40, align 4, !tbaa !13
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.90, i32 noundef %41) #5
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

45:                                               ; preds = %30
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._MatNd, ptr %48, i32 0, i32 1
  %50 = load i32, ptr %49, align 8, !tbaa !9
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._MatNd, ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 8, !tbaa !9
  %54 = icmp eq i32 %50, %53
  br i1 %54, label %55, label %86

55:                                               ; preds = %47
  store i32 0, ptr %5, align 4, !tbaa !14
  br label %56

56:                                               ; preds = %82, %55
  %57 = load i32, ptr %5, align 4, !tbaa !14
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._MatNd, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 8, !tbaa !9
  %61 = icmp ult i32 %57, %60
  br i1 %61, label %62, label %85

62:                                               ; preds = %56
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._MatNd, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = load i32, ptr %5, align 4, !tbaa !14
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %65, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !16
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._MatNd, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = load i32, ptr %5, align 4, !tbaa !14
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._MatNd, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = mul i32 %73, %76
  %78 = load i32, ptr %5, align 4, !tbaa !14
  %79 = add i32 %77, %78
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %72, i64 %80
  store double %69, ptr %81, align 8, !tbaa !16
  br label %82

82:                                               ; preds = %62
  %83 = load i32, ptr %5, align 4, !tbaa !14
  %84 = add i32 %83, 1
  store i32 %84, ptr %5, align 4, !tbaa !14
  br label %56, !llvm.loop !18

85:                                               ; preds = %56
  br label %140

86:                                               ; preds = %47
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._MatNd, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 8, !tbaa !9
  %90 = icmp eq i32 %89, 1
  br i1 %90, label %91, label %120

91:                                               ; preds = %86
  store i32 0, ptr %5, align 4, !tbaa !14
  br label %92

92:                                               ; preds = %116, %91
  %93 = load i32, ptr %5, align 4, !tbaa !14
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._MatNd, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 8, !tbaa !9
  %97 = icmp ult i32 %93, %96
  br i1 %97, label %98, label %119

98:                                               ; preds = %92
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._MatNd, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !15
  %102 = getelementptr inbounds double, ptr %101, i64 0
  %103 = load double, ptr %102, align 8, !tbaa !16
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._MatNd, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  %107 = load i32, ptr %5, align 4, !tbaa !14
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._MatNd, ptr %108, i32 0, i32 2
  %110 = load i32, ptr %109, align 4, !tbaa !13
  %111 = mul i32 %107, %110
  %112 = load i32, ptr %5, align 4, !tbaa !14
  %113 = add i32 %111, %112
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %106, i64 %114
  store double %103, ptr %115, align 8, !tbaa !16
  br label %116

116:                                              ; preds = %98
  %117 = load i32, ptr %5, align 4, !tbaa !14
  %118 = add i32 %117, 1
  store i32 %118, ptr %5, align 4, !tbaa !14
  br label %92, !llvm.loop !20

119:                                              ; preds = %92
  br label %139

120:                                              ; preds = %86
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.91, ptr noundef @.str.1, ptr noundef @__func__.MatNd_overwriteDiag, i32 noundef 1148) #5
  %124 = load ptr, ptr @stderr, align 8, !tbaa !5
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._MatNd, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 8, !tbaa !9
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._MatNd, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 8, !tbaa !9
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._MatNd, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 4, !tbaa !13
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.92, i32 noundef %127, i32 noundef %130, i32 noundef %133) #5
  %135 = load ptr, ptr @stderr, align 8, !tbaa !5
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

137:                                              ; No predecessors!
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138, %119
  br label %140

140:                                              ; preds = %139, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

attributes #0 = { 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 #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 = { noreturn 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_MatNd", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !6, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.MatNd_overwriteDiag = external hidden unnamed_addr constant [20 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [71 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

declare void @print_trace() local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_overwriteDiag(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 12
  %6 = load i32, ptr %5, align 4, !tbaa !12
  %7 = icmp eq i32 %4, %6
  br i1 %7, label %17, label %8

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !13
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_overwriteDiag, i32 noundef 1126, ptr noundef nonnull @.str.87) #4
  %11 = load ptr, ptr @stderr, align 8, !tbaa !13
  %12 = load i32, ptr %3, align 8, !tbaa !5
  %13 = load i32, ptr %5, align 4, !tbaa !12
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.88, i32 noundef %12, i32 noundef %13) #4
  %15 = load ptr, ptr @stderr, align 8, !tbaa !13
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

17:                                               ; preds = %2
  %18 = getelementptr inbounds i8, ptr %1, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !12
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %29, label %21

21:                                               ; preds = %17
  %22 = load ptr, ptr @stderr, align 8, !tbaa !13
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_overwriteDiag, i32 noundef 1128, ptr noundef nonnull @.str.89) #4
  %24 = load ptr, ptr @stderr, align 8, !tbaa !13
  %25 = load i32, ptr %18, align 4, !tbaa !12
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.90, i32 noundef %25) #4
  %27 = load ptr, ptr @stderr, align 8, !tbaa !13
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

29:                                               ; preds = %17
  %30 = getelementptr inbounds i8, ptr %1, i64 8
  %31 = load i32, ptr %30, align 8, !tbaa !5
  %32 = icmp eq i32 %31, %4
  br i1 %32, label %.preheader, label %61

.preheader:                                       ; preds = %29
  %.not37 = icmp eq i32 %4, 0
  br i1 %.not37, label %.loopexit, label %.lr.ph36

.lr.ph36:                                         ; preds = %.preheader
  %33 = load ptr, ptr %1, align 8, !tbaa !14
  %34 = load ptr, ptr %0, align 8, !tbaa !14
  %.031 = add i32 %4, 1
  %wide.trip.count43 = zext i32 %4 to i64
  %xtraiter49 = and i64 %wide.trip.count43, 3
  %35 = icmp ult i32 %4, 4
  br i1 %35, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph36.new

.lr.ph36.new:                                     ; preds = %.lr.ph36
  %unroll_iter52 = and i64 %wide.trip.count43, 4294967292
  br label %36

36:                                               ; preds = %36, %.lr.ph36.new
  %indvars.iv40 = phi i64 [ 0, %.lr.ph36.new ], [ %indvars.iv.next41.3, %36 ]
  %niter53 = phi i64 [ 0, %.lr.ph36.new ], [ %niter53.next.3, %36 ]
  %37 = getelementptr inbounds double, ptr %33, i64 %indvars.iv40
  %38 = load double, ptr %37, align 8, !tbaa !15
  %39 = trunc nuw i64 %indvars.iv40 to i32
  %40 = mul i32 %.031, %39
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds double, ptr %34, i64 %41
  store double %38, ptr %42, align 8, !tbaa !15
  %indvars.iv.next41 = or disjoint i64 %indvars.iv40, 1
  %43 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next41
  %44 = load double, ptr %43, align 8, !tbaa !15
  %45 = trunc nuw i64 %indvars.iv.next41 to i32
  %46 = mul i32 %.031, %45
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %34, i64 %47
  store double %44, ptr %48, align 8, !tbaa !15
  %indvars.iv.next41.1 = or disjoint i64 %indvars.iv40, 2
  %49 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next41.1
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = trunc nuw i64 %indvars.iv.next41.1 to i32
  %52 = mul i32 %.031, %51
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %34, i64 %53
  store double %50, ptr %54, align 8, !tbaa !15
  %indvars.iv.next41.2 = or disjoint i64 %indvars.iv40, 3
  %55 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next41.2
  %56 = load double, ptr %55, align 8, !tbaa !15
  %57 = trunc nuw i64 %indvars.iv.next41.2 to i32
  %58 = mul i32 %.031, %57
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %34, i64 %59
  store double %56, ptr %60, align 8, !tbaa !15
  %indvars.iv.next41.3 = add nuw nsw i64 %indvars.iv40, 4
  %niter53.next.3 = add i64 %niter53, 4
  %niter53.ncmp.3 = icmp eq i64 %niter53.next.3, %unroll_iter52
  br i1 %niter53.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %36, !llvm.loop !17

61:                                               ; preds = %29
  %62 = icmp eq i32 %31, 1
  br i1 %62, label %.preheader32, label %86

.preheader32:                                     ; preds = %61
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader32
  %63 = load ptr, ptr %1, align 8, !tbaa !14
  %64 = load ptr, ptr %0, align 8, !tbaa !14
  %.130 = add i32 %4, 1
  %wide.trip.count = zext i32 %4 to i64
  %.pre = load double, ptr %63, align 8, !tbaa !15
  %xtraiter = and i64 %wide.trip.count, 3
  %65 = icmp ult i32 %4, 4
  br i1 %65, label %.loopexit.loopexit47.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %66

66:                                               ; preds = %66, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %66 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %66 ]
  %67 = trunc nuw i64 %indvars.iv to i32
  %68 = mul i32 %.130, %67
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds double, ptr %64, i64 %69
  store double %.pre, ptr %70, align 8, !tbaa !15
  %71 = trunc i64 %indvars.iv to i32
  %72 = or disjoint i32 %71, 1
  %73 = mul i32 %.130, %72
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %64, i64 %74
  store double %.pre, ptr %75, align 8, !tbaa !15
  %76 = trunc i64 %indvars.iv to i32
  %77 = or disjoint i32 %76, 2
  %78 = mul i32 %.130, %77
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %64, i64 %79
  store double %.pre, ptr %80, align 8, !tbaa !15
  %81 = trunc i64 %indvars.iv to i32
  %82 = or disjoint i32 %81, 3
  %83 = mul i32 %.130, %82
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds double, ptr %64, i64 %84
  store double %.pre, ptr %85, align 8, !tbaa !15
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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 %.loopexit.loopexit47.unr-lcssa, label %66, !llvm.loop !19

86:                                               ; preds = %61
  %87 = load ptr, ptr @stderr, align 8, !tbaa !13
  %88 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef nonnull @.str.91, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_overwriteDiag, i32 noundef 1148) #4
  %89 = load ptr, ptr @stderr, align 8, !tbaa !13
  %90 = load i32, ptr %30, align 8, !tbaa !5
  %91 = load i32, ptr %3, align 8, !tbaa !5
  %92 = load i32, ptr %5, align 4, !tbaa !12
  %93 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.92, i32 noundef %90, i32 noundef %91, i32 noundef %92) #4
  %94 = load ptr, ptr @stderr, align 8, !tbaa !13
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

.loopexit.loopexit.unr-lcssa:                     ; preds = %36, %.lr.ph36
  %indvars.iv40.unr = phi i64 [ 0, %.lr.ph36 ], [ %indvars.iv.next41.3, %36 ]
  %lcmp.mod51.not = icmp eq i64 %xtraiter49, 0
  br i1 %lcmp.mod51.not, label %.loopexit, label %.epil.preheader48

.epil.preheader48:                                ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader48
  %indvars.iv40.epil = phi i64 [ %indvars.iv.next41.epil, %.epil.preheader48 ], [ %indvars.iv40.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter50 = phi i64 [ %epil.iter50.next, %.epil.preheader48 ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %96 = getelementptr inbounds double, ptr %33, i64 %indvars.iv40.epil
  %97 = load double, ptr %96, align 8, !tbaa !15
  %98 = trunc nuw i64 %indvars.iv40.epil to i32
  %99 = mul i32 %.031, %98
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds double, ptr %34, i64 %100
  store double %97, ptr %101, align 8, !tbaa !15
  %indvars.iv.next41.epil = add nuw nsw i64 %indvars.iv40.epil, 1
  %epil.iter50.next = add i64 %epil.iter50, 1
  %epil.iter50.cmp.not = icmp eq i64 %epil.iter50.next, %xtraiter49
  br i1 %epil.iter50.cmp.not, label %.loopexit, label %.epil.preheader48, !llvm.loop !20

.loopexit.loopexit47.unr-lcssa:                   ; preds = %66, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %66 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit.loopexit47.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.loopexit.loopexit47.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit.loopexit47.unr-lcssa ]
  %102 = trunc nuw i64 %indvars.iv.epil to i32
  %103 = mul i32 %.130, %102
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %64, i64 %104
  store double %.pre, ptr %105, align 8, !tbaa !15
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.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 %.loopexit, label %.epil.preheader, !llvm.loop !22

.loopexit:                                        ; preds = %.loopexit.loopexit47.unr-lcssa, %.epil.preheader, %.loopexit.loopexit.unr-lcssa, %.epil.preheader48, %.preheader32, %.preheader
  ret void
}

attributes #0 = { nofree 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 #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 = { noreturn 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 #3 = { 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 = { cold nounwind }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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, !10, i64 8}
!6 = !{!"_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !10, i64 12}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !21}


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