; LLVM IR from jgaeddert/liquid-dsp :: examples (dsssframe64sync_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 [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 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 i32, align 4
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, 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 4, ptr %6) #6
  store i32 2400, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store float -1.000000e+01, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr @.str, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %20 = call ptr (...) @dsssframe64gen_create()
  store ptr %20, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %21 = load ptr, ptr %9, align 8, !tbaa !9
  %22 = call i32 @dsssframe64gen_get_frame_len(ptr noundef %21)
  store i32 %22, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %23 = load i32, ptr %10, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = mul i64 %24, 8
  %26 = call noalias ptr @malloc(i64 noundef %25) #7
  store ptr %26, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %27 = load i32, ptr %10, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = mul i64 %28, 8
  %30 = call noalias ptr @malloc(i64 noundef %29) #7
  store ptr %30, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %31 = load ptr, ptr %8, align 8, !tbaa !9
  %32 = call noalias ptr @fopen(ptr noundef %31, ptr noundef @.str.1)
  store ptr %32, ptr %13, align 8, !tbaa !9
  %33 = load ptr, ptr %13, align 8, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !9
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.2, ptr noundef %34) #6
  %36 = load ptr, ptr %13, align 8, !tbaa !9
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.3) #6
  %38 = load ptr, ptr %13, align 8, !tbaa !9
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef @.str.4) #6
  %40 = load ptr, ptr %9, align 8, !tbaa !9
  %41 = load ptr, ptr %11, align 8, !tbaa !9
  %42 = call i32 @dsssframe64gen_execute(ptr noundef %40, ptr noundef null, ptr noundef null, ptr noundef %41)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %43 = load float, ptr %7, align 4, !tbaa !11
  %44 = fneg float %43
  %45 = fdiv float %44, 2.000000e+01
  %46 = call float @powf(float noundef 1.000000e+01, float noundef %45) #6
  store float %46, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %86, %2
  %48 = load i32, ptr %15, align 4, !tbaa !5
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = icmp ult i32 %48, %49
  br i1 %50, label %51, label %89

51:                                               ; preds = %47
  %52 = load ptr, ptr %11, align 8, !tbaa !9
  %53 = load i32, ptr %15, align 4, !tbaa !5
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds { float, float }, ptr %52, i64 %54
  %56 = getelementptr inbounds { float, float }, ptr %55, i32 0, i32 0
  %57 = load float, ptr %56, align 4
  %58 = getelementptr inbounds { float, float }, ptr %55, i32 0, i32 1
  %59 = load float, ptr %58, align 4
  %60 = fpext float %57 to double
  %61 = fpext float %59 to double
  %62 = fmul double %60, 0x3FE6A09E667F3BCD
  %63 = fmul double %61, 0x3FE6A09E667F3BCD
  %64 = load float, ptr %14, align 4, !tbaa !11
  %65 = call float (...) @randnf()
  %66 = call float (...) @randnf()
  %67 = fmul float 0.000000e+00, %66
  %68 = fmul float 1.000000e+00, %66
  %69 = fadd float %65, %67
  %70 = fmul float %64, %69
  %71 = fmul float %64, %68
  %72 = fpext float %70 to double
  %73 = fpext float %71 to double
  %74 = fdiv double %72, 0x3FF6A09E667F3BCD
  %75 = fdiv double %73, 0x3FF6A09E667F3BCD
  %76 = fadd double %62, %74
  %77 = fadd double %63, %75
  %78 = fptrunc double %76 to float
  %79 = fptrunc double %77 to float
  %80 = load ptr, ptr %12, align 8, !tbaa !9
  %81 = load i32, ptr %15, align 4, !tbaa !5
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds { float, float }, ptr %80, i64 %82
  %84 = getelementptr inbounds { float, float }, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds { float, float }, ptr %83, i32 0, i32 1
  store float %78, ptr %84, align 4
  store float %79, ptr %85, align 4
  br label %86

86:                                               ; preds = %51
  %87 = load i32, ptr %15, align 4, !tbaa !5
  %88 = add i32 %87, 1
  store i32 %88, ptr %15, align 4, !tbaa !5
  br label %47, !llvm.loop !13

89:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %90 = load ptr, ptr %13, align 8, !tbaa !9
  %91 = call ptr @dsssframe64sync_create(ptr noundef @callback, ptr noundef %90)
  store ptr %91, ptr %16, align 8, !tbaa !9
  %92 = load ptr, ptr %16, align 8, !tbaa !9
  %93 = load ptr, ptr %12, align 8, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = call i32 @dsssframe64sync_execute(ptr noundef %92, ptr noundef %93, i32 noundef %94)
  %96 = load ptr, ptr %16, align 8, !tbaa !9
  %97 = call i32 @dsssframe64sync_destroy(ptr noundef %96)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = call ptr @spgramcf_create_default(i32 noundef %98)
  store ptr %99, ptr %17, align 8, !tbaa !9
  %100 = load ptr, ptr %17, align 8, !tbaa !9
  %101 = load ptr, ptr %12, align 8, !tbaa !9
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = call i32 @spgramcf_write(ptr noundef %100, ptr noundef %101, i32 noundef %102)
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = zext i32 %104 to i64
  %106 = call ptr @llvm.stacksave.p0()
  store ptr %106, ptr %18, align 8
  %107 = alloca float, i64 %105, align 16
  store i64 %105, ptr %19, align 8
  %108 = load ptr, ptr %17, align 8, !tbaa !9
  %109 = call i32 @spgramcf_get_psd(ptr noundef %108, ptr noundef %107)
  %110 = load ptr, ptr %17, align 8, !tbaa !9
  %111 = call i32 @spgramcf_destroy(ptr noundef %110)
  %112 = load ptr, ptr %13, align 8, !tbaa !9
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.5, i32 noundef %113) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %129, %89
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = icmp ult i32 %116, %117
  br i1 %118, label %119, label %132

119:                                              ; preds = %115
  %120 = load ptr, ptr %13, align 8, !tbaa !9
  %121 = load i32, ptr %15, align 4, !tbaa !5
  %122 = add i32 %121, 1
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds float, ptr %107, i64 %124
  %126 = load float, ptr %125, align 4, !tbaa !11
  %127 = fpext float %126 to double
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.6, i32 noundef %122, double noundef %127) #6
  br label %129

129:                                              ; preds = %119
  %130 = load i32, ptr %15, align 4, !tbaa !5
  %131 = add i32 %130, 1
  store i32 %131, ptr %15, align 4, !tbaa !5
  br label %115, !llvm.loop !15

132:                                              ; preds = %115
  %133 = load ptr, ptr %13, align 8, !tbaa !9
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.7) #6
  %135 = load ptr, ptr %13, align 8, !tbaa !9
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.8) #6
  %137 = load ptr, ptr %13, align 8, !tbaa !9
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.9) #6
  %139 = load ptr, ptr %13, align 8, !tbaa !9
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.10) #6
  %141 = load ptr, ptr %13, align 8, !tbaa !9
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef @.str.11) #6
  %143 = load ptr, ptr %13, align 8, !tbaa !9
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str.12) #6
  %145 = load ptr, ptr %13, align 8, !tbaa !9
  %146 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.13) #6
  %147 = load ptr, ptr %13, align 8, !tbaa !9
  %148 = call i32 @fclose(ptr noundef %147)
  %149 = load ptr, ptr %8, align 8, !tbaa !9
  %150 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %149)
  %151 = load ptr, ptr %9, align 8, !tbaa !9
  %152 = call i32 @dsssframe64gen_destroy(ptr noundef %151)
  %153 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %153) #6
  %154 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %154) #6
  store i32 0, ptr %3, align 4
  %155 = load ptr, ptr %18, align 8
  call void @llvm.stackrestore.p0(ptr %155)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %156 = load i32, ptr %3, align 4
  ret i32 %156
}

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

declare ptr @dsssframe64gen_create(...) #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 @dsssframe64gen_execute(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #4

declare float @randnf(...) #2

declare ptr @dsssframe64sync_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) #0

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

declare i32 @dsssframe64sync_destroy(ptr noundef) #2

declare ptr @spgramcf_create_default(i32 noundef) #2

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

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

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

