; LLVM IR from artagnon/phoenixfs :: t (test-delta)

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

@.str = external hidden unnamed_addr constant [44 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.stat, align 8
  %13 = alloca %struct.stat, align 8
  %14 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 144, ptr %13) #7
  store ptr null, ptr %6, align 8, !tbaa !9
  store ptr null, ptr %7, align 8, !tbaa !9
  store ptr null, ptr %8, align 8, !tbaa !9
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = icmp slt i32 %15, 4
  br i1 %16, label %17, label %21

17:                                               ; preds = %2
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %18, i64 0
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  call void (ptr, ...) @die(ptr noundef @.str, ptr noundef %20)
  br label %21

21:                                               ; preds = %17, %2
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %22, i64 2
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = call noalias ptr @fopen(ptr noundef %24, ptr noundef @.str.1)
  store ptr %25, ptr %10, align 8, !tbaa !9
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %38

27:                                               ; preds = %21
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i64 2
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = call i32 @lstat(ptr noundef %30, ptr noundef %12) #7
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %38, label %33

33:                                               ; preds = %27
  %34 = getelementptr inbounds %struct.stat, ptr %12, i32 0, i32 8
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = call noalias ptr @malloc(i64 noundef %35) #8
  store ptr %36, ptr %6, align 8, !tbaa !9
  %37 = icmp ne ptr %36, null
  br i1 %37, label %42, label %38

38:                                               ; preds = %33, %27, %21
  %39 = call ptr @__errno_location() #9
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = sub nsw i32 0, %40
  store i32 %41, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %118

42:                                               ; preds = %33
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct.stat, ptr %12, i32 0, i32 8
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = load ptr, ptr %10, align 8, !tbaa !9
  %47 = call i64 @fread(ptr noundef %43, i64 noundef %45, i64 noundef 1, ptr noundef %46)
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = getelementptr inbounds ptr, ptr %48, i64 3
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = call noalias ptr @fopen(ptr noundef %50, ptr noundef @.str.1)
  store ptr %51, ptr %11, align 8, !tbaa !9
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %64

53:                                               ; preds = %42
  %54 = load ptr, ptr %5, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %54, i64 3
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = call i32 @lstat(ptr noundef %56, ptr noundef %13) #7
  %58 = icmp slt i32 %57, 0
  br i1 %58, label %64, label %59

59:                                               ; preds = %53
  %60 = getelementptr inbounds %struct.stat, ptr %13, i32 0, i32 8
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = call noalias ptr @malloc(i64 noundef %61) #8
  store ptr %62, ptr %7, align 8, !tbaa !9
  %63 = icmp ne ptr %62, null
  br i1 %63, label %68, label %64

64:                                               ; preds = %59, %53, %42
  %65 = call ptr @__errno_location() #9
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sub nsw i32 0, %66
  store i32 %67, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %118

68:                                               ; preds = %59
  %69 = load ptr, ptr %7, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.stat, ptr %13, i32 0, i32 8
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = load ptr, ptr %11, align 8, !tbaa !9
  %73 = call i64 @fread(ptr noundef %69, i64 noundef %71, i64 noundef 1, ptr noundef %72)
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %74, i64 1
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = call i32 @strcmp(ptr noundef %76, ptr noundef @.str.2) #10
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %87, label %79

79:                                               ; preds = %68
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.stat, ptr %12, i32 0, i32 8
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = load ptr, ptr %7, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.stat, ptr %13, i32 0, i32 8
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = call ptr @diff_delta(ptr noundef %80, i64 noundef %82, ptr noundef %83, i64 noundef %85, ptr noundef %9, i64 noundef 0)
  store ptr %86, ptr %8, align 8, !tbaa !9
  br label %106

87:                                               ; preds = %68
  %88 = load ptr, ptr %5, align 8, !tbaa !9
  %89 = getelementptr inbounds ptr, ptr %88, i64 1
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call i32 @strcmp(ptr noundef %90, ptr noundef @.str.3) #10
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %101, label %93

93:                                               ; preds = %87
  %94 = load ptr, ptr %6, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.stat, ptr %12, i32 0, i32 8
  %96 = load i64, ptr %95, align 8, !tbaa !11
  %97 = load ptr, ptr %7, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.stat, ptr %13, i32 0, i32 8
  %99 = load i64, ptr %98, align 8, !tbaa !11
  %100 = call ptr @patch_delta(ptr noundef %94, i64 noundef %96, ptr noundef %97, i64 noundef %99, ptr noundef %9)
  store ptr %100, ptr %8, align 8, !tbaa !9
  br label %105

101:                                              ; preds = %87
  %102 = load ptr, ptr %5, align 8, !tbaa !9
  %103 = getelementptr inbounds ptr, ptr %102, i64 0
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  call void (ptr, ...) @die(ptr noundef @.str, ptr noundef %104)
  br label %105

105:                                              ; preds = %101, %93
  br label %106

106:                                              ; preds = %105, %79
  %107 = load ptr, ptr %8, align 8, !tbaa !9
  %108 = load i64, ptr %9, align 8, !tbaa !15
  %109 = load ptr, ptr @stdout, align 8, !tbaa !9
  %110 = call i64 @fwrite(ptr noundef %107, i64 noundef %108, i64 noundef 1, ptr noundef %109)
  %111 = load ptr, ptr %6, align 8, !tbaa !9
  call void @free(ptr noundef %111) #7
  %112 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free(ptr noundef %112) #7
  %113 = load ptr, ptr %8, align 8, !tbaa !9
  call void @free(ptr noundef %113) #7
  %114 = load ptr, ptr %10, align 8, !tbaa !9
  %115 = call i32 @fclose(ptr noundef %114)
  %116 = load ptr, ptr %11, align 8, !tbaa !9
  %117 = call i32 @fclose(ptr noundef %116)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %118

118:                                              ; preds = %106, %64, %38
  call void @llvm.lifetime.end.p0(i64 144, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %119 = load i32, ptr %3, align 4
  ret i32 %119
}

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

declare void @die(ptr noundef, ...) #2

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

declare ptr @diff_delta(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #2

declare ptr @patch_delta(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) #2

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare i32 @fclose(ptr noundef) #2

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

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 = { "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 "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 allocsize(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(none) "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 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { 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 = !{!"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, !13, i64 48}
!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 = !{!13, !13, i64 0}


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

@.str = external hidden unnamed_addr constant [44 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2147483647, -2147483648) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca %struct.stat, align 8
  %5 = alloca %struct.stat, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %5) #8
  %6 = icmp slt i32 %0, 4
  br i1 %6, label %7, label %9

7:                                                ; preds = %2
  %8 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void (ptr, ...) @die(ptr noundef nonnull @.str, ptr noundef %8) #8
  br label %9

9:                                                ; preds = %7, %2
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = tail call noalias ptr @fopen(ptr noundef %11, ptr noundef nonnull @.str.1)
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %21, label %13

13:                                               ; preds = %9
  %14 = load ptr, ptr %10, align 8, !tbaa !5
  %15 = call i32 @lstat(ptr noundef %14, ptr noundef nonnull %4) #8
  %16 = icmp slt i32 %15, 0
  br i1 %16, label %21, label %17

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %4, i64 48
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = tail call noalias ptr @malloc(i64 noundef %19) #9
  %.not28 = icmp eq ptr %20, null
  br i1 %.not28, label %21, label %25

21:                                               ; preds = %17, %13, %9
  %22 = tail call ptr @__errno_location() #10
  %23 = load i32, ptr %22, align 4, !tbaa !14
  %24 = sub nsw i32 0, %23
  br label %61

25:                                               ; preds = %17
  %26 = tail call i64 @fread(ptr noundef nonnull %20, i64 noundef %19, i64 noundef 1, ptr noundef nonnull %12)
  %27 = getelementptr inbounds i8, ptr %1, i64 24
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = tail call noalias ptr @fopen(ptr noundef %28, ptr noundef nonnull @.str.1)
  %.not29 = icmp eq ptr %29, null
  br i1 %.not29, label %38, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %27, align 8, !tbaa !5
  %32 = call i32 @lstat(ptr noundef %31, ptr noundef nonnull %5) #8
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %38, label %34

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %5, i64 48
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = tail call noalias ptr @malloc(i64 noundef %36) #9
  %.not30 = icmp eq ptr %37, null
  br i1 %.not30, label %38, label %42

38:                                               ; preds = %34, %30, %25
  %39 = tail call ptr @__errno_location() #10
  %40 = load i32, ptr %39, align 4, !tbaa !14
  %41 = sub nsw i32 0, %40
  br label %61

42:                                               ; preds = %34
  %43 = tail call i64 @fread(ptr noundef nonnull %37, i64 noundef %36, i64 noundef 1, ptr noundef nonnull %29)
  %44 = getelementptr inbounds i8, ptr %1, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %45, ptr noundef nonnull dereferenceable(1) @.str.2) #11
  %.not31 = icmp eq i32 %46, 0
  br i1 %.not31, label %47, label %49

47:                                               ; preds = %42
  %48 = call ptr @diff_delta(ptr noundef nonnull %20, i64 noundef %19, ptr noundef nonnull %37, i64 noundef %36, ptr noundef nonnull %3, i64 noundef 0) #8
  br label %55

49:                                               ; preds = %42
  %50 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %45, ptr noundef nonnull dereferenceable(1) @.str.3) #11
  %.not32 = icmp eq i32 %50, 0
  br i1 %.not32, label %51, label %53

51:                                               ; preds = %49
  %52 = call ptr @patch_delta(ptr noundef nonnull %20, i64 noundef %19, ptr noundef nonnull %37, i64 noundef %36, ptr noundef nonnull %3) #8
  br label %55

53:                                               ; preds = %49
  %54 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void (ptr, ...) @die(ptr noundef nonnull @.str, ptr noundef %54) #8
  br label %55

55:                                               ; preds = %51, %53, %47
  %.023 = phi ptr [ null, %53 ], [ %52, %51 ], [ %48, %47 ]
  %56 = load i64, ptr %3, align 8, !tbaa !15
  %57 = load ptr, ptr @stdout, align 8, !tbaa !5
  %58 = call i64 @fwrite(ptr noundef %.023, i64 noundef %56, i64 noundef 1, ptr noundef %57)
  call void @free(ptr noundef nonnull %20) #8
  call void @free(ptr noundef nonnull %37) #8
  call void @free(ptr noundef %.023) #8
  %59 = call i32 @fclose(ptr noundef nonnull %12)
  %60 = call i32 @fclose(ptr noundef nonnull %29)
  br label %61

61:                                               ; preds = %55, %38, %21
  %.0 = phi i32 [ %24, %21 ], [ %41, %38 ], [ 0, %55 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i32 %.0
}

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

declare void @die(ptr noundef, ...) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

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

declare ptr @diff_delta(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @patch_delta(ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

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

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

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 = { "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 = { 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 #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { 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 #7 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(none) }
attributes #11 = { 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 48}
!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 = !{!12, !12, i64 0}
!15 = !{!11, !11, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass