; 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.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.MatNd_interpolateRows = external hidden unnamed_addr constant [22 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.246 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [11 x i8], align 1

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

declare void @print_trace() #1

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

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

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

; Function Attrs: noreturn nounwind
declare void @abort() #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) #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_interpolateRows(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %2
  %14 = load ptr, ptr %3, 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_interpolateRows, i32 noundef 4496, ptr noundef @.str.85) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

19:                                               ; preds = %13
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %27, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_interpolateRows, i32 noundef 4497, ptr noundef @.str.245) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

27:                                               ; preds = %21
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._MatNd, ptr %30, i32 0, i32 2
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._MatNd, ptr %33, i32 0, i32 2
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = icmp eq i32 %32, %35
  br i1 %36, label %40, label %37

37:                                               ; preds = %29
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_interpolateRows, i32 noundef 4498, ptr noundef @.str.177) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

40:                                               ; preds = %29
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._MatNd, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 8, !tbaa !13
  %46 = icmp ugt i32 %45, 1
  br i1 %46, label %50, label %47

47:                                               ; preds = %42
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_interpolateRows, i32 noundef 4499, ptr noundef @.str.246) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

50:                                               ; preds = %42
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !13
  %56 = icmp ugt i32 %55, 1
  br i1 %56, label %60, label %57

57:                                               ; preds = %52
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_interpolateRows, i32 noundef 4500, ptr noundef @.str.247) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

60:                                               ; preds = %52
  br label %61

61:                                               ; preds = %60
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._MatNd, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 8, !tbaa !13
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._MatNd, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 8, !tbaa !13
  %68 = icmp eq i32 %64, %67
  br i1 %68, label %69, label %72

69:                                               ; preds = %61
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  call void @MatNd_copy(ptr noundef %70, ptr noundef %71)
  br label %180

72:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._MatNd, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 4, !tbaa !9
  store i32 %75, ptr %5, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !13
  store i32 %78, ptr %6, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._MatNd, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 8, !tbaa !13
  %82 = sub i32 %81, 1
  %83 = uitofp i32 %82 to double
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._MatNd, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 8, !tbaa !13
  %87 = sub i32 %86, 1
  %88 = uitofp i32 %87 to double
  %89 = fdiv double %83, %88
  store double %89, ptr %7, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._MatNd, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 8, !tbaa !13
  %93 = mul i32 %92, 1
  %94 = icmp ugt i32 %93, 1296
  br i1 %94, label %95, label %100

95:                                               ; preds = %72
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._MatNd, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 8, !tbaa !13
  %99 = call ptr @MatNd_create(i32 noundef %98, i32 noundef 1)
  store ptr %99, ptr %8, align 8, !tbaa !5
  br label %141

100:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._MatNd, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !13
  %104 = mul i32 %103, 1
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %100
  br label %112

107:                                              ; preds = %100
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._MatNd, ptr %108, i32 0, i32 1
  %110 = load i32, ptr %109, align 8, !tbaa !13
  %111 = mul i32 %110, 1
  br label %112

112:                                              ; preds = %107, %106
  %113 = phi i32 [ 1, %106 ], [ %111, %107 ]
  store i32 %113, ptr %9, align 4, !tbaa !14
  %114 = load i32, ptr %9, align 4, !tbaa !14
  %115 = zext i32 %114 to i64
  %116 = mul i64 %115, 8
  %117 = add i64 24, %116
  %118 = alloca i8, i64 %117, align 16
  store ptr %118, ptr %8, align 8, !tbaa !5
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._MatNd, ptr %119, i64 1
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._MatNd, ptr %121, i32 0, i32 0
  store ptr %120, ptr %122, align 8, !tbaa !17
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._MatNd, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 8, !tbaa !13
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._MatNd, ptr %126, i32 0, i32 1
  store i32 %125, ptr %127, align 8, !tbaa !13
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._MatNd, ptr %128, i32 0, i32 2
  store i32 1, ptr %129, align 4, !tbaa !9
  %130 = load i32, ptr %9, align 4, !tbaa !14
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._MatNd, ptr %131, i32 0, i32 3
  store i32 %130, ptr %132, align 8, !tbaa !18
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._MatNd, ptr %133, i32 0, i32 4
  store i8 1, ptr %134, align 4, !tbaa !19
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._MatNd, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !17
  %138 = load i32, ptr %9, align 4, !tbaa !14
  %139 = zext i32 %138 to i64
  %140 = mul i64 %139, 8
  call void @llvm.memset.p0.i64(ptr align 8 %137, i8 0, i64 %140, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %141

141:                                              ; preds = %112, %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !14
  br label %142

142:                                              ; preds = %175, %141
  %143 = load i32, ptr %10, align 4, !tbaa !14
  %144 = load i32, ptr %5, align 4, !tbaa !14
  %145 = icmp ult i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 12, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %178

147:                                              ; preds = %142
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = load i32, ptr %10, align 4, !tbaa !14
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  call void @MatNd_getColumn(ptr noundef %148, i32 noundef %149, ptr noundef %150)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !14
  br label %151

151:                                              ; preds = %171, %147
  %152 = load i32, ptr %12, align 4, !tbaa !14
  %153 = load i32, ptr %6, align 4, !tbaa !14
  %154 = icmp ult i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 15, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %174

156:                                              ; preds = %151
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = load i32, ptr %12, align 4, !tbaa !14
  %159 = load i32, ptr %10, align 4, !tbaa !14
  %160 = load i32, ptr %12, align 4, !tbaa !14
  %161 = uitofp i32 %160 to double
  %162 = load double, ptr %7, align 8, !tbaa !15
  %163 = fmul double %161, %162
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._MatNd, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !17
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._MatNd, ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 8, !tbaa !13
  %170 = call double @Math_interpolateLinear(double noundef %163, ptr noundef %166, i32 noundef %169)
  call void @MatNd_set(ptr noundef %157, i32 noundef %158, i32 noundef %159, double noundef %170)
  br label %171

171:                                              ; preds = %156
  %172 = load i32, ptr %12, align 4, !tbaa !14
  %173 = add i32 %172, 1
  store i32 %173, ptr %12, align 4, !tbaa !14
  br label %151, !llvm.loop !20

174:                                              ; preds = %155
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %10, align 4, !tbaa !14
  %177 = add i32 %176, 1
  store i32 %177, ptr %10, align 4, !tbaa !14
  br label %142, !llvm.loop !22

178:                                              ; preds = %146
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %179)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %180

180:                                              ; preds = %178, %69
  ret void
}

declare double @Math_interpolateLinear(double noundef, ptr noundef, i32 noundef) #1

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !11, i64 12}
!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 8}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!10, !6, i64 0}
!18 = !{!10, !11, i64 16}
!19 = !{!10, !12, i64 20}
!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.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.MatNd_interpolateRows = external hidden unnamed_addr constant [22 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.246 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [11 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: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @abort() 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 #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_getColumn(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

3:                                                ; preds = %2
  %4 = load ptr, ptr @stderr, align 8, !tbaa !5
  %5 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %4, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_interpolateRows, i32 noundef 4496, ptr noundef nonnull @.str.85) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

6:                                                ; preds = %2
  %.not52 = icmp eq ptr %1, null
  br i1 %.not52, label %7, label %10

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

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  %12 = load i32, ptr %11, align 4, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %1, i64 12
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = icmp eq i32 %12, %14
  br i1 %15, label %19, label %16

16:                                               ; preds = %10
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_interpolateRows, i32 noundef 4498, ptr noundef nonnull @.str.177) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

19:                                               ; preds = %10
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !13
  %22 = icmp ugt i32 %21, 1
  br i1 %22, label %26, label %23

23:                                               ; preds = %19
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_interpolateRows, i32 noundef 4499, ptr noundef nonnull @.str.246) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = icmp ugt i32 %28, 1
  br i1 %29, label %33, label %30

30:                                               ; preds = %26
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_interpolateRows, i32 noundef 4500, ptr noundef nonnull @.str.247) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

33:                                               ; preds = %26
  %34 = icmp eq i32 %21, %28
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  tail call void @MatNd_copy(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %67

36:                                               ; preds = %33
  %37 = add i32 %28, -1
  %38 = uitofp i32 %37 to double
  %39 = add i32 %21, -1
  %40 = uitofp i32 %39 to double
  %41 = fdiv double %38, %40
  %42 = icmp ugt i32 %28, 1296
  br i1 %42, label %43, label %45

43:                                               ; preds = %36
  %44 = tail call ptr @MatNd_create(i32 noundef %28, i32 noundef 1)
  br label %55

45:                                               ; preds = %36
  %46 = shl nuw nsw i32 %28, 3
  %47 = zext nneg i32 %46 to i64
  %48 = add nuw nsw i64 %47, 24
  %49 = alloca i8, i64 %48, align 16
  %50 = getelementptr inbounds i8, ptr %49, i64 24
  store ptr %50, ptr %49, align 16, !tbaa !14
  %51 = getelementptr inbounds i8, ptr %49, i64 8
  store i32 %28, ptr %51, align 8, !tbaa !13
  %52 = getelementptr inbounds i8, ptr %49, i64 12
  store i32 1, ptr %52, align 4, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %49, i64 16
  store i32 %28, ptr %53, align 16, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %49, i64 20
  store i8 1, ptr %54, align 4, !tbaa !16
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %50, i8 0, i64 %47, i1 false)
  br label %55

55:                                               ; preds = %45, %43
  %.046 = phi ptr [ %44, %43 ], [ %49, %45 ]
  %.not55 = icmp eq i32 %12, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %55
  %56 = getelementptr inbounds i8, ptr %.046, i64 8
  br label %57

._crit_edge:                                      ; preds = %58, %55
  call void @MatNd_destroy(ptr noundef %.046)
  br label %67

57:                                               ; preds = %.lr.ph, %58
  %.04554 = phi i32 [ 0, %.lr.ph ], [ %59, %58 ]
  call void @MatNd_getColumn(ptr noundef %.046, i32 noundef %.04554, ptr noundef nonnull %1)
  br label %60

58:                                               ; preds = %60
  %59 = add nuw i32 %.04554, 1
  %exitcond56.not = icmp eq i32 %59, %12
  br i1 %exitcond56.not, label %._crit_edge, label %57, !llvm.loop !17

60:                                               ; preds = %57, %60
  %.053 = phi i32 [ 0, %57 ], [ %66, %60 ]
  %61 = uitofp i32 %.053 to double
  %62 = fmul double %41, %61
  %63 = load ptr, ptr %.046, align 8, !tbaa !14
  %64 = load i32, ptr %56, align 8, !tbaa !13
  %65 = call double @Math_interpolateLinear(double noundef %62, ptr noundef %63, i32 noundef %64) #6
  call void @MatNd_set(ptr noundef nonnull %0, i32 noundef %.053, i32 noundef %.04554, double noundef %65)
  %66 = add nuw i32 %.053, 1
  %exitcond.not = icmp eq i32 %66, %21
  br i1 %exitcond.not, label %58, label %60, !llvm.loop !19

67:                                               ; preds = %._crit_edge, %35
  ret void
}

declare double @Math_interpolateLinear(double noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 12}
!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 8}
!14 = !{!10, !6, i64 0}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !12, i64 20}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass