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

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

@.str = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @benchmark_bpacketsync(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = mul i64 %20, 4
  store i64 %21, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 64, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %22 = load i32, ptr %7, align 4, !tbaa !11
  %23 = load i32, ptr %8, align 4, !tbaa !11
  %24 = load i32, ptr %9, align 4, !tbaa !11
  %25 = load i32, ptr %10, align 4, !tbaa !11
  %26 = call ptr @bpacketgen_create(i32 noundef 0, i32 noundef %22, i32 noundef %23, i32 noundef %24, i32 noundef %25)
  store ptr %26, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = call i32 @bpacketgen_get_packet_len(ptr noundef %27)
  store i32 %28, ptr %12, align 4, !tbaa !11
  %29 = load i32, ptr %7, align 4, !tbaa !11
  %30 = zext i32 %29 to i64
  %31 = call ptr @llvm.stacksave.p0()
  store ptr %31, ptr %13, align 8
  %32 = alloca i8, i64 %30, align 16
  store i64 %30, ptr %14, align 8
  %33 = load i32, ptr %12, align 4, !tbaa !11
  %34 = zext i32 %33 to i64
  %35 = alloca i8, i64 %34, align 16
  store i64 %34, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %36 = call ptr @bpacketsync_create(i32 noundef 0, ptr noundef @bpacketsync_benchmark_callback, ptr noundef %16)
  store ptr %36, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %37

37:                                               ; preds = %48, %3
  %38 = load i64, ptr %18, align 8, !tbaa !9
  %39 = load i32, ptr %7, align 4, !tbaa !11
  %40 = zext i32 %39 to i64
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %42, label %51

42:                                               ; preds = %37
  %43 = call i32 @rand() #5
  %44 = srem i32 %43, 256
  %45 = trunc i32 %44 to i8
  %46 = load i64, ptr %18, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %32, i64 %46
  store i8 %45, ptr %47, align 1, !tbaa !13
  br label %48

48:                                               ; preds = %42
  %49 = load i64, ptr %18, align 8, !tbaa !9
  %50 = add i64 %49, 1
  store i64 %50, ptr %18, align 8, !tbaa !9
  br label %37, !llvm.loop !14

51:                                               ; preds = %37
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  call void @bpacketgen_encode(ptr noundef %52, ptr noundef %32, ptr noundef %35)
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call i32 @getrusage(i32 noundef 0, ptr noundef %53) #5
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %101, %51
  %56 = load i64, ptr %18, align 8, !tbaa !9
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = icmp ult i64 %56, %58
  br i1 %59, label %60, label %104

60:                                               ; preds = %55
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = load i64, ptr %18, align 8, !tbaa !9
  %63 = mul i64 4, %62
  %64 = add i64 %63, 0
  %65 = load i32, ptr %12, align 4, !tbaa !11
  %66 = zext i32 %65 to i64
  %67 = urem i64 %64, %66
  %68 = getelementptr inbounds i8, ptr %35, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !13
  %70 = call i32 @bpacketsync_execute_byte(ptr noundef %61, i8 noundef zeroext %69)
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = load i64, ptr %18, align 8, !tbaa !9
  %73 = mul i64 4, %72
  %74 = add i64 %73, 1
  %75 = load i32, ptr %12, align 4, !tbaa !11
  %76 = zext i32 %75 to i64
  %77 = urem i64 %74, %76
  %78 = getelementptr inbounds i8, ptr %35, i64 %77
  %79 = load i8, ptr %78, align 1, !tbaa !13
  %80 = call i32 @bpacketsync_execute_byte(ptr noundef %71, i8 noundef zeroext %79)
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = load i64, ptr %18, align 8, !tbaa !9
  %83 = mul i64 4, %82
  %84 = add i64 %83, 2
  %85 = load i32, ptr %12, align 4, !tbaa !11
  %86 = zext i32 %85 to i64
  %87 = urem i64 %84, %86
  %88 = getelementptr inbounds i8, ptr %35, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !13
  %90 = call i32 @bpacketsync_execute_byte(ptr noundef %81, i8 noundef zeroext %89)
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  %92 = load i64, ptr %18, align 8, !tbaa !9
  %93 = mul i64 4, %92
  %94 = add i64 %93, 3
  %95 = load i32, ptr %12, align 4, !tbaa !11
  %96 = zext i32 %95 to i64
  %97 = urem i64 %94, %96
  %98 = getelementptr inbounds i8, ptr %35, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !13
  %100 = call i32 @bpacketsync_execute_byte(ptr noundef %91, i8 noundef zeroext %99)
  br label %101

101:                                              ; preds = %60
  %102 = load i64, ptr %18, align 8, !tbaa !9
  %103 = add i64 %102, 1
  store i64 %103, ptr %18, align 8, !tbaa !9
  br label %55, !llvm.loop !16

104:                                              ; preds = %55
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = call i32 @getrusage(i32 noundef 0, ptr noundef %105) #5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load i64, ptr %107, align 8, !tbaa !9
  %109 = mul i64 %108, 4
  store i64 %109, ptr %107, align 8, !tbaa !9
  %110 = load i32, ptr %16, align 4, !tbaa !11
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %110)
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  call void @bpacketgen_destroy(ptr noundef %112)
  %113 = load ptr, ptr %17, align 8, !tbaa !5
  %114 = call i32 @bpacketsync_destroy(ptr noundef %113)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %115 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %115)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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

declare ptr @bpacketgen_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare i32 @bpacketgen_get_packet_len(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

declare ptr @bpacketsync_create(i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @bpacketsync_benchmark_callback(ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #0

; Function Attrs: nounwind
declare i32 @rand() #4

declare void @bpacketgen_encode(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @getrusage(i32 noundef, ptr noundef) #4

declare i32 @bpacketsync_execute_byte(ptr noundef, i8 noundef zeroext) #2

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

declare void @bpacketgen_destroy(ptr noundef) #2

declare i32 @bpacketsync_destroy(ptr noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { "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 nosync nounwind willreturn }
attributes #4 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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

@.str = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @benchmark_bpacketsync(ptr noundef %0, ptr noundef %1, ptr nocapture noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = load i64, ptr %2, align 8, !tbaa !5
  %6 = shl i64 %5, 2
  store i64 %6, ptr %2, align 8, !tbaa !5
  %7 = tail call ptr @bpacketgen_create(i32 noundef 0, i32 noundef 64, i32 noundef 1, i32 noundef 1, i32 noundef 1) #5
  %8 = tail call i32 @bpacketgen_get_packet_len(ptr noundef %7) #5
  %9 = alloca [64 x i8], align 16
  %10 = zext i32 %8 to i64
  %11 = alloca i8, i64 %10, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  %12 = call ptr @bpacketsync_create(i32 noundef 0, ptr noundef nonnull @bpacketsync_benchmark_callback, ptr noundef nonnull %4) #5
  %13 = call i32 @rand() #5
  %14 = trunc i32 %13 to i8
  store i8 %14, ptr %9, align 16, !tbaa !11
  %15 = call i32 @rand() #5
  %16 = trunc i32 %15 to i8
  %17 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 %16, ptr %17, align 1, !tbaa !11
  %18 = call i32 @rand() #5
  %19 = trunc i32 %18 to i8
  %20 = getelementptr inbounds i8, ptr %9, i64 2
  store i8 %19, ptr %20, align 2, !tbaa !11
  %21 = call i32 @rand() #5
  %22 = trunc i32 %21 to i8
  %23 = getelementptr inbounds i8, ptr %9, i64 3
  store i8 %22, ptr %23, align 1, !tbaa !11
  %24 = call i32 @rand() #5
  %25 = trunc i32 %24 to i8
  %26 = getelementptr inbounds i8, ptr %9, i64 4
  store i8 %25, ptr %26, align 4, !tbaa !11
  %27 = call i32 @rand() #5
  %28 = trunc i32 %27 to i8
  %29 = getelementptr inbounds i8, ptr %9, i64 5
  store i8 %28, ptr %29, align 1, !tbaa !11
  %30 = call i32 @rand() #5
  %31 = trunc i32 %30 to i8
  %32 = getelementptr inbounds i8, ptr %9, i64 6
  store i8 %31, ptr %32, align 2, !tbaa !11
  %33 = call i32 @rand() #5
  %34 = trunc i32 %33 to i8
  %35 = getelementptr inbounds i8, ptr %9, i64 7
  store i8 %34, ptr %35, align 1, !tbaa !11
  %36 = call i32 @rand() #5
  %37 = trunc i32 %36 to i8
  %38 = getelementptr inbounds i8, ptr %9, i64 8
  store i8 %37, ptr %38, align 8, !tbaa !11
  %39 = call i32 @rand() #5
  %40 = trunc i32 %39 to i8
  %41 = getelementptr inbounds i8, ptr %9, i64 9
  store i8 %40, ptr %41, align 1, !tbaa !11
  %42 = call i32 @rand() #5
  %43 = trunc i32 %42 to i8
  %44 = getelementptr inbounds i8, ptr %9, i64 10
  store i8 %43, ptr %44, align 2, !tbaa !11
  %45 = call i32 @rand() #5
  %46 = trunc i32 %45 to i8
  %47 = getelementptr inbounds i8, ptr %9, i64 11
  store i8 %46, ptr %47, align 1, !tbaa !11
  %48 = call i32 @rand() #5
  %49 = trunc i32 %48 to i8
  %50 = getelementptr inbounds i8, ptr %9, i64 12
  store i8 %49, ptr %50, align 4, !tbaa !11
  %51 = call i32 @rand() #5
  %52 = trunc i32 %51 to i8
  %53 = getelementptr inbounds i8, ptr %9, i64 13
  store i8 %52, ptr %53, align 1, !tbaa !11
  %54 = call i32 @rand() #5
  %55 = trunc i32 %54 to i8
  %56 = getelementptr inbounds i8, ptr %9, i64 14
  store i8 %55, ptr %56, align 2, !tbaa !11
  %57 = call i32 @rand() #5
  %58 = trunc i32 %57 to i8
  %59 = getelementptr inbounds i8, ptr %9, i64 15
  store i8 %58, ptr %59, align 1, !tbaa !11
  %60 = call i32 @rand() #5
  %61 = trunc i32 %60 to i8
  %62 = getelementptr inbounds i8, ptr %9, i64 16
  store i8 %61, ptr %62, align 16, !tbaa !11
  %63 = call i32 @rand() #5
  %64 = trunc i32 %63 to i8
  %65 = getelementptr inbounds i8, ptr %9, i64 17
  store i8 %64, ptr %65, align 1, !tbaa !11
  %66 = call i32 @rand() #5
  %67 = trunc i32 %66 to i8
  %68 = getelementptr inbounds i8, ptr %9, i64 18
  store i8 %67, ptr %68, align 2, !tbaa !11
  %69 = call i32 @rand() #5
  %70 = trunc i32 %69 to i8
  %71 = getelementptr inbounds i8, ptr %9, i64 19
  store i8 %70, ptr %71, align 1, !tbaa !11
  %72 = call i32 @rand() #5
  %73 = trunc i32 %72 to i8
  %74 = getelementptr inbounds i8, ptr %9, i64 20
  store i8 %73, ptr %74, align 4, !tbaa !11
  %75 = call i32 @rand() #5
  %76 = trunc i32 %75 to i8
  %77 = getelementptr inbounds i8, ptr %9, i64 21
  store i8 %76, ptr %77, align 1, !tbaa !11
  %78 = call i32 @rand() #5
  %79 = trunc i32 %78 to i8
  %80 = getelementptr inbounds i8, ptr %9, i64 22
  store i8 %79, ptr %80, align 2, !tbaa !11
  %81 = call i32 @rand() #5
  %82 = trunc i32 %81 to i8
  %83 = getelementptr inbounds i8, ptr %9, i64 23
  store i8 %82, ptr %83, align 1, !tbaa !11
  %84 = call i32 @rand() #5
  %85 = trunc i32 %84 to i8
  %86 = getelementptr inbounds i8, ptr %9, i64 24
  store i8 %85, ptr %86, align 8, !tbaa !11
  %87 = call i32 @rand() #5
  %88 = trunc i32 %87 to i8
  %89 = getelementptr inbounds i8, ptr %9, i64 25
  store i8 %88, ptr %89, align 1, !tbaa !11
  %90 = call i32 @rand() #5
  %91 = trunc i32 %90 to i8
  %92 = getelementptr inbounds i8, ptr %9, i64 26
  store i8 %91, ptr %92, align 2, !tbaa !11
  %93 = call i32 @rand() #5
  %94 = trunc i32 %93 to i8
  %95 = getelementptr inbounds i8, ptr %9, i64 27
  store i8 %94, ptr %95, align 1, !tbaa !11
  %96 = call i32 @rand() #5
  %97 = trunc i32 %96 to i8
  %98 = getelementptr inbounds i8, ptr %9, i64 28
  store i8 %97, ptr %98, align 4, !tbaa !11
  %99 = call i32 @rand() #5
  %100 = trunc i32 %99 to i8
  %101 = getelementptr inbounds i8, ptr %9, i64 29
  store i8 %100, ptr %101, align 1, !tbaa !11
  %102 = call i32 @rand() #5
  %103 = trunc i32 %102 to i8
  %104 = getelementptr inbounds i8, ptr %9, i64 30
  store i8 %103, ptr %104, align 2, !tbaa !11
  %105 = call i32 @rand() #5
  %106 = trunc i32 %105 to i8
  %107 = getelementptr inbounds i8, ptr %9, i64 31
  store i8 %106, ptr %107, align 1, !tbaa !11
  %108 = call i32 @rand() #5
  %109 = trunc i32 %108 to i8
  %110 = getelementptr inbounds i8, ptr %9, i64 32
  store i8 %109, ptr %110, align 16, !tbaa !11
  %111 = call i32 @rand() #5
  %112 = trunc i32 %111 to i8
  %113 = getelementptr inbounds i8, ptr %9, i64 33
  store i8 %112, ptr %113, align 1, !tbaa !11
  %114 = call i32 @rand() #5
  %115 = trunc i32 %114 to i8
  %116 = getelementptr inbounds i8, ptr %9, i64 34
  store i8 %115, ptr %116, align 2, !tbaa !11
  %117 = call i32 @rand() #5
  %118 = trunc i32 %117 to i8
  %119 = getelementptr inbounds i8, ptr %9, i64 35
  store i8 %118, ptr %119, align 1, !tbaa !11
  %120 = call i32 @rand() #5
  %121 = trunc i32 %120 to i8
  %122 = getelementptr inbounds i8, ptr %9, i64 36
  store i8 %121, ptr %122, align 4, !tbaa !11
  %123 = call i32 @rand() #5
  %124 = trunc i32 %123 to i8
  %125 = getelementptr inbounds i8, ptr %9, i64 37
  store i8 %124, ptr %125, align 1, !tbaa !11
  %126 = call i32 @rand() #5
  %127 = trunc i32 %126 to i8
  %128 = getelementptr inbounds i8, ptr %9, i64 38
  store i8 %127, ptr %128, align 2, !tbaa !11
  %129 = call i32 @rand() #5
  %130 = trunc i32 %129 to i8
  %131 = getelementptr inbounds i8, ptr %9, i64 39
  store i8 %130, ptr %131, align 1, !tbaa !11
  %132 = call i32 @rand() #5
  %133 = trunc i32 %132 to i8
  %134 = getelementptr inbounds i8, ptr %9, i64 40
  store i8 %133, ptr %134, align 8, !tbaa !11
  %135 = call i32 @rand() #5
  %136 = trunc i32 %135 to i8
  %137 = getelementptr inbounds i8, ptr %9, i64 41
  store i8 %136, ptr %137, align 1, !tbaa !11
  %138 = call i32 @rand() #5
  %139 = trunc i32 %138 to i8
  %140 = getelementptr inbounds i8, ptr %9, i64 42
  store i8 %139, ptr %140, align 2, !tbaa !11
  %141 = call i32 @rand() #5
  %142 = trunc i32 %141 to i8
  %143 = getelementptr inbounds i8, ptr %9, i64 43
  store i8 %142, ptr %143, align 1, !tbaa !11
  %144 = call i32 @rand() #5
  %145 = trunc i32 %144 to i8
  %146 = getelementptr inbounds i8, ptr %9, i64 44
  store i8 %145, ptr %146, align 4, !tbaa !11
  %147 = call i32 @rand() #5
  %148 = trunc i32 %147 to i8
  %149 = getelementptr inbounds i8, ptr %9, i64 45
  store i8 %148, ptr %149, align 1, !tbaa !11
  %150 = call i32 @rand() #5
  %151 = trunc i32 %150 to i8
  %152 = getelementptr inbounds i8, ptr %9, i64 46
  store i8 %151, ptr %152, align 2, !tbaa !11
  %153 = call i32 @rand() #5
  %154 = trunc i32 %153 to i8
  %155 = getelementptr inbounds i8, ptr %9, i64 47
  store i8 %154, ptr %155, align 1, !tbaa !11
  %156 = call i32 @rand() #5
  %157 = trunc i32 %156 to i8
  %158 = getelementptr inbounds i8, ptr %9, i64 48
  store i8 %157, ptr %158, align 16, !tbaa !11
  %159 = call i32 @rand() #5
  %160 = trunc i32 %159 to i8
  %161 = getelementptr inbounds i8, ptr %9, i64 49
  store i8 %160, ptr %161, align 1, !tbaa !11
  %162 = call i32 @rand() #5
  %163 = trunc i32 %162 to i8
  %164 = getelementptr inbounds i8, ptr %9, i64 50
  store i8 %163, ptr %164, align 2, !tbaa !11
  %165 = call i32 @rand() #5
  %166 = trunc i32 %165 to i8
  %167 = getelementptr inbounds i8, ptr %9, i64 51
  store i8 %166, ptr %167, align 1, !tbaa !11
  %168 = call i32 @rand() #5
  %169 = trunc i32 %168 to i8
  %170 = getelementptr inbounds i8, ptr %9, i64 52
  store i8 %169, ptr %170, align 4, !tbaa !11
  %171 = call i32 @rand() #5
  %172 = trunc i32 %171 to i8
  %173 = getelementptr inbounds i8, ptr %9, i64 53
  store i8 %172, ptr %173, align 1, !tbaa !11
  %174 = call i32 @rand() #5
  %175 = trunc i32 %174 to i8
  %176 = getelementptr inbounds i8, ptr %9, i64 54
  store i8 %175, ptr %176, align 2, !tbaa !11
  %177 = call i32 @rand() #5
  %178 = trunc i32 %177 to i8
  %179 = getelementptr inbounds i8, ptr %9, i64 55
  store i8 %178, ptr %179, align 1, !tbaa !11
  %180 = call i32 @rand() #5
  %181 = trunc i32 %180 to i8
  %182 = getelementptr inbounds i8, ptr %9, i64 56
  store i8 %181, ptr %182, align 8, !tbaa !11
  %183 = call i32 @rand() #5
  %184 = trunc i32 %183 to i8
  %185 = getelementptr inbounds i8, ptr %9, i64 57
  store i8 %184, ptr %185, align 1, !tbaa !11
  %186 = call i32 @rand() #5
  %187 = trunc i32 %186 to i8
  %188 = getelementptr inbounds i8, ptr %9, i64 58
  store i8 %187, ptr %188, align 2, !tbaa !11
  %189 = call i32 @rand() #5
  %190 = trunc i32 %189 to i8
  %191 = getelementptr inbounds i8, ptr %9, i64 59
  store i8 %190, ptr %191, align 1, !tbaa !11
  %192 = call i32 @rand() #5
  %193 = trunc i32 %192 to i8
  %194 = getelementptr inbounds i8, ptr %9, i64 60
  store i8 %193, ptr %194, align 4, !tbaa !11
  %195 = call i32 @rand() #5
  %196 = trunc i32 %195 to i8
  %197 = getelementptr inbounds i8, ptr %9, i64 61
  store i8 %196, ptr %197, align 1, !tbaa !11
  %198 = call i32 @rand() #5
  %199 = trunc i32 %198 to i8
  %200 = getelementptr inbounds i8, ptr %9, i64 62
  store i8 %199, ptr %200, align 2, !tbaa !11
  %201 = call i32 @rand() #5
  %202 = trunc i32 %201 to i8
  %203 = getelementptr inbounds i8, ptr %9, i64 63
  store i8 %202, ptr %203, align 1, !tbaa !11
  call void @bpacketgen_encode(ptr noundef %7, ptr noundef nonnull %9, ptr noundef nonnull %11) #5
  %204 = call i32 @getrusage(i32 noundef 0, ptr noundef %0) #5
  %205 = load i64, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i64 %205, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3, %.lr.ph
  %.134 = phi i64 [ %226, %.lr.ph ], [ 0, %3 ]
  %206 = shl i64 %.134, 2
  %207 = urem i64 %206, %10
  %208 = getelementptr inbounds i8, ptr %11, i64 %207
  %209 = load i8, ptr %208, align 1, !tbaa !11
  %210 = call i32 @bpacketsync_execute_byte(ptr noundef %12, i8 noundef zeroext %209) #5
  %211 = or disjoint i64 %206, 1
  %212 = urem i64 %211, %10
  %213 = getelementptr inbounds i8, ptr %11, i64 %212
  %214 = load i8, ptr %213, align 1, !tbaa !11
  %215 = call i32 @bpacketsync_execute_byte(ptr noundef %12, i8 noundef zeroext %214) #5
  %216 = or disjoint i64 %206, 2
  %217 = urem i64 %216, %10
  %218 = getelementptr inbounds i8, ptr %11, i64 %217
  %219 = load i8, ptr %218, align 1, !tbaa !11
  %220 = call i32 @bpacketsync_execute_byte(ptr noundef %12, i8 noundef zeroext %219) #5
  %221 = or disjoint i64 %206, 3
  %222 = urem i64 %221, %10
  %223 = getelementptr inbounds i8, ptr %11, i64 %222
  %224 = load i8, ptr %223, align 1, !tbaa !11
  %225 = call i32 @bpacketsync_execute_byte(ptr noundef %12, i8 noundef zeroext %224) #5
  %226 = add nuw i64 %.134, 1
  %227 = load i64, ptr %2, align 8, !tbaa !5
  %228 = icmp ult i64 %226, %227
  br i1 %228, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %3
  %229 = call i32 @getrusage(i32 noundef 0, ptr noundef %1) #5
  %230 = load i64, ptr %2, align 8, !tbaa !5
  %231 = shl i64 %230, 2
  store i64 %231, ptr %2, align 8, !tbaa !5
  %232 = load i32, ptr %4, align 4, !tbaa !9
  %233 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %232)
  call void @bpacketgen_destroy(ptr noundef %7) #5
  %234 = call i32 @bpacketsync_destroy(ptr noundef %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  ret void
}

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

declare ptr @bpacketgen_create(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @bpacketgen_get_packet_len(ptr noundef) local_unnamed_addr #2

declare ptr @bpacketsync_create(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @bpacketsync_benchmark_callback(ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%struct.framesyncstats_s) align 8, ptr noundef) #0

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

declare void @bpacketgen_encode(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @bpacketsync_execute_byte(ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

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

declare void @bpacketgen_destroy(ptr noundef) local_unnamed_addr #2

declare i32 @bpacketsync_destroy(ptr noundef) local_unnamed_addr #2

; 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 = { "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 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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