; LLVM IR from ChaCheeChoo/GAAS-Engine :: GWDGenSource (unpack)

; 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.header = type { [4 x i8], [2 x i16], i32, i32, i32, i32, i32 }
%struct.ToCblock = type { i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@head = external dso_local global %struct.header, align 4
@fileindex = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; 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 i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca [512 x i8], align 16
  %11 = 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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %12 = load ptr, ptr %5, align 8, !tbaa !9
  %13 = getelementptr inbounds ptr, ptr %12, i64 1
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = call noalias ptr @fopen(ptr noundef %14, ptr noundef @.str)
  store ptr %15, ptr %7, align 8, !tbaa !9
  %16 = load ptr, ptr %7, align 8, !tbaa !9
  %17 = call i64 @fread(ptr noundef @head, i64 noundef 28, i64 noundef 1, ptr noundef %16)
  %18 = load i8, ptr @head, align 4, !tbaa !11
  %19 = zext i8 %18 to i32
  %20 = icmp eq i32 %19, 71
  br i1 %20, label %21, label %72

21:                                               ; preds = %2
  %22 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @head, i64 0, i64 1), align 1, !tbaa !11
  %23 = zext i8 %22 to i32
  %24 = icmp eq i32 %23, 87
  br i1 %24, label %25, label %72

25:                                               ; preds = %21
  %26 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @head, i64 0, i64 2), align 2, !tbaa !11
  %27 = zext i8 %26 to i32
  %28 = icmp eq i32 %27, 68
  br i1 %28, label %29, label %72

29:                                               ; preds = %25
  %30 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @head, i64 0, i64 3), align 1, !tbaa !11
  %31 = zext i8 %30 to i32
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %72

33:                                               ; preds = %29
  %34 = load i16, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 1), align 4, !tbaa !12
  %35 = zext i16 %34 to i32
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %71

37:                                               ; preds = %33
  %38 = load i16, ptr getelementptr inbounds ([2 x i16], ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 1), i64 0, i64 1), align 2, !tbaa !12
  %39 = zext i16 %38 to i32
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %71

41:                                               ; preds = %37
  %42 = load i32, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 4), align 4, !tbaa !14
  %43 = zext i32 %42 to i64
  %44 = call noalias ptr @malloc(i64 noundef %43) #6
  store ptr %44, ptr @fileindex, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %67, %41
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 3), align 4, !tbaa !16
  %48 = icmp ult i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %70

50:                                               ; preds = %45
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = load i32, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 6), align 4, !tbaa !17
  %53 = load i32, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 5), align 4, !tbaa !18
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = mul i32 %53, %54
  %56 = add i32 %52, %55
  %57 = zext i32 %56 to i64
  %58 = call i32 @fseek(ptr noundef %51, i64 noundef %57, i32 noundef 0)
  %59 = load ptr, ptr @fileindex, align 8, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %struct.ToCblock, ptr %59, i64 %61
  %63 = load i32, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 5), align 4, !tbaa !18
  %64 = zext i32 %63 to i64
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  %66 = call i64 @fread(ptr noundef %62, i64 noundef %64, i64 noundef 1, ptr noundef %65)
  br label %67

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

70:                                               ; preds = %49
  br label %71

71:                                               ; preds = %70, %37, %33
  br label %72

72:                                               ; preds = %71, %29, %25, %21, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %132, %72
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = load i32, ptr getelementptr inbounds (%struct.header, ptr @head, i32 0, i32 3), align 4, !tbaa !16
  %76 = icmp ult i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %135

