; LLVM IR from jgaeddert/liquid-dsp :: src/filter/tests (iirdes_autotest)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.autotest_psd_s = type { float, float, float, float, i32, i32 }

@liquid_autotest_verbose = external global i32, align 4
@.str.11 = external hidden unnamed_addr constant [38 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 ptr @iirfilt_rrrf_create_prototype(i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef, float noundef, float noundef) #1

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

declare i32 @iirfilt_rrrf_destroy(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_iirdes_ellip_bandstop() #2 {
  %1 = alloca i32, align 4
  %2 = alloca float, align 4
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca [5 x %struct.autotest_psd_s], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 9, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store float 0x3FD3333340000000, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store float 0x3FD6666660000000, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store float 0x3FB99999A0000000, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store float 6.000000e+01, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store float 0x3F50624DE0000000, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 2400, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = load float, ptr %2, align 4, !tbaa !9
  %12 = load float, ptr %3, align 4, !tbaa !9
  %13 = load float, ptr %4, align 4, !tbaa !9
  %14 = load float, ptr %5, align 4, !tbaa !9
  %15 = call ptr @iirfilt_rrrf_create_prototype(i32 noundef 3, i32 noundef 3, i32 noundef 0, i32 noundef %10, float noundef %11, float noundef %12, float noundef %13, float noundef %14)
  store ptr %15, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 120, ptr %9) #3
  %16 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 0
  store float -5.000000e-01, ptr %16, align 8, !tbaa !13
  %17 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 1
  store float 0xBFD90624E0000000, ptr %17, align 4, !tbaa !15
  %18 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 2
  %19 = load float, ptr %4, align 4, !tbaa !9
  %20 = fneg float %19
  %21 = load float, ptr %6, align 4, !tbaa !9
  %22 = fsub float %20, %21
  store float %22, ptr %18, align 8, !tbaa !16
  %23 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 3
  %24 = load float, ptr %6, align 4, !tbaa !9
  store float %24, ptr %23, align 4, !tbaa !17
  %25 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 4
  store i32 1, ptr %25, align 8, !tbaa !18
  %26 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 5
  store i32 1, ptr %26, align 4, !tbaa !19
  %27 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i64 1
  %28 = getelementptr inbounds %struct.autotest_psd_s, ptr %27, i32 0, i32 0
  store float 0xBFD8C49BA0000000, ptr %28, align 8, !tbaa !13
  %29 = getelementptr inbounds %struct.autotest_psd_s, ptr %27, i32 0, i32 1
  store float 0xBFD3958100000000, ptr %29, align 4, !tbaa !15
  %30 = getelementptr inbounds %struct.autotest_psd_s, ptr %27, i32 0, i32 2
  store float 0.000000e+00, ptr %30, align 8, !tbaa !16
  %31 = getelementptr inbounds %struct.autotest_psd_s, ptr %27, i32 0, i32 3
  %32 = load float, ptr %5, align 4, !tbaa !9
  %33 = fneg float %32
  %34 = load float, ptr %6, align 4, !tbaa !9
  %35 = fadd float %33, %34
  store float %35, ptr %31, align 4, !tbaa !17
  %36 = getelementptr inbounds %struct.autotest_psd_s, ptr %27, i32 0, i32 4
  store i32 0, ptr %36, align 8, !tbaa !18
  %37 = getelementptr inbounds %struct.autotest_psd_s, ptr %27, i32 0, i32 5
  store i32 1, ptr %37, align 4, !tbaa !19
  %38 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i64 2
  %39 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 0
  store float 0xBFD3126EA0000000, ptr %39, align 8, !tbaa !13
  %40 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 1
  store float 0x3FD3126EA0000000, ptr %40, align 4, !tbaa !15
  %41 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 2
  %42 = load float, ptr %4, align 4, !tbaa !9
  %43 = fneg float %42
  %44 = load float, ptr %6, align 4, !tbaa !9
  %45 = fsub float %43, %44
  store float %45, ptr %41, align 8, !tbaa !16
  %46 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 3
  %47 = load float, ptr %6, align 4, !tbaa !9
  store float %47, ptr %46, align 4, !tbaa !17
  %48 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 4
  store i32 1, ptr %48, align 8, !tbaa !18
  %49 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 5
  store i32 1, ptr %49, align 4, !tbaa !19
  %50 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i64 3
  %51 = getelementptr inbounds %struct.autotest_psd_s, ptr %50, i32 0, i32 0
  store float 0x3FD3958100000000, ptr %51, align 8, !tbaa !13
  %52 = getelementptr inbounds %struct.autotest_psd_s, ptr %50, i32 0, i32 1
  store float 0x3FD8C49BA0000000, ptr %52, align 4, !tbaa !15
  %53 = getelementptr inbounds %struct.autotest_psd_s, ptr %50, i32 0, i32 2
  store float 0.000000e+00, ptr %53, align 8, !tbaa !16
  %54 = getelementptr inbounds %struct.autotest_psd_s, ptr %50, i32 0, i32 3
  %55 = load float, ptr %5, align 4, !tbaa !9
  %56 = fneg float %55
  %57 = load float, ptr %6, align 4, !tbaa !9
  %58 = fadd float %56, %57
  store float %58, ptr %54, align 4, !tbaa !17
  %59 = getelementptr inbounds %struct.autotest_psd_s, ptr %50, i32 0, i32 4
  store i32 0, ptr %59, align 8, !tbaa !18
  %60 = getelementptr inbounds %struct.autotest_psd_s, ptr %50, i32 0, i32 5
  store i32 1, ptr %60, align 4, !tbaa !19
  %61 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i64 4
  %62 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 0
  store float 0x3FD90624E0000000, ptr %62, align 8, !tbaa !13
  %63 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 1
  store float 5.000000e-01, ptr %63, align 4, !tbaa !15
  %64 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 2
  %65 = load float, ptr %4, align 4, !tbaa !9
  %66 = fneg float %65
  %67 = load float, ptr %6, align 4, !tbaa !9
  %68 = fsub float %66, %67
  store float %68, ptr %64, align 8, !tbaa !16
  %69 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 3
  %70 = load float, ptr %6, align 4, !tbaa !9
  store float %70, ptr %69, align 4, !tbaa !17
  %71 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 4
  store i32 1, ptr %71, align 8, !tbaa !18
  %72 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 5
  store i32 1, ptr %72, align 4, !tbaa !19
  %73 = load ptr, ptr %8, align 8, !tbaa !11
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = getelementptr inbounds [5 x %struct.autotest_psd_s], ptr %9, i64 0, i64 0
  %76 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %77 = icmp ne i32 %76, 0
  %78 = zext i1 %77 to i64
  %79 = select i1 %77, ptr @.str.11, ptr null
  %80 = call i32 @liquid_autotest_validate_psd_iirfilt_rrrf(ptr noundef %73, i32 noundef %74, ptr noundef %75, i32 noundef 5, ptr noundef %79)
  %81 = load ptr, ptr %8, align 8, !tbaa !11
  %82 = call i32 @iirfilt_rrrf_destroy(ptr noundef %81)
  call void @llvm.lifetime.end.p0(i64 120, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

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 }

!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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 20}
!15 = !{!14, !10, i64 4}
!16 = !{!14, !10, i64 8}
!17 = !{!14, !10, i64 12}
!18 = !{!14, !6, i64 16}
!19 = !{!14, !6, i64 20}


; 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.autotest_psd_s = type { float, float, float, float, i32, i32 }

@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str.11 = external hidden unnamed_addr constant [38 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 ptr @iirfilt_rrrf_create_prototype(i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

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

declare i32 @iirfilt_rrrf_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_iirdes_ellip_bandstop() local_unnamed_addr #2 {
  %1 = alloca [5 x %struct.autotest_psd_s], align 16
  %2 = tail call ptr @iirfilt_rrrf_create_prototype(i32 noundef 3, i32 noundef 3, i32 noundef 0, i32 noundef 9, float noundef 0x3FD3333340000000, float noundef 0x3FD6666660000000, float noundef 0x3FB99999A0000000, float noundef 6.000000e+01) #3
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %1) #3
  store <4 x float> <float -5.000000e-01, float 0xBFD90624E0000000, float 0xBFB9DB22E0000000, float 0x3F50624DE0000000>, ptr %1, align 16, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 1, ptr %3, align 16, !tbaa !9
  %4 = getelementptr inbounds i8, ptr %1, i64 20
  store i32 1, ptr %4, align 4, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %1, i64 24
  store <4 x float> <float 0xBFD8C49BA0000000, float 0xBFD3958100000000, float 0.000000e+00, float 0xC04DFFDF40000000>, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  store i32 0, ptr %6, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %1, i64 44
  store i32 1, ptr %7, align 4, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %1, i64 48
  store <4 x float> <float 0xBFD3126EA0000000, float 0x3FD3126EA0000000, float 0xBFB9DB22E0000000, float 0x3F50624DE0000000>, ptr %8, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 64
  store i32 1, ptr %9, align 16, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %1, i64 68
  store i32 1, ptr %10, align 4, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %1, i64 72
  store <4 x float> <float 0x3FD3958100000000, float 0x3FD8C49BA0000000, float 0.000000e+00, float 0xC04DFFDF40000000>, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 88
  store i32 0, ptr %12, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %1, i64 92
  store i32 1, ptr %13, align 4, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %1, i64 96
  store <4 x float> <float 0x3FD90624E0000000, float 5.000000e-01, float 0xBFB9DB22E0000000, float 0x3F50624DE0000000>, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 1, ptr %15, align 16, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %1, i64 116
  store i32 1, ptr %16, align 4, !tbaa !12
  %17 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !13
  %.not = icmp eq i32 %17, 0
  %18 = select i1 %.not, ptr null, ptr @.str.11
  %19 = call i32 @liquid_autotest_validate_psd_iirfilt_rrrf(ptr noundef %2, i32 noundef 2400, ptr noundef nonnull %1, i32 noundef 5, ptr noundef %18) #3
  %20 = call i32 @iirfilt_rrrf_destroy(ptr noundef %2) #3
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %1) #3
  ret void
}

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 }

!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, !11, i64 16}
!10 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !11, i64 16, !11, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 20}
!13 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass