; LLVM IR from Ryuk17/SpeechAlgorithms :: WebRTC_ANR/src (WebRTC_NS)

; 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.timeval = type { i64, i64 }

@main.runtime = external hidden global float, align 4
@main.avg = external hidden global float, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.timeval, align 8
  %7 = alloca %struct.timeval, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [128 x i8], align 16
  %11 = alloca [128 x i8], align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %22 = call noalias ptr @calloc(i64 noundef 160, i64 noundef 2) #7
  store ptr %22, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %23 = call noalias ptr @calloc(i64 noundef 160, i64 noundef 2) #7
  store ptr %23, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %24 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %25 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %24, ptr noundef @.str, ptr noundef @.str.1) #6
  %26 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %27 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %26, ptr noundef @.str, ptr noundef @.str.2) #6
  %28 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %29 = call noalias ptr @fopen(ptr noundef %28, ptr noundef @.str.3)
  store ptr %29, ptr %14, align 8, !tbaa !9
  %30 = load ptr, ptr %14, align 8, !tbaa !9
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %34

32:                                               ; preds = %2
  %33 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  call void @perror(ptr noundef %33)
  br label %34

34:                                               ; preds = %32, %2
  %35 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %35)
  %37 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %38 = call noalias ptr @fopen(ptr noundef %37, ptr noundef @.str.5)
  store ptr %38, ptr %15, align 8, !tbaa !9
  %39 = load ptr, ptr %15, align 8, !tbaa !9
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %34
  %42 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  call void @perror(ptr noundef %42)
  br label %43

43:                                               ; preds = %41, %34
  %44 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %44)
  %46 = load ptr, ptr %12, align 8, !tbaa !9
  %47 = load ptr, ptr %14, align 8, !tbaa !9
  %48 = call i64 @fread(ptr noundef %46, i64 noundef 1, i64 noundef 44, ptr noundef %47)
  %49 = load ptr, ptr %12, align 8, !tbaa !9
  %50 = load ptr, ptr %15, align 8, !tbaa !9
  %51 = call i64 @fwrite(ptr noundef %49, i64 noundef 1, i64 noundef 44, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 16000, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 1, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 1, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %52 = load i32, ptr %17, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = mul i64 %53, 8
  %55 = call noalias ptr @malloc(i64 noundef %54) #8
  store ptr %55, ptr %20, align 8, !tbaa !9
  %56 = call ptr (...) @WebRtcNs_Create()
  store ptr %56, ptr %20, align 8, !tbaa !9
  %57 = load ptr, ptr %20, align 8, !tbaa !9
  %58 = load i32, ptr %16, align 4, !tbaa !5
  %59 = call i32 @WebRtcNs_Init(ptr noundef %57, i32 noundef %58)
  store i32 %59, ptr %8, align 4, !tbaa !5
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %43
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %128

64:                                               ; preds = %43
  %65 = load ptr, ptr %20, align 8, !tbaa !9
  %66 = load i32, ptr %19, align 4, !tbaa !5
  %67 = call i32 @WebRtcNs_set_policy(ptr noundef %65, i32 noundef %66)
  store i32 %67, ptr %8, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %72

70:                                               ; preds = %64
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %128

72:                                               ; preds = %64
  br label %73

73:                                               ; preds = %115, %72
  %74 = load ptr, ptr %12, align 8, !tbaa !9
  %75 = load ptr, ptr %14, align 8, !tbaa !9
  %76 = call i64 @fread(ptr noundef %74, i64 noundef 2, i64 noundef 160, ptr noundef %75)
  %77 = icmp ne i64 %76, 0
  br i1 %77, label %78, label %119

78:                                               ; preds = %73
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %9, align 4, !tbaa !5
  %81 = call i32 @gettimeofday(ptr noundef %6, ptr noundef null) #6
  %82 = load ptr, ptr %20, align 8, !tbaa !9
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  call void @WebRtcNs_Analyze(ptr noundef %82, ptr noundef %83)
  %84 = load ptr, ptr %20, align 8, !tbaa !9
  %85 = load i32, ptr %18, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  call void @WebRtcNs_Process(ptr noundef %84, ptr noundef %12, i64 noundef %86, ptr noundef %13)
  %87 = call i32 @gettimeofday(ptr noundef %7, ptr noundef null) #6
  %88 = getelementptr inbounds %struct.timeval, ptr %7, i32 0, i32 0
  %89 = load i64, ptr %88, align 8, !tbaa !11
  %90 = getelementptr inbounds %struct.timeval, ptr %6, i32 0, i32 0
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = sub nsw i64 %89, %91
  %93 = mul nsw i64 1000000, %92
  %94 = getelementptr inbounds %struct.timeval, ptr %7, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !14
  %96 = add nsw i64 %93, %95
  %97 = getelementptr inbounds %struct.timeval, ptr %6, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !14
  %99 = sub nsw i64 %96, %98
  %100 = sitofp i64 %99 to float
  %101 = load float, ptr @main.runtime, align 4, !tbaa !15
  %102 = fadd float %101, %100
  store float %102, ptr @main.runtime, align 4, !tbaa !15
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = srem i32 %103, 100
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %115

106:                                              ; preds = %78
  %107 = load float, ptr @main.runtime, align 4, !tbaa !15
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = sitofp i32 %108 to float
  %110 = fdiv float %107, %109
  store float %110, ptr @main.avg, align 4, !tbaa !15
  %111 = load float, ptr @main.avg, align 4, !tbaa !15
  %112 = fdiv float %111, 1.000000e+03
  %113 = fpext float %112 to double
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %113)
  br label %115

115:                                              ; preds = %106, %78
  %116 = load ptr, ptr %13, align 8, !tbaa !9
  %117 = load ptr, ptr %15, align 8, !tbaa !9
  %118 = call i64 @fwrite(ptr noundef %116, i64 noundef 2, i64 noundef 160, ptr noundef %117)
  br label %73, !llvm.loop !17

119:                                              ; preds = %73
  %120 = load ptr, ptr %20, align 8, !tbaa !9
  call void @WebRtcNs_Free(ptr noundef %120)
  %121 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %121) #6
  %122 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %122) #6
  %123 = load ptr, ptr %14, align 8, !tbaa !9
  %124 = call i32 @fclose(ptr noundef %123)
  %125 = load ptr, ptr %15, align 8, !tbaa !9
  %126 = call i32 @fclose(ptr noundef %125)
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %21, align 4
  br label %128

128:                                              ; preds = %119, %70, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  %129 = load i32, ptr %3, align 4
  ret i32 %129
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #4

declare void @perror(ptr noundef) #4

declare i32 @printf(ptr noundef, ...) #4

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

declare ptr @WebRtcNs_Create(...) #4

declare i32 @WebRtcNs_Init(ptr noundef, i32 noundef) #4

declare i32 @WebRtcNs_set_policy(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @gettimeofday(ptr noundef, ptr noundef) #3

declare void @WebRtcNs_Analyze(ptr noundef, ptr noundef) #4

declare void @WebRtcNs_Process(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #4

declare void @WebRtcNs_Free(ptr noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare i32 @fclose(ptr noundef) #4

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind allocsize(0,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 #3 = { nounwind "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 = { "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 #5 = { nounwind allocsize(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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { nounwind allocsize(0) }

!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, !13, i64 0}
!12 = !{!"timeval", !13, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"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"

%struct.timeval = type { i64, i64 }

@main.runtime = external hidden local_unnamed_addr global float, align 4
@main.avg = external hidden local_unnamed_addr global float, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca %struct.timeval, align 8
  %4 = alloca %struct.timeval, align 8
  %5 = alloca [128 x i8], align 16
  %6 = alloca [128 x i8], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %9 = tail call noalias dereferenceable_or_null(320) ptr @calloc(i64 noundef 160, i64 noundef 2) #7
  store ptr %9, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %10 = tail call noalias dereferenceable_or_null(320) ptr @calloc(i64 noundef 160, i64 noundef 2) #7
  store ptr %10, ptr %8, align 8, !tbaa !5
  %11 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.1) #6
  %12 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %6, ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull @.str.2) #6
  %13 = call noalias ptr @fopen(ptr noundef nonnull %5, ptr noundef nonnull @.str.3)
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  call void @perror(ptr noundef nonnull %5) #8
  br label %16

16:                                               ; preds = %15, %2
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %5)
  %18 = call noalias ptr @fopen(ptr noundef nonnull %6, ptr noundef nonnull @.str.5)
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %16
  call void @perror(ptr noundef nonnull %6) #8
  br label %21

21:                                               ; preds = %20, %16
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %6)
  %23 = call i64 @fread(ptr noundef %9, i64 noundef 1, i64 noundef 44, ptr noundef %13)
  %24 = call i64 @fwrite(ptr noundef %9, i64 noundef 1, i64 noundef 44, ptr noundef %18)
  %25 = call ptr (...) @WebRtcNs_Create() #6
  %26 = call i32 @WebRtcNs_Init(ptr noundef %25, i32 noundef 16000) #6
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %27, label %65

27:                                               ; preds = %21
  %28 = call i32 @WebRtcNs_set_policy(ptr noundef %25, i32 noundef 1) #6
  %.not23 = icmp eq i32 %28, 0
  br i1 %.not23, label %.preheader, label %65

.preheader:                                       ; preds = %27
  %29 = call i64 @fread(ptr noundef %9, i64 noundef 2, i64 noundef 160, ptr noundef %13)
  %.not2425 = icmp eq i64 %29, 0
  br i1 %.not2425, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %30 = getelementptr inbounds i8, ptr %4, i64 8
  %31 = getelementptr inbounds i8, ptr %3, i64 8
  br label %32

32:                                               ; preds = %.lr.ph, %56
  %.02226 = phi i32 [ 0, %.lr.ph ], [ %33, %56 ]
  %33 = add nuw nsw i32 %.02226, 1
  %34 = call i32 @gettimeofday(ptr noundef nonnull %3, ptr noundef null) #6
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  call void @WebRtcNs_Analyze(ptr noundef %25, ptr noundef %35) #6
  call void @WebRtcNs_Process(ptr noundef %25, ptr noundef nonnull %7, i64 noundef 1, ptr noundef nonnull %8) #6
  %36 = call i32 @gettimeofday(ptr noundef nonnull %4, ptr noundef null) #6
  %37 = load i64, ptr %4, align 8, !tbaa !9
  %38 = load i64, ptr %3, align 8, !tbaa !9
  %39 = sub nsw i64 %37, %38
  %40 = mul nsw i64 %39, 1000000
  %41 = load i64, ptr %30, align 8, !tbaa !12
  %42 = add nsw i64 %40, %41
  %43 = load i64, ptr %31, align 8, !tbaa !12
  %44 = sub i64 %42, %43
  %45 = sitofp i64 %44 to float
  %46 = load float, ptr @main.runtime, align 4, !tbaa !13
  %47 = fadd float %46, %45
  store float %47, ptr @main.runtime, align 4, !tbaa !13
  %48 = urem i32 %33, 100
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %56

50:                                               ; preds = %32
  %51 = uitofp nneg i32 %33 to float
  %52 = fdiv float %47, %51
  store float %52, ptr @main.avg, align 4, !tbaa !13
  %53 = fdiv float %52, 1.000000e+03
  %54 = fpext float %53 to double
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %54)
  br label %56

56:                                               ; preds = %50, %32
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = call i64 @fwrite(ptr noundef %57, i64 noundef 2, i64 noundef 160, ptr noundef %18)
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = call i64 @fread(ptr noundef %59, i64 noundef 2, i64 noundef 160, ptr noundef %13)
  %.not24 = icmp eq i64 %60, 0
  br i1 %.not24, label %._crit_edge, label %32, !llvm.loop !15

._crit_edge:                                      ; preds = %56, %.preheader
  call void @WebRtcNs_Free(ptr noundef %25) #6
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %61) #6
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %62) #6
  %63 = call i32 @fclose(ptr noundef %13)
  %64 = call i32 @fclose(ptr noundef %18)
  br label %65

65:                                               ; preds = %27, %21, %._crit_edge
  %.str.9.sink = phi ptr [ @.str.9, %._crit_edge ], [ @.str.6, %21 ], [ @.str.7, %27 ]
  %.0 = phi i32 [ 0, %._crit_edge ], [ -1, %21 ], [ -1, %27 ]
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.9.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  ret i32 %.0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

declare ptr @WebRtcNs_Create(...) local_unnamed_addr #4

declare i32 @WebRtcNs_Init(ptr noundef, i32 noundef) local_unnamed_addr #4

declare i32 @WebRtcNs_set_policy(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @gettimeofday(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

declare void @WebRtcNs_Analyze(ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @WebRtcNs_Process(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

declare void @WebRtcNs_Free(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nofree nounwind "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 = { "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 #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { cold }

!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, !11, i64 0}
!10 = !{!"timeval", !11, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass