; LLVM IR from jgaeddert/liquid-dsp :: src/nco/tests (nco_crcf_pll_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"

@__const.autotest_nco_crcf_pll_freq.bw = external hidden unnamed_addr constant [4 x float], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @nco_crcf_pll_test(i32 noundef, float noundef, float noundef, float noundef, i32 noundef, float noundef) #0

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local void @autotest_nco_crcf_pll_freq() #3 {
  %1 = alloca [4 x float], align 16
  %2 = alloca float, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %1) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %1, ptr align 16 @__const.autotest_nco_crcf_pll_freq.bw, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store float 0x3F847AE140000000, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %5

5:                                                ; preds = %63, %0
  %6 = load i32, ptr %3, align 4, !tbaa !9
  %7 = icmp ult i32 %6, 4
  br i1 %7, label %8, label %66

8:                                                ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %9 = load i32, ptr %3, align 4, !tbaa !9
  %10 = zext i32 %9 to i64
  %11 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %10
  %12 = load float, ptr %11, align 4, !tbaa !5
  %13 = fdiv float 3.200000e+01, %12
  %14 = fptoui float %13 to i32
  store i32 %14, ptr %4, align 4, !tbaa !9
  %15 = load i32, ptr %3, align 4, !tbaa !9
  %16 = zext i32 %15 to i64
  %17 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %16
  %18 = load float, ptr %17, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !9
  %20 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFE99999A0000000, float noundef %18, i32 noundef %19, float noundef %20)
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %22
  %24 = load float, ptr %23, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFD99999A0000000, float noundef %24, i32 noundef %25, float noundef %26)
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %28
  %30 = load float, ptr %29, align 4, !tbaa !5
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFC99999A0000000, float noundef %30, i32 noundef %31, float noundef %32)
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %34
  %36 = load float, ptr %35, align 4, !tbaa !5
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFB99999A0000000, float noundef %36, i32 noundef %37, float noundef %38)
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %40
  %42 = load float, ptr %41, align 4, !tbaa !5
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef %42, i32 noundef %43, float noundef %44)
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %46
  %48 = load float, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %4, align 4, !tbaa !9
  %50 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FC99999A0000000, float noundef %48, i32 noundef %49, float noundef %50)
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %52
  %54 = load float, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FD99999A0000000, float noundef %54, i32 noundef %55, float noundef %56)
  %57 = load i32, ptr %3, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds [4 x float], ptr %1, i64 0, i64 %58
  %60 = load float, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !9
  %62 = load float, ptr %2, align 4, !tbaa !5
  call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FE99999A0000000, float noundef %60, i32 noundef %61, float noundef %62)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %63

63:                                               ; preds = %8
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = add i32 %64, 1
  store i32 %65, ptr %3, align 4, !tbaa !9
  br label %5, !llvm.loop !11

66:                                               ; preds = %5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %1) #4
  ret void
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

@__const.autotest_nco_crcf_pll_freq.bw = external hidden unnamed_addr constant [4 x float], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @nco_crcf_pll_test(i32 noundef, float noundef, float noundef, float noundef, i32 noundef, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @autotest_nco_crcf_pll_freq() local_unnamed_addr #1 {
  %1 = load float, ptr @__const.autotest_nco_crcf_pll_freq.bw, align 16, !tbaa !5
  %2 = fdiv float 3.200000e+01, %1
  %3 = fptoui float %2 to i32
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFE99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFD99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFC99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFB99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FC99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FD99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FE99999A0000000, float noundef %1, i32 noundef %3, float noundef 0x3F847AE140000000)
  %4 = load float, ptr getelementptr inbounds (i8, ptr @__const.autotest_nco_crcf_pll_freq.bw, i64 4), align 4, !tbaa !5
  %5 = fdiv float 3.200000e+01, %4
  %6 = fptoui float %5 to i32
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFE99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFD99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFC99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFB99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FC99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FD99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FE99999A0000000, float noundef %4, i32 noundef %6, float noundef 0x3F847AE140000000)
  %7 = load float, ptr getelementptr inbounds (i8, ptr @__const.autotest_nco_crcf_pll_freq.bw, i64 8), align 8, !tbaa !5
  %8 = fdiv float 3.200000e+01, %7
  %9 = fptoui float %8 to i32
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFE99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFD99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFC99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFB99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FC99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FD99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FE99999A0000000, float noundef %7, i32 noundef %9, float noundef 0x3F847AE140000000)
  %10 = load float, ptr getelementptr inbounds (i8, ptr @__const.autotest_nco_crcf_pll_freq.bw, i64 12), align 4, !tbaa !5
  %11 = fdiv float 3.200000e+01, %10
  %12 = fptoui float %11 to i32
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFE99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFD99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFC99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0xBFB99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FB99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FC99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FD99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  tail call void @nco_crcf_pll_test(i32 noundef 0, float noundef 0.000000e+00, float noundef 0x3FE99999A0000000, float noundef %10, i32 noundef %12, float noundef 0x3F847AE140000000)
  ret void
}

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 = { 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" }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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