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

; 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.qsourcecf_s = type { i32, i32, i32, i32, float, float, float, i32, ptr, ptr, float, float, i32, ptr, ptr, ptr, ptr, i32, i64, i32, %union.anon }
%union.anon = type { %struct.anon.1 }
%struct.anon.1 = type { ptr, float, i32, i32, i64, i64 }
%struct.anon = type { ptr, ptr }
%struct.anon.3 = type { ptr }
%struct.anon.4 = type { ptr, ptr, i32, i32, i32 }
%struct.anon.5 = type { ptr, [2 x { float, float }], i32 }

@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [45 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

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

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @qsourcecf_disable(ptr noundef) #2

declare i32 @nco_crcf_set_frequency(ptr noundef, float noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @qsourcecf_generate(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca { float, float }, align 4
  %7 = alloca i32, align 4
  %8 = alloca { float, float }, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.qsourcecf_s, ptr %9, i32 0, i32 19
  %11 = load i32, ptr %10, align 8, !tbaa !9
  switch i32 %11, label %213 [
    i32 1, label %12
    i32 2, label %22
    i32 3, label %25
    i32 4, label %86
    i32 5, label %100
    i32 6, label %118
    i32 7, label %167
  ]

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.qsourcecf_s, ptr %13, i32 0, i32 20
  %15 = getelementptr inbounds %struct.anon, ptr %14, i32 0, i32 1
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.qsourcecf_s, ptr %17, i32 0, i32 20
  %19 = getelementptr inbounds %struct.anon, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = call i32 %16(ptr noundef %20, ptr noundef %6, i32 noundef 1)
  br label %215

22:                                               ; preds = %2
  %23 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %24 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float 1.000000e+00, ptr %23, align 4
  store float 0.000000e+00, ptr %24, align 4
  br label %215

25:                                               ; preds = %2
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.qsourcecf_s, ptr %26, i32 0, i32 20
  %28 = getelementptr inbounds %struct.anon.1, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = call i32 @nco_crcf_cexpf(ptr noundef %29, ptr noundef %6)
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.qsourcecf_s, ptr %31, i32 0, i32 20
  %33 = getelementptr inbounds %struct.anon.1, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.qsourcecf_s, ptr %35, i32 0, i32 20
  %37 = getelementptr inbounds %struct.anon.1, ptr %36, i32 0, i32 1
  %38 = load float, ptr %37, align 8, !tbaa !14
  %39 = call i32 @nco_crcf_adjust_frequency(ptr noundef %34, float noundef %38)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.qsourcecf_s, ptr %40, i32 0, i32 20
  %42 = getelementptr inbounds %struct.anon.1, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  %44 = call i32 @nco_crcf_step(ptr noundef %43)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.qsourcecf_s, ptr %45, i32 0, i32 20
  %47 = getelementptr inbounds %struct.anon.1, ptr %46, i32 0, i32 5
  %48 = load i64, ptr %47, align 8, !tbaa !14
  %49 = add i64 %48, -1
  store i64 %49, ptr %47, align 8, !tbaa !14
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.qsourcecf_s, ptr %50, i32 0, i32 20
  %52 = getelementptr inbounds %struct.anon.1, ptr %51, i32 0, i32 5
  %53 = load i64, ptr %52, align 8, !tbaa !14
  %54 = icmp eq i64 %53, 0
  br i1 %54, label %55, label %85

55:                                               ; preds = %25
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.qsourcecf_s, ptr %56, i32 0, i32 20
  %58 = getelementptr inbounds %struct.anon.1, ptr %57, i32 0, i32 4
  %59 = load i64, ptr %58, align 8, !tbaa !14
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.qsourcecf_s, ptr %60, i32 0, i32 20
  %62 = getelementptr inbounds %struct.anon.1, ptr %61, i32 0, i32 5
  store i64 %59, ptr %62, align 8, !tbaa !14
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.qsourcecf_s, ptr %63, i32 0, i32 20
  %65 = getelementptr inbounds %struct.anon.1, ptr %64, i32 0, i32 3
  %66 = load i32, ptr %65, align 8, !tbaa !14
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %71

68:                                               ; preds = %55
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call i32 @qsourcecf_disable(ptr noundef %69)
  br label %71

71:                                               ; preds = %68, %55
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.qsourcecf_s, ptr %72, i32 0, i32 20
  %74 = getelementptr inbounds %struct.anon.1, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.qsourcecf_s, ptr %76, i32 0, i32 20
  %78 = getelementptr inbounds %struct.anon.1, ptr %77, i32 0, i32 2
  %79 = load i32, ptr %78, align 4, !tbaa !14
  %80 = icmp ne i32 %79, 0
  %81 = zext i1 %80 to i64
  %82 = select i1 %80, double 0x400921FB54442D18, double 0xC00921FB54442D18
  %83 = fptrunc double %82 to float
  %84 = call i32 @nco_crcf_set_frequency(ptr noundef %75, float noundef %83)
  br label %85

85:                                               ; preds = %71, %25
  br label %215

86:                                               ; preds = %2
  %87 = call float (...) @randnf()
  %88 = call float (...) @randnf()
  %89 = fmul float 0.000000e+00, %88
  %90 = fmul float 1.000000e+00, %88
  %91 = fadd float %87, %89
  %92 = fpext float %91 to double
  %93 = fpext float %90 to double
  %94 = fmul double %92, 0x3FE6A09E667F3BCD
  %95 = fmul double %93, 0x3FE6A09E667F3BCD
  %96 = fptrunc double %94 to float
  %97 = fptrunc double %95 to float
  %98 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %99 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float %96, ptr %98, align 4
  store float %97, ptr %99, align 4
  br label %215

100:                                              ; preds = %2
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.qsourcecf_s, ptr %101, i32 0, i32 20
  %103 = getelementptr inbounds %struct.anon.3, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !14
  %105 = call i32 @symstreamcf_write_samples(ptr noundef %104, ptr noundef %6, i32 noundef 1)
  %106 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %107 = load float, ptr %106, align 4
  %108 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  %109 = load float, ptr %108, align 4
  %110 = fpext float %107 to double
  %111 = fpext float %109 to double
  %112 = fmul double %110, 0x3FE6A09E667F3BCD
  %113 = fmul double %111, 0x3FE6A09E667F3BCD
  %114 = fptrunc double %112 to float
  %115 = fptrunc double %113 to float
  %116 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %117 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float %114, ptr %116, align 4
  store float %115, ptr %117, align 4
  br label %215

118:                                              ; preds = %2
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.qsourcecf_s, ptr %119, i32 0, i32 20
  %121 = getelementptr inbounds %struct.anon.4, ptr %120, i32 0, i32 3
  %122 = load i32, ptr %121, align 4, !tbaa !14
  %123 = icmp eq i32 %122, 0
  br i1 %123, label %124, label %140

124:                                              ; preds = %118
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.qsourcecf_s, ptr %125, i32 0, i32 20
  %127 = getelementptr inbounds %struct.anon.4, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !14
  %129 = call i32 @rand() #5
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.qsourcecf_s, ptr %130, i32 0, i32 20
  %132 = getelementptr inbounds %struct.anon.4, ptr %131, i32 0, i32 4
  %133 = load i32, ptr %132, align 8, !tbaa !14
  %134 = and i32 %129, %133
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.qsourcecf_s, ptr %135, i32 0, i32 20
  %137 = getelementptr inbounds %struct.anon.4, ptr %136, i32 0, i32 1
  %138 = load ptr, ptr %137, align 8, !tbaa !14
  %139 = call i32 @fskmod_modulate(ptr noundef %128, i32 noundef %134, ptr noundef %138)
  br label %140

140:                                              ; preds = %124, %118
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.qsourcecf_s, ptr %141, i32 0, i32 20
  %143 = getelementptr inbounds %struct.anon.4, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !14
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.qsourcecf_s, ptr %145, i32 0, i32 20
  %147 = getelementptr inbounds %struct.anon.4, ptr %146, i32 0, i32 3
  %148 = load i32, ptr %147, align 4, !tbaa !14
  %149 = add i32 %148, 1
  store i32 %149, ptr %147, align 4, !tbaa !14
  %150 = zext i32 %148 to i64
  %151 = getelementptr inbounds { float, float }, ptr %144, i64 %150
  %152 = getelementptr inbounds { float, float }, ptr %151, i32 0, i32 0
  %153 = load float, ptr %152, align 4
  %154 = getelementptr inbounds { float, float }, ptr %151, i32 0, i32 1
  %155 = load float, ptr %154, align 4
  %156 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %157 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float %153, ptr %156, align 4
  store float %155, ptr %157, align 4
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.qsourcecf_s, ptr %158, i32 0, i32 20
  %160 = getelementptr inbounds %struct.anon.4, ptr %159, i32 0, i32 2
  %161 = load i32, ptr %160, align 8, !tbaa !14
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.qsourcecf_s, ptr %162, i32 0, i32 20
  %164 = getelementptr inbounds %struct.anon.4, ptr %163, i32 0, i32 3
  %165 = load i32, ptr %164, align 4, !tbaa !14
  %166 = urem i32 %165, %161
  store i32 %166, ptr %164, align 4, !tbaa !14
  br label %215

167:                                              ; preds = %2
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.qsourcecf_s, ptr %168, i32 0, i32 20
  %170 = getelementptr inbounds %struct.anon.5, ptr %169, i32 0, i32 2
  %171 = load i32, ptr %170, align 8, !tbaa !14
  %172 = icmp eq i32 %171, 0
  br i1 %172, label %173, label %185

173:                                              ; preds = %167
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.qsourcecf_s, ptr %174, i32 0, i32 20
  %176 = getelementptr inbounds %struct.anon.5, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !14
  %178 = call i32 @rand() #5
  %179 = and i32 %178, 1
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.qsourcecf_s, ptr %180, i32 0, i32 20
  %182 = getelementptr inbounds %struct.anon.5, ptr %181, i32 0, i32 1
  %183 = getelementptr inbounds [2 x { float, float }], ptr %182, i64 0, i64 0
  %184 = call i32 @gmskmod_modulate(ptr noundef %177, i32 noundef %179, ptr noundef %183)
  br label %185

185:                                              ; preds = %173, %167
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.qsourcecf_s, ptr %186, i32 0, i32 20
  %188 = getelementptr inbounds %struct.anon.5, ptr %187, i32 0, i32 1
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.qsourcecf_s, ptr %189, i32 0, i32 20
  %191 = getelementptr inbounds %struct.anon.5, ptr %190, i32 0, i32 2
  %192 = load i32, ptr %191, align 8, !tbaa !14
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %191, align 8, !tbaa !14
  %194 = sext i32 %192 to i64
  %195 = getelementptr inbounds [2 x { float, float }], ptr %188, i64 0, i64 %194
  %196 = getelementptr inbounds { float, float }, ptr %195, i32 0, i32 0
  %197 = load float, ptr %196, align 8
  %198 = getelementptr inbounds { float, float }, ptr %195, i32 0, i32 1
  %199 = load float, ptr %198, align 4
  %200 = fpext float %197 to double
  %201 = fpext float %199 to double
  %202 = fmul double %200, 0x3FE6A09E667F3BCD
  %203 = fmul double %201, 0x3FE6A09E667F3BCD
  %204 = fptrunc double %202 to float
  %205 = fptrunc double %203 to float
  %206 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %207 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float %204, ptr %206, align 4
  store float %205, ptr %207, align 4
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.qsourcecf_s, ptr %208, i32 0, i32 20
  %210 = getelementptr inbounds %struct.anon.5, ptr %209, i32 0, i32 2
  %211 = load i32, ptr %210, align 8, !tbaa !14
  %212 = and i32 %211, 1
  store i32 %212, ptr %210, align 8, !tbaa !14
  br label %215

213:                                              ; preds = %2
  %214 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 1, ptr noundef @.str.31, i32 noundef 491, ptr noundef @.str.49, ptr noundef @.str.2)
  store i32 %214, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %240

215:                                              ; preds = %185, %140, %100, %86, %85, %22, %12
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.qsourcecf_s, ptr %216, i32 0, i32 17
  %218 = load i32, ptr %217, align 8, !tbaa !15
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %223, label %220

220:                                              ; preds = %215
  %221 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %222 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  store float 0.000000e+00, ptr %221, align 4
  store float 0.000000e+00, ptr %222, align 4
  br label %223

223:                                              ; preds = %220, %215
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.qsourcecf_s, ptr %224, i32 0, i32 9
  %226 = load ptr, ptr %225, align 8, !tbaa !16
  %227 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 0
  %228 = load float, ptr %227, align 4
  %229 = getelementptr inbounds { float, float }, ptr %6, i32 0, i32 1
  %230 = load float, ptr %229, align 4
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 0
  %233 = getelementptr inbounds { float, float }, ptr %8, i32 0, i32 1
  store float %228, ptr %232, align 4
  store float %230, ptr %233, align 4
  %234 = load <2 x float>, ptr %8, align 4
  %235 = call i32 @nco_crcf_mix_up(ptr noundef %226, <2 x float> noundef %234, ptr noundef %231)
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.qsourcecf_s, ptr %236, i32 0, i32 9
  %238 = load ptr, ptr %237, align 8, !tbaa !16
  %239 = call i32 @nco_crcf_step(ptr noundef %238)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %240

240:                                              ; preds = %223, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %241 = load i32, ptr %3, align 4
  ret i32 %241
}

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

declare i32 @nco_crcf_adjust_frequency(ptr noundef, float noundef) #1

declare i32 @nco_crcf_step(ptr noundef) #1

declare float @randnf(...) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @symstreamcf_write_samples(ptr noundef, ptr noundef, i32 noundef) #2

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

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

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

declare i32 @nco_crcf_mix_up(ptr noundef, <2 x float> noundef, 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 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 112}
!10 = !{!"qsourcecf_s", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !11, i64 28, !6, i64 32, !6, i64 40, !12, i64 48, !12, i64 52, !11, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !13, i64 104, !11, i64 112, !7, i64 120}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!10, !11, i64 96}
!16 = !{!10, !6, i64 40}


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

@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [45 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

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

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @qsourcecf_disable(ptr noundef) local_unnamed_addr #2

declare i32 @nco_crcf_set_frequency(ptr noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @qsourcecf_generate(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca { float, float }, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %4 = getelementptr inbounds i8, ptr %0, i64 112
  %5 = load i32, ptr %4, align 8, !tbaa !5
  switch i32 %5, label %105 [
    i32 1, label %6
    i32 2, label %12
    i32 3, label %13
    i32 4, label %40
    i32 5, label %50
    i32 6, label %58
    i32 7, label %83
  ]

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 120
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  %10 = load ptr, ptr %7, align 8, !tbaa !13
  %11 = call i32 %9(ptr noundef %10, ptr noundef nonnull %3, i32 noundef 1) #5
  br label %107

12:                                               ; preds = %2
  store <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %3, align 8
  br label %107

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %0, i64 120
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = call i32 @nco_crcf_cexpf(ptr noundef %15, ptr noundef nonnull %3) #5
  %17 = load ptr, ptr %14, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %0, i64 128
  %19 = load float, ptr %18, align 8, !tbaa !13
  %20 = call i32 @nco_crcf_adjust_frequency(ptr noundef %17, float noundef %19) #5
  %21 = load ptr, ptr %14, align 8, !tbaa !13
  %22 = call i32 @nco_crcf_step(ptr noundef %21) #5
  %23 = getelementptr inbounds i8, ptr %0, i64 152
  %24 = load i64, ptr %23, align 8, !tbaa !13
  %25 = add i64 %24, -1
  store i64 %25, ptr %23, align 8, !tbaa !13
  %26 = icmp eq i64 %25, 0
  br i1 %26, label %27, label %107

27:                                               ; preds = %13
  %28 = getelementptr inbounds i8, ptr %0, i64 144
  %29 = load i64, ptr %28, align 8, !tbaa !13
  store i64 %29, ptr %23, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %0, i64 136
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %.not = icmp eq i32 %31, 0
  br i1 %.not, label %34, label %32

32:                                               ; preds = %27
  %33 = call i32 @qsourcecf_disable(ptr noundef nonnull %0)
  br label %34

34:                                               ; preds = %32, %27
  %35 = load ptr, ptr %14, align 8, !tbaa !13
  %36 = getelementptr inbounds i8, ptr %0, i64 132
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %.not35 = icmp eq i32 %37, 0
  %38 = select i1 %.not35, float 0xC00921FB60000000, float 0x400921FB60000000
  %39 = call i32 @nco_crcf_set_frequency(ptr noundef %35, float noundef %38) #5
  br label %107

40:                                               ; preds = %2
  %41 = tail call float (...) @randnf() #5
  %42 = tail call float (...) @randnf() #5
  %43 = fmul float %42, 0.000000e+00
  %44 = fadd float %41, %43
  %45 = insertelement <2 x float> poison, float %44, i64 0
  %46 = insertelement <2 x float> %45, float %42, i64 1
  %47 = fpext <2 x float> %46 to <2 x double>
  %48 = fmul <2 x double> %47, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %49 = fptrunc <2 x double> %48 to <2 x float>
  store <2 x float> %49, ptr %3, align 8
  br label %107

50:                                               ; preds = %2
  %51 = getelementptr inbounds i8, ptr %0, i64 120
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  %53 = call i32 @symstreamcf_write_samples(ptr noundef %52, ptr noundef nonnull %3, i32 noundef 1)
  %54 = load <2 x float>, ptr %3, align 8
  %55 = fpext <2 x float> %54 to <2 x double>
  %56 = fmul <2 x double> %55, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %57 = fptrunc <2 x double> %56 to <2 x float>
  store <2 x float> %57, ptr %3, align 8
  br label %107

58:                                               ; preds = %2
  %59 = getelementptr inbounds i8, ptr %0, i64 140
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %72

62:                                               ; preds = %58
  %63 = getelementptr inbounds i8, ptr %0, i64 120
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = tail call i32 @rand() #5
  %66 = getelementptr inbounds i8, ptr %0, i64 144
  %67 = load i32, ptr %66, align 8, !tbaa !13
  %68 = and i32 %67, %65
  %69 = getelementptr inbounds i8, ptr %0, i64 128
  %70 = load ptr, ptr %69, align 8, !tbaa !13
  %71 = tail call i32 @fskmod_modulate(ptr noundef %64, i32 noundef %68, ptr noundef %70) #5
  %.pre37 = load i32, ptr %59, align 4, !tbaa !13
  br label %72

72:                                               ; preds = %62, %58
  %73 = phi i32 [ %.pre37, %62 ], [ %60, %58 ]
  %74 = getelementptr inbounds i8, ptr %0, i64 128
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = add i32 %73, 1
  store i32 %76, ptr %59, align 4, !tbaa !13
  %77 = zext i32 %73 to i64
  %78 = getelementptr inbounds { float, float }, ptr %75, i64 %77
  %79 = load <2 x float>, ptr %78, align 4
  store <2 x float> %79, ptr %3, align 8
  %80 = getelementptr inbounds i8, ptr %0, i64 136
  %81 = load i32, ptr %80, align 8, !tbaa !13
  %82 = urem i32 %76, %81
  store i32 %82, ptr %59, align 4, !tbaa !13
  br label %107

83:                                               ; preds = %2
  %84 = getelementptr inbounds i8, ptr %0, i64 144
  %85 = load i32, ptr %84, align 8, !tbaa !13
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %94

87:                                               ; preds = %83
  %88 = getelementptr inbounds i8, ptr %0, i64 120
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = tail call i32 @rand() #5
  %91 = and i32 %90, 1
  %92 = getelementptr inbounds i8, ptr %0, i64 128
  %93 = tail call i32 @gmskmod_modulate(ptr noundef %89, i32 noundef %91, ptr noundef nonnull %92) #5
  %.pre = load i32, ptr %84, align 8, !tbaa !13
  br label %94

94:                                               ; preds = %87, %83
  %95 = phi i32 [ %.pre, %87 ], [ %85, %83 ]
  %96 = getelementptr inbounds i8, ptr %0, i64 128
  %97 = add nsw i32 %95, 1
  store i32 %97, ptr %84, align 8, !tbaa !13
  %98 = sext i32 %95 to i64
  %99 = getelementptr inbounds [2 x { float, float }], ptr %96, i64 0, i64 %98
  %100 = load <2 x float>, ptr %99, align 8
  %101 = fpext <2 x float> %100 to <2 x double>
  %102 = fmul <2 x double> %101, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %103 = fptrunc <2 x double> %102 to <2 x float>
  store <2 x float> %103, ptr %3, align 8
  %104 = and i32 %97, 1
  store i32 %104, ptr %84, align 8, !tbaa !13
  br label %107

105:                                              ; preds = %2
  %106 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 1, ptr noundef nonnull @.str.31, i32 noundef 491, ptr noundef nonnull @.str.49, ptr noundef nonnull @.str.2) #5
  br label %119

107:                                              ; preds = %13, %34, %94, %72, %50, %40, %12, %6
  %108 = getelementptr inbounds i8, ptr %0, i64 96
  %109 = load i32, ptr %108, align 8, !tbaa !14
  %.not36 = icmp eq i32 %109, 0
  br i1 %.not36, label %111, label %._crit_edge

._crit_edge:                                      ; preds = %107
  %110 = load <2 x float>, ptr %3, align 8
  br label %112

111:                                              ; preds = %107
  store <2 x float> zeroinitializer, ptr %3, align 8
  br label %112

112:                                              ; preds = %._crit_edge, %111
  %113 = phi <2 x float> [ %110, %._crit_edge ], [ zeroinitializer, %111 ]
  %114 = getelementptr inbounds i8, ptr %0, i64 40
  %115 = load ptr, ptr %114, align 8, !tbaa !15
  %116 = call i32 @nco_crcf_mix_up(ptr noundef %115, <2 x float> noundef %113, ptr noundef %1) #5
  %117 = load ptr, ptr %114, align 8, !tbaa !15
  %118 = call i32 @nco_crcf_step(ptr noundef %117) #5
  br label %119

119:                                              ; preds = %112, %105
  %.0 = phi i32 [ %106, %105 ], [ 0, %112 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 %.0
}

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

declare i32 @nco_crcf_adjust_frequency(ptr noundef, float noundef) local_unnamed_addr #1

declare i32 @nco_crcf_step(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @symstreamcf_write_samples(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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

declare i32 @nco_crcf_mix_up(ptr noundef, <2 x float> noundef, 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 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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, !7, i64 112}
!6 = !{!"qsourcecf_s", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28, !11, i64 32, !11, i64 40, !10, i64 48, !10, i64 52, !7, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !7, i64 96, !12, i64 104, !7, i64 112, !8, i64 120}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!6, !7, i64 96}
!15 = !{!6, !11, i64 40}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass