; 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.10 = 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_bandpass() #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 2, 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 0xBFD9581060000000, ptr %17, align 4, !tbaa !15
  %18 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 2
  store float 0.000000e+00, ptr %18, align 8, !tbaa !16
  %19 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 3
  %20 = load float, ptr %5, align 4, !tbaa !9
  %21 = fneg float %20
  %22 = load float, ptr %6, align 4, !tbaa !9
  %23 = fadd float %21, %22
  store float %23, ptr %19, align 4, !tbaa !17
  %24 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 4
  store i32 0, ptr %24, align 8, !tbaa !18
  %25 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i32 0, i32 5
  store i32 1, ptr %25, align 4, !tbaa !19
  %26 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i64 1
  %27 = getelementptr inbounds %struct.autotest_psd_s, ptr %26, i32 0, i32 0
  store float 0xBFD8D4FE00000000, ptr %27, align 8, !tbaa !13
  %28 = getelementptr inbounds %struct.autotest_psd_s, ptr %26, i32 0, i32 1
  store float 0xBFD3439580000000, ptr %28, align 4, !tbaa !15
  %29 = getelementptr inbounds %struct.autotest_psd_s, ptr %26, i32 0, i32 2
  %30 = load float, ptr %4, align 4, !tbaa !9
  %31 = fneg float %30
  %32 = load float, ptr %6, align 4, !tbaa !9
  %33 = fsub float %31, %32
  store float %33, ptr %29, align 8, !tbaa !16
  %34 = getelementptr inbounds %struct.autotest_psd_s, ptr %26, i32 0, i32 3
  %35 = load float, ptr %6, align 4, !tbaa !9
  store float %35, ptr %34, align 4, !tbaa !17
  %36 = getelementptr inbounds %struct.autotest_psd_s, ptr %26, i32 0, i32 4
  store i32 1, ptr %36, align 8, !tbaa !18
  %37 = getelementptr inbounds %struct.autotest_psd_s, ptr %26, 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 0xBFD2C08320000000, ptr %39, align 8, !tbaa !13
  %40 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 1
  store float 0x3FD2C08320000000, ptr %40, align 4, !tbaa !15
  %41 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 2
  store float 0.000000e+00, ptr %41, align 8, !tbaa !16
  %42 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 3
  %43 = load float, ptr %5, align 4, !tbaa !9
  %44 = fneg float %43
  %45 = load float, ptr %6, align 4, !tbaa !9
  %46 = fadd float %44, %45
  store float %46, ptr %42, align 4, !tbaa !17
  %47 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 4
  store i32 0, ptr %47, align 8, !tbaa !18
  %48 = getelementptr inbounds %struct.autotest_psd_s, ptr %38, i32 0, i32 5
  store i32 1, ptr %48, align 4, !tbaa !19
  %49 = getelementptr inbounds %struct.autotest_psd_s, ptr %9, i64 3
  %50 = getelementptr inbounds %struct.autotest_psd_s, ptr %49, i32 0, i32 0
  store float 0x3FD3439580000000, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds %struct.autotest_psd_s, ptr %49, i32 0, i32 1
  store float 0x3FD8D4FE00000000, ptr %51, align 4, !tbaa !15
  %52 = getelementptr inbounds %struct.autotest_psd_s, ptr %49, i32 0, i32 2
  %53 = load float, ptr %4, align 4, !tbaa !9
  %54 = fneg float %53
  %55 = load float, ptr %6, align 4, !tbaa !9
  %56 = fsub float %54, %55
  store float %56, ptr %52, align 8, !tbaa !16
  %57 = getelementptr inbounds %struct.autotest_psd_s, ptr %49, i32 0, i32 3
  %58 = load float, ptr %6, align 4, !tbaa !9
  store float %58, ptr %57, align 4, !tbaa !17
  %59 = getelementptr inbounds %struct.autotest_psd_s, ptr %49, i32 0, i32 4
  store i32 1, ptr %59, align 8, !tbaa !18
  %60 = getelementptr inbounds %struct.autotest_psd_s, ptr %49, 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 0x3FD9581060000000, 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
  store float 0.000000e+00, ptr %64, align 8, !tbaa !16
  %65 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 3
  %66 = load float, ptr %5, align 4, !tbaa !9
  %67 = fneg float %66
  %68 = load float, ptr %6, align 4, !tbaa !9
  %69 = fadd float %67, %68
  store float %69, ptr %65, align 4, !tbaa !17
  %70 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 4
  store i32 0, ptr %70, align 8, !tbaa !18
  %71 = getelementptr inbounds %struct.autotest_psd_s, ptr %61, i32 0, i32 5
  store i32 1, ptr %71, align 4, !tbaa !19
  %72 = load ptr, ptr %8, align 8, !tbaa !11
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = getelementptr inbounds [5 x %struct.autotest_psd_s], ptr %9, i64 0, i64 0
  %75 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %76 = icmp ne i32 %75, 0
  %77 = zext i1 %76 to i64
  %78 = select i1 %76, ptr @.str.10, ptr null
  %79 = call i32 @liquid_autotest_validate_psd_iirfilt_rrrf(ptr noundef %72, i32 noundef %73, ptr noundef %74, i32 noundef 5, ptr noundef %78)
  %80 = load ptr, ptr %8, align 8, !tbaa !11
  %81 = call i32 @iirfilt_rrrf_destroy(ptr noundef %80)
  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.10 = 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_bandpass() 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 2, 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 0xBFD9581060000000, float 0.000000e+00, float 0xC04DFFDF40000000>, ptr %1, align 16, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %1, i64 16
  store i32 0, 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 0xBFD8D4FE00000000, float 0xBFD3439580000000, float 0xBFB9DB22E0000000, float 0x3F50624DE0000000>, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  store i32 1, 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 0xBFD2C08320000000, float 0x3FD2C08320000000, float 0.000000e+00, float 0xC04DFFDF40000000>, ptr %8, align 16, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 64
  store i32 0, 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 0x3FD3439580000000, float 0x3FD8D4FE00000000, float 0xBFB9DB22E0000000, float 0x3F50624DE0000000>, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 88
  store i32 1, 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 0x3FD9581060000000, float 5.000000e-01, float 0.000000e+00, float 0xC04DFFDF40000000>, ptr %14, align 16, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  store i32 0, 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.10
  %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