; LLVM IR from jgaeddert/liquid-dsp :: examples (modem_pi4dqpsk_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 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca float, align 4
  %3 = alloca i32, align 4
  %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 { float, float }, align 4
  %11 = alloca { float, float }, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca { float, float }, align 4
  %17 = alloca { float, float }, align 4
  %18 = alloca { float, float }, align 4
  %19 = alloca { float, float }, align 4
  %20 = alloca { float, float }, align 4
  %21 = alloca { float, float }, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store float 2.500000e+01, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 800, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %22 = call ptr @modemcf_create(i32 noundef 51)
  store ptr %22, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %23 = call ptr @modemcf_create(i32 noundef 51)
  store ptr %23, ptr %5, align 8, !tbaa !11
  %24 = load ptr, ptr %4, align 8, !tbaa !11
  %25 = call i32 @modemcf_print(ptr noundef %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %26 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %26, ptr %6, align 8, !tbaa !11
  %27 = load ptr, ptr %6, align 8, !tbaa !11
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.2, ptr noundef @.str) #4
  %29 = load ptr, ptr %6, align 8, !tbaa !11
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef @.str.3) #4
  %31 = load ptr, ptr %6, align 8, !tbaa !11
  %32 = load i32, ptr %3, align 4, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.4, i32 noundef %32) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %34 = load float, ptr %2, align 4, !tbaa !5
  %35 = fneg float %34
  %36 = fdiv float %35, 2.000000e+01
  %37 = call float @powf(float noundef 1.000000e+01, float noundef %36) #4
  store float %37, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store float 0.000000e+00, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %163, %0
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = load i32, ptr %3, align 4, !tbaa !9
  %41 = icmp ult i32 %39, %40
  br i1 %41, label %42, label %166

42:                                               ; preds = %38
  %43 = call i32 @rand() #4
  %44 = and i32 %43, 3
  store i32 %44, ptr %8, align 4, !tbaa !9
  %45 = load ptr, ptr %4, align 8, !tbaa !11
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = call i32 @modemcf_modulate(ptr noundef %45, i32 noundef %46, ptr noundef %10)
  %48 = getelementptr inbounds { float, float }, ptr %10, i32 0, i32 0
  %49 = load float, ptr %48, align 4
  %50 = getelementptr inbounds { float, float }, ptr %10, i32 0, i32 1
  %51 = load float, ptr %50, align 4
  %52 = fpext float %49 to double
  %53 = fpext float %51 to double
  %54 = load float, ptr %14, align 4, !tbaa !5
  %55 = call float (...) @randnf()
  %56 = call float (...) @randnf()
  %57 = fmul float 0.000000e+00, %56
  %58 = fmul float 1.000000e+00, %56
  %59 = fadd float %55, %57
  %60 = fmul float %54, %59
  %61 = fmul float %54, %58
  %62 = fpext float %60 to double
  %63 = fpext float %61 to double
  %64 = fmul double %62, 0x3FE6A09E667F3BCD
  %65 = fmul double %63, 0x3FE6A09E667F3BCD
  %66 = fadd double %52, %64
  %67 = fadd double %53, %65
  %68 = fptrunc double %66 to float
  %69 = fptrunc double %67 to float
  %70 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %71 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  store float %68, ptr %70, align 4
  store float %69, ptr %71, align 4
  %72 = load ptr, ptr %5, align 8, !tbaa !11
  %73 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %74 = load float, ptr %73, align 4
  %75 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  %76 = load float, ptr %75, align 4
  %77 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %78 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float %74, ptr %77, align 4
  store float %76, ptr %78, align 4
  %79 = load <2 x float>, ptr %17, align 4
  %80 = call i32 @modemcf_demodulate(ptr noundef %72, <2 x float> noundef %79, ptr noundef %9)
  %81 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %82 = load float, ptr %81, align 4
  %83 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  %84 = load float, ptr %83, align 4
  %85 = load float, ptr %15, align 4, !tbaa !5
  %86 = fmul float -0.000000e+00, %85
  %87 = fmul float -1.000000e+00, %85
  %88 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 0
  %89 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 1
  store float %86, ptr %88, align 4
  store float %87, ptr %89, align 4
  %90 = load <2 x float>, ptr %18, align 4
  %91 = call <2 x float> @cexpf(<2 x float> noundef %90) #4
  store <2 x float> %91, ptr %19, align 4
  %92 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 0
  %93 = load float, ptr %92, align 4
  %94 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 1
  %95 = load float, ptr %94, align 4
  %96 = fmul float %82, %93
  %97 = fmul float %84, %95
  %98 = fmul float %82, %95
  %99 = fmul float %84, %93
  %100 = fsub float %96, %97
  %101 = fadd float %98, %99
  %102 = fcmp uno float %100, %100
  br i1 %102, label %103, label %111, !prof !13

103:                                              ; preds = %42
  %104 = fcmp uno float %101, %101
  br i1 %104, label %105, label %111, !prof !13

105:                                              ; preds = %103
  %106 = call <2 x float> @__mulsc3(float noundef %82, float noundef %84, float noundef %93, float noundef %95) #4
  store <2 x float> %106, ptr %20, align 4
  %107 = getelementptr inbounds { float, float }, ptr %20, i32 0, i32 0
  %108 = load float, ptr %107, align 4
  %109 = getelementptr inbounds { float, float }, ptr %20, i32 0, i32 1
  %110 = load float, ptr %109, align 4
  br label %111

111:                                              ; preds = %105, %103, %42
  %112 = phi float [ %100, %42 ], [ %100, %103 ], [ %108, %105 ]
  %113 = phi float [ %101, %42 ], [ %101, %103 ], [ %110, %105 ]
  %114 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 0
  %115 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 1
  store float %112, ptr %114, align 4
  store float %113, ptr %115, align 4
  %116 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %117 = load float, ptr %116, align 4
  %118 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  %119 = load float, ptr %118, align 4
  %120 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 0
  %121 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 1
  store float %117, ptr %120, align 4
  store float %119, ptr %121, align 4
  %122 = load <2 x float>, ptr %21, align 4
  %123 = call float @cargf(<2 x float> noundef %122) #4
  store float %123, ptr %15, align 4, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = load i32, ptr %9, align 4, !tbaa !9
  %126 = icmp ne i32 %124, %125
  %127 = zext i1 %126 to i32
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = add i32 %128, %127
  store i32 %129, ptr %12, align 4, !tbaa !9
  %130 = load i32, ptr %8, align 4, !tbaa !9
  %131 = load i32, ptr %9, align 4, !tbaa !9
  %132 = call i32 @count_bit_errors(i32 noundef %130, i32 noundef %131)
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = add i32 %133, %132
  store i32 %134, ptr %13, align 4, !tbaa !9
  %135 = load ptr, ptr %6, align 8, !tbaa !11
  %136 = load i32, ptr %7, align 4, !tbaa !9
  %137 = add i32 %136, 1
  %138 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %139 = load float, ptr %138, align 4
  %140 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  %141 = load float, ptr %140, align 4
  %142 = fpext float %139 to double
  %143 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 0
  %144 = load float, ptr %143, align 4
  %145 = getelementptr inbounds { float, float }, ptr %11, i32 0, i32 1
  %146 = load float, ptr %145, align 4
  %147 = fpext float %146 to double
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.5, i32 noundef %137, double noundef %142, double noundef %147) #4
  %149 = load ptr, ptr %6, align 8, !tbaa !11
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = add i32 %150, 1
  %152 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 0
  %153 = load float, ptr %152, align 4
  %154 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 1
  %155 = load float, ptr %154, align 4
  %156 = fpext float %153 to double
  %157 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 0
  %158 = load float, ptr %157, align 4
  %159 = getelementptr inbounds { float, float }, ptr %16, i32 0, i32 1
  %160 = load float, ptr %159, align 4
  %161 = fpext float %160 to double
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str.6, i32 noundef %151, double noundef %156, double noundef %161) #4
  br label %163

163:                                              ; preds = %111
  %164 = load i32, ptr %7, align 4, !tbaa !9
  %165 = add i32 %164, 1
  store i32 %165, ptr %7, align 4, !tbaa !9
  br label %38, !llvm.loop !14

