; LLVM IR from ayazhassan/RT-CUDA-GUI-Development :: RTCUDAGUI (mmio)

; 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"

@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@stdout = external global ptr, align 8
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @mm_typecode_to_str(ptr noundef) #3

declare i32 @fclose(ptr noundef) #1

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @mm_write_mtx_crd(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !9
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = call i32 @strcmp(ptr noundef %21, ptr noundef @.str.27) #6
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %8
  %25 = load ptr, ptr @stdout, align 8, !tbaa !5
  store ptr %25, ptr %18, align 8, !tbaa !5
  br label %32

26:                                               ; preds = %8
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = call noalias ptr @fopen(ptr noundef %27, ptr noundef @.str.28)
  store ptr %28, ptr %18, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  store i32 17, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %163

31:                                               ; preds = %26
  br label %32

32:                                               ; preds = %31, %24
  %33 = load ptr, ptr %18, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.29, ptr noundef @.str.8) #5
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = load ptr, ptr %17, align 8, !tbaa !5
  %37 = call ptr @mm_typecode_to_str(ptr noundef %36)
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.30, ptr noundef %37) #5
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.20, i32 noundef %40, i32 noundef %41, i32 noundef %42) #5
  %44 = load ptr, ptr %17, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 2
  %46 = load i8, ptr %45, align 1, !tbaa !11
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 80
  br i1 %48, label %49, label %71

49:                                               ; preds = %32
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %67, %49
  %51 = load i32, ptr %19, align 4, !tbaa !9
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %70

54:                                               ; preds = %50
  %55 = load ptr, ptr %18, align 8, !tbaa !5
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = load i32, ptr %19, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %56, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = load ptr, ptr %15, align 8, !tbaa !5
  %62 = load i32, ptr %19, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %61, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.23, i32 noundef %60, i32 noundef %65) #5
  br label %67

67:                                               ; preds = %54
  %68 = load i32, ptr %19, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %19, align 4, !tbaa !9
  br label %50, !llvm.loop !12

70:                                               ; preds = %50
  br label %155

71:                                               ; preds = %32
  %72 = load ptr, ptr %17, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 2
  %74 = load i8, ptr %73, align 1, !tbaa !11
  %75 = sext i8 %74 to i32
  %76 = icmp eq i32 %75, 82
  br i1 %76, label %77, label %104

77:                                               ; preds = %71
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %100, %77
  %79 = load i32, ptr %19, align 4, !tbaa !9
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %103

82:                                               ; preds = %78
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = load i32, ptr %19, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = load i32, ptr %19, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %89, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  %95 = load i32, ptr %19, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %94, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !14
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.31, i32 noundef %88, i32 noundef %93, double noundef %98) #5
  br label %100

100:                                              ; preds = %82
  %101 = load i32, ptr %19, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %19, align 4, !tbaa !9
  br label %78, !llvm.loop !16

103:                                              ; preds = %78
  br label %154

104:                                              ; preds = %71
  %105 = load ptr, ptr %17, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i64 2
  %107 = load i8, ptr %106, align 1, !tbaa !11
  %108 = sext i8 %107 to i32
  %109 = icmp eq i32 %108, 67
  br i1 %109, label %110, label %145

110:                                              ; preds = %104
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %141, %110
  %112 = load i32, ptr %19, align 4, !tbaa !9
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %115, label %144

115:                                              ; preds = %111
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load i32, ptr %19, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = load i32, ptr %19, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !9
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = mul nsw i32 2, %128
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %127, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !14
  %133 = load ptr, ptr %16, align 8, !tbaa !5
  %134 = load i32, ptr %19, align 4, !tbaa !9
  %135 = mul nsw i32 2, %134
  %136 = add nsw i32 %135, 1
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %133, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !14
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.32, i32 noundef %121, i32 noundef %126, double noundef %132, double noundef %139) #5
  br label %141

141:                                              ; preds = %115
  %142 = load i32, ptr %19, align 4, !tbaa !9
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %19, align 4, !tbaa !9
  br label %111, !llvm.loop !17

144:                                              ; preds = %111
  br label %153

145:                                              ; preds = %104
  %146 = load ptr, ptr %18, align 8, !tbaa !5
  %147 = load ptr, ptr @stdout, align 8, !tbaa !5
  %148 = icmp ne ptr %146, %147
  br i1 %148, label %149, label %152

149:                                              ; preds = %145
  %150 = load ptr, ptr %18, align 8, !tbaa !5
  %151 = call i32 @fclose(ptr noundef %150)
  br label %152

152:                                              ; preds = %149, %145
  store i32 15, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %163

153:                                              ; preds = %144
  br label %154

154:                                              ; preds = %153, %103
  br label %155

155:                                              ; preds = %154, %70
  %156 = load ptr, ptr %18, align 8, !tbaa !5
  %157 = load ptr, ptr @stdout, align 8, !tbaa !5
  %158 = icmp ne ptr %156, %157
  br i1 %158, label %159, label %162

159:                                              ; preds = %155
  %160 = load ptr, ptr %18, align 8, !tbaa !5
  %161 = call i32 @fclose(ptr noundef %160)
  br label %162

162:                                              ; preds = %159, %155
  store i32 0, ptr %9, align 4
  store i32 1, ptr %20, align 4
  br label %163

163:                                              ; preds = %162, %152, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %164 = load i32, ptr %9, align 4
  ret i32 %164
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { nounwind willreturn memory(read) "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 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; 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"

@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [7 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.28 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [23 x i8], align 1

; 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 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @mm_typecode_to_str(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 18) i32 @mm_write_mtx_crd(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr nocapture noundef readonly %4, ptr nocapture noundef readonly %5, ptr nocapture noundef readonly %6, ptr noundef %7) local_unnamed_addr #1 {
  %9 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) @.str.27) #3
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %13

11:                                               ; preds = %8
  %12 = load ptr, ptr @stdout, align 8, !tbaa !5
  br label %16

13:                                               ; preds = %8
  %14 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str.28)
  %15 = icmp eq ptr %14, null
  br i1 %15, label %53, label %16

16:                                               ; preds = %13, %11
  %.046 = phi ptr [ %12, %11 ], [ %14, %13 ]
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.046, ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.8) #4
  %18 = tail call ptr @mm_typecode_to_str(ptr noundef %7)
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.046, ptr noundef nonnull @.str.30, ptr noundef %18) #4
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.046, ptr noundef nonnull @.str.20, i32 noundef %1, i32 noundef %2, i32 noundef %3) #4
  %21 = getelementptr inbounds i8, ptr %7, i64 2
  %22 = load i8, ptr %21, align 1, !tbaa !9
  switch i8 %22, label %49 [
    i8 80, label %.preheader
    i8 82, label %.preheader51
    i8 67, label %.preheader53
  ]

.preheader53:                                     ; preds = %16
  %23 = icmp sgt i32 %3, 0
  br i1 %23, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %.preheader53
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph

.preheader51:                                     ; preds = %16
  %24 = icmp sgt i32 %3, 0
  br i1 %24, label %.lr.ph57.preheader, label %.loopexit

.lr.ph57.preheader:                               ; preds = %.preheader51
  %wide.trip.count66 = zext nneg i32 %3 to i64
  br label %.lr.ph57

.preheader:                                       ; preds = %16
  %25 = icmp sgt i32 %3, 0
  br i1 %25, label %.lr.ph59.preheader, label %.loopexit

.lr.ph59.preheader:                               ; preds = %.preheader
  %wide.trip.count71 = zext nneg i32 %3 to i64
  br label %.lr.ph59

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %.lr.ph59
  %indvars.iv68 = phi i64 [ 0, %.lr.ph59.preheader ], [ %indvars.iv.next69, %.lr.ph59 ]
  %26 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv68
  %27 = load i32, ptr %26, align 4, !tbaa !10
  %28 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv68
  %29 = load i32, ptr %28, align 4, !tbaa !10
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.046, ptr noundef nonnull @.str.23, i32 noundef %27, i32 noundef %29) #4
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond72.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count71
  br i1 %exitcond72.not, label %.loopexit, label %.lr.ph59, !llvm.loop !12

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %.lr.ph57
  %indvars.iv63 = phi i64 [ 0, %.lr.ph57.preheader ], [ %indvars.iv.next64, %.lr.ph57 ]
  %31 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv63
  %32 = load i32, ptr %31, align 4, !tbaa !10
  %33 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv63
  %34 = load i32, ptr %33, align 4, !tbaa !10
  %35 = getelementptr inbounds double, ptr %6, i64 %indvars.iv63
  %36 = load double, ptr %35, align 8, !tbaa !14
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.046, ptr noundef nonnull @.str.31, i32 noundef %32, i32 noundef %34, double noundef %36) #4
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond67.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count66
  br i1 %exitcond67.not, label %.loopexit, label %.lr.ph57, !llvm.loop !16

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %38 = getelementptr inbounds i32, ptr %4, i64 %indvars.iv
  %39 = load i32, ptr %38, align 4, !tbaa !10
  %40 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv
  %41 = load i32, ptr %40, align 4, !tbaa !10
  %42 = shl nuw nsw i64 %indvars.iv, 1
  %43 = getelementptr inbounds double, ptr %6, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !14
  %45 = or disjoint i64 %42, 1
  %46 = getelementptr inbounds double, ptr %6, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !14
  %48 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %.046, ptr noundef nonnull @.str.32, i32 noundef %39, i32 noundef %41, double noundef %44, double noundef %47) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !17

49:                                               ; preds = %16
  %50 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.not = icmp eq ptr %.046, %50
  br i1 %.not, label %53, label %.sink.split

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph57, %.lr.ph59, %.preheader53, %.preheader51, %.preheader
  %51 = load ptr, ptr @stdout, align 8, !tbaa !5
  %.not50 = icmp eq ptr %.046, %51
  br i1 %.not50, label %53, label %.sink.split

.sink.split:                                      ; preds = %.loopexit, %49
  %.047.ph = phi i32 [ 15, %49 ], [ 0, %.loopexit ]
  %52 = tail call i32 @fclose(ptr noundef %.046)
  br label %53

53:                                               ; preds = %.sink.split, %.loopexit, %49, %13
  %.047 = phi i32 [ 17, %13 ], [ 15, %49 ], [ 0, %.loopexit ], [ %.047.ph, %.sink.split ]
  ret i32 %.047
}

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 = { 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 #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 willreturn memory(read) }
attributes #4 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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