; LLVM IR from jgaeddert/liquid-dsp :: src/framing/tests (flexframesync_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.flexframegenprops_s = type { i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@__const.autotest_flexframesync.header = external hidden unnamed_addr constant [14 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4
@.str = external hidden unnamed_addr constant [97 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 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.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_flexframesync() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.flexframegenprops_s, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca [14 x i8], align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca [2 x { float, float }], align 16
  %16 = alloca %struct.framedatastats_s, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 400, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 40, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 6, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %17 = call i32 @flexframegenprops_init_default(ptr noundef %7)
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = getelementptr inbounds %struct.flexframegenprops_s, ptr %7, i32 0, i32 3
  store i32 %18, ptr %19, align 4, !tbaa !9
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = getelementptr inbounds %struct.flexframegenprops_s, ptr %7, i32 0, i32 0
  store i32 %20, ptr %21, align 4, !tbaa !11
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = getelementptr inbounds %struct.flexframegenprops_s, ptr %7, i32 0, i32 1
  store i32 %22, ptr %23, align 4, !tbaa !12
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = getelementptr inbounds %struct.flexframegenprops_s, ptr %7, i32 0, i32 2
  store i32 %24, ptr %25, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %26 = call ptr @flexframegen_create(ptr noundef %7)
  store ptr %26, ptr %8, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %27 = call ptr @flexframesync_create(ptr noundef @framing_autotest_callback, ptr noundef %9)
  store ptr %27, ptr %10, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 14, ptr %11) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 @__const.autotest_flexframesync.header, i64 14, i1 false)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = zext i32 %28 to i64
  %30 = call ptr @llvm.stacksave.p0()
  store ptr %30, ptr %12, align 8
  %31 = alloca i8, i64 %29, align 16
  store i64 %29, ptr %13, align 8
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %43, %0
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp ult i32 %33, %34
  br i1 %35, label %36, label %46

36:                                               ; preds = %32
  %37 = call i32 @rand() #6
  %38 = and i32 %37, 255
  %39 = trunc i32 %38 to i8
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds i8, ptr %31, i64 %41
  store i8 %39, ptr %42, align 1, !tbaa !16
  br label %43

43:                                               ; preds = %36
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = add i32 %44, 1
  store i32 %45, ptr %1, align 4, !tbaa !5
  br label %32, !llvm.loop !17

46:                                               ; preds = %32
  %47 = load ptr, ptr %8, align 8, !tbaa !14
  %48 = getelementptr inbounds [14 x i8], ptr %11, i64 0, i64 0
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = call i32 @flexframegen_assemble(ptr noundef %47, ptr noundef %48, ptr noundef %31, i32 noundef %49)
  %51 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %46
  %54 = load ptr, ptr %8, align 8, !tbaa !14
  %55 = call i32 @flexframegen_print(ptr noundef %54)
  br label %56

56:                                               ; preds = %53, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  br label %57

57:                                               ; preds = %61, %56
  %58 = load i32, ptr %14, align 4, !tbaa !5
  %59 = icmp ne i32 %58, 0
  %60 = xor i1 %59, true
  br i1 %60, label %61, label %68

61:                                               ; preds = %57
  %62 = load ptr, ptr %8, align 8, !tbaa !14
  %63 = getelementptr inbounds [2 x { float, float }], ptr %15, i64 0, i64 0
  %64 = call i32 @flexframegen_write_samples(ptr noundef %62, ptr noundef %63, i32 noundef 2)
  store i32 %64, ptr %14, align 4, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !14
  %66 = getelementptr inbounds [2 x { float, float }], ptr %15, i64 0, i64 0
  %67 = call i32 @flexframesync_execute(ptr noundef %65, ptr noundef %66, i32 noundef 2)
  br label %57, !llvm.loop !19

68:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %69 = load ptr, ptr %10, align 8, !tbaa !14
  call void @flexframesync_get_framedatastats(ptr dead_on_unwind writable sret(%struct.framedatastats_s) align 8 %16, ptr noundef %69)
  %70 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %75

72:                                               ; preds = %68
  %73 = load ptr, ptr %10, align 8, !tbaa !14
  %74 = call i32 @flexframesync_print(ptr noundef %73)
  br label %75

75:                                               ; preds = %72, %68
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = icmp ne i32 %76, 19088743
  br i1 %77, label %78, label %81

78:                                               ; preds = %75
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = uitofp i32 %79 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 83, ptr noundef @.str.1, double noundef %80, ptr noundef @.str.2, ptr noundef @.str.3, double noundef 0x4172345670000000)
  br label %82

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

82:                                               ; preds = %81, %78
  %83 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !20
  %85 = icmp ne i32 %84, 1
  br i1 %85, label %86, label %90

86:                                               ; preds = %82
  %87 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !20
  %89 = uitofp i32 %88 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 86, ptr noundef @.str.4, double noundef %89, ptr noundef @.str.2, ptr noundef @.str.5, double noundef 1.000000e+00)
  br label %91

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

91:                                               ; preds = %90, %86
  %92 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !23
  %94 = icmp ne i32 %93, 1
  br i1 %94, label %95, label %99

95:                                               ; preds = %91
  %96 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !23
  %98 = uitofp i32 %97 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 87, ptr noundef @.str.6, double noundef %98, ptr noundef @.str.2, ptr noundef @.str.5, double noundef 1.000000e+00)
  br label %100

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

100:                                              ; preds = %99, %95
  %101 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 2
  %102 = load i32, ptr %101, align 8, !tbaa !24
  %103 = icmp ne i32 %102, 1
  br i1 %103, label %104, label %108

104:                                              ; preds = %100
  %105 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 2
  %106 = load i32, ptr %105, align 8, !tbaa !24
  %107 = uitofp i32 %106 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 88, ptr noundef @.str.7, double noundef %107, ptr noundef @.str.2, ptr noundef @.str.5, double noundef 1.000000e+00)
  br label %109

108:                                              ; preds = %100
  call void (...) @liquid_autotest_passed()
  br label %109

109:                                              ; preds = %108, %104
  %110 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 3
  %111 = load i64, ptr %110, align 8, !tbaa !25
  %112 = load i32, ptr %2, align 4, !tbaa !5
  %113 = zext i32 %112 to i64
  %114 = icmp ne i64 %111, %113
  br i1 %114, label %115, label %121

115:                                              ; preds = %109
  %116 = getelementptr inbounds %struct.framedatastats_s, ptr %16, i32 0, i32 3
  %117 = load i64, ptr %116, align 8, !tbaa !25
  %118 = uitofp i64 %117 to double
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = uitofp i32 %119 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str, i32 noundef 89, ptr noundef @.str.8, double noundef %118, ptr noundef @.str.2, ptr noundef @.str.9, double noundef %120)
  br label %122

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

122:                                              ; preds = %121, %115
  %123 = load ptr, ptr %8, align 8, !tbaa !14
  %124 = call i32 @flexframegen_destroy(ptr noundef %123)
  %125 = load ptr, ptr %10, align 8, !tbaa !14
  %126 = call i32 @flexframesync_destroy(ptr noundef %125)
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %127 = load ptr, ptr %12, align 8
  call void @llvm.stackrestore.p0(ptr %127)
  call void @llvm.lifetime.end.p0(i64 14, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

declare i32 @flexframegenprops_init_default(ptr noundef) #2

declare ptr @flexframegen_create(ptr noundef) #2

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

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) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @flexframegen_print(ptr noundef) #2

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

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

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

declare i32 @flexframesync_print(ptr noundef) #2

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

declare void @liquid_autotest_passed(...) #2

declare i32 @flexframegen_destroy(ptr noundef) #2

declare i32 @flexframesync_destroy(ptr noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
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 }

!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, !6, i64 12}
!10 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!11 = !{!10, !6, i64 0}
!12 = !{!10, !6, i64 4}
!13 = !{!10, !6, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!21, !6, i64 0}
!21 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !22, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{!21, !6, i64 4}
!24 = !{!21, !6, i64 8}
!25 = !{!21, !22, 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.flexframegenprops_s = type { i32, i32, i32, i32 }
%struct.framedatastats_s = type { i32, i32, i32, i64 }
%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@__const.autotest_flexframesync.header = external hidden unnamed_addr constant [14 x i8], align 1
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [97 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 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.4 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_flexframesync() local_unnamed_addr #0 {
  %1 = alloca %struct.flexframegenprops_s, align 16
  %2 = alloca i32, align 4
  %3 = alloca [14 x i8], align 1
  %4 = alloca [2 x { float, float }], align 16
  %5 = alloca %struct.framedatastats_s, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #6
  %6 = call i32 @flexframegenprops_init_default(ptr noundef nonnull %1) #6
  store <4 x i32> <i32 6, i32 1, i32 1, i32 40>, ptr %1, align 16, !tbaa !5
  %7 = call ptr @flexframegen_create(ptr noundef nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %8 = call ptr @flexframesync_create(ptr noundef nonnull @framing_autotest_callback, ptr noundef nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 14, ptr nonnull %3) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(14) %3, ptr noundef nonnull align 1 dereferenceable(14) @__const.autotest_flexframesync.header, i64 14, i1 false)
  %9 = call ptr @llvm.stacksave.p0()
  %10 = alloca [400 x i8], align 16
  br label %11

11:                                               ; preds = %0, %11
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %11 ]
  %12 = call i32 @rand() #6
  %13 = trunc i32 %12 to i8
  %14 = getelementptr inbounds i8, ptr %10, i64 %indvars.iv
  store i8 %13, ptr %14, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 400
  br i1 %exitcond.not, label %15, label %11, !llvm.loop !10

15:                                               ; preds = %11
  %16 = call i32 @flexframegen_assemble(ptr noundef %7, ptr noundef nonnull %3, ptr noundef nonnull %10, i32 noundef 400) #6
  %17 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %20, label %18

18:                                               ; preds = %15
  %19 = call i32 @flexframegen_print(ptr noundef %7) #6
  br label %20

20:                                               ; preds = %18, %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  br label %21

21:                                               ; preds = %20, %21
  %22 = call i32 @flexframegen_write_samples(ptr noundef %7, ptr noundef nonnull %4, i32 noundef 2) #6
  %23 = call i32 @flexframesync_execute(ptr noundef %8, ptr noundef nonnull %4, i32 noundef 2) #6
  %.not27 = icmp eq i32 %22, 0
  br i1 %.not27, label %21, label %24, !llvm.loop !12

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @flexframesync_get_framedatastats(ptr dead_on_unwind nonnull writable sret(%struct.framedatastats_s) align 8 %5, ptr noundef %8) #6
  %25 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not28 = icmp eq i32 %25, 0
  br i1 %.not28, label %28, label %26

26:                                               ; preds = %24
  %27 = call i32 @flexframesync_print(ptr noundef %8) #6
  br label %28

28:                                               ; preds = %26, %24
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %.not29 = icmp eq i32 %29, 19088743
  br i1 %.not29, label %32, label %30

30:                                               ; preds = %28
  %31 = uitofp i32 %29 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 83, ptr noundef nonnull @.str.1, double noundef %31, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, double noundef 0x4172345670000000) #6
  br label %33

32:                                               ; preds = %28
  call void (...) @liquid_autotest_passed() #6
  br label %33

33:                                               ; preds = %32, %30
  %34 = load i32, ptr %5, align 8, !tbaa !13
  %.not30 = icmp eq i32 %34, 1
  br i1 %.not30, label %37, label %35

35:                                               ; preds = %33
  %36 = uitofp i32 %34 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 86, ptr noundef nonnull @.str.4, double noundef %36, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.5, double noundef 1.000000e+00) #6
  br label %38

37:                                               ; preds = %33
  call void (...) @liquid_autotest_passed() #6
  br label %38

38:                                               ; preds = %37, %35
  %39 = getelementptr inbounds i8, ptr %5, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !16
  %.not31 = icmp eq i32 %40, 1
  br i1 %.not31, label %43, label %41

41:                                               ; preds = %38
  %42 = uitofp i32 %40 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 87, ptr noundef nonnull @.str.6, double noundef %42, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.5, double noundef 1.000000e+00) #6
  br label %44

43:                                               ; preds = %38
  call void (...) @liquid_autotest_passed() #6
  br label %44

44:                                               ; preds = %43, %41
  %45 = getelementptr inbounds i8, ptr %5, i64 8
  %46 = load i32, ptr %45, align 8, !tbaa !17
  %.not32 = icmp eq i32 %46, 1
  br i1 %.not32, label %49, label %47

47:                                               ; preds = %44
  %48 = uitofp i32 %46 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 88, ptr noundef nonnull @.str.7, double noundef %48, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.5, double noundef 1.000000e+00) #6
  br label %50

49:                                               ; preds = %44
  call void (...) @liquid_autotest_passed() #6
  br label %50

50:                                               ; preds = %49, %47
  %51 = getelementptr inbounds i8, ptr %5, i64 16
  %52 = load i64, ptr %51, align 8, !tbaa !18
  %.not33 = icmp eq i64 %52, 400
  br i1 %.not33, label %55, label %53

53:                                               ; preds = %50
  %54 = uitofp i64 %52 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str, i32 noundef 89, ptr noundef nonnull @.str.8, double noundef %54, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.9, double noundef 4.000000e+02) #6
  br label %56

55:                                               ; preds = %50
  call void (...) @liquid_autotest_passed() #6
  br label %56

56:                                               ; preds = %55, %53
  %57 = call i32 @flexframegen_destroy(ptr noundef %7) #6
  %58 = call i32 @flexframesync_destroy(ptr noundef %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.stackrestore.p0(ptr %9)
  call void @llvm.lifetime.end.p0(i64 14, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  ret void
}

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

declare i32 @flexframegenprops_init_default(ptr noundef) local_unnamed_addr #2

declare ptr @flexframegen_create(ptr noundef) local_unnamed_addr #2

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

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) #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

declare i32 @flexframegen_print(ptr noundef) local_unnamed_addr #2

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

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

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

declare i32 @flexframesync_print(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @flexframegen_destroy(ptr noundef) local_unnamed_addr #2

declare i32 @flexframesync_destroy(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 }

!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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!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,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass