; 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
@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@RcsLogLevel = external global i32, align 4
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__.MatNd_createFromFile = external hidden unnamed_addr constant [21 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [25 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
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) #4

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @MatNd_arraySizeFromFile(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #1

declare double @String_toDouble_l(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @MatNd_createFromFile(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca [256 x i8], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = call noalias ptr @fopen(ptr noundef %15, ptr noundef @.str.63)
  store ptr %16, ptr %11, align 8, !tbaa !5
  %17 = load ptr, ptr %11, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %40

19:                                               ; preds = %1
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %26

23:                                               ; preds = %20
  %24 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %24(i32 noundef 1, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 935, ptr noundef @.str.68, ptr noundef %25)
  br label %26

26:                                               ; preds = %23, %20
  %27 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %28 = icmp sle i32 1, %27
  br i1 %28, label %29, label %37

29:                                               ; preds = %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.26, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 935) #5
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.68, ptr noundef %33) #5
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.4) #5
  br label %37

37:                                               ; preds = %29, %26
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  store ptr null, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %140

40:                                               ; preds = %1
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = call zeroext i1 @MatNd_arraySizeFromFile(ptr noundef %41, ptr noundef %5, ptr noundef %6, ptr noundef %8)
  %43 = zext i1 %42 to i8
  store i8 %43, ptr %10, align 1, !tbaa !11
  %44 = load i8, ptr %10, align 1, !tbaa !11, !range !13, !noundef !14
  %45 = trunc i8 %44 to i1
  %46 = zext i1 %45 to i32
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %95

48:                                               ; preds = %40
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %55

52:                                               ; preds = %49
  %53 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %53(i32 noundef 1, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 943, ptr noundef @.str.64, ptr noundef %54)
  br label %55

55:                                               ; preds = %52, %49
  %56 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %57 = icmp sle i32 1, %56
  br i1 %57, label %58, label %66

58:                                               ; preds = %55
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef @.str.26, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 943) #5
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.64, ptr noundef %62) #5
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.4) #5
  br label %66

66:                                               ; preds = %58, %55
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %77

72:                                               ; preds = %69
  %73 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = load i32, ptr %6, align 4, !tbaa !9
  %76 = load i32, ptr %8, align 4, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) %73(i32 noundef 4, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 945, ptr noundef @.str.69, i32 noundef %74, i32 noundef %75, i32 noundef %76)
  br label %77

77:                                               ; preds = %72, %69
  %78 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %79 = icmp sle i32 4, %78
  br i1 %79, label %80, label %90

80:                                               ; preds = %77
  %81 = load ptr, ptr @stderr, align 8, !tbaa !5
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.26, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 945) #5
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.69, 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
  br label %90

90:                                               ; preds = %80, %77
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = call i32 @fclose(ptr noundef %93)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %140

95:                                               ; preds = %40
  %96 = load i32, ptr %5, align 4, !tbaa !9
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = call ptr @MatNd_create(i32 noundef %96, i32 noundef %97)
  store ptr %98, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %14) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %133, %95
  %100 = load i32, ptr %4, align 4, !tbaa !9
  %101 = load i32, ptr %5, align 4, !tbaa !9
  %102 = load i32, ptr %6, align 4, !tbaa !9
  %103 = mul nsw i32 %101, %102
  %104 = icmp slt i32 %100, %103
  br i1 %104, label %105, label %136

105:                                              ; preds = %99
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 0
  %108 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %106, ptr noundef @.str.65, ptr noundef %107)
  store i32 %108, ptr %9, align 4, !tbaa !9
  %109 = getelementptr inbounds [256 x i8], ptr %14, i64 0, i64 0
  %110 = call double @String_toDouble_l(ptr noundef %109)
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._MatNd, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !15
  %114 = load i32, ptr %7, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %113, i64 %115
  store double %110, ptr %116, align 8, !tbaa !17
  %117 = load i32, ptr %7, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %7, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %105
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = icmp ne i32 %120, -1
  br i1 %121, label %130, label %122

122:                                              ; preds = %119
  %123 = load ptr, ptr @stderr, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.MatNd_createFromFile, i32 noundef 958, ptr noundef @.str.66) #5
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.70, i32 noundef %126) #5
  %128 = load ptr, ptr @stderr, align 8, !tbaa !5
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.4) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

130:                                              ; preds = %119
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %4, align 4, !tbaa !9
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %4, align 4, !tbaa !9
  br label %99, !llvm.loop !19

136:                                              ; preds = %99
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = call i32 @fclose(ptr noundef %137)
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %139, ptr %2, align 8
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 256, ptr %14) #5
  br label %140

140:                                              ; preds = %136, %92, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 1, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %141 = load ptr, ptr %2, align 8
  ret ptr %141
}

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