78:                                               ; preds = %73
  %79 = getelementptr inbounds [512 x i8], ptr %10, i64 0, i64 0
  %80 = load ptr, ptr %5, align 8, !tbaa !9
  %81 = getelementptr inbounds ptr, ptr %80, i64 2
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = load ptr, ptr @fileindex, align 8, !tbaa !9
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %struct.ToCblock, ptr %83, i64 %85
  %87 = getelementptr inbounds %struct.ToCblock, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !21
  %89 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %79, ptr noundef @.str.1, ptr noundef %82, i32 noundef %88) #5
  %90 = getelementptr inbounds [512 x i8], ptr %10, i64 0, i64 0
  %91 = call noalias ptr @fopen(ptr noundef %90, ptr noundef @.str.2)
  store ptr %91, ptr %6, align 8, !tbaa !9
  %92 = load ptr, ptr %7, align 8, !tbaa !9
  %93 = load ptr, ptr @fileindex, align 8, !tbaa !9
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %struct.ToCblock, ptr %93, i64 %95
  %97 = getelementptr inbounds %struct.ToCblock, ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 4, !tbaa !23
  %99 = zext i32 %98 to i64
  %100 = call i32 @fseek(ptr noundef %92, i64 noundef %99, i32 noundef 0)
  %101 = load ptr, ptr @fileindex, align 8, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %struct.ToCblock, ptr %101, i64 %103
  %105 = getelementptr inbounds %struct.ToCblock, ptr %104, i32 0, i32 3
  %106 = load i32, ptr %105, align 4, !tbaa !24
  %107 = zext i32 %106 to i64
  %108 = call noalias ptr @malloc(i64 noundef %107) #6
  store ptr %108, ptr %9, align 8, !tbaa !9
  %109 = load ptr, ptr %9, align 8, !tbaa !9
  %110 = load ptr, ptr @fileindex, align 8, !tbaa !9
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %struct.ToCblock, ptr %110, i64 %112
  %114 = getelementptr inbounds %struct.ToCblock, ptr %113, i32 0, i32 3
  %115 = load i32, ptr %114, align 4, !tbaa !24
  %116 = zext i32 %115 to i64
  %117 = load ptr, ptr %7, align 8, !tbaa !9
  %118 = call i64 @fread(ptr noundef %109, i64 noundef %116, i64 noundef 1, ptr noundef %117)
  %119 = load ptr, ptr %9, align 8, !tbaa !9
  %120 = load ptr, ptr @fileindex, align 8, !tbaa !9
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %struct.ToCblock, ptr %120, i64 %122
  %124 = getelementptr inbounds %struct.ToCblock, ptr %123, i32 0, i32 3
  %125 = load i32, ptr %124, align 4, !tbaa !24
  %126 = zext i32 %125 to i64
  %127 = load ptr, ptr %6, align 8, !tbaa !9
  %128 = call i64 @fwrite(ptr noundef %119, i64 noundef %126, i64 noundef 1, ptr noundef %127)
  %129 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %129) #5
  %130 = load ptr, ptr %6, align 8, !tbaa !9
  %131 = call i32 @fclose(ptr noundef %130)
  br label %132

132:                                              ; preds = %78
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %11, align 4, !tbaa !5
  br label %73, !llvm.loop !25

135:                                              ; preds = %77
  %136 = load ptr, ptr @fileindex, align 8, !tbaa !9
  call void @free(ptr noundef %136) #5
  %137 = load ptr, ptr %7, align 8, !tbaa !9
  %138 = call i32 @fclose(ptr noundef %137)
  call void @llvm.lifetime.end.p0(i64 512, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  ret i32 0
}

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

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

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

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

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #2

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

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

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

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

declare i32 @fclose(ptr noundef) #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 = { 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 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !6, i64 16}
!15 = !{!"header", !7, i64 0, !7, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24}
!16 = !{!15, !6, i64 12}
!17 = !{!15, !6, i64 24}
!18 = !{!15, !6, i64 20}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !6, i64 4}
!22 = !{!"ToCblock", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!23 = !{!22, !6, i64 8}
!24 = !{!22, !6, i64 12}
!25 = distinct !{!25, !20}


; 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.header = type { [4 x i8], [2 x i16], i32, i32, i32, i32, i32 }
%struct.ToCblock = type { i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@head = external dso_local global %struct.header, align 4
@fileindex = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [512 x i8], align 16
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = tail call noalias ptr @fopen(ptr noundef %5, ptr noundef nonnull @.str)
  %7 = tail call i64 @fread(ptr noundef nonnull @head, i64 noundef 28, i64 noundef 1, ptr noundef %6)
  %8 = load <4 x i8>, ptr @head, align 4
  %.fr = freeze <4 x i8> %8
  %.fr.scalar = bitcast <4 x i8> %.fr to i32
  %9 = icmp eq i32 %.fr.scalar, 4478791
  br i1 %9, label %10, label %..loopexit_crit_edge

..loopexit_crit_edge:                             ; preds = %2
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 12), align 4, !tbaa !9
  br label %.loopexit

10:                                               ; preds = %2
  %11 = load i16, ptr getelementptr inbounds (i8, ptr @head, i64 4), align 4, !tbaa !12
  %12 = icmp eq i16 %11, 1
  %13 = load i16, ptr getelementptr inbounds (i8, ptr @head, i64 6), align 2
  %14 = icmp eq i16 %13, 0
  %or.cond11 = select i1 %12, i1 %14, i1 false
  %.pre43 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 12), align 4, !tbaa !9
  br i1 %or.cond11, label %15, label %.loopexit

15:                                               ; preds = %10
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 16), align 4, !tbaa !14
  %17 = zext i32 %16 to i64
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #5
  store ptr %18, ptr @fileindex, align 8, !tbaa !5
  %.not = icmp eq i32 %.pre43, 0
  br i1 %.not, label %.loopexit.thread, label %.lr.ph

.loopexit.thread:                                 ; preds = %15
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #6
  br label %._crit_edge

.lr.ph:                                           ; preds = %15, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %15 ]
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 24), align 4, !tbaa !15
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 20), align 4, !tbaa !16
  %21 = trunc nuw nsw i64 %indvars.iv to i32
  %22 = mul i32 %20, %21
  %23 = add i32 %22, %19
  %24 = zext i32 %23 to i64
  %25 = tail call i32 @fseek(ptr noundef %6, i64 noundef %24, i32 noundef 0)
  %26 = load ptr, ptr @fileindex, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ToCblock, ptr %26, i64 %indvars.iv
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 20), align 4, !tbaa !16
  %29 = zext i32 %28 to i64
  %30 = tail call i64 @fread(ptr noundef %27, i64 noundef %29, i64 noundef 1, ptr noundef %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 12), align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = icmp ult i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph, %..loopexit_crit_edge, %10
  %34 = phi i32 [ %.pre, %..loopexit_crit_edge ], [ %.pre43, %10 ], [ %31, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #6
  %.not38 = icmp eq i32 %34, 0
  br i1 %.not38, label %._crit_edge, label %.lr.ph37

.lr.ph37:                                         ; preds = %.loopexit
  %35 = getelementptr inbounds i8, ptr %1, i64 16
  br label %38

._crit_edge:                                      ; preds = %38, %.loopexit.thread, %.loopexit
  %36 = load ptr, ptr @fileindex, align 8, !tbaa !5
  tail call void @free(ptr noundef %36) #6
  %37 = tail call i32 @fclose(ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #6
  ret i32 0

38:                                               ; preds = %.lr.ph37, %38
  %indvars.iv40 = phi i64 [ 0, %.lr.ph37 ], [ %indvars.iv.next41, %38 ]
  %39 = load ptr, ptr %35, align 8, !tbaa !5
  %40 = load ptr, ptr @fileindex, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ToCblock, ptr %40, i64 %indvars.iv40, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %39, i32 noundef %42) #6
  %44 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.2)
  %45 = load ptr, ptr @fileindex, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ToCblock, ptr %45, i64 %indvars.iv40, i32 2
  %47 = load i32, ptr %46, align 4, !tbaa !21
  %48 = zext i32 %47 to i64
  %49 = tail call i32 @fseek(ptr noundef %6, i64 noundef %48, i32 noundef 0)
  %50 = load ptr, ptr @fileindex, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ToCblock, ptr %50, i64 %indvars.iv40, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !22
  %53 = zext i32 %52 to i64
  %54 = tail call noalias ptr @malloc(i64 noundef %53) #5
  %55 = tail call i64 @fread(ptr noundef %54, i64 noundef %53, i64 noundef 1, ptr noundef %6)
  %56 = load ptr, ptr @fileindex, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ToCblock, ptr %56, i64 %indvars.iv40, i32 3
  %58 = load i32, ptr %57, align 4, !tbaa !22
  %59 = zext i32 %58 to i64
  %60 = tail call i64 @fwrite(ptr noundef %54, i64 noundef %59, i64 noundef 1, ptr noundef %44)
  tail call void @free(ptr noundef %54) #6
  %61 = tail call i32 @fclose(ptr noundef %44)
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 12), align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = icmp ult i64 %indvars.iv.next41, %63
  br i1 %64, label %38, label %._crit_edge, !llvm.loop !23
}

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

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

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

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

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

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

; 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 noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) 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 = { 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 #4 = { 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 #5 = { nounwind allocsize(0) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 12}
!10 = !{!"header", !7, i64 0, !7, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !11, i64 16}
!15 = !{!10, !11, i64 24}
!16 = !{!10, !11, i64 20}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !11, i64 4}
!20 = !{!"ToCblock", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!21 = !{!20, !11, i64 8}
!22 = !{!20, !11, i64 12}
!23 = distinct !{!23, !18}


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