; LLVM IR from jgaeddert/liquid-dsp :: examples (modem_soft_example)

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

@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @print_bitstring(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca { float, float }, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca { float, float }, align 4
  %22 = 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 4, ptr %6) #7
  store i32 40, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  br label %23

23:                                               ; preds = %45, %2
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = call i32 @getopt(i32 noundef %24, ptr noundef %25, ptr noundef @.str.5) #7
  store i32 %26, ptr %7, align 4, !tbaa !5
  %27 = icmp ne i32 %26, -1
  br i1 %27, label %28, label %46

28:                                               ; preds = %23
  %29 = load i32, ptr %7, align 4, !tbaa !5
  switch i32 %29, label %44 [
    i32 104, label %30
    i32 109, label %31
  ]

30:                                               ; preds = %28
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %147

31:                                               ; preds = %28
  %32 = load ptr, ptr @optarg, align 8, !tbaa !9
  %33 = call i32 @liquid_getopt_str2mod(ptr noundef %32)
  store i32 %33, ptr %6, align 4, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %43

36:                                               ; preds = %31
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 0
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = load ptr, ptr @optarg, align 8, !tbaa !9
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.6, ptr noundef %40, ptr noundef %41) #7
  store i32 1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %147

43:                                               ; preds = %31
  br label %45

44:                                               ; preds = %28
  call void @exit(i32 noundef 1) #8
  unreachable

45:                                               ; preds = %43
  br label %23, !llvm.loop !11

46:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = call ptr @modemcf_create(i32 noundef %47)
  store ptr %48, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = call ptr @modemcf_create(i32 noundef %49)
  store ptr %50, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %51 = load ptr, ptr %9, align 8, !tbaa !9
  %52 = call i32 @modemcf_get_bps(ptr noundef %51)
  store i32 %52, ptr %11, align 4, !tbaa !5
  %53 = load ptr, ptr %9, align 8, !tbaa !9
  %54 = call i32 @modemcf_print(ptr noundef %53)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %56 = zext i32 %55 to i64
  %57 = call ptr @llvm.stacksave.p0()
  store ptr %57, ptr %14, align 8
  %58 = alloca i8, i64 %56, align 16
  store i64 %56, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %60 = shl i32 1, %59
  store i32 %60, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef @.str.9, ptr noundef @.str.10, ptr noundef @.str.11)
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %70, %46
  %64 = load i32, ptr %12, align 4, !tbaa !5
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = icmp ult i32 %64, %65
  br i1 %66, label %67, label %73

67:                                               ; preds = %63
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i32 noundef %68)
  br label %70

70:                                               ; preds = %67
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = add i32 %71, 1
  store i32 %72, ptr %12, align 4, !tbaa !5
  br label %63, !llvm.loop !13

73:                                               ; preds = %63
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %130, %73
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = load i32, ptr %17, align 4, !tbaa !5
  %78 = icmp ult i32 %76, %77
  br i1 %78, label %79, label %133

79:                                               ; preds = %75
  %80 = load ptr, ptr %9, align 8, !tbaa !9
  %81 = load i32, ptr %12, align 4, !tbaa !5
  %82 = call i32 @modemcf_modulate(ptr noundef %80, i32 noundef %81, ptr noundef %18)
  %83 = load ptr, ptr %10, align 8, !tbaa !9
  %84 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 0
  %85 = load float, ptr %84, align 4
  %86 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 1
  %87 = load float, ptr %86, align 4
  %88 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 0
  %89 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 1
  store float %85, ptr %88, align 4
  store float %87, ptr %89, align 4
  %90 = load <2 x float>, ptr %21, align 4
  %91 = call i32 @modemcf_demodulate_soft(ptr noundef %83, <2 x float> noundef %90, ptr noundef %13, ptr noundef %58)
  %92 = load i32, ptr %11, align 4, !tbaa !5
  %93 = call i32 @liquid_pack_soft_bits(ptr noundef %58, i32 noundef %92, ptr noundef %16)
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %95 = load i32, ptr %12, align 4, !tbaa !5
  %96 = load i32, ptr %11, align 4, !tbaa !5
  call void @print_bitstring(i32 noundef %95, i32 noundef %96, i32 noundef 12)
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = load i32, ptr %11, align 4, !tbaa !5
  call void @print_bitstring(i32 noundef %97, i32 noundef %98, i32 noundef 12)
  %99 = load i32, ptr %16, align 4, !tbaa !5
  %100 = load i32, ptr %11, align 4, !tbaa !5
  call void @print_bitstring(i32 noundef %99, i32 noundef %100, i32 noundef 12)
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %113, %79
  %103 = load i32, ptr %22, align 4, !tbaa !5
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = icmp ult i32 %103, %104
  br i1 %105, label %106, label %116

106:                                              ; preds = %102
  %107 = load i32, ptr %22, align 4, !tbaa !5
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %58, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !14
  %111 = zext i8 %110 to i32
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %111)
  br label %113

113:                                              ; preds = %106
  %114 = load i32, ptr %22, align 4, !tbaa !5
  %115 = add i32 %114, 1
  store i32 %115, ptr %22, align 4, !tbaa !5
  br label %102, !llvm.loop !15

116:                                              ; preds = %102
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = icmp eq i32 %118, %119
  %121 = zext i1 %120 to i64
  %122 = select i1 %120, i32 0, i32 1
  %123 = load i32, ptr %19, align 4, !tbaa !5
  %124 = add i32 %123, %122
  store i32 %124, ptr %19, align 4, !tbaa !5
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = load i32, ptr %16, align 4, !tbaa !5
  %127 = call i32 @count_bit_errors(i32 noundef %125, i32 noundef %126)
  %128 = load i32, ptr %20, align 4, !tbaa !5
  %129 = add i32 %128, %127
  store i32 %129, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %130

130:                                              ; preds = %116
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = add i32 %131, 1
  store i32 %132, ptr %12, align 4, !tbaa !5
  br label %75, !llvm.loop !16

133:                                              ; preds = %75
  %134 = load i32, ptr %19, align 4, !tbaa !5
  %135 = load i32, ptr %17, align 4, !tbaa !5
  %136 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %134, i32 noundef %135)
  %137 = load i32, ptr %20, align 4, !tbaa !5
  %138 = load i32, ptr %17, align 4, !tbaa !5
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = mul i32 %138, %139
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %137, i32 noundef %140)
  %142 = load ptr, ptr %9, align 8, !tbaa !9
  %143 = call i32 @modemcf_destroy(ptr noundef %142)
  %144 = load ptr, ptr %10, align 8, !tbaa !9
  %145 = call i32 @modemcf_destroy(ptr noundef %144)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %146 = load ptr, ptr %14, align 8
  call void @llvm.stackrestore.p0(ptr %146)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %147

147:                                              ; preds = %133, %36, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %148 = load i32, ptr %3, align 4
  ret i32 %148
}

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

declare i32 @liquid_getopt_str2mod(ptr noundef) #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

declare ptr @modemcf_create(i32 noundef) #1

declare i32 @modemcf_get_bps(ptr noundef) #1

declare i32 @modemcf_print(ptr noundef) #1

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

declare i32 @modemcf_modulate(ptr noundef, i32 noundef, ptr noundef) #1

declare i32 @modemcf_demodulate_soft(ptr noundef, <2 x float> noundef, ptr noundef, ptr noundef) #1

declare i32 @liquid_pack_soft_bits(ptr noundef, i32 noundef, ptr noundef) #1

declare i32 @count_bit_errors(i32 noundef, i32 noundef) #1

declare i32 @modemcf_destroy(ptr noundef) #1

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

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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { 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 = { noreturn 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 #6 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @usage() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @print_bitstring(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca { float, float }, align 8
  br label %6

6:                                                ; preds = %9, %2
  %.046 = phi i32 [ 40, %2 ], [ %11, %9 ]
  %7 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.5) #8
  switch i32 %7, label %18 [
    i32 -1, label %19
    i32 104, label %8
    i32 109, label %9
  ]

8:                                                ; preds = %6
  tail call void @usage()
  br label %76

9:                                                ; preds = %6
  %10 = load ptr, ptr @optarg, align 8, !tbaa !5
  %11 = tail call i32 @liquid_getopt_str2mod(ptr noundef %10) #8
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %6, !llvm.loop !9

13:                                               ; preds = %9
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = load ptr, ptr @optarg, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.6, ptr noundef %15, ptr noundef %16) #9
  br label %76

18:                                               ; preds = %6
  tail call void @exit(i32 noundef 1) #10
  unreachable

19:                                               ; preds = %6
  %20 = tail call ptr @modemcf_create(i32 noundef %.046) #8
  %21 = tail call ptr @modemcf_create(i32 noundef %.046) #8
  %22 = tail call i32 @modemcf_get_bps(ptr noundef %20) #8
  %.fr66 = freeze i32 %22
  %23 = tail call i32 @modemcf_print(ptr noundef %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %24 = zext i32 %.fr66 to i64
  %25 = tail call ptr @llvm.stacksave.p0()
  %26 = alloca i8, i64 %24, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %27 = shl nuw i32 1, %.fr66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.11)
  %.not = icmp eq i32 %.fr66, 0
  br i1 %.not, label %.split.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %19, %.lr.ph
  %.04755 = phi i32 [ %31, %.lr.ph ], [ 0, %19 ]
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i32 noundef %.04755)
  %31 = add nuw i32 %.04755, 1
  %exitcond.not = icmp eq i32 %31, %.fr66
  br i1 %exitcond.not, label %.lr.ph58.us.preheader, label %.lr.ph, !llvm.loop !11

.lr.ph58.us.preheader:                            ; preds = %.lr.ph
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %.lr.ph58.us

.split.preheader:                                 ; preds = %19
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %.split

.lr.ph58.us:                                      ; preds = %.lr.ph58.us.preheader, %._crit_edge59.us
  %.04362.us = phi i32 [ %53, %._crit_edge59.us ], [ 0, %.lr.ph58.us.preheader ]
  %.04461.us = phi i32 [ %51, %._crit_edge59.us ], [ 0, %.lr.ph58.us.preheader ]
  %.160.us = phi i32 [ %54, %._crit_edge59.us ], [ 0, %.lr.ph58.us.preheader ]
  %34 = call i32 @modemcf_modulate(ptr noundef %20, i32 noundef %.160.us, ptr noundef nonnull %5) #8
  %35 = load <2 x float>, ptr %5, align 8
  %36 = call i32 @modemcf_demodulate_soft(ptr noundef %21, <2 x float> noundef %35, ptr noundef nonnull %3, ptr noundef nonnull %26) #8
  %37 = call i32 @liquid_pack_soft_bits(ptr noundef nonnull %26, i32 noundef %.fr66, ptr noundef nonnull %4) #8
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  call void @print_bitstring(i32 noundef %.160.us, i32 noundef %.fr66, i32 noundef 12)
  %39 = load i32, ptr %3, align 4, !tbaa !12
  call void @print_bitstring(i32 noundef %39, i32 noundef %.fr66, i32 noundef 12)
  %40 = load i32, ptr %4, align 4, !tbaa !12
  call void @print_bitstring(i32 noundef %40, i32 noundef %.fr66, i32 noundef 12)
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  br label %42

42:                                               ; preds = %.lr.ph58.us, %42
  %indvars.iv = phi i64 [ 0, %.lr.ph58.us ], [ %indvars.iv.next, %42 ]
  %43 = getelementptr inbounds i8, ptr %26, i64 %indvars.iv
  %44 = load i8, ptr %43, align 1, !tbaa !14
  %45 = zext i8 %44 to i32
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %45)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next, %24
  br i1 %exitcond76.not, label %._crit_edge59.us, label %42, !llvm.loop !15

._crit_edge59.us:                                 ; preds = %42
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %48 = load i32, ptr %4, align 4, !tbaa !12
  %49 = icmp ne i32 %.160.us, %48
  %50 = zext i1 %49 to i32
  %51 = add i32 %.04461.us, %50
  %52 = call i32 @count_bit_errors(i32 noundef %.160.us, i32 noundef %48) #8
  %53 = add i32 %52, %.04362.us
  %54 = add nuw i32 %.160.us, 1
  %exitcond77.not = icmp eq i32 %54, %27
  br i1 %exitcond77.not, label %.split64.us, label %.lr.ph58.us, !llvm.loop !16

.split:                                           ; preds = %.split.preheader, %.split
  %.04362 = phi i32 [ %69, %.split ], [ 0, %.split.preheader ]
  %.04461 = phi i32 [ %67, %.split ], [ 0, %.split.preheader ]
  %.160 = phi i32 [ %70, %.split ], [ 0, %.split.preheader ]
  %55 = call i32 @modemcf_modulate(ptr noundef %20, i32 noundef %.160, ptr noundef nonnull %5) #8
  %56 = load <2 x float>, ptr %5, align 8
  %57 = call i32 @modemcf_demodulate_soft(ptr noundef %21, <2 x float> noundef %56, ptr noundef nonnull %3, ptr noundef nonnull %26) #8
  %58 = call i32 @liquid_pack_soft_bits(ptr noundef nonnull %26, i32 noundef 0, ptr noundef nonnull %4) #8
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  call void @print_bitstring(i32 noundef %.160, i32 noundef 0, i32 noundef 12)
  %60 = load i32, ptr %3, align 4, !tbaa !12
  call void @print_bitstring(i32 noundef %60, i32 noundef 0, i32 noundef 12)
  %61 = load i32, ptr %4, align 4, !tbaa !12
  call void @print_bitstring(i32 noundef %61, i32 noundef 0, i32 noundef 12)
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %64 = load i32, ptr %4, align 4, !tbaa !12
  %65 = icmp ne i32 %.160, %64
  %66 = zext i1 %65 to i32
  %67 = add i32 %.04461, %66
  %68 = call i32 @count_bit_errors(i32 noundef %.160, i32 noundef %64) #8
  %69 = add i32 %68, %.04362
  %70 = add nuw i32 %.160, 1
  %exitcond79.not = icmp eq i32 %70, %27
  br i1 %exitcond79.not, label %.split64.us, label %.split, !llvm.loop !16

.split64.us:                                      ; preds = %._crit_edge59.us, %.split
  %.us-phi = phi i32 [ %67, %.split ], [ %51, %._crit_edge59.us ]
  %.us-phi65 = phi i32 [ %69, %.split ], [ %53, %._crit_edge59.us ]
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %.us-phi, i32 noundef %27)
  %72 = shl i32 %.fr66, %.fr66
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %.us-phi65, i32 noundef %72)
  %74 = call i32 @modemcf_destroy(ptr noundef %20) #8
  %75 = call i32 @modemcf_destroy(ptr noundef %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.stackrestore.p0(ptr %25)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %76

76:                                               ; preds = %.split64.us, %13, %8
  %.045 = phi i32 [ 1, %13 ], [ 0, %8 ], [ 0, %.split64.us ]
  ret i32 %.045
}

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

declare i32 @liquid_getopt_str2mod(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #6

declare ptr @modemcf_create(i32 noundef) local_unnamed_addr #5

declare i32 @modemcf_get_bps(ptr noundef) local_unnamed_addr #5

declare i32 @modemcf_print(ptr noundef) local_unnamed_addr #5

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

declare i32 @modemcf_modulate(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare i32 @modemcf_demodulate_soft(ptr noundef, <2 x float> noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

declare i32 @liquid_pack_soft_bits(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare i32 @count_bit_errors(i32 noundef, i32 noundef) local_unnamed_addr #5

declare i32 @modemcf_destroy(ptr noundef) local_unnamed_addr #5

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { 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 = { "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 = { noreturn 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 #7 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #8 = { nounwind }
attributes #9 = { cold nounwind }
attributes #10 = { noreturn 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass