; LLVM IR from jgaeddert/liquid-dsp :: src/framing/src (framesync64)

; 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.framesync64_s = type { ptr, ptr, %struct.framesyncstats_s, %struct.framedatastats_s, i32, float, ptr, [64 x { float, float }], [64 x { float, float }], [600 x { float, float }], [72 x i8], ptr, ptr, i32, ptr, ptr, ptr, i32 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [62 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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @framesync64_debug_export(ptr noundef %0, i32 noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  br label %173

18:                                               ; preds = %3
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %21, label %30

21:                                               ; preds = %18
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.framesync64_s, ptr %22, i32 0, i32 16
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.framesync64_s, ptr %25, i32 0, i32 15
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %24, ptr noundef @.str.7, ptr noundef %27, i32 noundef %28) #5
  br label %106

30:                                               ; preds = %18
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %33, label %45

33:                                               ; preds = %30
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.framesync64_s, ptr %34, i32 0, i32 16
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.framesync64_s, ptr %37, i32 0, i32 15
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.framesync64_s, ptr %40, i32 0, i32 3
  %42 = getelementptr inbounds %struct.framedatastats_s, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !18
  %44 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %36, ptr noundef @.str.8, ptr noundef %39, i32 noundef %43) #5
  br label %105

45:                                               ; preds = %30
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = icmp eq i32 %46, -2
  br i1 %47, label %48, label %87

48:                                               ; preds = %45
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.framesync64_s, ptr %49, i32 0, i32 16
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.framesync64_s, ptr %52, i32 0, i32 15
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %51, ptr noundef @.str.9, ptr noundef %54) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.framesync64_s, ptr %56, i32 0, i32 16
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.framesync64_s, ptr %59, i32 0, i32 15
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = call i64 @strlen(ptr noundef %61) #6
  %63 = getelementptr inbounds i8, ptr %58, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 2
  store ptr %64, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %81, %48
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = icmp ult i32 %66, 4
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %84

69:                                               ; preds = %65
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.framesync64_s, ptr %71, i32 0, i32 10
  %73 = load i32, ptr %9, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds [72 x i8], ptr %72, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !19
  %77 = zext i8 %76 to i32
  %78 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %70, ptr noundef @.str.10, i32 noundef %77) #5
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 2
  store ptr %80, ptr %8, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %69
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = add i32 %82, 1
  store i32 %83, ptr %9, align 4, !tbaa !9
  br label %65, !llvm.loop !20

84:                                               ; preds = %68
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %85, ptr noundef @.str.11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %104

87:                                               ; preds = %45
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = icmp eq i32 %88, -3
  br i1 %89, label %90, label %100

90:                                               ; preds = %87
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.framesync64_s, ptr %91, i32 0, i32 16
  %93 = load ptr, ptr %92, align 8, !tbaa !11
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.framesync64_s, ptr %94, i32 0, i32 15
  %96 = load ptr, ptr %95, align 8, !tbaa !17
  %97 = call i32 @rand() #5
  %98 = and i32 %97, -1
  %99 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %93, ptr noundef @.str.12, ptr noundef %96, i32 noundef %98) #5
  br label %103

100:                                              ; preds = %87
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 398, ptr noundef @.str.13, i32 noundef %101)
  store i32 %102, ptr %4, align 4
  br label %173

103:                                              ; preds = %90
  br label %104

104:                                              ; preds = %103, %84
  br label %105

105:                                              ; preds = %104, %33
  br label %106

106:                                              ; preds = %105, %21
  br label %107

107:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.framesync64_s, ptr %108, i32 0, i32 16
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = call noalias ptr @fopen(ptr noundef %110, ptr noundef @.str.14)
  store ptr %111, ptr %10, align 8, !tbaa !5
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %119

114:                                              ; preds = %107
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.framesync64_s, ptr %115, i32 0, i32 16
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 10, ptr noundef @.str.1, i32 noundef 403, ptr noundef @.str.15, ptr noundef %117)
  store i32 %118, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %172

119:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.framesync64_s, ptr %120, i32 0, i32 14
  %122 = load ptr, ptr %121, align 8, !tbaa !22
  %123 = call i32 @windowcf_read(ptr noundef %122, ptr noundef %12)
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = call i64 @fwrite(ptr noundef %124, i64 noundef 8, i64 noundef 1440, ptr noundef %125)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store float 0.000000e+00, ptr %13, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store float 0.000000e+00, ptr %14, align 4, !tbaa !23
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = call i64 @fwrite(ptr noundef %13, i64 noundef 4, i64 noundef 1, ptr noundef %127)
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.framesync64_s, ptr %129, i32 0, i32 2
  %131 = getelementptr inbounds %struct.framesyncstats_s, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = call i64 @fwrite(ptr noundef %131, i64 noundef 4, i64 noundef 1, ptr noundef %132)
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = call i64 @fwrite(ptr noundef %14, i64 noundef 4, i64 noundef 1, ptr noundef %134)
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.framesync64_s, ptr %136, i32 0, i32 2
  %138 = getelementptr inbounds %struct.framesyncstats_s, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = call i64 @fwrite(ptr noundef %138, i64 noundef 4, i64 noundef 1, ptr noundef %139)
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.framesync64_s, ptr %141, i32 0, i32 2
  %143 = getelementptr inbounds %struct.framesyncstats_s, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = call i64 @fwrite(ptr noundef %143, i64 noundef 4, i64 noundef 1, ptr noundef %144)
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = call i64 @fwrite(ptr noundef %146, i64 noundef 8, i64 noundef 630, ptr noundef %147)
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.framesync64_s, ptr %149, i32 0, i32 9
  %151 = getelementptr inbounds [600 x { float, float }], ptr %150, i64 0, i64 0
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = call i64 @fwrite(ptr noundef %151, i64 noundef 8, i64 noundef 600, ptr noundef %152)
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.framesync64_s, ptr %154, i32 0, i32 10
  %156 = getelementptr inbounds [72 x i8], ptr %155, i64 0, i64 0
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = call i64 @fwrite(ptr noundef %156, i64 noundef 1, i64 noundef 72, ptr noundef %157)
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = call i32 @fclose(ptr noundef %159)
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.framesync64_s, ptr %161, i32 0, i32 17
  %163 = load i32, ptr %162, align 8, !tbaa !24
  %164 = add i32 %163, 1
  store i32 %164, ptr %162, align 8, !tbaa !24
  %165 = load ptr, ptr %5, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.framesync64_s, ptr %165, i32 0, i32 16
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.framesync64_s, ptr %168, i32 0, i32 17
  %170 = load i32, ptr %169, align 8, !tbaa !24
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %167, i32 noundef %170)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %172

172:                                              ; preds = %119, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %173

173:                                              ; preds = %172, %100, %17
  %174 = load i32, ptr %4, align 4
  ret i32 %174
}

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

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

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

; Function Attrs: nounwind
declare i32 @rand() #4

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

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

declare i64 @fwrite(ptr noundef, i64 noundef, i64 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 = { 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 = { 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 #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 willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 6040}
!12 = !{!"framesync64_s", !6, i64 0, !6, i64 8, !13, i64 16, !15, i64 64, !10, i64 88, !14, i64 92, !6, i64 96, !7, i64 104, !7, i64 616, !7, i64 1128, !7, i64 5928, !6, i64 6000, !6, i64 6008, !10, i64 6016, !6, i64 6024, !6, i64 6032, !6, i64 6040, !10, i64 6048}
!13 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44}
!14 = !{!"float", !7, i64 0}
!15 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!12, !6, i64 6032}
!18 = !{!12, !10, i64 64}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!12, !6, i64 6024}
!23 = !{!14, !14, i64 0}
!24 = !{!12, !10, i64 6048}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [62 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @framesync64_debug_export(ptr nocapture noundef %0, i32 noundef %1, ptr nocapture noundef %2) local_unnamed_addr #2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = icmp eq i32 %1, 0
  br i1 %7, label %94, label %8

8:                                                ; preds = %3
  %9 = icmp sgt i32 %1, 0
  br i1 %9, label %10, label %16

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 6040
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 6032
  %14 = load ptr, ptr %13, align 8, !tbaa !15
  %15 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %14, i32 noundef %1) #6
  br label %61

16:                                               ; preds = %8
  switch i32 %1, label %59 [
    i32 -1, label %17
    i32 -2, label %25
    i32 -3, label %52
  ]

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %0, i64 6040
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 6032
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  %23 = load i32, ptr %22, align 8, !tbaa !16
  %24 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %21, i32 noundef %23) #6
  br label %61

25:                                               ; preds = %16
  %26 = getelementptr inbounds i8, ptr %0, i64 6040
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %0, i64 6032
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef %29) #6
  %31 = load ptr, ptr %26, align 8, !tbaa !5
  %32 = load ptr, ptr %28, align 8, !tbaa !15
  %33 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %32) #7
  %34 = getelementptr inbounds i8, ptr %31, i64 %33
  %35 = getelementptr inbounds i8, ptr %0, i64 5928
  %.04952 = getelementptr inbounds i8, ptr %34, i64 2
  %36 = load i8, ptr %35, align 1, !tbaa !17
  %37 = zext i8 %36 to i32
  %38 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.04952, ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %37) #6
  %.049 = getelementptr inbounds i8, ptr %34, i64 4
  %39 = getelementptr inbounds i8, ptr %0, i64 5929
  %40 = load i8, ptr %39, align 1, !tbaa !17
  %41 = zext i8 %40 to i32
  %42 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.049, ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %41) #6
  %.049.1 = getelementptr inbounds i8, ptr %34, i64 6
  %43 = getelementptr inbounds i8, ptr %0, i64 5930
  %44 = load i8, ptr %43, align 1, !tbaa !17
  %45 = zext i8 %44 to i32
  %46 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.049.1, ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %45) #6
  %.049.2 = getelementptr inbounds i8, ptr %34, i64 8
  %47 = getelementptr inbounds i8, ptr %0, i64 5931
  %48 = load i8, ptr %47, align 1, !tbaa !17
  %49 = zext i8 %48 to i32
  %50 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.049.2, ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %49) #6
  %.049.3 = getelementptr inbounds i8, ptr %34, i64 10
  %51 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %.049.3, ptr noundef nonnull dereferenceable(1) @.str.11) #6
  br label %61

52:                                               ; preds = %16
  %53 = getelementptr inbounds i8, ptr %0, i64 6040
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %0, i64 6032
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = tail call i32 @rand() #6
  %58 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %54, ptr noundef nonnull dereferenceable(1) @.str.12, ptr noundef %56, i32 noundef %57) #6
  br label %61

59:                                               ; preds = %16
  %60 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 398, ptr noundef nonnull @.str.13, i32 noundef %1) #6
  br label %94

61:                                               ; preds = %10, %25, %52, %17
  %62 = getelementptr inbounds i8, ptr %0, i64 6040
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = tail call noalias ptr @fopen(ptr noundef %63, ptr noundef nonnull @.str.14)
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  %67 = load ptr, ptr %62, align 8, !tbaa !5
  %68 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 10, ptr noundef nonnull @.str.1, i32 noundef 403, ptr noundef nonnull @.str.15, ptr noundef %67) #6
  br label %94

69:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %70 = getelementptr inbounds i8, ptr %0, i64 6024
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = call i32 @windowcf_read(ptr noundef %71, ptr noundef nonnull %4) #6
  %73 = load ptr, ptr %4, align 8, !tbaa !19
  %74 = call i64 @fwrite(ptr noundef %73, i64 noundef 8, i64 noundef 1440, ptr noundef nonnull %64)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store float 0.000000e+00, ptr %5, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  store float 0.000000e+00, ptr %6, align 4, !tbaa !20
  %75 = call i64 @fwrite(ptr noundef nonnull %5, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %64)
  %76 = getelementptr inbounds i8, ptr %0, i64 16
  %77 = getelementptr inbounds i8, ptr %0, i64 24
  %78 = call i64 @fwrite(ptr noundef nonnull %77, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %64)
  %79 = call i64 @fwrite(ptr noundef nonnull %6, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %64)
  %80 = getelementptr inbounds i8, ptr %0, i64 20
  %81 = call i64 @fwrite(ptr noundef nonnull %80, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %64)
  %82 = call i64 @fwrite(ptr noundef nonnull %76, i64 noundef 4, i64 noundef 1, ptr noundef nonnull %64)
  %83 = call i64 @fwrite(ptr noundef %2, i64 noundef 8, i64 noundef 630, ptr noundef nonnull %64)
  %84 = getelementptr inbounds i8, ptr %0, i64 1128
  %85 = call i64 @fwrite(ptr noundef nonnull %84, i64 noundef 8, i64 noundef 600, ptr noundef nonnull %64)
  %86 = getelementptr inbounds i8, ptr %0, i64 5928
  %87 = call i64 @fwrite(ptr noundef nonnull %86, i64 noundef 1, i64 noundef 72, ptr noundef nonnull %64)
  %88 = call i32 @fclose(ptr noundef nonnull %64)
  %89 = getelementptr inbounds i8, ptr %0, i64 6048
  %90 = load i32, ptr %89, align 8, !tbaa !21
  %91 = add i32 %90, 1
  store i32 %91, ptr %89, align 8, !tbaa !21
  %92 = load ptr, ptr %62, align 8, !tbaa !5
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef %92, i32 noundef %91)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %94

94:                                               ; preds = %66, %69, %3, %59
  %.1 = phi i32 [ %60, %59 ], [ 0, %3 ], [ %68, %66 ], [ 0, %69 ]
  ret i32 %.1
}

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

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #4

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #5

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

declare i32 @windowcf_read(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 "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, !7, i64 6040}
!6 = !{!"framesync64_s", !7, i64 0, !7, i64 8, !10, i64 16, !13, i64 64, !12, i64 88, !11, i64 92, !7, i64 96, !8, i64 104, !8, i64 616, !8, i64 1128, !8, i64 5928, !7, i64 6000, !7, i64 6008, !12, i64 6016, !7, i64 6024, !7, i64 6032, !7, i64 6040, !12, i64 6048}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44}
!11 = !{!"float", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !14, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!6, !7, i64 6032}
!16 = !{!6, !12, i64 64}
!17 = !{!8, !8, i64 0}
!18 = !{!6, !7, i64 6024}
!19 = !{!7, !7, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!6, !12, i64 6048}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass