; LLVM IR from DevonCrawford/A-Pathfinding-in-C-command-line :: backups (pathfinding_copy2)

; 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.GridSize = type { i32, i32 }

@size = external dso_local global %struct.GridSize, align 4
@__const.writeFile.addon = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: nounwind uwtable
define dso_local void @writeFile(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca [9 x i8], align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load i32, ptr @size, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call i64 @strlen(ptr noundef %20) #7
  %22 = trunc i64 %21 to i32
  store i32 %22, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %23 = load i32, ptr %5, align 4, !tbaa !12
  %24 = add nsw i32 %23, 8
  store i32 %24, ptr %6, align 4, !tbaa !12
  %25 = load i32, ptr %6, align 4, !tbaa !12
  %26 = zext i32 %25 to i64
  %27 = call ptr @llvm.stacksave.p0()
  store ptr %27, ptr %7, align 8
  %28 = alloca i8, i64 %26, align 16
  store i64 %26, ptr %8, align 8
  call void @initString(ptr noundef %28)
  call void @llvm.lifetime.start.p0(i64 9, ptr %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %9, ptr align 1 @__const.writeFile.addon, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 -1, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 -1, ptr %12, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 -1, ptr %13, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %29 = load i32, ptr %5, align 4, !tbaa !12
  store i32 %29, ptr %12, align 4, !tbaa !12
  br label %30

30:                                               ; preds = %39, %2
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load i32, ptr %12, align 4, !tbaa !12
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds i8, ptr %31, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = sext i8 %35 to i32
  %37 = icmp ne i32 %36, 46
  br i1 %37, label %38, label %42

38:                                               ; preds = %30
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %12, align 4, !tbaa !12
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr %12, align 4, !tbaa !12
  br label %30, !llvm.loop !14

42:                                               ; preds = %30
  %43 = load i32, ptr %12, align 4, !tbaa !12
  %44 = add nsw i32 %43, 8
  store i32 %44, ptr %13, align 4, !tbaa !12
  %45 = load i32, ptr %5, align 4, !tbaa !12
  %46 = load i32, ptr %12, align 4, !tbaa !12
  %47 = sub nsw i32 %45, %46
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %10, align 4, !tbaa !12
  %49 = load i32, ptr %10, align 4, !tbaa !12
  %50 = zext i32 %49 to i64
  %51 = alloca i8, i64 %50, align 16
  store i64 %50, ptr %15, align 8
  call void @initString(ptr noundef %51)
  %52 = load i32, ptr %12, align 4, !tbaa !12
  store i32 %52, ptr %11, align 4, !tbaa !12
  br label %53

53:                                               ; preds = %68, %42
  %54 = load i32, ptr %11, align 4, !tbaa !12
  %55 = load i32, ptr %5, align 4, !tbaa !12
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %71

57:                                               ; preds = %53
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load i32, ptr %11, align 4, !tbaa !12
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %58, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !13
  %63 = load i32, ptr %11, align 4, !tbaa !12
  %64 = load i32, ptr %12, align 4, !tbaa !12
  %65 = sub nsw i32 %63, %64
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i8, ptr %51, i64 %66
  store i8 %62, ptr %67, align 1, !tbaa !13
  br label %68

68:                                               ; preds = %57
  %69 = load i32, ptr %11, align 4, !tbaa !12
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %11, align 4, !tbaa !12
  br label %53, !llvm.loop !16

71:                                               ; preds = %53
  %72 = load i32, ptr %11, align 4, !tbaa !12
  %73 = load i32, ptr %12, align 4, !tbaa !12
  %74 = sub nsw i32 %72, %73
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %51, i64 %75
  store i8 0, ptr %76, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %77

77:                                               ; preds = %130, %71
  %78 = load i32, ptr %16, align 4, !tbaa !12
  %79 = load i32, ptr %6, align 4, !tbaa !12
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %133

81:                                               ; preds = %77
  %82 = load i32, ptr %16, align 4, !tbaa !12
  %83 = load i32, ptr %12, align 4, !tbaa !12
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %94

85:                                               ; preds = %81
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = load i32, ptr %16, align 4, !tbaa !12
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !13
  %91 = load i32, ptr %16, align 4, !tbaa !12
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %28, i64 %92
  store i8 %90, ptr %93, align 1, !tbaa !13
  br label %129

94:                                               ; preds = %81
  %95 = load i32, ptr %16, align 4, !tbaa !12
  %96 = load i32, ptr %13, align 4, !tbaa !12
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %98, label %111

98:                                               ; preds = %94
  %99 = load i32, ptr %16, align 4, !tbaa !12
  %100 = load i32, ptr %5, align 4, !tbaa !12
  %101 = sub nsw i32 %99, %100
  %102 = load i32, ptr %10, align 4, !tbaa !12
  %103 = add nsw i32 %101, %102
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [9 x i8], ptr %9, i64 0, i64 %105
  %107 = load i8, ptr %106, align 1, !tbaa !13
  %108 = load i32, ptr %16, align 4, !tbaa !12
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %28, i64 %109
  store i8 %107, ptr %110, align 1, !tbaa !13
  br label %128

111:                                              ; preds = %94
  %112 = load i32, ptr %16, align 4, !tbaa !12
  %113 = load i32, ptr %13, align 4, !tbaa !12
  %114 = load i32, ptr %10, align 4, !tbaa !12
  %115 = add nsw i32 %113, %114
  %116 = icmp slt i32 %112, %115
  br i1 %116, label %117, label %127

117:                                              ; preds = %111
  %118 = load i32, ptr %16, align 4, !tbaa !12
  %119 = load i32, ptr %13, align 4, !tbaa !12
  %120 = sub nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i8, ptr %51, i64 %121
  %123 = load i8, ptr %122, align 1, !tbaa !13
  %124 = load i32, ptr %16, align 4, !tbaa !12
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i8, ptr %28, i64 %125
  store i8 %123, ptr %126, align 1, !tbaa !13
  br label %127

127:                                              ; preds = %117, %111
  br label %128

128:                                              ; preds = %127, %98
  br label %129

129:                                              ; preds = %128, %85
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %16, align 4, !tbaa !12
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %16, align 4, !tbaa !12
  br label %77, !llvm.loop !17

133:                                              ; preds = %77
  %134 = load i32, ptr %16, align 4, !tbaa !12
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i8, ptr %28, i64 %135
  store i8 0, ptr %136, align 1, !tbaa !13
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %28)
  %138 = call noalias ptr @fopen(ptr noundef %28, ptr noundef @.str.15)
  store ptr %138, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !12
  br label %139

139:                                              ; preds = %167, %133
  %140 = load i32, ptr %17, align 4, !tbaa !12
  %141 = load i32, ptr getelementptr inbounds (%struct.GridSize, ptr @size, i32 0, i32 1), align 4, !tbaa !18
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %143, label %170

143:                                              ; preds = %139
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %144

144:                                              ; preds = %161, %143
  %145 = load i32, ptr %16, align 4, !tbaa !12
  %146 = load i32, ptr @size, align 4, !tbaa !9
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %148, label %164

148:                                              ; preds = %144
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = load i32, ptr %17, align 4, !tbaa !12
  %151 = sext i32 %150 to i64
  %152 = mul nsw i64 %151, %19
  %153 = getelementptr inbounds i8, ptr %149, i64 %152
  %154 = load i32, ptr %16, align 4, !tbaa !12
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %153, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !13
  %158 = sext i8 %157 to i32
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  %160 = call i32 @fputc(i32 noundef %158, ptr noundef %159)
  br label %161

161:                                              ; preds = %148
  %162 = load i32, ptr %16, align 4, !tbaa !12
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %16, align 4, !tbaa !12
  br label %144, !llvm.loop !19

164:                                              ; preds = %144
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  %166 = call i32 @fputc(i32 noundef 10, ptr noundef %165)
  br label %167

167:                                              ; preds = %164
  %168 = load i32, ptr %17, align 4, !tbaa !12
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %17, align 4, !tbaa !12
  br label %139, !llvm.loop !20

170:                                              ; preds = %139
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = call i32 @fclose(ptr noundef %171)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 9, ptr %9) #6
  %173 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %173)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

declare i32 @fputc(i32 noundef, ptr noundef) #1

declare i32 @fclose(ptr noundef) #1

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
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 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 #6 = { nounwind }
attributes #7 = { 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, !11, i64 0}
!10 = !{!"GridSize", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{!10, !11, i64 4}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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

%struct.GridSize = type { i32, i32 }

@size = external dso_local local_unnamed_addr global %struct.GridSize, align 4
@__const.writeFile.addon = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [2 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @writeFile(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = load i32, ptr @size, align 4, !tbaa !5
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #5
  %5 = trunc i64 %4 to i32
  %6 = add i32 %5, 8
  %7 = zext i32 %6 to i64
  %8 = alloca i8, i64 %7, align 16
  call void @initString(ptr noundef nonnull %8)
  %sext = shl i64 %4, 32
  %9 = ashr exact i64 %sext, 32
  br label %10

10:                                               ; preds = %10, %2
  %indvar = phi i32 [ %indvar.next, %10 ], [ 0, %2 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %10 ], [ %9, %2 ]
  %11 = getelementptr i8, ptr %1, i64 %indvars.iv
  %12 = load i8, ptr %11, align 1, !tbaa !10
  %.not = icmp eq i8 %12, 46
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %indvar.next = add i32 %indvar, 1
  br i1 %.not, label %13, label %10, !llvm.loop !11

13:                                               ; preds = %10
  %14 = zext i32 %3 to i64
  %15 = trunc nsw i64 %indvars.iv to i32
  %16 = add nsw i32 %15, 8
  %17 = sub nsw i32 %5, %15
  %18 = add nsw i32 %17, 1
  %19 = zext i32 %18 to i64
  %20 = alloca i8, i64 %19, align 16
  call void @initString(ptr noundef nonnull %20)
  %21 = icmp slt i32 %15, %5
  br i1 %21, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %13
  %22 = getelementptr i8, ptr %1, i64 %indvars.iv
  %23 = add i32 %indvar, -1
  %24 = zext i32 %23 to i64
  %25 = add nuw nsw i64 %24, 1
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %20, ptr noundef nonnull align 1 dereferenceable(1) %22, i64 %25, i1 false), !tbaa !10
  %26 = sext i32 %17 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %13, %.lr.ph.preheader
  %.pre-phi = phi i64 [ %26, %.lr.ph.preheader ], [ 0, %13 ]
  %27 = getelementptr inbounds i8, ptr %20, i64 %.pre-phi
  store i8 0, ptr %27, align 1, !tbaa !10
  %28 = icmp sgt i32 %5, -8
  br i1 %28, label %.lr.ph60, label %._crit_edge61

.lr.ph60:                                         ; preds = %._crit_edge
  %29 = add nsw i32 %18, %16
  %30 = sext i32 %16 to i64
  %31 = sext i32 %29 to i64
  %sext83 = shl i64 %indvars.iv, 32
  %32 = ashr exact i64 %sext83, 32
  %smax = call i32 @llvm.smax.i32(i32 %6, i32 1)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %33

33:                                               ; preds = %.lr.ph60, %50
  %indvars.iv73 = phi i64 [ 0, %.lr.ph60 ], [ %indvars.iv.next74, %50 ]
  %34 = icmp slt i64 %indvars.iv73, %32
  br i1 %34, label %35, label %37

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv73
  br label %.sink.split

37:                                               ; preds = %33
  %38 = icmp slt i64 %indvars.iv73, %30
  br i1 %38, label %39, label %43

39:                                               ; preds = %37
  %40 = sub i64 %indvars.iv73, %indvars.iv
  %sext84 = shl i64 %40, 32
  %41 = ashr exact i64 %sext84, 32
  %42 = getelementptr inbounds [9 x i8], ptr @__const.writeFile.addon, i64 0, i64 %41
  br label %.sink.split

43:                                               ; preds = %37
  %44 = icmp slt i64 %indvars.iv73, %31
  br i1 %44, label %45, label %50

45:                                               ; preds = %43
  %46 = sub nsw i64 %indvars.iv73, %30
  %47 = getelementptr inbounds i8, ptr %20, i64 %46
  br label %.sink.split

.sink.split:                                      ; preds = %39, %45, %35
  %.sink87 = phi ptr [ %36, %35 ], [ %47, %45 ], [ %42, %39 ]
  %48 = load i8, ptr %.sink87, align 1, !tbaa !10
  %49 = getelementptr inbounds i8, ptr %8, i64 %indvars.iv73
  store i8 %48, ptr %49, align 1, !tbaa !10
  br label %50

50:                                               ; preds = %.sink.split, %43
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next74, %wide.trip.count
  br i1 %exitcond76.not, label %._crit_edge61.loopexit, label %33, !llvm.loop !13

._crit_edge61.loopexit:                           ; preds = %50
  %51 = zext nneg i32 %smax to i64
  br label %._crit_edge61

._crit_edge61:                                    ; preds = %._crit_edge, %._crit_edge61.loopexit
  %.052.lcssa = phi i64 [ %51, %._crit_edge61.loopexit ], [ 0, %._crit_edge ]
  %52 = getelementptr inbounds i8, ptr %8, i64 %.052.lcssa
  store i8 0, ptr %52, align 1, !tbaa !10
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull %8)
  %54 = call noalias ptr @fopen(ptr noundef nonnull %8, ptr noundef nonnull @.str.15)
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @size, i64 4), align 4, !tbaa !14
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.preheader, label %._crit_edge67

.preheader:                                       ; preds = %._crit_edge61, %._crit_edge65
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %._crit_edge65 ], [ 0, %._crit_edge61 ]
  %57 = load i32, ptr @size, align 4, !tbaa !5
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %.preheader
  %59 = mul nuw nsw i64 %indvars.iv80, %14
  %60 = getelementptr inbounds i8, ptr %0, i64 %59
  br label %61

61:                                               ; preds = %.lr.ph64, %61
  %indvars.iv77 = phi i64 [ 0, %.lr.ph64 ], [ %indvars.iv.next78, %61 ]
  %62 = getelementptr inbounds i8, ptr %60, i64 %indvars.iv77
  %63 = load i8, ptr %62, align 1, !tbaa !10
  %64 = sext i8 %63 to i32
  %65 = call i32 @fputc(i32 noundef %64, ptr noundef %54)
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %66 = load i32, ptr @size, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = icmp slt i64 %indvars.iv.next78, %67
  br i1 %68, label %61, label %._crit_edge65, !llvm.loop !15

._crit_edge65:                                    ; preds = %61, %.preheader
  %69 = call i32 @fputc(i32 noundef 10, ptr noundef %54)
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @size, i64 4), align 4, !tbaa !14
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next81, %71
  br i1 %72, label %.preheader, label %._crit_edge67, !llvm.loop !16

._crit_edge67:                                    ; preds = %._crit_edge65, %._crit_edge61
  %73 = call i32 @fclose(ptr noundef %54)
  ret void
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"GridSize", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!6, !7, i64 4}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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