; LLVM IR from jgaeddert/liquid-dsp :: examples (firfilt_rrrf_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 [23 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 [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca float, align 4
  %15 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 65, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store float 0x3FB99999A0000000, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store float 6.000000e+01, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 240, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load float, ptr %3, align 4, !tbaa !9
  %18 = load float, ptr %4, align 4, !tbaa !9
  %19 = call ptr @firfilt_rrrf_create_kaiser(i32 noundef %16, float noundef %17, float noundef %18, float noundef 0.000000e+00)
  store ptr %19, ptr %6, align 8, !tbaa !11
  %20 = load ptr, ptr %6, align 8, !tbaa !11
  %21 = load float, ptr %3, align 4, !tbaa !9
  %22 = fmul float 2.000000e+00, %21
  %23 = call i32 @firfilt_rrrf_set_scale(ptr noundef %20, float noundef %22)
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = call ptr @llvm.stacksave.p0()
  store ptr %26, ptr %7, align 8
  %27 = alloca float, i64 %25, align 16
  store i64 %25, ptr %8, align 8
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = zext i32 %28 to i64
  %30 = alloca float, i64 %29, align 16
  store i64 %29, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %32 = uitofp i32 %31 to double
  %33 = fmul double 7.500000e-01, %32
  %34 = fptrunc double %33 to float
  %35 = call float @llvm.round.f32(float %34)
  %36 = fptoui float %35 to i32
  store i32 %36, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %83, %0
  %38 = load i32, ptr %11, align 4, !tbaa !5
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = icmp ult i32 %38, %39
  br i1 %40, label %41, label %86

41:                                               ; preds = %37
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = uitofp i32 %42 to double
  %44 = fmul double 0x3FD6EBCA96C7AA1D, %43
  %45 = fptrunc double %44 to float
  %46 = call float @cosf(float noundef %45) #6
  %47 = load i32, ptr %11, align 4, !tbaa !5
  %48 = uitofp i32 %47 to double
  %49 = fmul double 0x4001F1DCE6270492, %48
  %50 = fptrunc double %49 to float
  %51 = call float @cosf(float noundef %50) #6
  %52 = fmul float 0x3FD3333340000000, %51
  %53 = call float @llvm.fmuladd.f32(float 0x3FE6666660000000, float %46, float %52)
  %54 = load i32, ptr %11, align 4, !tbaa !5
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds float, ptr %27, i64 %55
  store float %53, ptr %56, align 4, !tbaa !9
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = icmp ult i32 %57, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %41
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = call float @liquid_hamming(i32 noundef %61, i32 noundef %62)
  br label %65

64:                                               ; preds = %41
  br label %65

65:                                               ; preds = %64, %60
  %66 = phi float [ %63, %60 ], [ 0.000000e+00, %64 ]
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds float, ptr %27, i64 %68
  %70 = load float, ptr %69, align 4, !tbaa !9
  %71 = fmul float %70, %66
  store float %71, ptr %69, align 4, !tbaa !9
  %72 = load ptr, ptr %6, align 8, !tbaa !11
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds float, ptr %27, i64 %74
  %76 = load float, ptr %75, align 4, !tbaa !9
  %77 = call i32 @firfilt_rrrf_push(ptr noundef %72, float noundef %76)
  %78 = load ptr, ptr %6, align 8, !tbaa !11
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds float, ptr %30, i64 %80
  %82 = call i32 @firfilt_rrrf_execute(ptr noundef %78, ptr noundef %81)
  br label %83

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

86:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1024, ptr %12, align 4, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = zext i32 %87 to i64
  %89 = alloca { float, float }, i64 %88, align 16
  store i64 %88, ptr %13, align 8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %109, %86
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = icmp ult i32 %91, %92
  br i1 %93, label %94, label %112

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = uitofp i32 %95 to float
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = uitofp i32 %97 to float
  %99 = call float @llvm.fmuladd.f32(float -5.000000e-01, float %98, float %96)
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = uitofp i32 %100 to float
  %102 = fdiv float %99, %101
  store float %102, ptr %14, align 4, !tbaa !9
  %103 = load ptr, ptr %6, align 8, !tbaa !11
  %104 = load float, ptr %14, align 4, !tbaa !9
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds { float, float }, ptr %89, i64 %106
  %108 = call i32 @firfilt_rrrf_freqresponse(ptr noundef %103, float noundef %104, ptr noundef %107)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %109

109:                                              ; preds = %94
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = add i32 %110, 1
  store i32 %111, ptr %11, align 4, !tbaa !5
  br label %90, !llvm.loop !15

112:                                              ; preds = %90
  %113 = load ptr, ptr %6, align 8, !tbaa !11
  %114 = call i32 @firfilt_rrrf_destroy(ptr noundef %113)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %115 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.1)
  store ptr %115, ptr %15, align 8, !tbaa !11
  %116 = load ptr, ptr %15, align 8, !tbaa !11
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.2, ptr noundef @.str) #6
  %118 = load ptr, ptr %15, align 8, !tbaa !11
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str.3) #6
  %120 = load ptr, ptr %15, align 8, !tbaa !11
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef @.str.4) #6
  %122 = load ptr, ptr %15, align 8, !tbaa !11
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.5) #6
  %124 = load ptr, ptr %15, align 8, !tbaa !11
  %125 = load i32, ptr %2, align 4, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.6, i32 noundef %125) #6
  %127 = load ptr, ptr %15, align 8, !tbaa !11
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.7, i32 noundef %128) #6
  %130 = load ptr, ptr %15, align 8, !tbaa !11
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef @.str.8, i32 noundef %131) #6
  %133 = load ptr, ptr %15, align 8, !tbaa !11
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.9) #6
  %135 = load ptr, ptr %15, align 8, !tbaa !11
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.10) #6
  %137 = load ptr, ptr %15, align 8, !tbaa !11
  %138 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %162, %112
  %140 = load i32, ptr %11, align 4, !tbaa !5
  %141 = load i32, ptr %5, align 4, !tbaa !5
  %142 = icmp ult i32 %140, %141
  br i1 %142, label %143, label %165

143:                                              ; preds = %139
  %144 = load ptr, ptr %15, align 8, !tbaa !11
  %145 = load i32, ptr %11, align 4, !tbaa !5
  %146 = add i32 %145, 1
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds float, ptr %27, i64 %148
  %150 = load float, ptr %149, align 4, !tbaa !9
  %151 = fpext float %150 to double
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.12, i32 noundef %146, double noundef %151) #6
  %153 = load ptr, ptr %15, align 8, !tbaa !11
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = add i32 %154, 1
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds float, ptr %30, i64 %157
  %159 = load float, ptr %158, align 4, !tbaa !9
  %160 = fpext float %159 to double
  %161 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.13, i32 noundef %155, double noundef %160) #6
  br label %162

162:                                              ; preds = %143
  %163 = load i32, ptr %11, align 4, !tbaa !5
  %164 = add i32 %163, 1
  store i32 %164, ptr %11, align 4, !tbaa !5
  br label %139, !llvm.loop !16

165:                                              ; preds = %139
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %191, %165
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = load i32, ptr %12, align 4, !tbaa !5
  %169 = icmp ult i32 %167, %168
  br i1 %169, label %170, label %194

170:                                              ; preds = %166
  %171 = load ptr, ptr %15, align 8, !tbaa !11
  %172 = load i32, ptr %11, align 4, !tbaa !5
  %173 = add i32 %172, 1
  %174 = load i32, ptr %11, align 4, !tbaa !5
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds { float, float }, ptr %89, i64 %175
  %177 = getelementptr inbounds { float, float }, ptr %176, i32 0, i32 0
  %178 = load float, ptr %177, align 8
  %179 = getelementptr inbounds { float, float }, ptr %176, i32 0, i32 1
  %180 = load float, ptr %179, align 4
  %181 = fpext float %178 to double
  %182 = load i32, ptr %11, align 4, !tbaa !5
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds { float, float }, ptr %89, i64 %183
  %185 = getelementptr inbounds { float, float }, ptr %184, i32 0, i32 0
  %186 = load float, ptr %185, align 8
  %187 = getelementptr inbounds { float, float }, ptr %184, i32 0, i32 1
  %188 = load float, ptr %187, align 4
  %189 = fpext float %188 to double
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.14, i32 noundef %173, double noundef %181, double noundef %189) #6
  br label %191

191:                                              ; preds = %170
  %192 = load i32, ptr %11, align 4, !tbaa !5
  %193 = add i32 %192, 1
  store i32 %193, ptr %11, align 4, !tbaa !5
  br label %166, !llvm.loop !17

194:                                              ; preds = %166
  %195 = load ptr, ptr %15, align 8, !tbaa !11
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.15) #6
  %197 = load ptr, ptr %15, align 8, !tbaa !11
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %197, ptr noundef @.str.16) #6
  %199 = load ptr, ptr %15, align 8, !tbaa !11
  %200 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %199, ptr noundef @.str.17) #6
  %201 = load ptr, ptr %15, align 8, !tbaa !11
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.18) #6
  %203 = load ptr, ptr %15, align 8, !tbaa !11
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %203, ptr noundef @.str.19) #6
  %205 = load ptr, ptr %15, align 8, !tbaa !11
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %205, ptr noundef @.str.20) #6
  %207 = load ptr, ptr %15, align 8, !tbaa !11
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef @.str.21) #6
  %209 = load ptr, ptr %15, align 8, !tbaa !11
  %210 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %209, ptr noundef @.str.22) #6
  %211 = load ptr, ptr %15, align 8, !tbaa !11
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef @.str.23) #6
  %213 = load ptr, ptr %15, align 8, !tbaa !11
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %213, ptr noundef @.str.24) #6
  %215 = load ptr, ptr %15, align 8, !tbaa !11
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.25) #6
  %217 = load ptr, ptr %15, align 8, !tbaa !11
  %218 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %217, ptr noundef @.str.26) #6
  %219 = load ptr, ptr %15, align 8, !tbaa !11
  %220 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %219, ptr noundef @.str.27) #6
  %221 = load ptr, ptr %15, align 8, !tbaa !11
  %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %221, ptr noundef @.str.28) #6
  %223 = load ptr, ptr %15, align 8, !tbaa !11
  %224 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %223, ptr noundef @.str.29) #6
  %225 = load ptr, ptr %15, align 8, !tbaa !11
  %226 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %225, ptr noundef @.str.30) #6
  %227 = load ptr, ptr %15, align 8, !tbaa !11
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef @.str.31) #6
  %229 = load ptr, ptr %15, align 8, !tbaa !11
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef @.str.32) #6
  %231 = load ptr, ptr %15, align 8, !tbaa !11
  %232 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %231, ptr noundef @.str.33) #6
  %233 = load ptr, ptr %15, align 8, !tbaa !11
  %234 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef @.str.34) #6
  %235 = load ptr, ptr %15, align 8, !tbaa !11
  %236 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %235, ptr noundef @.str.35) #6
  %237 = load ptr, ptr %15, align 8, !tbaa !11
  %238 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %237, ptr noundef @.str.36) #6
  %239 = load ptr, ptr %15, align 8, !tbaa !11
  %240 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %239, ptr noundef @.str.37) #6
  %241 = load ptr, ptr %15, align 8, !tbaa !11
  %242 = call i32 @fclose(ptr noundef %241)
  %243 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str)
  %244 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %245 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %245)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %246 = load i32, ptr %1, align 4
  ret i32 %246
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.round.f32(float) #4

; Function Attrs: nounwind
declare float @cosf(float noundef) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare float @liquid_hamming(i32 noundef, i32 noundef) #2

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

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

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

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

declare i32 @firfilt_rrrf_destroy(ptr noundef) #2

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

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

declare i32 @fclose(ptr noundef) #2

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !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 [23 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 [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call ptr @firfilt_rrrf_create_kaiser(i32 noundef 65, float noundef 0x3FB99999A0000000, float noundef 6.000000e+01, float noundef 0.000000e+00) #5
  %2 = tail call i32 @firfilt_rrrf_set_scale(ptr noundef %1, float noundef 0x3FC99999A0000000) #5
  %3 = alloca [240 x float], align 16
  %4 = alloca [240 x float], align 16
  br label %5

5:                                                ; preds = %0, %20
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %20 ]
  %6 = trunc nuw nsw i64 %indvars.iv to i32
  %7 = uitofp nneg i32 %6 to double
  %8 = fmul double %7, 0x3FD6EBCA96C7AA1D
  %9 = fptrunc double %8 to float
  %10 = call float @cosf(float noundef %9) #5
  %11 = fmul double %7, 0x4001F1DCE6270492
  %12 = fptrunc double %11 to float
  %13 = call float @cosf(float noundef %12) #5
  %14 = fmul float %13, 0x3FD3333340000000
  %15 = call float @llvm.fmuladd.f32(float %10, float 0x3FE6666660000000, float %14)
  %16 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  %17 = icmp ult i64 %indvars.iv, 180
  br i1 %17, label %18, label %20

18:                                               ; preds = %5
  %19 = call float @liquid_hamming(i32 noundef %6, i32 noundef 180) #5
  br label %20

20:                                               ; preds = %5, %18
  %21 = phi float [ %19, %18 ], [ 0.000000e+00, %5 ]
  %22 = fmul float %15, %21
  store float %22, ptr %16, align 4, !tbaa !5
  %23 = call i32 @firfilt_rrrf_push(ptr noundef %1, float noundef %22) #5
  %24 = getelementptr inbounds float, ptr %4, i64 %indvars.iv
  %25 = call i32 @firfilt_rrrf_execute(ptr noundef %1, ptr noundef nonnull %24) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 240
  br i1 %exitcond.not, label %26, label %5, !llvm.loop !9

26:                                               ; preds = %20
  %27 = alloca [1024 x { float, float }], align 16
  br label %28

28:                                               ; preds = %26, %28
  %indvars.iv93 = phi i64 [ 0, %26 ], [ %indvars.iv.next94, %28 ]
  %29 = trunc nuw nsw i64 %indvars.iv93 to i32
  %30 = uitofp nneg i32 %29 to float
  %31 = fadd float %30, -5.120000e+02
  %32 = fmul float %31, 0x3F50000000000000
  %33 = getelementptr inbounds { float, float }, ptr %27, i64 %indvars.iv93
  %34 = call i32 @firfilt_rrrf_freqresponse(ptr noundef %1, float noundef %32, ptr noundef nonnull %33) #5
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next94, 1024
  br i1 %exitcond96.not, label %35, label %28, !llvm.loop !11

35:                                               ; preds = %28
  %36 = call i32 @firfilt_rrrf_destroy(ptr noundef %1) #5
  %37 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1)
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str) #5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.3) #5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.4) #5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.5) #5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.6, i32 noundef 65) #5
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.7, i32 noundef 240) #5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.8, i32 noundef 1024) #5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.9) #5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.10) #5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.11) #5
  br label %48

48:                                               ; preds = %35, %48
  %indvars.iv97 = phi i64 [ 0, %35 ], [ %indvars.iv.next98, %48 ]
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %49 = getelementptr inbounds float, ptr %3, i64 %indvars.iv97
  %50 = load float, ptr %49, align 4, !tbaa !5
  %51 = fpext float %50 to double
  %52 = trunc nuw nsw i64 %indvars.iv.next98 to i32
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.12, i32 noundef %52, double noundef %51) #5
  %54 = getelementptr inbounds float, ptr %4, i64 %indvars.iv97
  %55 = load float, ptr %54, align 4, !tbaa !5
  %56 = fpext float %55 to double
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.13, i32 noundef %52, double noundef %56) #5
  %exitcond100.not = icmp eq i64 %indvars.iv.next98, 240
  br i1 %exitcond100.not, label %.preheader, label %48, !llvm.loop !12

.preheader:                                       ; preds = %48, %.preheader
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %.preheader ], [ 0, %48 ]
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %58 = getelementptr inbounds { float, float }, ptr %27, i64 %indvars.iv101
  %59 = load float, ptr %58, align 8
  %60 = getelementptr inbounds i8, ptr %58, i64 4
  %61 = fpext float %59 to double
  %62 = load float, ptr %60, align 4
  %63 = fpext float %62 to double
  %64 = trunc nuw nsw i64 %indvars.iv.next102 to i32
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.14, i32 noundef %64, double noundef %61, double noundef %63) #5
  %exitcond104.not = icmp eq i64 %indvars.iv.next102, 1024
  br i1 %exitcond104.not, label %66, label %.preheader, !llvm.loop !13

66:                                               ; preds = %.preheader
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.15) #5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.16) #5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.17) #5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.18) #5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.19) #5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.20) #5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.21) #5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.22) #5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.23) #5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.24) #5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.25) #5
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.26) #5
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.27) #5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.28) #5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.29) #5
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.30) #5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.31) #5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.32) #5
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.33) #5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.34) #5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.35) #5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.36) #5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.37) #5
  %90 = call i32 @fclose(ptr noundef %37)
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str)
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39)
  ret i32 0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

declare float @liquid_hamming(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

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

declare i32 @firfilt_rrrf_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 #4

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

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

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

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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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