; 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_copyBlock = external hidden unnamed_addr constant [16 x i8], align 1
@.str.193 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.194 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.195 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [16 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_copyBlock(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #4 {
  %7 = alloca ptr, 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
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  store i32 %5, ptr %12, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %6
  %17 = load i32, ptr %11, align 4, !tbaa !9
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = icmp uge i32 %17, %18
  br i1 %19, label %29, label %20

20:                                               ; preds = %16
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyBlock, i32 noundef 3309, ptr noundef @.str.193) #5
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.194, i32 noundef %24, i32 noundef %25) #5
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

29:                                               ; preds = %16
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = icmp uge i32 %32, %33
  br i1 %34, label %44, label %35

35:                                               ; preds = %31
  %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_copyBlock, i32 noundef 3310, ptr noundef @.str.195) #5
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = load i32, ptr %12, align 4, !tbaa !9
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.196, i32 noundef %39, i32 noundef %40) #5
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

44:                                               ; preds = %31
  br label %45

45:                                               ; preds = %44
  br label %46

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

55:                                               ; preds = %46
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %56, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyBlock, i32 noundef 3311, ptr noundef @.str.197) #5
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._MatNd, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !11
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str.198, i32 noundef %61, i32 noundef %62, 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 = %46
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._MatNd, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 4, !tbaa !14
  %73 = sub i32 %72, 1
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %10, align 4, !tbaa !9
  %76 = sub i32 %74, %75
  %77 = icmp eq i32 %73, %76
  br i1 %77, label %90, label %78

78:                                               ; preds = %69
  %79 = load ptr, ptr @stderr, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyBlock, i32 noundef 3312, ptr noundef @.str.199) #5
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._MatNd, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !14
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = load i32, ptr %10, align 4, !tbaa !9
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.200, i32 noundef %84, i32 noundef %85, i32 noundef %86) #5
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

90:                                               ; preds = %69
  br label %91

91:                                               ; preds = %90
  br label %92

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

98:                                               ; preds = %92
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyBlock, i32 noundef 3313, ptr noundef @.str.201) #5
  %101 = load ptr, ptr @stderr, align 8, !tbaa !5
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._MatNd, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 8, !tbaa !11
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.202, i32 noundef %104, i32 noundef %105) #5
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

109:                                              ; preds = %92
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._MatNd, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %113, align 4, !tbaa !14
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = icmp ugt i32 %114, %115
  br i1 %116, label %128, label %117

117:                                              ; preds = %111
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_copyBlock, i32 noundef 3314, ptr noundef @.str.203) #5
  %120 = load ptr, ptr @stderr, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._MatNd, ptr %121, i32 0, i32 2
  %123 = load i32, ptr %122, align 4, !tbaa !14
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.204, i32 noundef %123, i32 noundef %124) #5
  %126 = load ptr, ptr @stderr, align 8, !tbaa !5
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

128:                                              ; preds = %111
  br label %129

129:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %179, %129
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = sub i32 %132, %133
  %135 = icmp ule i32 %131, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %130
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %182

137:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %175, %137
  %139 = load i32, ptr %15, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = sub i32 %140, %141
  %143 = icmp ule i32 %139, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %138
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %178

145:                                              ; preds = %138
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._MatNd, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !15
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = load i32, ptr %9, align 4, !tbaa !9
  %151 = add i32 %149, %150
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct._MatNd, ptr %152, i32 0, i32 2
  %154 = load i32, ptr %153, align 4, !tbaa !14
  %155 = mul i32 %151, %154
  %156 = load i32, ptr %15, align 4, !tbaa !9
  %157 = load i32, ptr %10, align 4, !tbaa !9
  %158 = add i32 %156, %157
  %159 = add i32 %155, %158
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %148, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !16
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._MatNd, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = load i32, ptr %13, align 4, !tbaa !9
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._MatNd, ptr %167, i32 0, i32 2
  %169 = load i32, ptr %168, align 4, !tbaa !14
  %170 = mul i32 %166, %169
  %171 = load i32, ptr %15, align 4, !tbaa !9
  %172 = add i32 %170, %171
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %165, i64 %173
  store double %162, ptr %174, align 8, !tbaa !16
  br label %175

175:                                              ; preds = %145
  %176 = load i32, ptr %15, align 4, !tbaa !9
  %177 = add i32 %176, 1
  store i32 %177, ptr %15, align 4, !tbaa !9
  br label %138, !llvm.loop !18

178:                                              ; preds = %144
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %13, align 4, !tbaa !9
  %181 = add i32 %180, 1
  store i32 %181, ptr %13, align 4, !tbaa !9
  br label %130, !llvm.loop !20

182:                                              ; preds = %136
  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, !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 = !{!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_copyBlock = external hidden unnamed_addr constant [16 x i8], align 1
@.str.193 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.194 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.195 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [16 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_copyBlock(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #3 {
  %.not = icmp ult i32 %4, %2
  br i1 %.not, label %7, label %14

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, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyBlock, i32 noundef 3309, ptr noundef nonnull @.str.193) #4
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.194, i32 noundef %4, i32 noundef %2) #4
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

14:                                               ; preds = %6
  %.not54 = icmp ult i32 %5, %3
  br i1 %.not54, label %15, label %22

15:                                               ; preds = %14
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyBlock, i32 noundef 3310, ptr noundef nonnull @.str.195) #4
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.196, i32 noundef %5, i32 noundef %3) #4
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

22:                                               ; preds = %14
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = add i32 %24, -1
  %26 = sub i32 %4, %2
  %27 = icmp eq i32 %25, %26
  br i1 %27, label %36, label %28

28:                                               ; preds = %22
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyBlock, i32 noundef 3311, ptr noundef nonnull @.str.197) #4
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = load i32, ptr %23, align 8, !tbaa !9
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.198, i32 noundef %32, i32 noundef %4, i32 noundef %2) #4
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

36:                                               ; preds = %22
  %37 = getelementptr inbounds i8, ptr %0, i64 12
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = add i32 %38, -1
  %40 = sub i32 %5, %3
  %41 = icmp eq i32 %39, %40
  br i1 %41, label %50, label %42

42:                                               ; preds = %36
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyBlock, i32 noundef 3312, ptr noundef nonnull @.str.199) #4
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = load i32, ptr %37, align 4, !tbaa !13
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.200, i32 noundef %46, i32 noundef %5, i32 noundef %3) #4
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

50:                                               ; preds = %36
  %51 = getelementptr inbounds i8, ptr %1, i64 8
  %52 = load i32, ptr %51, align 8, !tbaa !9
  %53 = icmp ugt i32 %52, %4
  br i1 %53, label %62, label %54

54:                                               ; preds = %50
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyBlock, i32 noundef 3313, ptr noundef nonnull @.str.201) #4
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = load i32, ptr %51, align 8, !tbaa !9
  %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.202, i32 noundef %58, i32 noundef %4) #4
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

62:                                               ; preds = %50
  %63 = getelementptr inbounds i8, ptr %1, i64 12
  %64 = load i32, ptr %63, align 4, !tbaa !13
  %65 = icmp ugt i32 %64, %5
  br i1 %65, label %.preheader57, label %74

.preheader57:                                     ; preds = %62
  %66 = load ptr, ptr %1, align 8, !tbaa !14
  %67 = ptrtoint ptr %66 to i64
  %68 = load ptr, ptr %0, align 8, !tbaa !14
  %69 = ptrtoint ptr %68 to i64
  %70 = zext i32 %39 to i64
  %71 = mul i32 %64, %2
  %72 = add i32 %71, %3
  %73 = add nuw nsw i64 %70, 1
  %min.iters.check = icmp ult i32 %39, 9
  %n.vec = and i64 %73, 8589934588
  %cmp.n = icmp eq i64 %73, %n.vec
  br label %.preheader

74:                                               ; preds = %62
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_copyBlock, i32 noundef 3314, ptr noundef nonnull @.str.203) #4
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = load i32, ptr %63, align 4, !tbaa !13
  %79 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.204, i32 noundef %78, i32 noundef %5) #4
  %80 = load ptr, ptr @stderr, align 8, !tbaa !5
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.4) #4
  tail call void @print_trace() #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

.preheader:                                       ; preds = %.preheader57, %.loopexit
  %.04559 = phi i32 [ 0, %.preheader57 ], [ %115, %.loopexit ]
  %82 = add i32 %.04559, %2
  %83 = mul i32 %82, %64
  %84 = add i32 %83, %3
  %85 = mul i32 %.04559, %38
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.scevcheck, %.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.preheader ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.scevcheck:                                 ; preds = %.preheader
  %86 = mul i32 %38, %.04559
  %87 = zext i32 %86 to i64
  %88 = shl nuw nsw i64 %87, 3
  %89 = add i64 %88, %69
  %90 = mul i32 %64, %.04559
  %91 = add i32 %72, %90
  %92 = zext i32 %91 to i64
  %93 = shl nuw nsw i64 %92, 3
  %94 = add i64 %93, %67
  %95 = sub i64 %89, %94
  %96 = mul i32 %64, %.04559
  %97 = add i32 %72, %96
  %98 = mul i32 %38, %.04559
  %99 = xor i32 %98, -1
  %100 = icmp ugt i32 %39, %99
  %101 = xor i32 %97, -1
  %102 = icmp ugt i32 %39, %101
  %103 = or i1 %100, %102
  %diff.check = icmp ult i64 %95, 32
  %or.cond = select i1 %103, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.scevcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.scevcheck ]
  %104 = trunc i64 %index to i32
  %105 = add i32 %84, %104
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds double, ptr %66, i64 %106
  %108 = getelementptr inbounds i8, ptr %107, i64 16
  %wide.load = load <2 x double>, ptr %107, align 8, !tbaa !15
  %wide.load61 = load <2 x double>, ptr %108, align 8, !tbaa !15
  %109 = add i32 %85, %104
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %68, i64 %110
  %112 = getelementptr inbounds i8, ptr %111, i64 16
  store <2 x double> %wide.load, ptr %111, align 8, !tbaa !15
  store <2 x double> %wide.load61, ptr %112, align 8, !tbaa !15
  %index.next = add nuw i64 %index, 4
  %113 = icmp eq i64 %index.next, %n.vec
  br i1 %113, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

114:                                              ; preds = %.loopexit
  ret void

.loopexit:                                        ; preds = %scalar.ph, %middle.block
  %115 = add nuw i32 %.04559, 1
  %.not55.not = icmp ult i32 %.04559, %25
  br i1 %.not55.not, label %.preheader, label %114, !llvm.loop !21

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %116 = trunc nuw i64 %indvars.iv to i32
  %117 = add i32 %84, %116
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds double, ptr %66, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !15
  %121 = add i32 %85, %116
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds double, ptr %68, i64 %122
  store double %120, ptr %123, align 8, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not56.not = icmp ult i64 %indvars.iv, %70
  br i1 %.not56.not, label %scalar.ph, label %.loopexit, !llvm.loop !22
}

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, !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 = !{!10, !6, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18, !19}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass