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

; 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.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }

@.str = external hidden unnamed_addr constant [95 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 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

declare ptr @framegen64_create(...) #1

declare ptr @framesync64_create(ptr noundef, ptr noundef) #1

declare i32 @framing_autotest_callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #1

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

declare float @randnf(...) #1

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

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) #1

declare void @liquid_autotest_passed(...) #1

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

declare i32 @framegen64_destroy(ptr noundef) #1

declare i32 @framesync64_destroy(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_framesync64_copy() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1440 x { float, float }], align 16
  %7 = alloca ptr, align 8
  %8 = alloca %struct.framedatastats_s, align 8
  %9 = alloca %struct.framedatastats_s, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %10 = call ptr (...) @framegen64_create()
  store ptr %10, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %11 = call ptr @framesync64_create(ptr noundef @framing_autotest_callback, ptr noundef %2)
  store ptr %11, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 11520, ptr %6) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %34, %0
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = icmp ult i32 %13, 1440
  br i1 %14, label %15, label %37

15:                                               ; preds = %12
  %16 = call float (...) @randnf()
  %17 = call float (...) @randnf()
  %18 = fmul float 0.000000e+00, %17
  %19 = fmul float 1.000000e+00, %17
  %20 = fadd float %16, %18
  %21 = fmul float 0x3F847AE140000000, %20
  %22 = fmul float 0x3F847AE140000000, %19
  %23 = fpext float %21 to double
  %24 = fpext float %22 to double
  %25 = fmul double %23, 0x3FE6A09E667F3BCD
  %26 = fmul double %24, 0x3FE6A09E667F3BCD
  %27 = fptrunc double %25 to float
  %28 = fptrunc double %26 to float
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds [1440 x { float, float }], ptr %6, i64 0, i64 %30
  %32 = getelementptr inbounds { float, float }, ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds { float, float }, ptr %31, i32 0, i32 1
  store float %27, ptr %32, align 8
  store float %28, ptr %33, align 4
  br label %34

34:                                               ; preds = %15
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = add i32 %35, 1
  store i32 %36, ptr %1, align 4, !tbaa !5
  br label %12, !llvm.loop !11

37:                                               ; preds = %12
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds [1440 x { float, float }], ptr %6, i64 0, i64 0
  %40 = call i32 @framesync64_execute(ptr noundef %38, ptr noundef %39, i32 noundef 1440)
  %41 = load ptr, ptr %4, align 8, !tbaa !9
  %42 = getelementptr inbounds [1440 x { float, float }], ptr %6, i64 0, i64 0
  %43 = call i32 @framegen64_execute(ptr noundef %41, ptr noundef null, ptr noundef null, ptr noundef %42)
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %74, %37
  %45 = load i32, ptr %1, align 4, !tbaa !5
  %46 = icmp ult i32 %45, 1440
  br i1 %46, label %47, label %77

47:                                               ; preds = %44
  %48 = call float (...) @randnf()
  %49 = call float (...) @randnf()
  %50 = fmul float 0.000000e+00, %49
  %51 = fmul float 1.000000e+00, %49
  %52 = fadd float %48, %50
  %53 = fmul float 0x3F847AE140000000, %52
  %54 = fmul float 0x3F847AE140000000, %51
  %55 = fpext float %53 to double
  %56 = fpext float %54 to double
  %57 = fmul double %55, 0x3FE6A09E667F3BCD
  %58 = fmul double %56, 0x3FE6A09E667F3BCD
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds [1440 x { float, float }], ptr %6, i64 0, i64 %60
  %62 = getelementptr inbounds { float, float }, ptr %61, i32 0, i32 0
  %63 = load float, ptr %62, align 8
  %64 = getelementptr inbounds { float, float }, ptr %61, i32 0, i32 1
  %65 = load float, ptr %64, align 4
  %66 = fpext float %63 to double
  %67 = fpext float %65 to double
  %68 = fadd double %66, %57
  %69 = fadd double %67, %58
  %70 = fptrunc double %68 to float
  %71 = fptrunc double %69 to float
  %72 = getelementptr inbounds { float, float }, ptr %61, i32 0, i32 0
  %73 = getelementptr inbounds { float, float }, ptr %61, i32 0, i32 1
  store float %70, ptr %72, align 8
  store float %71, ptr %73, align 4
  br label %74

74:                                               ; preds = %47
  %75 = load i32, ptr %1, align 4, !tbaa !5
  %76 = add i32 %75, 1
  store i32 %76, ptr %1, align 4, !tbaa !5
  br label %44, !llvm.loop !13

77:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = call ptr @framesync64_copy(ptr noundef %78)
  store ptr %79, ptr %7, align 8, !tbaa !9
  %80 = load ptr, ptr %7, align 8, !tbaa !9
  %81 = call i32 @framesync64_set_userdata(ptr noundef %80, ptr noundef %3)
  %82 = load ptr, ptr %5, align 8, !tbaa !9
  %83 = call i32 @framesync64_print(ptr noundef %82)
  %84 = load ptr, ptr %7, align 8, !tbaa !9
  %85 = call i32 @framesync64_print(ptr noundef %84)
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %112, %77
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = icmp ult i32 %87, 1440
  br i1 %88, label %89, label %115

89:                                               ; preds = %86
  %90 = load ptr, ptr %5, align 8, !tbaa !9
  %91 = getelementptr inbounds [1440 x { float, float }], ptr %6, i64 0, i64 0
  %92 = load i32, ptr %1, align 4, !tbaa !5
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds { float, float }, ptr %91, i64 %93
  %95 = call i32 @framesync64_execute(ptr noundef %90, ptr noundef %94, i32 noundef 1)
  %96 = load ptr, ptr %7, align 8, !tbaa !9
  %97 = getelementptr inbounds [1440 x { float, float }], ptr %6, i64 0, i64 0
  %98 = load i32, ptr %1, align 4, !tbaa !5
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds { float, float }, ptr %97, i64 %99
  %101 = call i32 @framesync64_execute(ptr noundef %96, ptr noundef %100, i32 noundef 1)
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %105, label %110

105:                                              ; preds = %89
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = sitofp i32 %106 to double
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = sitofp i32 %108 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 118, ptr noundef @.str.11, double noundef %107, ptr noundef @.str.2, ptr noundef @.str.12, double noundef %109)
  br label %111

110:                                              ; preds = %89
  call void (...) @liquid_autotest_passed()
  br label %111

111:                                              ; preds = %110, %105
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = add i32 %113, 1
  store i32 %114, ptr %1, align 4, !tbaa !5
  br label %86, !llvm.loop !14

115:                                              ; preds = %86
  %116 = load i32, ptr %2, align 4, !tbaa !5
  %117 = icmp ne i32 %116, 19088743
  br i1 %117, label %118, label %121

118:                                              ; preds = %115
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = sitofp i32 %119 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 122, ptr noundef @.str.11, double noundef %120, ptr noundef @.str.2, ptr noundef @.str.3, double noundef 0x4172345670000000)
  br label %122

121:                                              ; preds = %115
  call void (...) @liquid_autotest_passed()
  br label %122

122:                                              ; preds = %121, %118
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = icmp ne i32 %123, 19088743
  br i1 %124, label %125, label %128

125:                                              ; preds = %122
  %126 = load i32, ptr %3, align 4, !tbaa !5
  %127 = sitofp i32 %126 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 123, ptr noundef @.str.12, double noundef %127, ptr noundef @.str.2, ptr noundef @.str.3, double noundef 0x4172345670000000)
  br label %129

128:                                              ; preds = %122
  call void (...) @liquid_autotest_passed()
  br label %129

129:                                              ; preds = %128, %125
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #3
  %130 = load ptr, ptr %5, align 8, !tbaa !9
  call void @framesync64_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8 %8, ptr noundef %130)
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #3
  %131 = load ptr, ptr %7, align 8, !tbaa !9
  call void @framesync64_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8 %9, ptr noundef %131)
  %132 = call i32 @framedatastats_print(ptr noundef %8)
  %133 = call i32 @framedatastats_print(ptr noundef %9)
  %134 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !15
  %136 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 0
  %137 = load i32, ptr %136, align 8, !tbaa !15
  %138 = icmp ne i32 %135, %137
  br i1 %138, label %139, label %146

139:                                              ; preds = %129
  %140 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !15
  %142 = uitofp i32 %141 to double
  %143 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 0
  %144 = load i32, ptr %143, align 8, !tbaa !15
  %145 = uitofp i32 %144 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 131, ptr noundef @.str.13, double noundef %142, ptr noundef @.str.2, ptr noundef @.str.14, double noundef %145)
  br label %147

146:                                              ; preds = %129
  call void (...) @liquid_autotest_passed()
  br label %147

147:                                              ; preds = %146, %139
  %148 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !18
  %150 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !18
  %152 = icmp ne i32 %149, %151
  br i1 %152, label %153, label %160

153:                                              ; preds = %147
  %154 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !18
  %156 = uitofp i32 %155 to double
  %157 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 1
  %158 = load i32, ptr %157, align 4, !tbaa !18
  %159 = uitofp i32 %158 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 132, ptr noundef @.str.15, double noundef %156, ptr noundef @.str.2, ptr noundef @.str.16, double noundef %159)
  br label %161

160:                                              ; preds = %147
  call void (...) @liquid_autotest_passed()
  br label %161

161:                                              ; preds = %160, %153
  %162 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 2
  %163 = load i32, ptr %162, align 8, !tbaa !19
  %164 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 2
  %165 = load i32, ptr %164, align 8, !tbaa !19
  %166 = icmp ne i32 %163, %165
  br i1 %166, label %167, label %174

167:                                              ; preds = %161
  %168 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 2
  %169 = load i32, ptr %168, align 8, !tbaa !19
  %170 = uitofp i32 %169 to double
  %171 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 2
  %172 = load i32, ptr %171, align 8, !tbaa !19
  %173 = uitofp i32 %172 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 133, ptr noundef @.str.17, double noundef %170, ptr noundef @.str.2, ptr noundef @.str.18, double noundef %173)
  br label %175

174:                                              ; preds = %161
  call void (...) @liquid_autotest_passed()
  br label %175

175:                                              ; preds = %174, %167
  %176 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 3
  %177 = load i64, ptr %176, align 8, !tbaa !20
  %178 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 3
  %179 = load i64, ptr %178, align 8, !tbaa !20
  %180 = icmp ne i64 %177, %179
  br i1 %180, label %181, label %188

181:                                              ; preds = %175
  %182 = getelementptr inbounds %struct.framedatastats_s, ptr %8, i32 0, i32 3
  %183 = load i64, ptr %182, align 8, !tbaa !20
  %184 = uitofp i64 %183 to double
  %185 = getelementptr inbounds %struct.framedatastats_s, ptr %9, i32 0, i32 3
  %186 = load i64, ptr %185, align 8, !tbaa !20
  %187 = uitofp i64 %186 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 134, ptr noundef @.str.19, double noundef %184, ptr noundef @.str.2, ptr noundef @.str.20, double noundef %187)
  br label %189

188:                                              ; preds = %175
  call void (...) @liquid_autotest_passed()
  br label %189

189:                                              ; preds = %188, %181
  %190 = load ptr, ptr %5, align 8, !tbaa !9
  %191 = call i32 @framesync64_print(ptr noundef %190)
  %192 = load ptr, ptr %7, align 8, !tbaa !9
  %193 = call i32 @framesync64_print(ptr noundef %192)
  %194 = load ptr, ptr %4, align 8, !tbaa !9
  %195 = call i32 @framegen64_destroy(ptr noundef %194)
  %196 = load ptr, ptr %5, align 8, !tbaa !9
  %197 = call i32 @framesync64_destroy(ptr noundef %196)
  %198 = load ptr, ptr %7, align 8, !tbaa !9
  %199 = call i32 @framesync64_destroy(ptr noundef %198)
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 11520, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

declare ptr @framesync64_copy(ptr noundef) #1

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

declare i32 @framesync64_print(ptr noundef) #1

declare i32 @framedatastats_print(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 }

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


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

%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }

@.str = external hidden unnamed_addr constant [95 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [27 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

declare ptr @framegen64_create(...) local_unnamed_addr #1

declare ptr @framesync64_create(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @framing_autotest_callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #1

declare i32 @framegen64_execute(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare float @randnf(...) local_unnamed_addr #1

declare i32 @framesync64_execute(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #1

declare void @liquid_autotest_passed(...) local_unnamed_addr #1

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

declare i32 @framegen64_destroy(ptr noundef) local_unnamed_addr #1

declare i32 @framesync64_destroy(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @autotest_framesync64_copy() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [1440 x { float, float }], align 16
  %4 = alloca %struct.framedatastats_s, align 8
  %5 = alloca %struct.framedatastats_s, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  %6 = tail call ptr (...) @framegen64_create() #3
  %7 = call ptr @framesync64_create(ptr noundef nonnull @framing_autotest_callback, ptr noundef nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 11520, ptr nonnull %3) #3
  br label %8

8:                                                ; preds = %0, %8
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %8 ]
  %9 = call float (...) @randnf() #3
  %10 = call float (...) @randnf() #3
  %11 = fmul float %10, 0.000000e+00
  %12 = fadd float %9, %11
  %13 = getelementptr inbounds [1440 x { float, float }], ptr %3, i64 0, i64 %indvars.iv
  %14 = insertelement <2 x float> poison, float %12, i64 0
  %15 = insertelement <2 x float> %14, float %10, i64 1
  %16 = fmul <2 x float> %15, <float 0x3F847AE140000000, float 0x3F847AE140000000>
  %17 = fpext <2 x float> %16 to <2 x double>
  %18 = fmul <2 x double> %17, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %19 = fptrunc <2 x double> %18 to <2 x float>
  store <2 x float> %19, ptr %13, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1440
  br i1 %exitcond.not, label %20, label %8, !llvm.loop !9

20:                                               ; preds = %8
  %21 = call i32 @framesync64_execute(ptr noundef %7, ptr noundef nonnull %3, i32 noundef 1440) #3
  %22 = call i32 @framegen64_execute(ptr noundef %6, ptr noundef null, ptr noundef null, ptr noundef nonnull %3) #3
  br label %23

23:                                               ; preds = %20, %23
  %indvars.iv46 = phi i64 [ 0, %20 ], [ %indvars.iv.next47, %23 ]
  %24 = call float (...) @randnf() #3
  %25 = call float (...) @randnf() #3
  %26 = fmul float %25, 0.000000e+00
  %27 = fadd float %24, %26
  %28 = getelementptr inbounds [1440 x { float, float }], ptr %3, i64 0, i64 %indvars.iv46
  %29 = insertelement <2 x float> poison, float %27, i64 0
  %30 = insertelement <2 x float> %29, float %25, i64 1
  %31 = fmul <2 x float> %30, <float 0x3F847AE140000000, float 0x3F847AE140000000>
  %32 = fpext <2 x float> %31 to <2 x double>
  %33 = fmul <2 x double> %32, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %34 = load <2 x float>, ptr %28, align 8
  %35 = fpext <2 x float> %34 to <2 x double>
  %36 = fadd <2 x double> %33, %35
  %37 = fptrunc <2 x double> %36 to <2 x float>
  store <2 x float> %37, ptr %28, align 8
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next47, 1440
  br i1 %exitcond49.not, label %38, label %23, !llvm.loop !11

38:                                               ; preds = %23
  %39 = call ptr @framesync64_copy(ptr noundef %7) #3
  %40 = call i32 @framesync64_set_userdata(ptr noundef %39, ptr noundef nonnull %2) #3
  %41 = call i32 @framesync64_print(ptr noundef %7) #3
  %42 = call i32 @framesync64_print(ptr noundef %39) #3
  br label %43

43:                                               ; preds = %38, %53
  %indvars.iv50 = phi i64 [ 0, %38 ], [ %indvars.iv.next51, %53 ]
  %44 = getelementptr inbounds { float, float }, ptr %3, i64 %indvars.iv50
  %45 = call i32 @framesync64_execute(ptr noundef %7, ptr noundef nonnull %44, i32 noundef 1) #3
  %46 = call i32 @framesync64_execute(ptr noundef %39, ptr noundef nonnull %44, i32 noundef 1) #3
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %.not41 = icmp eq i32 %47, %48
  br i1 %.not41, label %52, label %49

49:                                               ; preds = %43
  %50 = sitofp i32 %47 to double
  %51 = sitofp i32 %48 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 118, ptr noundef nonnull @.str.11, double noundef %50, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.12, double noundef %51) #3
  br label %53

52:                                               ; preds = %43
  call void (...) @liquid_autotest_passed() #3
  br label %53

53:                                               ; preds = %49, %52
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next51, 1440
  br i1 %exitcond53.not, label %54, label %43, !llvm.loop !12

54:                                               ; preds = %53
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %55, 19088743
  br i1 %.not, label %58, label %56

56:                                               ; preds = %54
  %57 = sitofp i32 %55 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 122, ptr noundef nonnull @.str.11, double noundef %57, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x4172345670000000) #3
  br label %59

58:                                               ; preds = %54
  call void (...) @liquid_autotest_passed() #3
  br label %59

59:                                               ; preds = %58, %56
  %60 = load i32, ptr %2, align 4, !tbaa !5
  %.not36 = icmp eq i32 %60, 19088743
  br i1 %.not36, label %63, label %61

61:                                               ; preds = %59
  %62 = sitofp i32 %60 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 123, ptr noundef nonnull @.str.12, double noundef %62, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x4172345670000000) #3
  br label %64

63:                                               ; preds = %59
  call void (...) @liquid_autotest_passed() #3
  br label %64

64:                                               ; preds = %63, %61
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #3
  call void @framesync64_get_framedatastats(ptr dead_on_unwind nonnull writable sret(%struct.framedatastats_s) align 8 %4, ptr noundef %7) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @framesync64_get_framedatastats(ptr dead_on_unwind nonnull writable sret(%struct.framedatastats_s) align 8 %5, ptr noundef %39) #3
  %65 = call i32 @framedatastats_print(ptr noundef nonnull %4) #3
  %66 = call i32 @framedatastats_print(ptr noundef nonnull %5) #3
  %67 = load i32, ptr %4, align 8, !tbaa !13
  %68 = load i32, ptr %5, align 8, !tbaa !13
  %.not37 = icmp eq i32 %67, %68
  br i1 %.not37, label %72, label %69

69:                                               ; preds = %64
  %70 = uitofp i32 %67 to double
  %71 = uitofp i32 %68 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 131, ptr noundef nonnull @.str.13, double noundef %70, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.14, double noundef %71) #3
  br label %73

72:                                               ; preds = %64
  call void (...) @liquid_autotest_passed() #3
  br label %73

73:                                               ; preds = %72, %69
  %74 = getelementptr inbounds i8, ptr %4, i64 4
  %75 = load i32, ptr %74, align 4, !tbaa !16
  %76 = getelementptr inbounds i8, ptr %5, i64 4
  %77 = load i32, ptr %76, align 4, !tbaa !16
  %.not38 = icmp eq i32 %75, %77
  br i1 %.not38, label %81, label %78

78:                                               ; preds = %73
  %79 = uitofp i32 %75 to double
  %80 = uitofp i32 %77 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 132, ptr noundef nonnull @.str.15, double noundef %79, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.16, double noundef %80) #3
  br label %82

81:                                               ; preds = %73
  call void (...) @liquid_autotest_passed() #3
  br label %82

82:                                               ; preds = %81, %78
  %83 = getelementptr inbounds i8, ptr %4, i64 8
  %84 = load i32, ptr %83, align 8, !tbaa !17
  %85 = getelementptr inbounds i8, ptr %5, i64 8
  %86 = load i32, ptr %85, align 8, !tbaa !17
  %.not39 = icmp eq i32 %84, %86
  br i1 %.not39, label %90, label %87

87:                                               ; preds = %82
  %88 = uitofp i32 %84 to double
  %89 = uitofp i32 %86 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 133, ptr noundef nonnull @.str.17, double noundef %88, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.18, double noundef %89) #3
  br label %91

90:                                               ; preds = %82
  call void (...) @liquid_autotest_passed() #3
  br label %91

91:                                               ; preds = %90, %87
  %92 = getelementptr inbounds i8, ptr %4, i64 16
  %93 = load i64, ptr %92, align 8, !tbaa !18
  %94 = getelementptr inbounds i8, ptr %5, i64 16
  %95 = load i64, ptr %94, align 8, !tbaa !18
  %.not40 = icmp eq i64 %93, %95
  br i1 %.not40, label %99, label %96

96:                                               ; preds = %91
  %97 = uitofp i64 %93 to double
  %98 = uitofp i64 %95 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 134, ptr noundef nonnull @.str.19, double noundef %97, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.20, double noundef %98) #3
  br label %100

99:                                               ; preds = %91
  call void (...) @liquid_autotest_passed() #3
  br label %100

100:                                              ; preds = %99, %96
  %101 = call i32 @framesync64_print(ptr noundef %7) #3
  %102 = call i32 @framesync64_print(ptr noundef %39) #3
  %103 = call i32 @framegen64_destroy(ptr noundef %6) #3
  %104 = call i32 @framesync64_destroy(ptr noundef %7) #3
  %105 = call i32 @framesync64_destroy(ptr noundef %39) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 11520, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  ret void
}

declare ptr @framesync64_copy(ptr noundef) local_unnamed_addr #1

declare i32 @framesync64_set_userdata(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @framesync64_print(ptr noundef) local_unnamed_addr #1

declare i32 @framedatastats_print(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 }

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass