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

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca { float, float }, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  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) #5
  store i32 16, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 6, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 5, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 65536, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 6.000000e+01, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 3, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !5
  %28 = load float, ptr %10, align 4, !tbaa !11
  %29 = call ptr @firpfbchr_crcf_create_kaiser(i32 noundef %25, i32 noundef %26, i32 noundef %27, float noundef %28)
  store ptr %29, ptr %13, align 8, !tbaa !9
  %30 = load ptr, ptr %13, align 8, !tbaa !9
  %31 = call i32 @firpfbchr_crcf_print(ptr noundef %30)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %32 = call ptr @msourcecf_create_default()
  store ptr %32, ptr %14, align 8, !tbaa !9
  %33 = load ptr, ptr %14, align 8, !tbaa !9
  %34 = call i32 @msourcecf_add_noise(ptr noundef %33, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef -6.000000e+01)
  %35 = load ptr, ptr %14, align 8, !tbaa !9
  %36 = call i32 @msourcecf_add_noise(ptr noundef %35, float noundef 0xBFD3333340000000, float noundef 0x3FB99999A0000000, float noundef -2.000000e+01)
  %37 = load ptr, ptr %14, align 8, !tbaa !9
  %38 = call i32 @msourcecf_add_tone(ptr noundef %37, float noundef 0x3FB47AE140000000, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %39 = load ptr, ptr %14, align 8, !tbaa !9
  %40 = load i32, ptr %12, align 4, !tbaa !5
  %41 = uitofp i32 %40 to float
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = uitofp i32 %42 to float
  %44 = fdiv float %41, %43
  %45 = call i32 @msourcecf_add_modem(ptr noundef %39, float noundef %44, float noundef 0x3FB47AE140000000, float noundef -2.000000e+01, i32 noundef 40, i32 noundef 12, float noundef 0x3FD3333340000000)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 2400, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %46 = load i32, ptr %15, align 4, !tbaa !5
  %47 = call ptr @spgramcf_create_default(i32 noundef %46)
  store ptr %47, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %48 = load i32, ptr %15, align 4, !tbaa !5
  %49 = call ptr @spgramcf_create_default(i32 noundef %48)
  store ptr %49, ptr %17, align 8, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = zext i32 %50 to i64
  %52 = call ptr @llvm.stacksave.p0()
  store ptr %52, ptr %18, align 8
  %53 = alloca { float, float }, i64 %51, align 16
  store i64 %51, ptr %19, align 8
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = zext i32 %54 to i64
  %56 = alloca { float, float }, i64 %55, align 16
  store i64 %55, ptr %20, align 8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %84, %2
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = icmp ult i32 %58, %59
  br i1 %60, label %61, label %87

61:                                               ; preds = %57
  %62 = load ptr, ptr %14, align 8, !tbaa !9
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = call i32 @msourcecf_write_samples(ptr noundef %62, ptr noundef %53, i32 noundef %63)
  %65 = load ptr, ptr %13, align 8, !tbaa !9
  %66 = call i32 @firpfbchr_crcf_push(ptr noundef %65, ptr noundef %53)
  %67 = load ptr, ptr %13, align 8, !tbaa !9
  %68 = call i32 @firpfbchr_crcf_execute(ptr noundef %67, ptr noundef %56)
  %69 = load ptr, ptr %16, align 8, !tbaa !9
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = call i32 @spgramcf_write(ptr noundef %69, ptr noundef %53, i32 noundef %70)
  %72 = load ptr, ptr %17, align 8, !tbaa !9
  %73 = load i32, ptr %12, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds { float, float }, ptr %56, i64 %74
  %76 = getelementptr inbounds { float, float }, ptr %75, i32 0, i32 0
  %77 = load float, ptr %76, align 8
  %78 = getelementptr inbounds { float, float }, ptr %75, i32 0, i32 1
  %79 = load float, ptr %78, align 4
  %80 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 0
  %81 = getelementptr inbounds { float, float }, ptr %21, i32 0, i32 1
  store float %77, ptr %80, align 4
  store float %79, ptr %81, align 4
  %82 = load <2 x float>, ptr %21, align 4
  %83 = call i32 @spgramcf_push(ptr noundef %72, <2 x float> noundef %82)
  br label %84

84:                                               ; preds = %61
  %85 = load i32, ptr %11, align 4, !tbaa !5
  %86 = add i32 %85, 1
  store i32 %86, ptr %11, align 4, !tbaa !5
  br label %57, !llvm.loop !13

87:                                               ; preds = %57
  %88 = load ptr, ptr %16, align 8, !tbaa !9
  %89 = call i32 @spgramcf_print(ptr noundef %88)
  %90 = load ptr, ptr %17, align 8, !tbaa !9
  %91 = call i32 @spgramcf_print(ptr noundef %90)
  %92 = load i32, ptr %15, align 4, !tbaa !5
  %93 = zext i32 %92 to i64
  %94 = alloca float, i64 %93, align 16
  store i64 %93, ptr %22, align 8
  %95 = load i32, ptr %15, align 4, !tbaa !5
  %96 = zext i32 %95 to i64
  %97 = alloca float, i64 %96, align 16
  store i64 %96, ptr %23, align 8
  %98 = load ptr, ptr %16, align 8, !tbaa !9
  %99 = call i32 @spgramcf_get_psd(ptr noundef %98, ptr noundef %94)
  %100 = load ptr, ptr %17, align 8, !tbaa !9
  %101 = call i32 @spgramcf_get_psd(ptr noundef %100, ptr noundef %97)
  %102 = load ptr, ptr %13, align 8, !tbaa !9
  %103 = call i32 @firpfbchr_crcf_destroy(ptr noundef %102)
  %104 = load ptr, ptr %14, align 8, !tbaa !9
  %105 = call i32 @msourcecf_destroy(ptr noundef %104)
  %106 = load ptr, ptr %16, align 8, !tbaa !9
  %107 = call i32 @spgramcf_destroy(ptr noundef %106)
  %108 = load ptr, ptr %17, align 8, !tbaa !9
  %109 = call i32 @spgramcf_destroy(ptr noundef %108)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %110 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %110, ptr %24, align 8, !tbaa !9
  %111 = load ptr, ptr %24, align 8, !tbaa !9
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str.2, ptr noundef @.str) #5
  %113 = load ptr, ptr %24, align 8, !tbaa !9
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef @.str.3) #5
  %115 = load ptr, ptr %24, align 8, !tbaa !9
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.4) #5
  %117 = load ptr, ptr %24, align 8, !tbaa !9
  %118 = load i32, ptr %15, align 4, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str.5, i32 noundef %118) #5
  %120 = load ptr, ptr %24, align 8, !tbaa !9
  %121 = load i32, ptr %6, align 4, !tbaa !5
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.6, i32 noundef %121) #5
  %123 = load ptr, ptr %24, align 8, !tbaa !9
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef @.str.7, i32 noundef %124) #5
  %126 = load ptr, ptr %24, align 8, !tbaa !9
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %126, ptr noundef @.str.8, i32 noundef %127) #5
  %129 = load ptr, ptr %24, align 8, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str.9, i32 noundef %130) #5
  %132 = load ptr, ptr %24, align 8, !tbaa !9
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.10) #5
  %134 = load ptr, ptr %24, align 8, !tbaa !9
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.11) #5
  %136 = load ptr, ptr %24, align 8, !tbaa !9
  %137 = load i32, ptr %12, align 4, !tbaa !5
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = udiv i32 %138, 2
  %140 = icmp ult i32 %137, %139
  br i1 %140, label %141, label %143

141:                                              ; preds = %87
  %142 = load i32, ptr %12, align 4, !tbaa !5
  br label %147

143:                                              ; preds = %87
  %144 = load i32, ptr %12, align 4, !tbaa !5
  %145 = load i32, ptr %6, align 4, !tbaa !5
  %146 = sub nsw i32 %144, %145
  br label %147

147:                                              ; preds = %143, %141
  %148 = phi i32 [ %142, %141 ], [ %146, %143 ]
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.12, i32 noundef %148) #5
  %150 = load ptr, ptr %24, align 8, !tbaa !9
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef @.str.13) #5
  %152 = load ptr, ptr %24, align 8, !tbaa !9
  %153 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef @.str.14) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %177, %147
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = icmp ult i32 %155, %156
  br i1 %157, label %158, label %180

158:                                              ; preds = %154
  %159 = load ptr, ptr %24, align 8, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = add i32 %160, 1
  %162 = load i32, ptr %11, align 4, !tbaa !5
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds float, ptr %94, i64 %163
  %165 = load float, ptr %164, align 4, !tbaa !11
  %166 = fpext float %165 to double
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.15, i32 noundef %161, double noundef %166) #5
  %168 = load ptr, ptr %24, align 8, !tbaa !9
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = add i32 %169, 1
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = zext i32 %171 to i64
  %173 = getelementptr inbounds float, ptr %97, i64 %172
  %174 = load float, ptr %173, align 4, !tbaa !11
  %175 = fpext float %174 to double
  %176 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.16, i32 noundef %170, double noundef %175) #5
  br label %177

177:                                              ; preds = %158
  %178 = load i32, ptr %11, align 4, !tbaa !5
  %179 = add i32 %178, 1
  store i32 %179, ptr %11, align 4, !tbaa !5
  br label %154, !llvm.loop !15

180:                                              ; preds = %154
  %181 = load ptr, ptr %24, align 8, !tbaa !9
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str.17) #5
  %183 = load ptr, ptr %24, align 8, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str.18) #5
  %185 = load ptr, ptr %24, align 8, !tbaa !9
  %186 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %185, ptr noundef @.str.19) #5
  %187 = load ptr, ptr %24, align 8, !tbaa !9
  %188 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef @.str.20) #5
  %189 = load ptr, ptr %24, align 8, !tbaa !9
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef @.str.21) #5
  %191 = load ptr, ptr %24, align 8, !tbaa !9
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.22) #5
  %193 = load ptr, ptr %24, align 8, !tbaa !9
  %194 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef @.str.23) #5
  %195 = load ptr, ptr %24, align 8, !tbaa !9
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.24) #5
  %197 = load ptr, ptr %24, align 8, !tbaa !9
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %197, ptr noundef @.str.25) #5
  %199 = load ptr, ptr %24, align 8, !tbaa !9
  %200 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %199, ptr noundef @.str.26) #5
  %201 = load ptr, ptr %24, align 8, !tbaa !9
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.22) #5
  %203 = load ptr, ptr %24, align 8, !tbaa !9
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %203, ptr noundef @.str.23) #5
  %205 = load ptr, ptr %24, align 8, !tbaa !9
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %205, ptr noundef @.str.24) #5
  %207 = load ptr, ptr %24, align 8, !tbaa !9
  %208 = call i32 @fclose(ptr noundef %207)
  %209 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, ptr noundef @.str)
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %211 = load ptr, ptr %18, align 8
  call void @llvm.stackrestore.p0(ptr %211)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %212 = load i32, ptr %3, align 4
  ret i32 %212
}

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

declare ptr @firpfbchr_crcf_create_kaiser(i32 noundef, i32 noundef, i32 noundef, float noundef) #2

declare i32 @firpfbchr_crcf_print(ptr noundef) #2

declare ptr @msourcecf_create_default() #2

declare i32 @msourcecf_add_noise(ptr noundef, float noundef, float noundef, float noundef) #2

declare i32 @msourcecf_add_tone(ptr noundef, float noundef, float noundef, float noundef) #2

declare i32 @msourcecf_add_modem(ptr noundef, float noundef, float noundef, float noundef, i32 noundef, i32 noundef, float noundef) #2

declare ptr @spgramcf_create_default(i32 noundef) #2

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

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

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

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

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

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

declare i32 @spgramcf_print(ptr noundef) #2

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

declare i32 @firpfbchr_crcf_destroy(ptr noundef) #2

declare i32 @msourcecf_destroy(ptr noundef) #2

declare i32 @spgramcf_destroy(ptr noundef) #2

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

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

declare i32 @fclose(ptr noundef) #2

declare i32 @printf(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"="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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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 [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = tail call ptr @firpfbchr_crcf_create_kaiser(i32 noundef 16, i32 noundef 6, i32 noundef 5, float noundef 6.000000e+01) #3
  %4 = tail call i32 @firpfbchr_crcf_print(ptr noundef %3) #3
  %5 = tail call ptr @msourcecf_create_default() #3
  %6 = tail call i32 @msourcecf_add_noise(ptr noundef %5, float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef -6.000000e+01) #3
  %7 = tail call i32 @msourcecf_add_noise(ptr noundef %5, float noundef 0xBFD3333340000000, float noundef 0x3FB99999A0000000, float noundef -2.000000e+01) #3
  %8 = tail call i32 @msourcecf_add_tone(ptr noundef %5, float noundef 0x3FB47AE140000000, float noundef 0.000000e+00, float noundef 0.000000e+00) #3
  %9 = tail call i32 @msourcecf_add_modem(ptr noundef %5, float noundef 1.875000e-01, float noundef 0x3FB47AE140000000, float noundef -2.000000e+01, i32 noundef 40, i32 noundef 12, float noundef 0x3FD3333340000000) #3
  %10 = tail call ptr @spgramcf_create_default(i32 noundef 2400) #3
  %11 = tail call ptr @spgramcf_create_default(i32 noundef 2400) #3
  %12 = alloca [6 x { float, float }], align 16
  %13 = alloca [16 x { float, float }], align 16
  %14 = getelementptr inbounds i8, ptr %13, i64 24
  br label %15

15:                                               ; preds = %2, %15
  %.084 = phi i32 [ 0, %2 ], [ %22, %15 ]
  %16 = call i32 @msourcecf_write_samples(ptr noundef %5, ptr noundef nonnull %12, i32 noundef 6) #3
  %17 = call i32 @firpfbchr_crcf_push(ptr noundef %3, ptr noundef nonnull %12) #3
  %18 = call i32 @firpfbchr_crcf_execute(ptr noundef %3, ptr noundef nonnull %13) #3
  %19 = call i32 @spgramcf_write(ptr noundef %10, ptr noundef nonnull %12, i32 noundef 6) #3
  %20 = load <4 x float>, ptr %14, align 8
  %.sroa.0.4.vec.insert = shufflevector <4 x float> %20, <4 x float> poison, <2 x i32> <i32 0, i32 1>
  %21 = call i32 @spgramcf_push(ptr noundef %11, <2 x float> noundef %.sroa.0.4.vec.insert) #3
  %22 = add nuw nsw i32 %.084, 1
  %exitcond.not = icmp eq i32 %22, 65536
  br i1 %exitcond.not, label %23, label %15, !llvm.loop !5

23:                                               ; preds = %15
  %24 = call i32 @spgramcf_print(ptr noundef %10) #3
  %25 = call i32 @spgramcf_print(ptr noundef %11) #3
  %26 = alloca [2400 x float], align 16
  %27 = alloca [2400 x float], align 16
  %28 = call i32 @spgramcf_get_psd(ptr noundef %10, ptr noundef nonnull %26) #3
  %29 = call i32 @spgramcf_get_psd(ptr noundef %11, ptr noundef nonnull %27) #3
  %30 = call i32 @firpfbchr_crcf_destroy(ptr noundef %3) #3
  %31 = call i32 @msourcecf_destroy(ptr noundef %5) #3
  %32 = call i32 @spgramcf_destroy(ptr noundef %10) #3
  %33 = call i32 @spgramcf_destroy(ptr noundef %11) #3
  %34 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str) #3
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.3) #3
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.4) #3
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.5, i32 noundef 2400) #3
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.6, i32 noundef 16) #3
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.7, i32 noundef 6) #3
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.8, i32 noundef 5) #3
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.9, i32 noundef 3) #3
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.10) #3
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.11) #3
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.12, i32 noundef 3) #3
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.13) #3
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.14) #3
  br label %48

48:                                               ; preds = %23, %48
  %indvars.iv = phi i64 [ 0, %23 ], [ %indvars.iv.next, %48 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = getelementptr inbounds float, ptr %26, i64 %indvars.iv
  %50 = load float, ptr %49, align 4, !tbaa !7
  %51 = fpext float %50 to double
  %52 = trunc nuw nsw i64 %indvars.iv.next to i32
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.15, i32 noundef %52, double noundef %51) #3
  %54 = getelementptr inbounds float, ptr %27, i64 %indvars.iv
  %55 = load float, ptr %54, align 4, !tbaa !7
  %56 = fpext float %55 to double
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.16, i32 noundef %52, double noundef %56) #3
  %exitcond87.not = icmp eq i64 %indvars.iv.next, 2400
  br i1 %exitcond87.not, label %58, label %48, !llvm.loop !11

58:                                               ; preds = %48
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.17) #3
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.18) #3
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.19) #3
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.20) #3
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.21) #3
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.22) #3
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.23) #3
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.24) #3
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.25) #3
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.26) #3
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.22) #3
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.23) #3
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.24) #3
  %72 = call i32 @fclose(ptr noundef %34)
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, ptr noundef nonnull @.str)
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  ret i32 0
}

declare ptr @firpfbchr_crcf_create_kaiser(i32 noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #1

declare i32 @firpfbchr_crcf_print(ptr noundef) local_unnamed_addr #1

declare ptr @msourcecf_create_default() local_unnamed_addr #1

declare i32 @msourcecf_add_noise(ptr noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

declare i32 @msourcecf_add_tone(ptr noundef, float noundef, float noundef, float noundef) local_unnamed_addr #1

declare i32 @msourcecf_add_modem(ptr noundef, float noundef, float noundef, float noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #1

declare ptr @spgramcf_create_default(i32 noundef) local_unnamed_addr #1

declare i32 @msourcecf_write_samples(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @firpfbchr_crcf_push(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @firpfbchr_crcf_execute(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @spgramcf_write(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare i32 @spgramcf_print(ptr noundef) local_unnamed_addr #1

declare i32 @spgramcf_get_psd(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @firpfbchr_crcf_destroy(ptr noundef) local_unnamed_addr #1

declare i32 @msourcecf_destroy(ptr noundef) local_unnamed_addr #1

declare i32 @spgramcf_destroy(ptr noundef) local_unnamed_addr #1

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

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

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

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass