; LLVM IR from mncoppola/rpef :: utilities_src/squashfs2.1/squashfs-2.1-r2 (sort)

; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%struct.priority_entry = type { ptr, i64, i64, i64, ptr }

@priority_list = external dso_local global [65536 x ptr], align 16
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@silent = external global i32, align 4
@.str.16 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [59 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @add_to_sorted_inode_list(i64 noundef, i64 noundef, i64 noundef) #0

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

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

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

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

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

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

declare void @perror(ptr noundef) #3

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

declare i32 @excluded(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @sort_files_and_write(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %struct.stat, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca [8192 x i8], align 16
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 144, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %65, %2
  %12 = load i32, ptr %6, align 4, !tbaa !5
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %15, label %68

15:                                               ; preds = %11
  %16 = load ptr, ptr %4, align 8, !tbaa !9
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds ptr, ptr %16, i64 %18
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call i32 @lstat(ptr noundef %20, ptr noundef %5) #4
  %22 = icmp eq i32 %21, -1
  br i1 %22, label %23, label %32

23:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8192, ptr %10) #4
  %24 = getelementptr inbounds [8192 x i8], ptr %10, i64 0, i64 0
  %25 = load ptr, ptr %4, align 8, !tbaa !9
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds ptr, ptr %25, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %24, ptr noundef @.str.11, ptr noundef %29) #4
  %31 = getelementptr inbounds [8192 x i8], ptr %10, i64 0, i64 0
  call void @perror(ptr noundef %31)
  call void @llvm.lifetime.end.p0(i64 8192, ptr %10) #4
  br label %65

32:                                               ; preds = %15
  %33 = load ptr, ptr %4, align 8, !tbaa !9
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds ptr, ptr %33, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call i32 @excluded(ptr noundef %37, ptr noundef %5)
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %32
  br label %65

41:                                               ; preds = %32
  %42 = getelementptr inbounds %struct.stat, ptr %5, i32 0, i32 3
  %43 = load i32, ptr %42, align 8, !tbaa !11
  %44 = and i32 %43, 61440
  switch i32 %44, label %64 [
    i32 32768, label %45
    i32 16384, label %58
  ]

45:                                               ; preds = %41
  %46 = load ptr, ptr %4, align 8, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %46, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = load ptr, ptr %4, align 8, !tbaa !9
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = call i32 @get_priority(ptr noundef %55, ptr noundef %5, i32 noundef 0)
  %57 = call i32 @add_priority_list(ptr noundef %50, ptr noundef %5, i32 noundef %56)
  br label %64

58:                                               ; preds = %41
  %59 = load ptr, ptr %4, align 8, !tbaa !9
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %59, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  call void @generate_file_priorities(ptr noundef %63, i32 noundef 0, ptr noundef %5)
  br label %64

64:                                               ; preds = %58, %45, %41
  br label %65

65:                                               ; preds = %64, %40, %23
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %6, align 4, !tbaa !5
  br label %11, !llvm.loop !15

68:                                               ; preds = %11
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %128, %68
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 65536
  br i1 %71, label %72, label %131

72:                                               ; preds = %69
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [65536 x ptr], ptr @priority_list, i64 0, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  store ptr %76, ptr %8, align 8, !tbaa !9
  br label %77

77:                                               ; preds = %123, %72
  %78 = load ptr, ptr %8, align 8, !tbaa !9
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %127

80:                                               ; preds = %77
  %81 = load ptr, ptr %8, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.priority_entry, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !17
  %84 = load ptr, ptr %8, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.priority_entry, ptr %84, i32 0, i32 1
  %86 = load i64, ptr %85, align 8, !tbaa !20
  %87 = call i64 @write_file(ptr noundef %83, i64 noundef %86, ptr noundef %7)
  store i64 %87, ptr %9, align 8, !tbaa !21
  %88 = load i32, ptr @silent, align 4, !tbaa !5
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %97, label %90

90:                                               ; preds = %80
  %91 = load ptr, ptr %8, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.priority_entry, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !17
  %94 = load i32, ptr %7, align 4, !tbaa !5
  %95 = load i64, ptr %9, align 8, !tbaa !21
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %93, i32 noundef %94, i64 noundef %95)
  br label %97

97:                                               ; preds = %90, %80
  %98 = load i32, ptr @silent, align 4, !tbaa !5
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %114, label %100

100:                                              ; preds = %97
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = sitofp i32 %101 to float
  %103 = load ptr, ptr %8, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.priority_entry, ptr %103, i32 0, i32 1
  %105 = load i64, ptr %104, align 8, !tbaa !20
  %106 = sitofp i64 %105 to float
  %107 = fdiv float %102, %106
  %108 = fpext float %107 to double
  %109 = fmul double %108, 1.000000e+02
  %110 = load ptr, ptr %8, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.priority_entry, ptr %110, i32 0, i32 1
  %112 = load i64, ptr %111, align 8, !tbaa !20
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, double noundef %109, i64 noundef %112)
  br label %114

114:                                              ; preds = %100, %97
  %115 = load i64, ptr %9, align 8, !tbaa !21
  %116 = load ptr, ptr %8, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.priority_entry, ptr %116, i32 0, i32 3
  %118 = load i64, ptr %117, align 8, !tbaa !22
  %119 = load ptr, ptr %8, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.priority_entry, ptr %119, i32 0, i32 2
  %121 = load i64, ptr %120, align 8, !tbaa !23
  %122 = call i32 @add_to_sorted_inode_list(i64 noundef %115, i64 noundef %118, i64 noundef %121)
  br label %123

123:                                              ; preds = %114
  %124 = load ptr, ptr %8, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.priority_entry, ptr %124, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !24
  store ptr %126, ptr %8, align 8, !tbaa !9
  br label %77, !llvm.loop !25

127:                                              ; preds = %77
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %6, align 4, !tbaa !5
  br label %69, !llvm.loop !26

131:                                              ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr %5) #4
  ret void
}

declare i64 @write_file(ptr noundef, i64 noundef, ptr noundef) #3

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"stat", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !14, i64 72, !14, i64 88, !14, i64 104, !7, i64 120}
!13 = !{!"long", !7, i64 0}
!14 = !{!"timespec", !13, i64 0, !13, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !10, i64 0}
!18 = !{!"priority_entry", !10, i64 0, !19, i64 8, !13, i64 16, !13, i64 24, !10, i64 32}
!19 = !{!"long long", !7, i64 0}
!20 = !{!18, !19, i64 8}
!21 = !{!19, !19, i64 0}
!22 = !{!18, !13, i64 24}
!23 = !{!18, !13, i64 16}
!24 = !{!18, !10, i64 32}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}


; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@priority_list = external dso_local local_unnamed_addr global [65536 x ptr], align 16
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@silent = external local_unnamed_addr global i32, align 4
@.str.16 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [59 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @add_to_sorted_inode_list(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @add_priority_list(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @get_priority(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @lstat(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #2

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

declare i32 @excluded(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @sort_files_and_write(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.stat, align 8
  %4 = alloca i32, align 4
  %5 = alloca [8192 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %6 = icmp sgt i32 %0, 0
  br i1 %6, label %.lr.ph, label %.preheader.preheader

.lr.ph:                                           ; preds = %2
  %7 = getelementptr inbounds i8, ptr %3, i64 24
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %8

8:                                                ; preds = %.lr.ph, %28
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %28 ]
  %9 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = call i32 @lstat(ptr noundef %10, ptr noundef nonnull %3) #4
  %12 = icmp eq i32 %11, -1
  br i1 %12, label %13, label %16

13:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %5) #4
  %14 = load ptr, ptr %9, align 8, !tbaa !5
  %15 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef %14) #4
  call void @perror(ptr noundef nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %5) #4
  br label %28

16:                                               ; preds = %8
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = call i32 @excluded(ptr noundef %17, ptr noundef nonnull %3) #4
  %.not31 = icmp eq i32 %18, 0
  br i1 %.not31, label %19, label %28

19:                                               ; preds = %16
  %20 = load i32, ptr %7, align 8, !tbaa !9
  %21 = trunc i32 %20 to i16
  %trunc = and i16 %21, -4096
  switch i16 %trunc, label %28 [
    i16 -32768, label %22
    i16 16384, label %26
  ]

22:                                               ; preds = %19
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = call i32 @get_priority(ptr noundef %23, ptr noundef nonnull %3, i32 noundef 0)
  %25 = call i32 @add_priority_list(ptr noundef %23, ptr noundef nonnull %3, i32 noundef %24)
  br label %28

26:                                               ; preds = %19
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  call void @generate_file_priorities(ptr noundef %27, i32 noundef 0, ptr noundef nonnull %3)
  br label %28

28:                                               ; preds = %19, %22, %26, %16, %13
  %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 %.preheader.preheader, label %8, !llvm.loop !14

.preheader.preheader:                             ; preds = %28, %2
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %._crit_edge ], [ 0, %.preheader.preheader ]
  %29 = getelementptr inbounds [65536 x ptr], ptr @priority_list, i64 0, i64 %indvars.iv40
  %.02834 = load ptr, ptr %29, align 8, !tbaa !5
  %.not35 = icmp eq ptr %.02834, null
  br i1 %.not35, label %._crit_edge, label %.lr.ph37

.lr.ph37:                                         ; preds = %.preheader, %.thread
  %.02836 = phi ptr [ %.028, %.thread ], [ %.02834, %.preheader ]
  %30 = load ptr, ptr %.02836, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %.02836, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !19
  %33 = call i64 @write_file(ptr noundef %30, i64 noundef %32, ptr noundef nonnull %4) #4
  %34 = load i32, ptr @silent, align 4, !tbaa !20
  %.not29 = icmp eq i32 %34, 0
  br i1 %.not29, label %35, label %.thread

35:                                               ; preds = %.lr.ph37
  %36 = load ptr, ptr %.02836, align 8, !tbaa !16
  %37 = load i32, ptr %4, align 4, !tbaa !20
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef %36, i32 noundef %37, i64 noundef %33)
  %.pr = load i32, ptr @silent, align 4, !tbaa !20
  %.not30 = icmp eq i32 %.pr, 0
  br i1 %.not30, label %39, label %.thread

39:                                               ; preds = %35
  %40 = load i32, ptr %4, align 4, !tbaa !20
  %41 = sitofp i32 %40 to float
  %42 = load i64, ptr %31, align 8, !tbaa !19
  %43 = sitofp i64 %42 to float
  %44 = fdiv float %41, %43
  %45 = fpext float %44 to double
  %46 = fmul double %45, 1.000000e+02
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, double noundef %46, i64 noundef %42)
  br label %.thread

.thread:                                          ; preds = %.lr.ph37, %39, %35
  %48 = getelementptr inbounds i8, ptr %.02836, i64 24
  %49 = load i64, ptr %48, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %.02836, i64 16
  %51 = load i64, ptr %50, align 8, !tbaa !22
  %52 = call i32 @add_to_sorted_inode_list(i64 noundef %33, i64 noundef %49, i64 noundef %51)
  %53 = getelementptr inbounds i8, ptr %.02836, i64 32
  %.028 = load ptr, ptr %53, align 8, !tbaa !5
  %.not = icmp eq ptr %.028, null
  br i1 %.not, label %._crit_edge, label %.lr.ph37, !llvm.loop !23

._crit_edge:                                      ; preds = %.thread, %.preheader
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %exitcond43.not = icmp eq i64 %indvars.iv.next41, 65536
  br i1 %exitcond43.not, label %54, label %.preheader, !llvm.loop !24

54:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #4
  ret void
}

declare i64 @write_file(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 }
attributes #5 = { cold }

!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, !12, i64 24}
!10 = !{!"stat", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !13, i64 72, !13, i64 88, !13, i64 104, !7, i64 120}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"timespec", !11, i64 0, !11, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !6, i64 0}
!17 = !{!"priority_entry", !6, i64 0, !18, i64 8, !11, i64 16, !11, i64 24, !6, i64 32}
!18 = !{!"long long", !7, i64 0}
!19 = !{!17, !18, i64 8}
!20 = !{!12, !12, i64 0}
!21 = !{!17, !11, i64 24}
!22 = !{!17, !11, i64 16}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}


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