; 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_deleteColumn = external hidden unnamed_addr constant [19 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [19 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: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) #4

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_deleteColumn(ptr noundef %0, i32 noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr null, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct._MatNd, ptr %11, i32 0, i32 1
  %13 = load i32, ptr %12, align 8, !tbaa !11
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._MatNd, ptr %14, i32 0, i32 2
  %16 = load i32, ptr %15, align 4, !tbaa !14
  %17 = sub i32 %16, 1
  %18 = mul i32 %13, %17
  %19 = icmp ugt i32 %18, 1296
  br i1 %19, label %20, label %29

20:                                               ; preds = %2
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._MatNd, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._MatNd, ptr %24, i32 0, i32 2
  %26 = load i32, ptr %25, align 4, !tbaa !14
  %27 = sub i32 %26, 1
  %28 = call ptr @MatNd_create(i32 noundef %23, i32 noundef %27)
  store ptr %28, ptr %5, align 8, !tbaa !5
  br label %82

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._MatNd, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._MatNd, ptr %33, i32 0, i32 2
  %35 = load i32, ptr %34, align 4, !tbaa !14
  %36 = sub i32 %35, 1
  %37 = mul i32 %32, %36
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %29
  br label %49

40:                                               ; preds = %29
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._MatNd, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !11
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._MatNd, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 4, !tbaa !14
  %47 = sub i32 %46, 1
  %48 = mul i32 %43, %47
  br label %49

49:                                               ; preds = %40, %39
  %50 = phi i32 [ 1, %39 ], [ %48, %40 ]
  store i32 %50, ptr %6, align 4, !tbaa !9
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = mul i64 %52, 8
  %54 = add i64 24, %53
  %55 = alloca i8, i64 %54, align 16
  store ptr %55, ptr %5, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._MatNd, ptr %56, i64 1
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._MatNd, ptr %58, i32 0, i32 0
  store ptr %57, ptr %59, align 8, !tbaa !15
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._MatNd, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 8, !tbaa !11
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._MatNd, ptr %63, i32 0, i32 1
  store i32 %62, ptr %64, align 8, !tbaa !11
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._MatNd, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !14
  %68 = sub i32 %67, 1
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._MatNd, ptr %69, i32 0, i32 2
  store i32 %68, ptr %70, align 4, !tbaa !14
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._MatNd, ptr %72, i32 0, i32 3
  store i32 %71, ptr %73, align 8, !tbaa !16
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._MatNd, ptr %74, i32 0, i32 4
  store i8 1, ptr %75, align 4, !tbaa !17
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !15
  %79 = load i32, ptr %6, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = mul i64 %80, 8
  call void @llvm.memset.p0.i64(ptr align 8 %78, i8 0, i64 %81, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %82

82:                                               ; preds = %49, %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %4, align 4, !tbaa !9
  %85 = icmp sge i32 %84, 0
  br i1 %85, label %86, label %92

86:                                               ; preds = %83
  %87 = load i32, ptr %4, align 4, !tbaa !9
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._MatNd, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 4, !tbaa !14
  %91 = icmp slt i32 %87, %90
  br i1 %91, label %103, label %92

92:                                               ; preds = %86, %83
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_deleteColumn, i32 noundef 2223, ptr noundef @.str.140) #6
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._MatNd, ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 4, !tbaa !14
  %99 = load i32, ptr %4, align 4, !tbaa !9
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.141, i32 noundef %98, i32 noundef %99) #6
  %101 = load ptr, ptr @stderr, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

103:                                              ; preds = %86
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %150, %105
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._MatNd, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !11
  %111 = icmp ult i32 %107, %110
  br i1 %111, label %112, label %153

112:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._MatNd, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 4, !tbaa !14
  %117 = mul i32 %113, %116
  store i32 %117, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %146, %112
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._MatNd, ptr %120, i32 0, i32 2
  %122 = load i32, ptr %121, align 4, !tbaa !14
  %123 = icmp ult i32 %119, %122
  br i1 %123, label %124, label %149

124:                                              ; preds = %118
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = load i32, ptr %4, align 4, !tbaa !9
  %127 = icmp ne i32 %125, %126
  br i1 %127, label %128, label %145

128:                                              ; preds = %124
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._MatNd, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !15
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = load i32, ptr %8, align 4, !tbaa !9
  %134 = add i32 %132, %133
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds double, ptr %131, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !18
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._MatNd, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !15
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = add i32 %141, 1
  store i32 %142, ptr %9, align 4, !tbaa !9
  %143 = zext i32 %141 to i64
  %144 = getelementptr inbounds double, ptr %140, i64 %143
  store double %137, ptr %144, align 8, !tbaa !18
  br label %145

145:                                              ; preds = %128, %124
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %8, align 4, !tbaa !9
  %148 = add i32 %147, 1
  store i32 %148, ptr %8, align 4, !tbaa !9
  br label %118, !llvm.loop !20

149:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %7, align 4, !tbaa !9
  %152 = add i32 %151, 1
  store i32 %152, ptr %7, align 4, !tbaa !9
  br label %106, !llvm.loop !22

153:                                              ; preds = %106
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._MatNd, ptr %155, i32 0, i32 1
  %157 = load i32, ptr %156, align 8, !tbaa !11
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._MatNd, ptr %158, i32 0, i32 2
  %160 = load i32, ptr %159, align 4, !tbaa !14
  %161 = sub i32 %160, 1
  call void @MatNd_reshape(ptr noundef %154, i32 noundef %157, i32 noundef %161)
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_copy(ptr noundef %162, ptr noundef %163)
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %164)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"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, !10, i64 8}
!12 = !{!"_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !6, i64 0}
!16 = !{!12, !10, i64 16}
!17 = !{!12, !13, i64 20}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


; 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_deleteColumn = external hidden unnamed_addr constant [19 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [19 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: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_deleteColumn(ptr noundef %0, i32 noundef %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 = add i32 %6, -1
  %8 = mul i32 %7, %4
  %9 = icmp ugt i32 %8, 1296
  br i1 %9, label %10, label %12

10:                                               ; preds = %2
  %11 = tail call ptr @MatNd_create(i32 noundef %4, i32 noundef %7)
  br label %22

12:                                               ; preds = %2
  %spec.select = tail call i32 @llvm.umax.i32(i32 %8, i32 1)
  %13 = shl nuw nsw i32 %spec.select, 3
  %14 = zext nneg i32 %13 to i64
  %15 = add nuw nsw i64 %14, 24
  %16 = alloca i8, i64 %15, align 16
  %17 = getelementptr inbounds i8, ptr %16, i64 24
  store ptr %17, ptr %16, align 16, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %16, i64 8
  store i32 %4, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %16, i64 12
  store i32 %7, ptr %19, align 4, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %16, i64 16
  store i32 %spec.select, ptr %20, align 16, !tbaa !14
  %21 = getelementptr inbounds i8, ptr %16, i64 20
  store i8 1, ptr %21, align 4, !tbaa !15
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %17, i8 0, i64 %14, i1 false)
  br label %22

22:                                               ; preds = %12, %10
  %.0 = phi ptr [ %11, %10 ], [ %16, %12 ]
  %23 = icmp sgt i32 %1, -1
  br i1 %23, label %24, label %67

24:                                               ; preds = %22
  %25 = load i32, ptr %5, align 4, !tbaa !12
  %26 = icmp sgt i32 %25, %1
  br i1 %26, label %.preheader, label %67

.preheader:                                       ; preds = %24
  %27 = load i32, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %._crit_edge56, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %.preheader
  %28 = zext nneg i32 %1 to i64
  %wide.trip.count = zext i32 %25 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %29 = icmp eq i32 %25, 1
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %.04554.us = phi i32 [ %.2.us.lcssa, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %.04753.us = phi i32 [ %66, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %30 = mul i32 %.04753.us, %25
  br i1 %29, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

.lr.ph.us.new:                                    ; preds = %.lr.ph.us, %54
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %54 ], [ 0, %.lr.ph.us ]
  %.152.us = phi i32 [ %.2.us.1, %54 ], [ %.04554.us, %.lr.ph.us ]
  %niter = phi i64 [ %niter.next.1, %54 ], [ 0, %.lr.ph.us ]
  %.not.us = icmp eq i64 %indvars.iv, %28
  br i1 %.not.us, label %42, label %31

31:                                               ; preds = %.lr.ph.us.new
  %32 = load ptr, ptr %0, align 8, !tbaa !13
  %33 = trunc nuw i64 %indvars.iv to i32
  %34 = add i32 %30, %33
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds double, ptr %32, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !16
  %38 = load ptr, ptr %.0, align 8, !tbaa !13
  %39 = add i32 %.152.us, 1
  %40 = zext i32 %.152.us to i64
  %41 = getelementptr inbounds double, ptr %38, i64 %40
  store double %37, ptr %41, align 8, !tbaa !16
  br label %42

42:                                               ; preds = %31, %.lr.ph.us.new
  %.2.us = phi i32 [ %39, %31 ], [ %.152.us, %.lr.ph.us.new ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %.not.us.1 = icmp eq i64 %indvars.iv.next, %28
  br i1 %.not.us.1, label %54, label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %0, align 8, !tbaa !13
  %45 = trunc nuw i64 %indvars.iv.next to i32
  %46 = add i32 %30, %45
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %44, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = load ptr, ptr %.0, align 8, !tbaa !13
  %51 = add i32 %.2.us, 1
  %52 = zext i32 %.2.us to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  store double %49, ptr %53, align 8, !tbaa !16
  br label %54

54:                                               ; preds = %43, %42
  %.2.us.1 = phi i32 [ %51, %43 ], [ %.2.us, %42 ]
  %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.unr-lcssa, label %.lr.ph.us.new, !llvm.loop !18

._crit_edge.us.unr-lcssa:                         ; preds = %54, %.lr.ph.us
  %.2.us.lcssa.ph = phi i32 [ poison, %.lr.ph.us ], [ %.2.us.1, %54 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next.1, %54 ]
  %.152.us.unr = phi i32 [ %.04554.us, %.lr.ph.us ], [ %.2.us.1, %54 ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa
  %.not.us.epil = icmp eq i64 %indvars.iv.unr, %28
  br i1 %.not.us.epil, label %._crit_edge.us, label %55

55:                                               ; preds = %.epil.preheader
  %56 = load ptr, ptr %0, align 8, !tbaa !13
  %57 = trunc nuw i64 %indvars.iv.unr to i32
  %58 = add i32 %30, %57
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %56, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = load ptr, ptr %.0, align 8, !tbaa !13
  %63 = add i32 %.152.us.unr, 1
  %64 = zext i32 %.152.us.unr to i64
  %65 = getelementptr inbounds double, ptr %62, i64 %64
  store double %61, ptr %65, align 8, !tbaa !16
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.epil.preheader, %55, %._crit_edge.us.unr-lcssa
  %.2.us.lcssa = phi i32 [ %.2.us.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %63, %55 ], [ %.152.us.unr, %.epil.preheader ]
  %66 = add nuw i32 %.04753.us, 1
  %exitcond61.not = icmp eq i32 %66, %27
  br i1 %exitcond61.not, label %._crit_edge56, label %.lr.ph.us, !llvm.loop !20

67:                                               ; preds = %24, %22
  %68 = load ptr, ptr @stderr, align 8, !tbaa !21
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_deleteColumn, i32 noundef 2223, ptr noundef nonnull @.str.140) #6
  %70 = load ptr, ptr @stderr, align 8, !tbaa !21
  %71 = load i32, ptr %5, align 4, !tbaa !12
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull @.str.141, i32 noundef %71, i32 noundef %1) #6
  %73 = load ptr, ptr @stderr, align 8, !tbaa !21
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.4) #6
  call void @print_trace() #7
  call void @exit(i32 noundef 1) #8
  unreachable

._crit_edge56:                                    ; preds = %._crit_edge.us, %.preheader
  %75 = add i32 %25, -1
  call void @MatNd_reshape(ptr noundef nonnull %0, i32 noundef %27, i32 noundef %75)
  call void @MatNd_copy(ptr noundef nonnull %0, ptr noundef %.0)
  call void @MatNd_destroy(ptr noundef %.0)
  ret void
}

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { cold nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!6, !7, i64 0}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !11, i64 20}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!7, !7, i64 0}


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