declare i32 @spgramcf_destroy(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

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

declare i32 @dsssframe64gen_destroy(ptr noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

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

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 = { nocallback nofree nosync nounwind willreturn }
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 = !{!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 = distinct !{!15, !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.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [26 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 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 (...) @dsssframe64gen_create() #5
  %4 = tail call i32 @dsssframe64gen_get_frame_len(ptr noundef %3) #5
  %5 = zext i32 %4 to i64
  %6 = shl nuw nsw i64 %5, 3
  %7 = tail call noalias ptr @malloc(i64 noundef %6) #6
  %8 = tail call noalias ptr @malloc(i64 noundef %6) #6
  %9 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str) #5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.3) #5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.4) #5
  %13 = tail call i32 @dsssframe64gen_execute(ptr noundef %3, ptr noundef null, ptr noundef null, ptr noundef %7) #5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %14 = getelementptr inbounds { float, float }, ptr %7, i64 %indvars.iv
  %15 = getelementptr inbounds { float, float }, ptr %8, i64 %indvars.iv
  %16 = load <2 x float>, ptr %14, align 4
  %17 = fpext <2 x float> %16 to <2 x double>
  %18 = fmul <2 x double> %17, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %19 = tail call float (...) @randnf() #5
  %20 = tail call float (...) @randnf() #5
  %21 = fmul float %20, 0.000000e+00
  %22 = fadd float %19, %21
  %23 = insertelement <2 x float> poison, float %22, i64 0
  %24 = insertelement <2 x float> %23, float %20, i64 1
  %25 = fmul <2 x float> %24, <float 0x40094C5840000000, float 0x40094C5840000000>
  %26 = fpext <2 x float> %25 to <2 x double>
  %27 = fdiv <2 x double> %26, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
  %28 = fadd <2 x double> %18, %27
  %29 = fptrunc <2 x double> %28 to <2 x float>
  store <2 x float> %29, ptr %15, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %5
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %.lr.ph, %2
  %30 = tail call ptr @dsssframe64sync_create(ptr noundef nonnull @callback, ptr noundef %9) #5
  %31 = tail call i32 @dsssframe64sync_execute(ptr noundef %30, ptr noundef %8, i32 noundef %4) #5
  %32 = tail call i32 @dsssframe64sync_destroy(ptr noundef %30) #5
  %33 = tail call ptr @spgramcf_create_default(i32 noundef 2400) #5
  %34 = tail call i32 @spgramcf_write(ptr noundef %33, ptr noundef %8, i32 noundef %4) #5
  %35 = alloca [2400 x float], align 16
  %36 = call i32 @spgramcf_get_psd(ptr noundef %33, ptr noundef nonnull %35) #5
  %37 = call i32 @spgramcf_destroy(ptr noundef %33) #5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.5, i32 noundef 2400) #5
  br label %39

39:                                               ; preds = %._crit_edge, %39
  %indvars.iv56 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next57, %39 ]
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %40 = getelementptr inbounds float, ptr %35, i64 %indvars.iv56
  %41 = load float, ptr %40, align 4, !tbaa !7
  %42 = fpext float %41 to double
  %43 = trunc nuw nsw i64 %indvars.iv.next57 to i32
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.6, i32 noundef %43, double noundef %42) #5
  %exitcond59.not = icmp eq i64 %indvars.iv.next57, 2400
  br i1 %exitcond59.not, label %45, label %39, !llvm.loop !11

45:                                               ; preds = %39
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.7) #5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.8) #5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.9) #5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.10) #5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.11) #5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.12) #5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.13) #5
  %53 = call i32 @fclose(ptr noundef %9)
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull @.str)
  %55 = call i32 @dsssframe64gen_destroy(ptr noundef %3) #5
  call void @free(ptr noundef %7) #5
  call void @free(ptr noundef %8) #5
  ret i32 0
}

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

declare i32 @dsssframe64gen_get_frame_len(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

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

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

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

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

declare ptr @dsssframe64sync_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) #0

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

declare i32 @dsssframe64sync_destroy(ptr noundef) local_unnamed_addr #1

declare ptr @spgramcf_create_default(i32 noundef) local_unnamed_addr #1

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

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

declare i32 @spgramcf_destroy(ptr noundef) local_unnamed_addr #1

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

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

declare i32 @dsssframe64gen_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #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 = { "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 = { 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 #3 = { 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 #4 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass