; LLVM IR from jgaeddert/liquid-dsp :: examples (dsssframe64sync_performance_example)

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

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @frame64_add_noise(ptr noundef, i32 noundef, float 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
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 i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.framedatastats_s, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.framedatastats_s, align 8
  %21 = alloca i32, align 4
  %22 = alloca float, align 4
  %23 = alloca float, 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
  %24 = call ptr (...) @dsssframe64gen_create()
  store ptr %24, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %25 = call ptr @dsssframe64sync_create(ptr noundef null, ptr noundef null)
  store ptr %25, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 5, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 80, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1000, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %26 = load ptr, ptr %6, align 8, !tbaa !9
  %27 = call i32 @dsssframe64gen_get_frame_len(ptr noundef %26)
  store i32 %27, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %28 = load i32, ptr %11, align 4, !tbaa !5
  %29 = zext i32 %28 to i64
  %30 = mul i64 %29, 8
  %31 = call noalias ptr @malloc(i64 noundef %30) #6
  store ptr %31, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store float -2.500000e+01, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %32 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %32, ptr %14, align 8, !tbaa !9
  %33 = load ptr, ptr %14, align 8, !tbaa !9
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.2, ptr noundef @.str) #5
  %35 = load ptr, ptr %14, align 8, !tbaa !9
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.3) #5
  %37 = load ptr, ptr %14, align 8, !tbaa !9
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.4) #5
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef @.str.7, ptr noundef @.str.8, ptr noundef @.str.9, ptr noundef @.str.8, ptr noundef @.str.10)
  %40 = load ptr, ptr %14, align 8, !tbaa !9
  %41 = call i32 @fclose(ptr noundef %40)
  br label %42

42:                                               ; preds = %150, %2
  %43 = load float, ptr %13, align 4, !tbaa !11
  %44 = fcmp olt float %43, -5.000000e+00
  br i1 %44, label %45, label %151

45:                                               ; preds = %42
  %46 = load ptr, ptr %7, align 8, !tbaa !9
  %47 = call i32 @dsssframe64sync_reset_framedatastats(ptr noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %91, %45
  br label %49

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %67, %49
  %51 = load i32, ptr %17, align 4, !tbaa !5
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = icmp ult i32 %51, %52
  br i1 %53, label %54, label %70

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  %56 = call i32 @dsssframe64sync_reset(ptr noundef %55)
  %57 = load ptr, ptr %6, align 8, !tbaa !9
  %58 = load ptr, ptr %12, align 8, !tbaa !9
  %59 = call i32 @dsssframe64gen_execute(ptr noundef %57, ptr noundef null, ptr noundef null, ptr noundef %58)
  %60 = load ptr, ptr %12, align 8, !tbaa !9
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = load float, ptr %13, align 4, !tbaa !11
  call void @frame64_add_noise(ptr noundef %60, i32 noundef %61, float noundef %62)
  %63 = load ptr, ptr %7, align 8, !tbaa !9
  %64 = load ptr, ptr %12, align 8, !tbaa !9
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = call i32 @dsssframe64sync_execute(ptr noundef %63, ptr noundef %64, i32 noundef %65)
  br label %67

67:                                               ; preds = %54
  %68 = load i32, ptr %17, align 4, !tbaa !5
  %69 = add i32 %68, 1
  store i32 %69, ptr %17, align 4, !tbaa !5
  br label %50, !llvm.loop !13

70:                                               ; preds = %50
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = load i32, ptr %15, align 4, !tbaa !5
  %73 = add i32 %72, %71
  store i32 %73, ptr %15, align 4, !tbaa !5
  %74 = load i32, ptr %15, align 4, !tbaa !5
  %75 = load ptr, ptr %7, align 8, !tbaa !9
  call void @dsssframe64sync_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8 %18, ptr noundef %75)
  %76 = getelementptr inbounds %struct.framedatastats_s, ptr %18, i32 0, i32 2
  %77 = load i32, ptr %76, align 8, !tbaa !15
  %78 = sub i32 %74, %77
  store i32 %78, ptr %16, align 4, !tbaa !5
  %79 = load i32, ptr %16, align 4, !tbaa !5
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = icmp uge i32 %79, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %70
  store i32 5, ptr %19, align 4
  br label %89

83:                                               ; preds = %70
  %84 = load i32, ptr %15, align 4, !tbaa !5
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = icmp uge i32 %84, %85
  br i1 %86, label %87, label %88

87:                                               ; preds = %83
  store i32 5, ptr %19, align 4
  br label %89

88:                                               ; preds = %83
  store i32 0, ptr %19, align 4
  br label %89

89:                                               ; preds = %88, %87, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  %90 = load i32, ptr %19, align 4
  switch i32 %90, label %182 [
    i32 0, label %91
    i32 5, label %92
  ]

91:                                               ; preds = %89
  br label %48

92:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %93 = load ptr, ptr %7, align 8, !tbaa !9
  call void @dsssframe64sync_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8 %20, ptr noundef %93)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %94 = load i32, ptr %15, align 4, !tbaa !5
  %95 = getelementptr inbounds %struct.framedatastats_s, ptr %20, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !18
  %97 = sub i32 %94, %96
  store i32 %97, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %98 = load i32, ptr %21, align 4, !tbaa !5
  %99 = uitofp i32 %98 to float
  %100 = load i32, ptr %15, align 4, !tbaa !5
  %101 = uitofp i32 %100 to float
  %102 = fdiv float %99, %101
  store float %102, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %103 = load i32, ptr %16, align 4, !tbaa !5
  %104 = uitofp i32 %103 to float
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = uitofp i32 %105 to float
  %107 = fdiv float %104, %106
  store float %107, ptr %23, align 4, !tbaa !11
  %108 = load float, ptr %13, align 4, !tbaa !11
  %109 = fpext float %108 to double
  %110 = load i32, ptr %21, align 4, !tbaa !5
  %111 = load float, ptr %22, align 4, !tbaa !11
  %112 = fmul float %111, 1.000000e+02
  %113 = fpext float %112 to double
  %114 = load i32, ptr %16, align 4, !tbaa !5
  %115 = load float, ptr %23, align 4, !tbaa !11
  %116 = fmul float %115, 1.000000e+02
  %117 = fpext float %116 to double
  %118 = load i32, ptr %15, align 4, !tbaa !5
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %109, i32 noundef %110, double noundef %113, i32 noundef %114, double noundef %117, i32 noundef %118)
  %120 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.12)
  store ptr %120, ptr %14, align 8, !tbaa !9
  %121 = load ptr, ptr %14, align 8, !tbaa !9
  %122 = load float, ptr %13, align 4, !tbaa !11
  %123 = fpext float %122 to double
  %124 = getelementptr inbounds %struct.framedatastats_s, ptr %20, i32 0, i32 0
  %125 = load i32, ptr %124, align 8, !tbaa !18
  %126 = uitofp i32 %125 to float
  %127 = load i32, ptr %15, align 4, !tbaa !5
  %128 = uitofp i32 %127 to float
  %129 = fdiv float %126, %128
  %130 = fpext float %129 to double
  %131 = getelementptr inbounds %struct.framedatastats_s, ptr %20, i32 0, i32 2
  %132 = load i32, ptr %131, align 8, !tbaa !15
  %133 = uitofp i32 %132 to float
  %134 = load i32, ptr %15, align 4, !tbaa !5
  %135 = uitofp i32 %134 to float
  %136 = fdiv float %133, %135
  %137 = fpext float %136 to double
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.13, double noundef %123, double noundef %130, double noundef %137) #5
  %139 = load ptr, ptr %14, align 8, !tbaa !9
  %140 = call i32 @fclose(ptr noundef %139)
  %141 = load i32, ptr %16, align 4, !tbaa !5
  %142 = load i32, ptr %8, align 4, !tbaa !5
  %143 = icmp ult i32 %141, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %92
  store i32 3, ptr %19, align 4
  br label %148

145:                                              ; preds = %92
  %146 = load float, ptr %13, align 4, !tbaa !11
  %147 = fadd float %146, 1.000000e+00
  store float %147, ptr %13, align 4, !tbaa !11
  store i32 0, ptr %19, align 4
  br label %148

148:                                              ; preds = %145, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  %149 = load i32, ptr %19, align 4
  switch i32 %149, label %182 [
    i32 0, label %150
    i32 3, label %151
  ]

150:                                              ; preds = %148
  br label %42, !llvm.loop !19

151:                                              ; preds = %148, %42
  %152 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.12)
  store ptr %152, ptr %14, align 8, !tbaa !9
  %153 = load ptr, ptr %14, align 8, !tbaa !9
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.14) #5
  %155 = load ptr, ptr %14, align 8, !tbaa !9
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef @.str.15) #5
  %157 = load ptr, ptr %14, align 8, !tbaa !9
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.16) #5
  %159 = load ptr, ptr %14, align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.17) #5
  %161 = load ptr, ptr %14, align 8, !tbaa !9
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.18) #5
  %163 = load ptr, ptr %14, align 8, !tbaa !9
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.19) #5
  %165 = load ptr, ptr %14, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.20) #5
  %167 = load ptr, ptr %14, align 8, !tbaa !9
  %168 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %167, ptr noundef @.str.21) #5
  %169 = load ptr, ptr %14, align 8, !tbaa !9
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.22) #5
  %171 = load ptr, ptr %14, align 8, !tbaa !9
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.23) #5
  %173 = load ptr, ptr %14, align 8, !tbaa !9
  %174 = call i32 @fclose(ptr noundef %173)
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, ptr noundef @.str)
  %176 = load ptr, ptr %6, align 8, !tbaa !9
  %177 = call i32 @dsssframe64gen_destroy(ptr noundef %176)
  %178 = load ptr, ptr %7, align 8, !tbaa !9
  %179 = call i32 @dsssframe64sync_destroy(ptr noundef %178)
  %180 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %180) #5
  store i32 0, ptr %3, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %181 = load i32, ptr %3, align 4
  ret i32 %181

182:                                              ; preds = %148, %89
  unreachable
}

declare ptr @dsssframe64gen_create(...) #2

declare ptr @dsssframe64sync_create(ptr noundef, ptr noundef) #2

declare i32 @dsssframe64gen_get_frame_len(ptr noundef) #2

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

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

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

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

declare i32 @fclose(ptr noundef) #2

declare i32 @dsssframe64sync_reset_framedatastats(ptr noundef) #2

declare i32 @dsssframe64sync_reset(ptr noundef) #2

declare i32 @dsssframe64gen_execute(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @dsssframe64sync_execute(ptr noundef, ptr noundef, i32 noundef) #2

declare void @dsssframe64sync_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8, ptr noundef) #2

declare i32 @dsssframe64gen_destroy(ptr noundef) #2

declare i32 @dsssframe64sync_destroy(ptr noundef) #2

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

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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 8}
!16 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !17, i64 16}
!17 = !{!"long", !7, i64 0}
!18 = !{!16, !6, i64 0}
!19 = distinct !{!19, !14}


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

@.str = external hidden unnamed_addr constant [38 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @frame64_add_noise(ptr noundef, i32 noundef, float 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
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca %struct.framedatastats_s, align 8
  %4 = alloca %struct.framedatastats_s, align 8
  %5 = tail call ptr (...) @dsssframe64gen_create() #6
  %6 = tail call ptr @dsssframe64sync_create(ptr noundef null, ptr noundef null) #6
  %7 = tail call i32 @dsssframe64gen_get_frame_len(ptr noundef %5) #6
  %8 = zext i32 %7 to i64
  %9 = shl nuw nsw i64 %8, 3
  %10 = tail call noalias ptr @malloc(i64 noundef %9) #7
  %11 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str) #6
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.3) #6
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.4) #6
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.10)
  %16 = tail call i32 @fclose(ptr noundef %11)
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = getelementptr inbounds i8, ptr %4, i64 8
  br label %19

19:                                               ; preds = %34, %2
  %.0 = phi float [ -2.500000e+01, %2 ], [ %59, %34 ]
  %20 = fcmp olt float %.0, -5.000000e+00
  br i1 %20, label %21, label %60

21:                                               ; preds = %19
  %22 = call i32 @dsssframe64sync_reset_framedatastats(ptr noundef %6) #6
  br label %23

23:                                               ; preds = %29, %21
  %.067 = phi i32 [ 0, %21 ], [ %30, %29 ]
  br label %24

24:                                               ; preds = %23, %24
  %.06670 = phi i32 [ 0, %23 ], [ %28, %24 ]
  %25 = call i32 @dsssframe64sync_reset(ptr noundef %6) #6
  %26 = call i32 @dsssframe64gen_execute(ptr noundef %5, ptr noundef null, ptr noundef null, ptr noundef %10) #6
  call void @frame64_add_noise(ptr noundef %10, i32 noundef %7, float noundef %.0)
  %27 = call i32 @dsssframe64sync_execute(ptr noundef %6, ptr noundef %10, i32 noundef %7) #6
  %28 = add nuw nsw i32 %.06670, 1
  %exitcond.not = icmp eq i32 %28, 80
  br i1 %exitcond.not, label %29, label %24, !llvm.loop !5

29:                                               ; preds = %24
  %30 = add nuw nsw i32 %.067, 80
  call void @dsssframe64sync_get_framedatastats(ptr dead_on_unwind nonnull writable sret(%struct.framedatastats_s) align 8 %3, ptr noundef %6) #6
  %31 = load i32, ptr %17, align 8, !tbaa !7
  %32 = sub i32 %30, %31
  %33 = icmp ult i32 %.067, 920
  %.inv = icmp ult i32 %32, 5
  %switch = and i1 %33, %.inv
  br i1 %switch, label %23, label %34

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @dsssframe64sync_get_framedatastats(ptr dead_on_unwind nonnull writable sret(%struct.framedatastats_s) align 8 %4, ptr noundef %6) #6
  %35 = load i32, ptr %4, align 8, !tbaa !13
  %36 = sub i32 %30, %35
  %37 = uitofp i32 %36 to float
  %38 = uitofp nneg i32 %30 to float
  %39 = fdiv float %37, %38
  %40 = uitofp i32 %32 to float
  %41 = fdiv float %40, %38
  %42 = fpext float %.0 to double
  %43 = fmul float %39, 1.000000e+02
  %44 = fpext float %43 to double
  %45 = fmul float %41, 1.000000e+02
  %46 = fpext float %45 to double
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %42, i32 noundef %36, double noundef %44, i32 noundef %32, double noundef %46, i32 noundef %30)
  %48 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.12)
  %49 = load i32, ptr %4, align 8, !tbaa !13
  %50 = uitofp i32 %49 to float
  %51 = fdiv float %50, %38
  %52 = fpext float %51 to double
  %53 = load i32, ptr %18, align 8, !tbaa !7
  %54 = uitofp i32 %53 to float
  %55 = fdiv float %54, %38
  %56 = fpext float %55 to double
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.13, double noundef %42, double noundef %52, double noundef %56) #6
  %58 = call i32 @fclose(ptr noundef %48)
  %59 = fadd float %.0, 1.000000e+00
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br i1 %.inv, label %60, label %19

60:                                               ; preds = %34, %19
  %61 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.12)
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.14) #6
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.15) #6
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.16) #6
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.17) #6
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.18) #6
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.19) #6
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.20) #6
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.21) #6
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.22) #6
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.23) #6
  %72 = call i32 @fclose(ptr noundef %61)
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, ptr noundef nonnull @.str)
  %74 = call i32 @dsssframe64gen_destroy(ptr noundef %5) #6
  %75 = call i32 @dsssframe64sync_destroy(ptr noundef %6) #6
  call void @free(ptr noundef %10) #6
  ret i32 0
}

declare ptr @dsssframe64gen_create(...) local_unnamed_addr #2

declare ptr @dsssframe64sync_create(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @dsssframe64gen_get_frame_len(ptr 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 noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

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

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

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

declare i32 @dsssframe64sync_reset_framedatastats(ptr noundef) local_unnamed_addr #2

declare i32 @dsssframe64sync_reset(ptr noundef) local_unnamed_addr #2

declare i32 @dsssframe64gen_execute(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @dsssframe64sync_execute(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @dsssframe64sync_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8, ptr noundef) local_unnamed_addr #2

declare i32 @dsssframe64gen_destroy(ptr noundef) local_unnamed_addr #2

declare i32 @dsssframe64sync_destroy(ptr 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 #5

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 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 8}
!8 = !{!"", !9, i64 0, !9, i64 4, !9, i64 8, !12, i64 16}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!8, !9, i64 0}


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