166:                                              ; preds = %38
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = load i32, ptr %3, align 4, !tbaa !9
  %169 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %167, i32 noundef %168)
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = load i32, ptr %3, align 4, !tbaa !9
  %172 = mul i32 %171, 2
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %170, i32 noundef %172)
  %174 = load ptr, ptr %4, align 8, !tbaa !11
  %175 = call i32 @modemcf_destroy(ptr noundef %174)
  %176 = load ptr, ptr %5, align 8, !tbaa !11
  %177 = call i32 @modemcf_destroy(ptr noundef %176)
  %178 = load ptr, ptr %6, align 8, !tbaa !11
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef @.str.9) #4
  %180 = load ptr, ptr %6, align 8, !tbaa !11
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.10) #4
  %182 = load ptr, ptr %6, align 8, !tbaa !11
  %183 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %182, ptr noundef @.str.11) #4
  %184 = load ptr, ptr %6, align 8, !tbaa !11
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %184, ptr noundef @.str.12) #4
  %186 = load ptr, ptr %6, align 8, !tbaa !11
  %187 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %186, ptr noundef @.str.13) #4
  %188 = load ptr, ptr %6, align 8, !tbaa !11
  %189 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %188, ptr noundef @.str.14) #4
  %190 = load ptr, ptr %6, align 8, !tbaa !11
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.15) #4
  %192 = load ptr, ptr %6, align 8, !tbaa !11
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef @.str.16) #4
  %194 = load ptr, ptr %6, align 8, !tbaa !11
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.17) #4
  %196 = load ptr, ptr %6, align 8, !tbaa !11
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %196, ptr noundef @.str.18) #4
  %198 = load ptr, ptr %6, align 8, !tbaa !11
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.19) #4
  %200 = load ptr, ptr %6, align 8, !tbaa !11
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.20) #4
  %202 = load ptr, ptr %6, align 8, !tbaa !11
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef @.str.13) #4
  %204 = load ptr, ptr %6, align 8, !tbaa !11
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef @.str.14) #4
  %206 = load ptr, ptr %6, align 8, !tbaa !11
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str.15) #4
  %208 = load ptr, ptr %6, align 8, !tbaa !11
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %208, ptr noundef @.str.16) #4
  %210 = load ptr, ptr %6, align 8, !tbaa !11
  %211 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.17) #4
  %212 = load ptr, ptr %6, align 8, !tbaa !11
  %213 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef @.str.21) #4
  %214 = load ptr, ptr %6, align 8, !tbaa !11
  %215 = call i32 @fclose(ptr noundef %214)
  %216 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

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

declare ptr @modemcf_create(i32 noundef) #2

declare i32 @modemcf_print(ptr noundef) #2

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

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

; Function Attrs: nounwind
declare float @powf(float noundef, float noundef) #3

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

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

declare float @randnf(...) #2

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) #3

declare <2 x float> @__mulsc3(float, float, float, float)

; Function Attrs: nounwind
declare float @cargf(<2 x float> noundef) #3

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

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

declare i32 @modemcf_destroy(ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

; 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"="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 #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 = { 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 = { 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 = !{!"float", !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 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"branch_weights", i32 1, i32 1048575}
!14 = distinct !{!14, !15}
!15 = !{!"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"

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca { float, float }, align 8
  %3 = tail call ptr @modemcf_create(i32 noundef 51) #5
  %4 = tail call ptr @modemcf_create(i32 noundef 51) #5
  %5 = tail call i32 @modemcf_print(ptr noundef %3) #5
  %6 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str) #5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.3) #5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.4, i32 noundef 800) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  br label %10

10:                                               ; preds = %0, %47
  %.071 = phi i32 [ 0, %0 ], [ %57, %47 ]
  %.06570 = phi i32 [ 0, %0 ], [ %54, %47 ]
  %.06669 = phi i32 [ 0, %0 ], [ %56, %47 ]
  %.06768 = phi float [ 0.000000e+00, %0 ], [ %50, %47 ]
  %11 = call i32 @rand() #5
  %12 = and i32 %11, 3
  %13 = call i32 @modemcf_modulate(ptr noundef %3, i32 noundef %12, ptr noundef nonnull %2) #5
  %14 = fmul float %.06768, -0.000000e+00
  %15 = fneg float %.06768
  %.sroa.04.0.vec.insert = insertelement <2 x float> poison, float %14, i64 0
  %.sroa.04.4.vec.insert = insertelement <2 x float> %.sroa.04.0.vec.insert, float %15, i64 1
  %16 = load <2 x float>, ptr %2, align 8
  %17 = fpext <2 x float> %16 to <2 x double>
  %18 = call float (...) @randnf() #5
  %19 = call float (...) @randnf() #5
  %20 = fmul float %19, 0.000000e+00
  %21 = fadd float %18, %20
  %22 = insertelement <2 x float> poison, float %21, i64 0
  %23 = insertelement <2 x float> %22, float %19, i64 1
  %24 = fmul <2 x float> %23, <float 0x3FACCAB860000000, float 0x3FACCAB860000000>
  %25 = fpext <2 x float> %24 to <2 x double>
  %26 = fmul <2 x double> %25, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %27 = fadd <2 x double> %26, %17
  %28 = fptrunc <2 x double> %27 to <2 x float>
  %29 = call i32 @modemcf_demodulate(ptr noundef %4, <2 x float> noundef %28, ptr noundef nonnull %1) #5
  %30 = call <2 x float> @cexpf(<2 x float> noundef %.sroa.04.4.vec.insert) #5
  %31 = fmul <2 x float> %30, %28
  %32 = shufflevector <2 x float> %28, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %33 = fmul <2 x float> %30, %32
  %shift = shufflevector <2 x float> %31, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %34 = fsub <2 x float> %31, %shift
  %35 = extractelement <2 x float> %34, i64 0
  %shift75 = shufflevector <2 x float> %33, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %36 = fadd <2 x float> %33, %shift75
  %37 = extractelement <2 x float> %36, i64 0
  %38 = fcmp uno float %35, 0.000000e+00
  br i1 %38, label %39, label %47, !prof !5

39:                                               ; preds = %10
  %40 = fcmp uno float %37, 0.000000e+00
  br i1 %40, label %41, label %47, !prof !5

41:                                               ; preds = %39
  %42 = extractelement <2 x float> %30, i64 0
  %43 = extractelement <2 x float> %30, i64 1
  %44 = extractelement <2 x float> %28, i64 0
  %45 = extractelement <2 x float> %28, i64 1
  %46 = call <2 x float> @__mulsc3(float noundef %44, float noundef %45, float noundef %42, float noundef %43) #5
  %.sroa.02.0.vec.extract = extractelement <2 x float> %46, i64 0
  %.sroa.02.4.vec.extract = extractelement <2 x float> %46, i64 1
  br label %47

47:                                               ; preds = %41, %39, %10
  %48 = phi float [ %35, %10 ], [ %35, %39 ], [ %.sroa.02.0.vec.extract, %41 ]
  %49 = phi float [ %37, %10 ], [ %37, %39 ], [ %.sroa.02.4.vec.extract, %41 ]
  %50 = call float @cargf(<2 x float> noundef %28) #5
  %51 = load i32, ptr %1, align 4, !tbaa !6
  %52 = icmp ne i32 %12, %51
  %53 = zext i1 %52 to i32
  %54 = add i32 %.06570, %53
  %55 = call i32 @count_bit_errors(i32 noundef %12, i32 noundef %51) #5
  %56 = add i32 %55, %.06669
  %57 = add nuw nsw i32 %.071, 1
  %58 = extractelement <2 x float> %28, i64 0
  %59 = fpext float %58 to double
  %60 = extractelement <2 x float> %28, i64 1
  %61 = fpext float %60 to double
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.5, i32 noundef %57, double noundef %59, double noundef %61) #5
  %63 = fpext float %48 to double
  %64 = fpext float %49 to double
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.6, i32 noundef %57, double noundef %63, double noundef %64) #5
  %exitcond.not = icmp eq i32 %57, 800
  br i1 %exitcond.not, label %66, label %10, !llvm.loop !10

66:                                               ; preds = %47
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %54, i32 noundef 800)
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %56, i32 noundef 1600)
  %69 = call i32 @modemcf_destroy(ptr noundef %3) #5
  %70 = call i32 @modemcf_destroy(ptr noundef %4) #5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.9) #5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.10) #5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.11) #5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.12) #5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.13) #5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.14) #5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.15) #5
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.16) #5
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.17) #5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.18) #5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.19) #5
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.20) #5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.13) #5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.14) #5
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.15) #5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.16) #5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.17) #5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.21) #5
  %89 = call i32 @fclose(ptr noundef %6)
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef nonnull @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  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

declare ptr @modemcf_create(i32 noundef) local_unnamed_addr #2

declare i32 @modemcf_print(ptr noundef) local_unnamed_addr #2

; 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 noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

declare float @randnf(...) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare <2 x float> @cexpf(<2 x float> noundef) local_unnamed_addr #4

declare <2 x float> @__mulsc3(float, float, float, float) local_unnamed_addr

; Function Attrs: nounwind
declare float @cargf(<2 x float> noundef) local_unnamed_addr #4

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

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

declare i32 @modemcf_destroy(ptr noundef) local_unnamed_addr #2

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


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