; 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
@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [14 x i8], align 1
@__func__.MatNd_createFromFile = external hidden unnamed_addr constant [21 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [25 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress 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) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @MatNd_arraySizeFromFile(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

declare double @String_toDouble_l(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @MatNd_createFromFile(ptr noundef %0) local_unnamed_addr #4 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [256 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %6 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.63)
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %21

8:                                                ; preds = %1
  %9 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not27 = icmp eq ptr %9, null
  br i1 %.not27, label %11, label %10

10:                                               ; preds = %8
  tail call void (i32, ptr, ptr, i32, ptr, ...) %9(i32 noundef 1, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 935, ptr noundef nonnull @.str.68, ptr noundef %0) #5
  br label %11

11:                                               ; preds = %10, %8
  %12 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %14, label %82

14:                                               ; preds = %11
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 935) #6
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.68, ptr noundef %0) #6
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.4) #6
  br label %82

21:                                               ; preds = %1
  %22 = call zeroext i1 @MatNd_arraySizeFromFile(ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  br i1 %22, label %57, label %23

23:                                               ; preds = %21
  %24 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not25 = icmp eq ptr %24, null
  br i1 %.not25, label %26, label %25

25:                                               ; preds = %23
  call void (i32, ptr, ptr, i32, ptr, ...) %24(i32 noundef 1, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 943, ptr noundef nonnull @.str.64, ptr noundef %0) #5
  br label %26

26:                                               ; preds = %25, %23
  %27 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %29, label %36

29:                                               ; preds = %26
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 943) #6
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.64, ptr noundef %0) #6
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.4) #6
  br label %36

36:                                               ; preds = %26, %29
  %37 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not26 = icmp eq ptr %37, null
  br i1 %.not26, label %42, label %38

38:                                               ; preds = %36
  %39 = load i32, ptr %2, align 4, !tbaa !9
  %40 = load i32, ptr %3, align 4, !tbaa !9
  %41 = load i32, ptr %4, align 4, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) %37(i32 noundef 4, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 945, ptr noundef nonnull @.str.69, i32 noundef %39, i32 noundef %40, i32 noundef %41) #5
  br label %42

42:                                               ; preds = %38, %36
  %43 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %44 = icmp sgt i32 %43, 3
  br i1 %44, label %45, label %55

45:                                               ; preds = %42
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 945) #6
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !9
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = load i32, ptr %4, align 4, !tbaa !9
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.69, i32 noundef %49, i32 noundef %50, i32 noundef %51) #6
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.4) #6
  br label %55

55:                                               ; preds = %45, %42
  %56 = call i32 @fclose(ptr noundef nonnull %6)
  br label %82

57:                                               ; preds = %21
  %58 = load i32, ptr %2, align 4, !tbaa !9
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = call ptr @MatNd_create(i32 noundef %58, i32 noundef %59)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #5
  %61 = load i32, ptr %2, align 4, !tbaa !9
  %62 = load i32, ptr %3, align 4, !tbaa !9
  %63 = mul nsw i32 %62, %61
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph, label %._crit_edge

65:                                               ; preds = %.lr.ph
  %66 = load i32, ptr %2, align 4, !tbaa !9
  %67 = load i32, ptr %3, align 4, !tbaa !9
  %68 = mul nsw i32 %67, %66
  %69 = icmp sgt i32 %68, %indvars
  br i1 %69, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.lr.ph:                                           ; preds = %57, %65
  %indvars.iv = phi i64 [ %indvars.iv.next, %65 ], [ 0, %57 ]
  %70 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %6, ptr noundef nonnull @.str.65, ptr noundef nonnull %5) #5
  %71 = call double @String_toDouble_l(ptr noundef nonnull %5) #5
  %72 = load ptr, ptr %60, align 8, !tbaa !13
  %73 = getelementptr inbounds double, ptr %72, i64 %indvars.iv
  store double %71, ptr %73, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars = trunc i64 %indvars.iv.next to i32
  %.not = icmp eq i32 %70, -1
  br i1 %.not, label %74, label %65

74:                                               ; preds = %.lr.ph
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_createFromFile, i32 noundef 958, ptr noundef nonnull @.str.66) #6
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.70, i32 noundef %indvars) #6
  %79 = load ptr, ptr @stderr, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.4) #6
  call void @print_trace() #5
  call void @exit(i32 noundef 1) #7
  unreachable

._crit_edge:                                      ; preds = %65, %57
  %81 = call i32 @fclose(ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #5
  br label %82

82:                                               ; preds = %11, %14, %._crit_edge, %55
  %.0 = phi ptr [ null, %55 ], [ %60, %._crit_edge ], [ null, %14 ], [ null, %11 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  ret ptr %.0
}

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


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