; LLVM IR from jgaeddert/liquid-dsp :: examples (framesync64_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.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [22 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 [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca { float, float }, align 4
  %13 = alloca { float, float }, align 4
  %14 = alloca { float, float }, align 4
  %15 = alloca ptr, align 8
  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) #7
  %16 = call ptr (...) @framegen64_create()
  store ptr %16, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %17 = call ptr @framesync64_create(ptr noundef @callback, ptr noundef null)
  store ptr %17, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1440, ptr %8, align 4, !tbaa !5
  %18 = load i32, ptr %8, align 4, !tbaa !5
  %19 = zext i32 %18 to i64
  %20 = call ptr @llvm.stacksave.p0()
  store ptr %20, ptr %9, align 8
  %21 = alloca { float, float }, i64 %19, align 16
  store i64 %19, ptr %10, align 8
  %22 = load ptr, ptr %6, align 8, !tbaa !9
  %23 = call i32 @framegen64_execute(ptr noundef %22, ptr noundef null, ptr noundef null, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %106, %2
  %25 = load i32, ptr %11, align 4, !tbaa !5
  %26 = load i32, ptr %8, align 4, !tbaa !5
  %27 = icmp ult i32 %25, %26
  br i1 %27, label %28, label %109

28:                                               ; preds = %24
  %29 = load i32, ptr %11, align 4, !tbaa !5
  %30 = uitofp i32 %29 to float
  %31 = call float @llvm.fmuladd.f32(float 0x3F847AE140000000, float %30, float 0x3FF3C0C200000000)
  %32 = fmul float 0.000000e+00, %31
  %33 = fmul float 1.000000e+00, %31
  %34 = getelementptr inbounds { float, float }, ptr %12, i32 0, i32 0
  %35 = getelementptr inbounds { float, float }, ptr %12, i32 0, i32 1
  store float %32, ptr %34, align 4
  store float %33, ptr %35, align 4
  %36 = load <2 x float>, ptr %12, align 4
  %37 = call <2 x float> @cexpf(<2 x float> noundef %36) #7
  store <2 x float> %37, ptr %13, align 4
  %38 = getelementptr inbounds { float, float }, ptr %13, i32 0, i32 0
  %39 = load float, ptr %38, align 4
  %40 = getelementptr inbounds { float, float }, ptr %13, i32 0, i32 1
  %41 = load float, ptr %40, align 4
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds { float, float }, ptr %21, i64 %43
  %45 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 0
  %46 = load float, ptr %45, align 8
  %47 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 1
  %48 = load float, ptr %47, align 4
  %49 = fmul float %46, %39
  %50 = fmul float %48, %41
  %51 = fmul float %46, %41
  %52 = fmul float %48, %39
  %53 = fsub float %49, %50
  %54 = fadd float %51, %52
  %55 = fcmp uno float %53, %53
  br i1 %55, label %56, label %64, !prof !11

56:                                               ; preds = %28
  %57 = fcmp uno float %54, %54
  br i1 %57, label %58, label %64, !prof !11

58:                                               ; preds = %56
  %59 = call <2 x float> @__mulsc3(float noundef %46, float noundef %48, float noundef %39, float noundef %41) #7
  store <2 x float> %59, ptr %14, align 4
  %60 = getelementptr inbounds { float, float }, ptr %14, i32 0, i32 0
  %61 = load float, ptr %60, align 4
  %62 = getelementptr inbounds { float, float }, ptr %14, i32 0, i32 1
  %63 = load float, ptr %62, align 4
  br label %64

64:                                               ; preds = %58, %56, %28
  %65 = phi float [ %53, %28 ], [ %53, %56 ], [ %61, %58 ]
  %66 = phi float [ %54, %28 ], [ %54, %56 ], [ %63, %58 ]
  %67 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 0
  %68 = getelementptr inbounds { float, float }, ptr %44, i32 0, i32 1
  store float %65, ptr %67, align 8
  store float %66, ptr %68, align 4
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds { float, float }, ptr %21, i64 %70
  %72 = getelementptr inbounds { float, float }, ptr %71, i32 0, i32 0
  %73 = load float, ptr %72, align 8
  %74 = getelementptr inbounds { float, float }, ptr %71, i32 0, i32 1
  %75 = load float, ptr %74, align 4
  %76 = fmul float %73, 0x3FB99999A0000000
  %77 = fmul float %75, 0x3FB99999A0000000
  %78 = getelementptr inbounds { float, float }, ptr %71, i32 0, i32 0
  %79 = getelementptr inbounds { float, float }, ptr %71, i32 0, i32 1
  store float %76, ptr %78, align 8
  store float %77, ptr %79, align 4
  %80 = call float (...) @randnf()
  %81 = call float (...) @randnf()
  %82 = fmul float 0.000000e+00, %81
  %83 = fmul float 1.000000e+00, %81
  %84 = fadd float %80, %82
  %85 = fmul float 0x3F947AE140000000, %84
  %86 = fmul float 0x3F947AE140000000, %83
  %87 = fpext float %85 to double
  %88 = fpext float %86 to double
  %89 = fmul double %87, 0x3FE6A09E667F3BCD
  %90 = fmul double %88, 0x3FE6A09E667F3BCD
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds { float, float }, ptr %21, i64 %92
  %94 = getelementptr inbounds { float, float }, ptr %93, i32 0, i32 0
  %95 = load float, ptr %94, align 8
  %96 = getelementptr inbounds { float, float }, ptr %93, i32 0, i32 1
  %97 = load float, ptr %96, align 4
  %98 = fpext float %95 to double
  %99 = fpext float %97 to double
  %100 = fadd double %98, %89
  %101 = fadd double %99, %90
  %102 = fptrunc double %100 to float
  %103 = fptrunc double %101 to float
  %104 = getelementptr inbounds { float, float }, ptr %93, i32 0, i32 0
  %105 = getelementptr inbounds { float, float }, ptr %93, i32 0, i32 1
  store float %102, ptr %104, align 8
  store float %103, ptr %105, align 4
  br label %106

106:                                              ; preds = %64
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = add i32 %107, 1
  store i32 %108, ptr %11, align 4, !tbaa !5
  br label %24, !llvm.loop !12

109:                                              ; preds = %24
  %110 = load ptr, ptr %7, align 8, !tbaa !9
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = call i32 @framesync64_execute(ptr noundef %110, ptr noundef %21, i32 noundef %111)
  %113 = load ptr, ptr %7, align 8, !tbaa !9
  %114 = call i32 @framesync64_print(ptr noundef %113)
  %115 = load ptr, ptr %6, align 8, !tbaa !9
  %116 = call i32 @framegen64_destroy(ptr noundef %115)
  %117 = load ptr, ptr %7, align 8, !tbaa !9
  %118 = call i32 @framesync64_destroy(ptr noundef %117)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %119 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %119, ptr %15, align 8, !tbaa !9
  %120 = load ptr, ptr %15, align 8, !tbaa !9
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.2, ptr noundef @.str) #7
  %122 = load ptr, ptr %15, align 8, !tbaa !9
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.3) #7
  %124 = load ptr, ptr %15, align 8, !tbaa !9
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.4, i32 noundef %125) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %152, %109
  %128 = load i32, ptr %11, align 4, !tbaa !5
  %129 = load i32, ptr %8, align 4, !tbaa !5
  %130 = icmp ult i32 %128, %129
  br i1 %130, label %131, label %155

131:                                              ; preds = %127
  %132 = load ptr, ptr %15, align 8, !tbaa !9
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = add i32 %133, 1
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds { float, float }, ptr %21, i64 %136
  %138 = getelementptr inbounds { float, float }, ptr %137, i32 0, i32 0
  %139 = load float, ptr %138, align 8
  %140 = getelementptr inbounds { float, float }, ptr %137, i32 0, i32 1
  %141 = load float, ptr %140, align 4
  %142 = fpext float %139 to double
  %143 = load i32, ptr %11, align 4, !tbaa !5
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds { float, float }, ptr %21, i64 %144
  %146 = getelementptr inbounds { float, float }, ptr %145, i32 0, i32 0
  %147 = load float, ptr %146, align 8
  %148 = getelementptr inbounds { float, float }, ptr %145, i32 0, i32 1
  %149 = load float, ptr %148, align 4
  %150 = fpext float %149 to double
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.5, i32 noundef %134, double noundef %142, double noundef %150) #7
  br label %152

152:                                              ; preds = %131
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = add i32 %153, 1
  store i32 %154, ptr %11, align 4, !tbaa !5
  br label %127, !llvm.loop !14

155:                                              ; preds = %127
  %156 = load ptr, ptr %15, align 8, !tbaa !9
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.6) #7
  %158 = load ptr, ptr %15, align 8, !tbaa !9
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str.7) #7
  %160 = load ptr, ptr %15, align 8, !tbaa !9
  %161 = call i32 @fclose(ptr noundef %160)
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef @.str)
  %163 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %164 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %164)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %165 = load i32, ptr %3, align 4
  ret i32 %165
}

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

declare ptr @framegen64_create(...) #2

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

; Function Attrs: nounwind uwtable
declare hidden i32 @callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #3

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

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

declare <2 x float> @__mulsc3(float, float, float, float)

declare float @randnf(...) #2

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

declare i32 @framesync64_print(ptr noundef) #2

declare i32 @framegen64_destroy(ptr noundef) #2

declare i32 @framesync64_destroy(ptr noundef) #2

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

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

declare i32 @fclose(ptr noundef) #2

declare i32 @printf(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"="64" "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 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


; 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 }

@.str = external hidden unnamed_addr constant [22 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 [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = tail call ptr (...) @framegen64_create() #6
  %4 = tail call ptr @framesync64_create(ptr noundef nonnull @callback, ptr noundef null) #6
  %5 = alloca [1440 x { float, float }], align 16
  %6 = call i32 @framegen64_execute(ptr noundef %3, ptr noundef null, ptr noundef null, ptr noundef nonnull %5) #6
  br label %7

7:                                                ; preds = %2, %36
  %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %36 ]
  %8 = trunc nuw nsw i64 %indvars.iv to i32
  %9 = uitofp nneg i32 %8 to float
  %10 = call float @llvm.fmuladd.f32(float %9, float 0x3F847AE140000000, float 0x3FF3C0C200000000)
  %11 = fmul float %10, 0.000000e+00
  %.sroa.08.0.vec.insert = insertelement <2 x float> poison, float %11, i64 0
  %.sroa.08.4.vec.insert = insertelement <2 x float> %.sroa.08.0.vec.insert, float %10, i64 1
  %12 = call <2 x float> @cexpf(<2 x float> noundef %.sroa.08.4.vec.insert) #6
  %13 = getelementptr inbounds { float, float }, ptr %5, i64 %indvars.iv
  %14 = load float, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr %13, i64 4
  %16 = load float, ptr %15, align 4
  %17 = insertelement <2 x float> poison, float %14, i64 0
  %18 = shufflevector <2 x float> %17, <2 x float> poison, <2 x i32> zeroinitializer
  %19 = fmul <2 x float> %18, %12
  %20 = insertelement <2 x float> poison, float %16, i64 0
  %21 = shufflevector <2 x float> %20, <2 x float> poison, <2 x i32> zeroinitializer
  %22 = fmul <2 x float> %12, %21
  %23 = shufflevector <2 x float> %22, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %24 = fsub <2 x float> %19, %23
  %25 = fadd <2 x float> %19, %23
  %26 = shufflevector <2 x float> %24, <2 x float> %25, <2 x i32> <i32 0, i32 3>
  %27 = extractelement <2 x float> %24, i64 0
  %28 = fcmp uno float %27, 0.000000e+00
  br i1 %28, label %29, label %36, !prof !5

29:                                               ; preds = %7
  %30 = extractelement <2 x float> %25, i64 1
  %31 = fcmp uno float %30, 0.000000e+00
  br i1 %31, label %32, label %36, !prof !5

32:                                               ; preds = %29
  %33 = extractelement <2 x float> %12, i64 0
  %34 = extractelement <2 x float> %12, i64 1
  %35 = call <2 x float> @__mulsc3(float noundef %14, float noundef %16, float noundef %33, float noundef %34) #6
  br label %36

36:                                               ; preds = %32, %29, %7
  %37 = phi <2 x float> [ %26, %7 ], [ %26, %29 ], [ %35, %32 ]
  %38 = fmul <2 x float> %37, <float 0x3FB99999A0000000, float 0x3FB99999A0000000>
  store <2 x float> %38, ptr %13, align 8
  %39 = call float (...) @randnf() #6
  %40 = call float (...) @randnf() #6
  %41 = fmul float %40, 0.000000e+00
  %42 = fadd float %39, %41
  %43 = insertelement <2 x float> poison, float %42, i64 0
  %44 = insertelement <2 x float> %43, float %40, i64 1
  %45 = fmul <2 x float> %44, <float 0x3F947AE140000000, float 0x3F947AE140000000>
  %46 = fpext <2 x float> %45 to <2 x double>
  %47 = fmul <2 x double> %46, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %48 = load <2 x float>, ptr %13, align 8
  %49 = fpext <2 x float> %48 to <2 x double>
  %50 = fadd <2 x double> %47, %49
  %51 = fptrunc <2 x double> %50 to <2 x float>
  store <2 x float> %51, 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 %52, label %7, !llvm.loop !6

52:                                               ; preds = %36
  %53 = call i32 @framesync64_execute(ptr noundef %4, ptr noundef nonnull %5, i32 noundef 1440) #6
  %54 = call i32 @framesync64_print(ptr noundef %4) #6
  %55 = call i32 @framegen64_destroy(ptr noundef %3) #6
  %56 = call i32 @framesync64_destroy(ptr noundef %4) #6
  %57 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str) #6
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.3) #6
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.4, i32 noundef 1440) #6
  br label %61

61:                                               ; preds = %52, %61
  %indvars.iv35 = phi i64 [ 0, %52 ], [ %indvars.iv.next36, %61 ]
  %indvars.iv.next36 = add nuw nsw i64 %indvars.iv35, 1
  %62 = getelementptr inbounds { float, float }, ptr %5, i64 %indvars.iv35
  %63 = load float, ptr %62, align 8
  %64 = getelementptr inbounds i8, ptr %62, i64 4
  %65 = fpext float %63 to double
  %66 = load float, ptr %64, align 4
  %67 = fpext float %66 to double
  %68 = trunc nuw nsw i64 %indvars.iv.next36 to i32
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.5, i32 noundef %68, double noundef %65, double noundef %67) #6
  %exitcond38.not = icmp eq i64 %indvars.iv.next36, 1440
  br i1 %exitcond38.not, label %70, label %61, !llvm.loop !8

70:                                               ; preds = %61
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.6) #6
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.7) #6
  %73 = call i32 @fclose(ptr noundef %57)
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull @.str)
  %75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  ret i32 0
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @callback(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #2

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare <2 x float> @__mulsc3(float, float, float, float) local_unnamed_addr

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

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

declare i32 @framesync64_print(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: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #5

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = distinct !{!6, !7}
!7 = !{!"llvm.loop.mustprogress"}
!8 = distinct !{!8, !7}


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