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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.framesyncstats_s = type { float, float, float, ptr, i32, i32, i32, i32, i32, i32 }

@liquid_autotest_verbose = external global i32, align 4
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_bpacketsync() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 50, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 64, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 6, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 4, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = load i32, ptr %5, align 4, !tbaa !5
  %19 = call ptr @bpacketgen_create(i32 noundef 0, i32 noundef %15, i32 noundef %16, i32 noundef %17, i32 noundef %18)
  store ptr %19, ptr %6, align 8, !tbaa !9
  %20 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %0
  %23 = load ptr, ptr %6, align 8, !tbaa !9
  call void @bpacketgen_print(ptr noundef %23)
  br label %24

24:                                               ; preds = %22, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %25 = load ptr, ptr %6, align 8, !tbaa !9
  %26 = call i32 @bpacketgen_get_packet_len(ptr noundef %25)
  store i32 %26, ptr %7, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = call ptr @llvm.stacksave.p0()
  store ptr %29, ptr %8, align 8
  %30 = alloca i8, i64 %28, align 16
  store i64 %28, ptr %9, align 8
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = zext i32 %31 to i64
  %33 = alloca i8, i64 %32, align 16
  store i64 %32, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %34 = call ptr @bpacketsync_create(i32 noundef 0, ptr noundef @bpacketsync_autotest_callback, ptr noundef %11)
  store ptr %34, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %59, %24
  %36 = load i32, ptr %14, align 4, !tbaa !5
  %37 = load i32, ptr %1, align 4, !tbaa !5
  %38 = icmp ult i32 %36, %37
  br i1 %38, label %39, label %62

39:                                               ; preds = %35
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %51, %39
  %41 = load i32, ptr %13, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = icmp ult i32 %41, %42
  br i1 %43, label %44, label %54

44:                                               ; preds = %40
  %45 = call i32 @rand() #5
  %46 = srem i32 %45, 256
  %47 = trunc i32 %46 to i8
  %48 = load i32, ptr %13, align 4, !tbaa !5
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds i8, ptr %30, i64 %49
  store i8 %47, ptr %50, align 1, !tbaa !11
  br label %51

51:                                               ; preds = %44
  %52 = load i32, ptr %13, align 4, !tbaa !5
  %53 = add i32 %52, 1
  store i32 %53, ptr %13, align 4, !tbaa !5
  br label %40, !llvm.loop !12

54:                                               ; preds = %40
  %55 = load ptr, ptr %6, align 8, !tbaa !9
  call void @bpacketgen_encode(ptr noundef %55, ptr noundef %30, ptr noundef %33)
  %56 = load ptr, ptr %12, align 8, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !5
  %58 = call i32 @bpacketsync_execute(ptr noundef %56, ptr noundef %33, i32 noundef %57)
  br label %59

59:                                               ; preds = %54
  %60 = load i32, ptr %14, align 4, !tbaa !5
  %61 = add i32 %60, 1
  store i32 %61, ptr %14, align 4, !tbaa !5
  br label %35, !llvm.loop !14

62:                                               ; preds = %35
  %63 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %69

65:                                               ; preds = %62
  %66 = load i32, ptr %11, align 4, !tbaa !5
  %67 = load i32, ptr %1, align 4, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %66, i32 noundef %67)
  br label %69

69:                                               ; preds = %65, %62
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = load i32, ptr %1, align 4, !tbaa !5
  %72 = icmp ne i32 %70, %71
  br i1 %72, label %73, label %78

73:                                               ; preds = %69
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = uitofp i32 %74 to double
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = uitofp i32 %76 to double
  call void @liquid_autotest_failed_expr(ptr noundef @.str.1, i32 noundef 91, ptr noundef @.str.2, double noundef %75, ptr noundef @.str.3, ptr noundef @.str.4, double noundef %77)
  br label %79

78:                                               ; preds = %69
  call void (...) @liquid_autotest_passed()
  br label %79

79:                                               ; preds = %78, %73
  %80 = load ptr, ptr %6, align 8, !tbaa !9
  call void @bpacketgen_destroy(ptr noundef %80)
  %81 = load ptr, ptr %12, align 8, !tbaa !9
  %82 = call i32 @bpacketsync_destroy(ptr noundef %81)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %83 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %83)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #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 void @bpacketgen_print(ptr 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_autotest_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

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

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

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) #2

declare void @liquid_autotest_passed(...) #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 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}


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

@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [23 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @autotest_bpacketsync() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call ptr @bpacketgen_create(i32 noundef 0, i32 noundef 64, i32 noundef 6, i32 noundef 4, i32 noundef 1) #5
  %3 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %5, label %4

4:                                                ; preds = %0
  tail call void @bpacketgen_print(ptr noundef %2) #5
  br label %5

5:                                                ; preds = %4, %0
  %6 = tail call i32 @bpacketgen_get_packet_len(ptr noundef %2) #5
  %7 = alloca [64 x i8], align 16
  %8 = zext i32 %6 to i64
  %9 = alloca i8, i64 %8, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  %10 = call ptr @bpacketsync_create(i32 noundef 0, ptr noundef nonnull @bpacketsync_autotest_callback, ptr noundef nonnull %1) #5
  %11 = getelementptr inbounds i8, ptr %7, i64 1
  %12 = getelementptr inbounds i8, ptr %7, i64 2
  %13 = getelementptr inbounds i8, ptr %7, i64 3
  %14 = getelementptr inbounds i8, ptr %7, i64 4
  %15 = getelementptr inbounds i8, ptr %7, i64 5
  %16 = getelementptr inbounds i8, ptr %7, i64 6
  %17 = getelementptr inbounds i8, ptr %7, i64 7
  %18 = getelementptr inbounds i8, ptr %7, i64 8
  %19 = getelementptr inbounds i8, ptr %7, i64 9
  %20 = getelementptr inbounds i8, ptr %7, i64 10
  %21 = getelementptr inbounds i8, ptr %7, i64 11
  %22 = getelementptr inbounds i8, ptr %7, i64 12
  %23 = getelementptr inbounds i8, ptr %7, i64 13
  %24 = getelementptr inbounds i8, ptr %7, i64 14
  %25 = getelementptr inbounds i8, ptr %7, i64 15
  %26 = getelementptr inbounds i8, ptr %7, i64 16
  %27 = getelementptr inbounds i8, ptr %7, i64 17
  %28 = getelementptr inbounds i8, ptr %7, i64 18
  %29 = getelementptr inbounds i8, ptr %7, i64 19
  %30 = getelementptr inbounds i8, ptr %7, i64 20
  %31 = getelementptr inbounds i8, ptr %7, i64 21
  %32 = getelementptr inbounds i8, ptr %7, i64 22
  %33 = getelementptr inbounds i8, ptr %7, i64 23
  %34 = getelementptr inbounds i8, ptr %7, i64 24
  %35 = getelementptr inbounds i8, ptr %7, i64 25
  %36 = getelementptr inbounds i8, ptr %7, i64 26
  %37 = getelementptr inbounds i8, ptr %7, i64 27
  %38 = getelementptr inbounds i8, ptr %7, i64 28
  %39 = getelementptr inbounds i8, ptr %7, i64 29
  %40 = getelementptr inbounds i8, ptr %7, i64 30
  %41 = getelementptr inbounds i8, ptr %7, i64 31
  %42 = getelementptr inbounds i8, ptr %7, i64 32
  %43 = getelementptr inbounds i8, ptr %7, i64 33
  %44 = getelementptr inbounds i8, ptr %7, i64 34
  %45 = getelementptr inbounds i8, ptr %7, i64 35
  %46 = getelementptr inbounds i8, ptr %7, i64 36
  %47 = getelementptr inbounds i8, ptr %7, i64 37
  %48 = getelementptr inbounds i8, ptr %7, i64 38
  %49 = getelementptr inbounds i8, ptr %7, i64 39
  %50 = getelementptr inbounds i8, ptr %7, i64 40
  %51 = getelementptr inbounds i8, ptr %7, i64 41
  %52 = getelementptr inbounds i8, ptr %7, i64 42
  %53 = getelementptr inbounds i8, ptr %7, i64 43
  %54 = getelementptr inbounds i8, ptr %7, i64 44
  %55 = getelementptr inbounds i8, ptr %7, i64 45
  %56 = getelementptr inbounds i8, ptr %7, i64 46
  %57 = getelementptr inbounds i8, ptr %7, i64 47
  %58 = getelementptr inbounds i8, ptr %7, i64 48
  %59 = getelementptr inbounds i8, ptr %7, i64 49
  %60 = getelementptr inbounds i8, ptr %7, i64 50
  %61 = getelementptr inbounds i8, ptr %7, i64 51
  %62 = getelementptr inbounds i8, ptr %7, i64 52
  %63 = getelementptr inbounds i8, ptr %7, i64 53
  %64 = getelementptr inbounds i8, ptr %7, i64 54
  %65 = getelementptr inbounds i8, ptr %7, i64 55
  %66 = getelementptr inbounds i8, ptr %7, i64 56
  %67 = getelementptr inbounds i8, ptr %7, i64 57
  %68 = getelementptr inbounds i8, ptr %7, i64 58
  %69 = getelementptr inbounds i8, ptr %7, i64 59
  %70 = getelementptr inbounds i8, ptr %7, i64 60
  %71 = getelementptr inbounds i8, ptr %7, i64 61
  %72 = getelementptr inbounds i8, ptr %7, i64 62
  %73 = getelementptr inbounds i8, ptr %7, i64 63
  br label %.preheader

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

204:                                              ; preds = %.preheader
  %205 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %.not25 = icmp eq i32 %205, 0
  br i1 %.not25, label %209, label %206

206:                                              ; preds = %204
  %207 = load i32, ptr %1, align 4, !tbaa !5
  %208 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %207, i32 noundef 50)
  br label %209

209:                                              ; preds = %206, %204
  %210 = load i32, ptr %1, align 4, !tbaa !5
  %.not26 = icmp eq i32 %210, 50
  br i1 %.not26, label %213, label %211

211:                                              ; preds = %209
  %212 = uitofp i32 %210 to double
  call void @liquid_autotest_failed_expr(ptr noundef nonnull @.str.1, i32 noundef 91, ptr noundef nonnull @.str.2, double noundef %212, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, double noundef 5.000000e+01) #5
  br label %214

213:                                              ; preds = %209
  call void (...) @liquid_autotest_passed() #5
  br label %214

214:                                              ; preds = %213, %211
  call void @bpacketgen_destroy(ptr noundef %2) #5
  %215 = call i32 @bpacketsync_destroy(ptr noundef %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #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 void @bpacketgen_print(ptr 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_autotest_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

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

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

declare void @liquid_autotest_failed_expr(ptr noundef, i32 noundef, ptr noundef, double noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #2

declare void @liquid_autotest_passed(...) local_unnamed_addr #2

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass