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

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

@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [43 x i8], align 1

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr 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: nounwind uwtable
declare dso_local ptr @qdetector_cccf_create(ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @qdetector_cccf_copy(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %9

7:                                                ; preds = %1
  %8 = call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef @.str.11, i32 noundef 277, ptr noundef @.str.25, ptr noundef @.str.2)
  store ptr %8, ptr %2, align 8
  br label %107

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %10, i32 0, i32 1
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !13
  %16 = call ptr @qdetector_cccf_create(ptr noundef %12, i32 noundef %15)
  store ptr %16, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %17, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %20, i32 0, i32 4
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %23, i32 0, i32 8
  %25 = load i32, ptr %24, align 8, !tbaa !15
  %26 = zext i32 %25 to i64
  %27 = mul i64 %26, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %19, ptr align 4 %22, i64 %27, i1 false)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %28, i32 0, i32 5
  %30 = load ptr, ptr %29, align 8, !tbaa !16
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %31, i32 0, i32 5
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %34, i32 0, i32 8
  %36 = load i32, ptr %35, align 8, !tbaa !15
  %37 = zext i32 %36 to i64
  %38 = mul i64 %37, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %30, ptr align 4 %33, i64 %38, i1 false)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %39, i32 0, i32 7
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %42, i32 0, i32 7
  %44 = load ptr, ptr %43, align 8, !tbaa !17
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %45, i32 0, i32 8
  %47 = load i32, ptr %46, align 8, !tbaa !15
  %48 = zext i32 %47 to i64
  %49 = mul i64 %48, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %41, ptr align 4 %44, i64 %49, i1 false)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %53, i32 0, i32 6
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %56, i32 0, i32 8
  %58 = load i32, ptr %57, align 8, !tbaa !15
  %59 = zext i32 %58 to i64
  %60 = mul i64 %59, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 4 %52, ptr align 4 %55, i64 %60, i1 false)
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %61, i32 0, i32 11
  %63 = load i32, ptr %62, align 8, !tbaa !19
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %64, i32 0, i32 11
  store i32 %63, ptr %65, align 8, !tbaa !19
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %66, i32 0, i32 12
  %68 = load float, ptr %67, align 4, !tbaa !20
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %69, i32 0, i32 12
  store float %68, ptr %70, align 4, !tbaa !20
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %71, i32 0, i32 13
  %73 = load float, ptr %72, align 8, !tbaa !21
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %74, i32 0, i32 13
  store float %73, ptr %75, align 8, !tbaa !21
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %76, i32 0, i32 14
  %78 = load i32, ptr %77, align 4, !tbaa !22
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %79, i32 0, i32 14
  store i32 %78, ptr %80, align 4, !tbaa !22
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %81, i32 0, i32 15
  %83 = load i32, ptr %82, align 8, !tbaa !23
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %84, i32 0, i32 15
  store i32 %83, ptr %85, align 8, !tbaa !23
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %86, i32 0, i32 16
  %88 = load float, ptr %87, align 4, !tbaa !24
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %89, i32 0, i32 16
  store float %88, ptr %90, align 4, !tbaa !24
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %91, i32 0, i32 17
  %93 = load float, ptr %92, align 8, !tbaa !25
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %94, i32 0, i32 17
  store float %93, ptr %95, align 8, !tbaa !25
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %96, i32 0, i32 24
  %98 = load i32, ptr %97, align 4, !tbaa !26
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %99, i32 0, i32 24
  store i32 %98, ptr %100, align 4, !tbaa !26
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %101, i32 0, i32 25
  %103 = load i32, ptr %102, align 8, !tbaa !27
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.qdetector_cccf_s, ptr %104, i32 0, i32 25
  store i32 %103, ptr %105, align 8, !tbaa !27
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %106, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %107

107:                                              ; preds = %9, %7
  %108 = load ptr, ptr %2, align 8
  ret ptr %108
}

attributes #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"qdetector_cccf_s", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !6, i64 80, !11, i64 88, !12, i64 92, !12, i64 96, !11, i64 100, !11, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !11, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !11, i64 140, !11, i64 144}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!10, !6, i64 32}
!15 = !{!10, !11, i64 64}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 56}
!18 = !{!10, !6, i64 48}
!19 = !{!10, !11, i64 88}
!20 = !{!10, !12, i64 92}
!21 = !{!10, !12, i64 96}
!22 = !{!10, !11, i64 100}
!23 = !{!10, !11, i64 104}
!24 = !{!10, !12, i64 108}
!25 = !{!10, !12, i64 112}
!26 = !{!10, !11, i64 140}
!27 = !{!10, !11, i64 144}


; 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 [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [43 x i8], align 1

declare ptr @liquid_error_config_fl(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @qdetector_cccf_copy(ptr noundef readonly %0) local_unnamed_addr #1 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %3, label %5

3:                                                ; preds = %1
  %4 = tail call ptr (ptr, i32, ptr, ...) @liquid_error_config_fl(ptr noundef nonnull @.str.11, i32 noundef 277, ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.2) #3
  br label %54

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = load i32, ptr %0, align 8, !tbaa !12
  %9 = tail call ptr @qdetector_cccf_create(ptr noundef %7, i32 noundef %8)
  %10 = getelementptr inbounds i8, ptr %9, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  %15 = load i32, ptr %14, align 8, !tbaa !14
  %16 = zext i32 %15 to i64
  %17 = shl nuw nsw i64 %16, 3
  tail call void @llvm.memmove.p0.p0.i64(ptr align 4 %11, ptr align 4 %13, i64 %17, i1 false)
  %18 = getelementptr inbounds i8, ptr %9, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = load i32, ptr %14, align 8, !tbaa !14
  %23 = zext i32 %22 to i64
  %24 = shl nuw nsw i64 %23, 3
  tail call void @llvm.memmove.p0.p0.i64(ptr align 4 %19, ptr align 4 %21, i64 %24, i1 false)
  %25 = getelementptr inbounds i8, ptr %9, i64 56
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = load i32, ptr %14, align 8, !tbaa !14
  %30 = zext i32 %29 to i64
  %31 = shl nuw nsw i64 %30, 3
  tail call void @llvm.memmove.p0.p0.i64(ptr align 4 %26, ptr align 4 %28, i64 %31, i1 false)
  %32 = getelementptr inbounds i8, ptr %9, i64 48
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %0, i64 48
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = load i32, ptr %14, align 8, !tbaa !14
  %37 = zext i32 %36 to i64
  %38 = shl nuw nsw i64 %37, 3
  tail call void @llvm.memmove.p0.p0.i64(ptr align 4 %33, ptr align 4 %35, i64 %38, i1 false)
  %39 = getelementptr inbounds i8, ptr %0, i64 88
  %40 = load i32, ptr %39, align 8, !tbaa !18
  %41 = getelementptr inbounds i8, ptr %9, i64 88
  store i32 %40, ptr %41, align 8, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %0, i64 92
  %43 = getelementptr inbounds i8, ptr %9, i64 92
  %44 = load <2 x float>, ptr %42, align 4, !tbaa !19
  store <2 x float> %44, ptr %43, align 4, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %0, i64 100
  %46 = getelementptr inbounds i8, ptr %9, i64 100
  %47 = load <2 x i32>, ptr %45, align 4, !tbaa !20
  store <2 x i32> %47, ptr %46, align 4, !tbaa !20
  %48 = getelementptr inbounds i8, ptr %0, i64 108
  %49 = getelementptr inbounds i8, ptr %9, i64 108
  %50 = load <2 x float>, ptr %48, align 4, !tbaa !19
  store <2 x float> %50, ptr %49, align 4, !tbaa !19
  %51 = getelementptr inbounds i8, ptr %0, i64 140
  %52 = getelementptr inbounds i8, ptr %9, i64 140
  %53 = load <2 x i32>, ptr %51, align 4, !tbaa !20
  store <2 x i32> %53, ptr %52, align 4, !tbaa !20
  br label %54

54:                                               ; preds = %5, %3
  %.0 = phi ptr [ %4, %3 ], [ %9, %5 ]
  ret ptr %.0
}

attributes #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 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 8}
!6 = !{!"qdetector_cccf_s", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !11, i64 92, !11, i64 96, !7, i64 100, !7, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !7, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !7, i64 140, !7, i64 144}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !10, i64 32}
!14 = !{!6, !7, i64 64}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 56}
!17 = !{!6, !10, i64 48}
!18 = !{!6, !7, i64 88}
!19 = !{!11, !11, i64 0}
!20 = !{!7, !7, i64 0}


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