; 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
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_copyColumns = external hidden unnamed_addr constant [18 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [83 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: nounwind uwtable
declare dso_local void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) #4

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

; Function Attrs: noreturn nounwind
declare void @abort() #2

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

13:                                               ; preds = %3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %19, label %16

16:                                               ; preds = %13
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyColumns, i32 noundef 1314, ptr noundef @.str.101) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

19:                                               ; preds = %13
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  br label %22

22:                                               ; preds = %43, %21
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = getelementptr inbounds i32, ptr %23, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !9
  %28 = icmp ne i32 %27, -1
  br i1 %28, label %29, label %46

29:                                               ; preds = %22
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr %30, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = icmp sgt i32 %34, %35
  br i1 %36, label %37, label %43

37:                                               ; preds = %29
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %38, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %42, ptr %10, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %37, %29
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = add i32 %44, 1
  store i32 %45, ptr %9, align 4, !tbaa !9
  br label %22, !llvm.loop !11

46:                                               ; preds = %22
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._MatNd, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = icmp ult i32 %48, %51
  br i1 %52, label %67, label %53

53:                                               ; preds = %47
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyColumns, i32 noundef 1327, ptr noundef @.str.102) #5
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._MatNd, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 8, !tbaa !16
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._MatNd, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str.103, i32 noundef %57, i32 noundef %60, i32 noundef %63) #5
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

67:                                               ; preds = %47
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._MatNd, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 8, !tbaa !16
  %74 = load i32, ptr %9, align 4, !tbaa !9
  call void @MatNd_reshape(ptr noundef %70, i32 noundef %73, i32 noundef %74)
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %110, %69
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._MatNd, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 8, !tbaa !16
  %80 = icmp ult i32 %76, %79
  br i1 %80, label %81, label %113

81:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !9
  %84 = call ptr @MatNd_getRowPtr(ptr noundef %82, i32 noundef %83)
  store ptr %84, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = call ptr @MatNd_getRowPtr(ptr noundef %85, i32 noundef %86)
  store ptr %87, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %106, %81
  %89 = load i32, ptr %8, align 4, !tbaa !9
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = icmp ult i32 %89, %90
  br i1 %91, label %92, label %109

92:                                               ; preds = %88
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %94, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds double, ptr %93, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !17
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  store double %101, ptr %105, align 8, !tbaa !17
  br label %106

106:                                              ; preds = %92
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = add i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !9
  br label %88, !llvm.loop !19

109:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = add i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !9
  br label %75, !llvm.loop !20

113:                                              ; preds = %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_getRowPtr(ptr noundef, i32 noundef) #4

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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 12}
!14 = !{!"_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!14, !10, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !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"

@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
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_copyColumns = external hidden unnamed_addr constant [18 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [83 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
declare dso_local void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_copyColumns(ptr noundef %0, ptr noundef %1, ptr noundef readonly %2) local_unnamed_addr #3 {
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %5, label %.preheader

.preheader:                                       ; preds = %3
  %4 = load i32, ptr %2, align 4, !tbaa !5
  %.not3536 = icmp eq i32 %4, -1
  br i1 %.not3536, label %._crit_edge, label %.lr.ph

5:                                                ; preds = %3
  %6 = load ptr, ptr @stderr, align 8, !tbaa !9
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyColumns, i32 noundef 1314, ptr noundef nonnull @.str.101) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %8 = phi i32 [ %12, %.lr.ph ], [ %4, %.preheader ]
  %.03238 = phi i32 [ %spec.select, %.lr.ph ], [ 0, %.preheader ]
  %.03337 = phi i32 [ %9, %.lr.ph ], [ 0, %.preheader ]
  %spec.select = tail call i32 @llvm.smax.i32(i32 %8, i32 %.03238)
  %9 = add i32 %.03337, 1
  %10 = zext i32 %9 to i64
  %11 = getelementptr inbounds i32, ptr %2, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %.not35 = icmp eq i32 %12, -1
  br i1 %.not35, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %.033.lcssa = phi i32 [ 0, %.preheader ], [ %9, %.lr.ph ]
  %.032.lcssa = phi i32 [ 0, %.preheader ], [ %spec.select, %.lr.ph ]
  %13 = getelementptr inbounds i8, ptr %1, i64 12
  %14 = load i32, ptr %13, align 4, !tbaa !13
  %15 = icmp ult i32 %.032.lcssa, %14
  br i1 %15, label %26, label %16

16:                                               ; preds = %._crit_edge
  %17 = load ptr, ptr @stderr, align 8, !tbaa !9
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyColumns, i32 noundef 1327, ptr noundef nonnull @.str.102) #5
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %22 = load i32, ptr %13, align 4, !tbaa !13
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.103, i32 noundef %.032.lcssa, i32 noundef %21, i32 noundef %22) #5
  %24 = load ptr, ptr @stderr, align 8, !tbaa !9
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.4) #5
  tail call void @print_trace() #6
  tail call void @exit(i32 noundef 1) #7
  unreachable

26:                                               ; preds = %._crit_edge
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !16
  tail call void @MatNd_reshape(ptr noundef %0, i32 noundef %28, i32 noundef %.033.lcssa)
  %29 = load i32, ptr %27, align 8, !tbaa !16
  %.not48 = icmp eq i32 %29, 0
  br i1 %.not48, label %._crit_edge47, label %.lr.ph46

.lr.ph46:                                         ; preds = %26
  %.not49 = icmp eq i32 %.033.lcssa, 0
  br i1 %.not49, label %.lr.ph46.split, label %.lr.ph42.us.preheader

.lr.ph42.us.preheader:                            ; preds = %.lr.ph46
  %wide.trip.count = zext i32 %.033.lcssa to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %30 = icmp ult i32 %.033.lcssa, 4
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph42.us

.lr.ph42.us:                                      ; preds = %.lr.ph42.us.preheader, %._crit_edge43.us
  %.044.us = phi i32 [ %63, %._crit_edge43.us ], [ 0, %.lr.ph42.us.preheader ]
  %31 = tail call ptr @MatNd_getRowPtr(ptr noundef nonnull %1, i32 noundef %.044.us)
  %32 = tail call ptr @MatNd_getRowPtr(ptr noundef %0, i32 noundef %.044.us)
  br i1 %30, label %._crit_edge43.us.unr-lcssa, label %.lr.ph42.us.new

.lr.ph42.us.new:                                  ; preds = %.lr.ph42.us, %.lr.ph42.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph42.us.new ], [ 0, %.lr.ph42.us ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph42.us.new ], [ 0, %.lr.ph42.us ]
  %33 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds double, ptr %31, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !17
  %38 = getelementptr inbounds double, ptr %32, i64 %indvars.iv
  store double %37, ptr %38, align 8, !tbaa !17
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %39 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds double, ptr %31, i64 %41
  %43 = load double, ptr %42, align 8, !tbaa !17
  %44 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next
  store double %43, ptr %44, align 8, !tbaa !17
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %45 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next.1
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %31, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next.1
  store double %49, ptr %50, align 8, !tbaa !17
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %51 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.next.2
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %31, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !17
  %56 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next.2
  store double %55, ptr %56, align 8, !tbaa !17
  %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 %._crit_edge43.us.unr-lcssa, label %.lr.ph42.us.new, !llvm.loop !19

._crit_edge43.us.unr-lcssa:                       ; preds = %.lr.ph42.us.new, %.lr.ph42.us
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph42.us ], [ %indvars.iv.next.3, %.lr.ph42.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge43.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge43.us.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge43.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge43.us.unr-lcssa ]
  %57 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv.epil
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %31, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !17
  %62 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.epil
  store double %61, ptr %62, align 8, !tbaa !17
  %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 %._crit_edge43.us, label %.epil.preheader, !llvm.loop !20

._crit_edge43.us:                                 ; preds = %.epil.preheader, %._crit_edge43.us.unr-lcssa
  %63 = add nuw i32 %.044.us, 1
  %64 = load i32, ptr %27, align 8, !tbaa !16
  %65 = icmp ult i32 %63, %64
  br i1 %65, label %.lr.ph42.us, label %._crit_edge47, !llvm.loop !22

.lr.ph46.split:                                   ; preds = %.lr.ph46, %.lr.ph46.split
  %.044 = phi i32 [ %68, %.lr.ph46.split ], [ 0, %.lr.ph46 ]
  %66 = tail call ptr @MatNd_getRowPtr(ptr noundef nonnull %1, i32 noundef %.044)
  %67 = tail call ptr @MatNd_getRowPtr(ptr noundef %0, i32 noundef %.044)
  %68 = add nuw i32 %.044, 1
  %69 = load i32, ptr %27, align 8, !tbaa !16
  %70 = icmp ult i32 %68, %69
  br i1 %70, label %.lr.ph46.split, label %._crit_edge47, !llvm.loop !22

._crit_edge47:                                    ; preds = %._crit_edge43.us, %.lr.ph46.split, %26
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_getRowPtr(ptr noundef, i32 noundef) local_unnamed_addr #3

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

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


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