; LLVM IR from Ryuk17/SpeechAlgorithms :: WebRTC_AEC/src (echo_cancellation)

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

; 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 @WebRtc_MoveReadPtr(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @WebRtcAec_BufferFarend(ptr noundef %0, ptr noundef %1, i16 noundef signext %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i16, align 2
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [400 x i16], align 16
  %12 = alloca ptr, align 8
  %13 = alloca [400 x float], align 16
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i16 %2, ptr %7, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %18, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %19 = load i16, ptr %7, align 2, !tbaa !9
  %20 = sext i16 %19 to i32
  store i32 %20, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 800, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %21, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1600, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %22 = getelementptr inbounds [400 x float], ptr %13, i64 0, i64 0
  store ptr %22, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  store i32 0, ptr %16, align 4, !tbaa !11
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %28

25:                                               ; preds = %3
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.aecpc_t, ptr %26, i32 0, i32 26
  store i32 12003, ptr %27, align 8, !tbaa !13
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %131

28:                                               ; preds = %3
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.aecpc_t, ptr %29, i32 0, i32 9
  %31 = load i16, ptr %30, align 4, !tbaa !16
  %32 = sext i16 %31 to i32
  %33 = icmp ne i32 %32, 42
  br i1 %33, label %34, label %37

34:                                               ; preds = %28
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.aecpc_t, ptr %35, i32 0, i32 26
  store i32 12002, ptr %36, align 8, !tbaa !13
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %131

37:                                               ; preds = %28
  %38 = load i16, ptr %7, align 2, !tbaa !9
  %39 = sext i16 %38 to i32
  %40 = icmp ne i32 %39, 80
  br i1 %40, label %41, label %48

41:                                               ; preds = %37
  %42 = load i16, ptr %7, align 2, !tbaa !9
  %43 = sext i16 %42 to i32
  %44 = icmp ne i32 %43, 160
  br i1 %44, label %45, label %48

45:                                               ; preds = %41
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.aecpc_t, ptr %46, i32 0, i32 26
  store i32 12004, ptr %47, align 8, !tbaa !13
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %131

48:                                               ; preds = %41, %37
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.aecpc_t, ptr %49, i32 0, i32 24
  %51 = load float, ptr %50, align 4, !tbaa !17
  store float %51, ptr %15, align 4, !tbaa !18
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.aecpc_t, ptr %52, i32 0, i32 5
  %54 = load i16, ptr %53, align 4, !tbaa !19
  %55 = sext i16 %54 to i32
  %56 = icmp eq i32 %55, 1
  br i1 %56, label %57, label %72

57:                                               ; preds = %48
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.aecpc_t, ptr %58, i32 0, i32 22
  %60 = load i32, ptr %59, align 4, !tbaa !20
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %72

62:                                               ; preds = %57
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.aecpc_t, ptr %63, i32 0, i32 20
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load i16, ptr %7, align 2, !tbaa !9
  %68 = sext i16 %67 to i32
  %69 = load float, ptr %15, align 4, !tbaa !18
  %70 = getelementptr inbounds [400 x i16], ptr %11, i64 0, i64 0
  call void @WebRtcAec_ResampleLinear(ptr noundef %65, ptr noundef %66, i32 noundef %68, float noundef %69, ptr noundef %70, ptr noundef %10)
  %71 = getelementptr inbounds [400 x i16], ptr %11, i64 0, i64 0
  store ptr %71, ptr %12, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %62, %57, %48
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.aecpc_t, ptr %73, i32 0, i32 27
  store i32 1, ptr %74, align 4, !tbaa !22
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.aecpc_t, ptr %75, i32 0, i32 28
  %77 = load ptr, ptr %76, align 8, !tbaa !23
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.aecpc_t, ptr %78, i32 0, i32 28
  %80 = load ptr, ptr %79, align 8, !tbaa !23
  %81 = call i32 @WebRtcAec_system_delay(ptr noundef %80)
  %82 = load i32, ptr %10, align 4, !tbaa !11
  %83 = add nsw i32 %81, %82
  call void @WebRtcAec_SetSystemDelay(ptr noundef %77, i32 noundef %83)
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %98, %72
  %85 = load i32, ptr %16, align 4, !tbaa !11
  %86 = load i32, ptr %10, align 4, !tbaa !11
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %88, label %101

88:                                               ; preds = %84
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = load i32, ptr %16, align 4, !tbaa !11
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i16, ptr %89, i64 %91
  %93 = load i16, ptr %92, align 2, !tbaa !9
  %94 = sitofp i16 %93 to float
  %95 = load i32, ptr %16, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [400 x float], ptr %13, i64 0, i64 %96
  store float %94, ptr %97, align 4, !tbaa !18
  br label %98

98:                                               ; preds = %88
  %99 = load i32, ptr %16, align 4, !tbaa !11
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %16, align 4, !tbaa !11
  br label %84, !llvm.loop !24

101:                                              ; preds = %84
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.aecpc_t, ptr %102, i32 0, i32 25
  %104 = load ptr, ptr %103, align 8, !tbaa !26
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = load i32, ptr %10, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = call i64 @WebRtc_WriteBuffer(ptr noundef %104, ptr noundef %105, i64 noundef %107)
  br label %109

109:                                              ; preds = %115, %101
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.aecpc_t, ptr %110, i32 0, i32 25
  %112 = load ptr, ptr %111, align 8, !tbaa !26
  %113 = call i64 @WebRtc_available_read(ptr noundef %112)
  %114 = icmp uge i64 %113, 128
  br i1 %114, label %115, label %129

115:                                              ; preds = %109
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.aecpc_t, ptr %116, i32 0, i32 25
  %118 = load ptr, ptr %117, align 8, !tbaa !26
  %119 = getelementptr inbounds [400 x float], ptr %13, i64 0, i64 0
  %120 = call i64 @WebRtc_ReadBuffer(ptr noundef %118, ptr noundef %14, ptr noundef %119, i64 noundef 128)
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.aecpc_t, ptr %121, i32 0, i32 28
  %123 = load ptr, ptr %122, align 8, !tbaa !23
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  call void @WebRtcAec_BufferFarendPartition(ptr noundef %123, ptr noundef %124)
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.aecpc_t, ptr %125, i32 0, i32 25
  %127 = load ptr, ptr %126, align 8, !tbaa !26
  %128 = call i32 @WebRtc_MoveReadPtr(ptr noundef %127, i32 noundef -64)
  br label %109, !llvm.loop !27

129:                                              ; preds = %109
  %130 = load i32, ptr %9, align 4, !tbaa !11
  store i32 %130, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %131

131:                                              ; preds = %129, %45, %34, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1600, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 800, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %132 = load i32, ptr %4, align 4
  ret i32 %132
}

declare void @WebRtcAec_ResampleLinear(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #1

declare void @WebRtcAec_SetSystemDelay(ptr noundef, i32 noundef) #1

declare i32 @WebRtcAec_system_delay(ptr noundef) #1

declare i64 @WebRtc_WriteBuffer(ptr noundef, ptr noundef, i64 noundef) #1

declare i64 @WebRtc_available_read(ptr noundef) #1

declare i64 @WebRtc_ReadBuffer(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

declare void @WebRtcAec_BufferFarendPartition(ptr 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 }

!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, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 104}
!14 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !15, i64 16, !10, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !10, i64 36, !10, i64 38, !12, i64 40, !10, i64 44, !10, i64 46, !10, i64 48, !10, i64 50, !12, i64 52, !12, i64 56, !12, i64 60, !10, i64 64, !6, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !15, i64 92, !6, i64 96, !12, i64 104, !12, i64 108, !6, i64 112}
!15 = !{!"float", !7, i64 0}
!16 = !{!14, !10, i64 36}
!17 = !{!14, !15, i64 92}
!18 = !{!15, !15, i64 0}
!19 = !{!14, !10, i64 20}
!20 = !{!14, !12, i64 84}
!21 = !{!14, !6, i64 72}
!22 = !{!14, !12, i64 108}
!23 = !{!14, !6, i64 112}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!14, !6, i64 96}
!27 = distinct !{!27, !25}


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

; 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 @WebRtc_MoveReadPtr(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @WebRtcAec_BufferFarend(ptr nocapture noundef %0, ptr noundef %1, i16 noundef signext %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  %5 = alloca [400 x i16], align 16
  %6 = alloca [400 x float], align 16
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %8 = sext i16 %2 to i32
  store i32 %8, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 1600, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store ptr %6, ptr %7, align 8, !tbaa !9
  %9 = icmp eq ptr %1, null
  br i1 %9, label %.loopexit.sink.split, label %10

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %0, i64 36
  %12 = load i16, ptr %11, align 4, !tbaa !11
  %.not = icmp eq i16 %12, 42
  br i1 %.not, label %13, label %.loopexit.sink.split

13:                                               ; preds = %10
  switch i16 %2, label %.loopexit.sink.split [
    i16 160, label %14
    i16 80, label %14
  ]

14:                                               ; preds = %13, %13
  %15 = getelementptr inbounds i8, ptr %0, i64 92
  %16 = load float, ptr %15, align 4, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %0, i64 20
  %18 = load i16, ptr %17, align 4, !tbaa !16
  %19 = icmp eq i16 %18, 1
  br i1 %19, label %20, label %27

20:                                               ; preds = %14
  %21 = getelementptr inbounds i8, ptr %0, i64 84
  %22 = load i32, ptr %21, align 4, !tbaa !17
  %23 = icmp eq i32 %22, 1
  br i1 %23, label %24, label %27

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  call void @WebRtcAec_ResampleLinear(ptr noundef %26, ptr noundef nonnull %1, i32 noundef %8, float noundef %16, ptr noundef nonnull %5, ptr noundef nonnull %4) #3
  br label %27

27:                                               ; preds = %24, %20, %14
  %.034 = phi ptr [ %5, %24 ], [ %1, %20 ], [ %1, %14 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 1, ptr %28, align 4, !tbaa !19
  %29 = getelementptr inbounds i8, ptr %0, i64 112
  %30 = load ptr, ptr %29, align 8, !tbaa !20
  %31 = call i32 @WebRtcAec_system_delay(ptr noundef %30) #3
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, %31
  call void @WebRtcAec_SetSystemDelay(ptr noundef %30, i32 noundef %33) #3
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = icmp sgt i32 %34, 0
  br i1 %35, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %27
  %wide.trip.count = zext nneg i32 %34 to i64
  %min.iters.check = icmp ult i32 %34, 8
  br i1 %min.iters.check, label %.lr.ph.preheader43, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %36 = getelementptr inbounds i16, ptr %.034, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %wide.load = load <4 x i16>, ptr %36, align 2, !tbaa !21
  %wide.load42 = load <4 x i16>, ptr %37, align 2, !tbaa !21
  %38 = sitofp <4 x i16> %wide.load to <4 x float>
  %39 = sitofp <4 x i16> %wide.load42 to <4 x float>
  %40 = getelementptr inbounds [400 x float], ptr %6, i64 0, i64 %index
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  store <4 x float> %38, ptr %40, align 16, !tbaa !22
  store <4 x float> %39, ptr %41, align 16, !tbaa !22
  %index.next = add nuw i64 %index, 8
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader43

.lr.ph.preheader43:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader43, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader43 ]
  %43 = getelementptr inbounds i16, ptr %.034, i64 %indvars.iv
  %44 = load i16, ptr %43, align 2, !tbaa !21
  %45 = sitofp i16 %44 to float
  %46 = getelementptr inbounds [400 x float], ptr %6, i64 0, i64 %indvars.iv
  store float %45, ptr %46, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %27
  %47 = getelementptr inbounds i8, ptr %0, i64 96
  %48 = load ptr, ptr %47, align 8, !tbaa !28
  %49 = sext i32 %34 to i64
  %50 = call i64 @WebRtc_WriteBuffer(ptr noundef %48, ptr noundef nonnull %6, i64 noundef %49) #3
  %51 = load ptr, ptr %47, align 8, !tbaa !28
  %52 = call i64 @WebRtc_available_read(ptr noundef %51) #3
  %53 = icmp ugt i64 %52, 127
  br i1 %53, label %.lr.ph39, label %.loopexit

.lr.ph39:                                         ; preds = %._crit_edge, %.lr.ph39
  %54 = load ptr, ptr %47, align 8, !tbaa !28
  %55 = call i64 @WebRtc_ReadBuffer(ptr noundef %54, ptr noundef nonnull %7, ptr noundef nonnull %6, i64 noundef 128) #3
  %56 = load ptr, ptr %29, align 8, !tbaa !20
  %57 = load ptr, ptr %7, align 8, !tbaa !9
  call void @WebRtcAec_BufferFarendPartition(ptr noundef %56, ptr noundef %57) #3
  %58 = load ptr, ptr %47, align 8, !tbaa !28
  %59 = call i32 @WebRtc_MoveReadPtr(ptr noundef %58, i32 noundef -64) #3
  %60 = load ptr, ptr %47, align 8, !tbaa !28
  %61 = call i64 @WebRtc_available_read(ptr noundef %60) #3
  %62 = icmp ugt i64 %61, 127
  br i1 %62, label %.lr.ph39, label %.loopexit, !llvm.loop !29

.loopexit.sink.split:                             ; preds = %13, %10, %3
  %.sink = phi i32 [ 12003, %3 ], [ 12002, %10 ], [ 12004, %13 ]
  %63 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %.sink, ptr %63, align 8, !tbaa !30
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph39, %.loopexit.sink.split, %._crit_edge
  %.033 = phi i32 [ 0, %._crit_edge ], [ -1, %.loopexit.sink.split ], [ 0, %.lr.ph39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 1600, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  ret i32 %.033
}

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

declare void @WebRtcAec_SetSystemDelay(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @WebRtcAec_system_delay(ptr noundef) local_unnamed_addr #1

declare i64 @WebRtc_WriteBuffer(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i64 @WebRtc_available_read(ptr noundef) local_unnamed_addr #1

declare i64 @WebRtc_ReadBuffer(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @WebRtcAec_BufferFarendPartition(ptr 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 }

!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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !14, i64 36}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !13, i64 16, !14, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !14, i64 36, !14, i64 38, !6, i64 40, !14, i64 44, !14, i64 46, !14, i64 48, !14, i64 50, !6, i64 52, !6, i64 56, !6, i64 60, !14, i64 64, !10, i64 72, !6, i64 80, !6, i64 84, !6, i64 88, !13, i64 92, !10, i64 96, !6, i64 104, !6, i64 108, !10, i64 112}
!13 = !{!"float", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!12, !13, i64 92}
!16 = !{!12, !14, i64 20}
!17 = !{!12, !6, i64 84}
!18 = !{!12, !10, i64 72}
!19 = !{!12, !6, i64 108}
!20 = !{!12, !10, i64 112}
!21 = !{!14, !14, i64 0}
!22 = !{!13, !13, i64 0}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24, !26, !25}
!28 = !{!12, !10, i64 96}
!29 = distinct !{!29, !24}
!30 = !{!12, !6, i64 104}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass