; LLVM IR from jgaeddert/liquid-dsp :: examples (agc_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.4 = external hidden unnamed_addr constant [10 x i8], align 1
@optarg = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

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

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

26:                                               ; preds = %21
  %27 = load i32, ptr %9, align 4, !tbaa !5
  switch i32 %27, label %36 [
    i32 104, label %28
    i32 110, label %29
    i32 98, label %32
  ]

28:                                               ; preds = %26
  call void @usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %256

29:                                               ; preds = %26
  %30 = load ptr, ptr @optarg, align 8, !tbaa !9
  %31 = call i32 @atoi(ptr noundef %30) #9
  store i32 %31, ptr %8, align 4, !tbaa !5
  br label %37

32:                                               ; preds = %26
  %33 = load ptr, ptr @optarg, align 8, !tbaa !9
  %34 = call double @atof(ptr noundef %33) #9
  %35 = fptrunc double %34 to float
  store float %35, ptr %6, align 4, !tbaa !11
  br label %37

36:                                               ; preds = %26
  call void @exit(i32 noundef 1) #10
  unreachable

37:                                               ; preds = %32, %29
  br label %21, !llvm.loop !13

38:                                               ; preds = %21
  %39 = load float, ptr %6, align 4, !tbaa !11
  %40 = fcmp olt float %39, 0.000000e+00
  br i1 %40, label %41, label %47

41:                                               ; preds = %38
  %42 = load ptr, ptr @stderr, align 8, !tbaa !9
  %43 = load ptr, ptr %5, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %43, i64 0
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.5, ptr noundef %45) #8
  call void @exit(i32 noundef 1) #10
  unreachable

47:                                               ; preds = %38
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %56

50:                                               ; preds = %47
  %51 = load ptr, ptr @stderr, align 8, !tbaa !9
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 0
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.6, ptr noundef %54) #8
  call void @exit(i32 noundef 1) #10
  unreachable

56:                                               ; preds = %47
  br label %57

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %58 = call ptr @agc_crcf_create()
  store ptr %58, ptr %12, align 8, !tbaa !9
  %59 = load ptr, ptr %12, align 8, !tbaa !9
  %60 = load float, ptr %6, align 4, !tbaa !11
  %61 = call i32 @agc_crcf_set_bandwidth(ptr noundef %59, float noundef %60)
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = zext i32 %62 to i64
  %64 = call ptr @llvm.stacksave.p0()
  store ptr %64, ptr %13, align 8
  %65 = alloca { float, float }, i64 %63, align 16
  store i64 %63, ptr %14, align 8
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = zext i32 %66 to i64
  %68 = alloca { float, float }, i64 %67, align 16
  store i64 %67, ptr %15, align 8
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = alloca float, i64 %70, align 16
  store i64 %70, ptr %16, align 8
  %72 = load ptr, ptr %12, align 8, !tbaa !9
  %73 = call i32 @agc_crcf_print(ptr noundef %72)
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %101, %57
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = icmp ult i32 %75, %76
  br i1 %77, label %78, label %104

78:                                               ; preds = %74
  %79 = load float, ptr %7, align 4, !tbaa !11
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = uitofp i32 %80 to double
  %82 = fmul double 0.000000e+00, %81
  %83 = fmul double 0x3FBF0B412B6B99F8, %81
  %84 = fptrunc double %82 to float
  %85 = fptrunc double %83 to float
  %86 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 0
  %87 = getelementptr inbounds { float, float }, ptr %17, i32 0, i32 1
  store float %84, ptr %86, align 4
  store float %85, ptr %87, align 4
  %88 = load <2 x float>, ptr %17, align 4
  %89 = call <2 x float> @cexpf(<2 x float> noundef %88) #8
  store <2 x float> %89, ptr %18, align 4
  %90 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 0
  %91 = load float, ptr %90, align 4
  %92 = getelementptr inbounds { float, float }, ptr %18, i32 0, i32 1
  %93 = load float, ptr %92, align 4
  %94 = fmul float %79, %91
  %95 = fmul float %79, %93
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds { float, float }, ptr %65, i64 %97
  %99 = getelementptr inbounds { float, float }, ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds { float, float }, ptr %98, i32 0, i32 1
  store float %94, ptr %99, align 8
  store float %95, ptr %100, align 4
  br label %101

101:                                              ; preds = %78
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = add i32 %102, 1
  store i32 %103, ptr %11, align 4, !tbaa !5
  br label %74, !llvm.loop !15

104:                                              ; preds = %74
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %130, %104
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = icmp ult i32 %106, %107
  br i1 %108, label %109, label %133

109:                                              ; preds = %105
  %110 = load ptr, ptr %12, align 8, !tbaa !9
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds { float, float }, ptr %65, i64 %112
  %114 = getelementptr inbounds { float, float }, ptr %113, i32 0, i32 0
  %115 = load float, ptr %114, align 8
  %116 = getelementptr inbounds { float, float }, ptr %113, i32 0, i32 1
  %117 = load float, ptr %116, align 4
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds { float, float }, ptr %68, i64 %119
  %121 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 0
  %122 = getelementptr inbounds { float, float }, ptr %19, i32 0, i32 1
  store float %115, ptr %121, align 4
  store float %117, ptr %122, align 4
  %123 = load <2 x float>, ptr %19, align 4
  %124 = call i32 @agc_crcf_execute(ptr noundef %110, <2 x float> noundef %123, ptr noundef %120)
  %125 = load ptr, ptr %12, align 8, !tbaa !9
  %126 = call float @agc_crcf_get_rssi(ptr noundef %125)
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %71, i64 %128
  store float %126, ptr %129, align 4, !tbaa !11
  br label %130

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

133:                                              ; preds = %105
  %134 = load ptr, ptr %12, align 8, !tbaa !9
  %135 = call i32 @agc_crcf_destroy(ptr noundef %134)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %136 = call noalias ptr @fopen(ptr noundef @.str.7, ptr noundef @.str.8)
  store ptr %136, ptr %20, align 8, !tbaa !9
  %137 = load ptr, ptr %20, align 8, !tbaa !9
  %138 = icmp ne ptr %137, null
  br i1 %138, label %145, label %139

139:                                              ; preds = %133
  %140 = load ptr, ptr @stderr, align 8, !tbaa !9
  %141 = load ptr, ptr %5, align 8, !tbaa !9
  %142 = getelementptr inbounds ptr, ptr %141, i64 0
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.9, ptr noundef %143, ptr noundef @.str.7) #8
  call void @exit(i32 noundef 1) #10
  unreachable

145:                                              ; preds = %133
  %146 = load ptr, ptr %20, align 8, !tbaa !9
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef @.str.10, ptr noundef @.str.7) #8
  %148 = load ptr, ptr %20, align 8, !tbaa !9
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.11) #8
  %150 = load ptr, ptr %20, align 8, !tbaa !9
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef @.str.12, i32 noundef %151) #8
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %207, %145
  %154 = load i32, ptr %11, align 4, !tbaa !5
  %155 = load i32, ptr %8, align 4, !tbaa !5
  %156 = icmp ult i32 %154, %155
  br i1 %156, label %157, label %210

157:                                              ; preds = %153
  %158 = load ptr, ptr %20, align 8, !tbaa !9
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = add i32 %159, 1
  %161 = load i32, ptr %11, align 4, !tbaa !5
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds { float, float }, ptr %65, i64 %162
  %164 = getelementptr inbounds { float, float }, ptr %163, i32 0, i32 0
  %165 = load float, ptr %164, align 8
  %166 = getelementptr inbounds { float, float }, ptr %163, i32 0, i32 1
  %167 = load float, ptr %166, align 4
  %168 = fpext float %165 to double
  %169 = load i32, ptr %11, align 4, !tbaa !5
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds { float, float }, ptr %65, i64 %170
  %172 = getelementptr inbounds { float, float }, ptr %171, i32 0, i32 0
  %173 = load float, ptr %172, align 8
  %174 = getelementptr inbounds { float, float }, ptr %171, i32 0, i32 1
  %175 = load float, ptr %174, align 4
  %176 = fpext float %175 to double
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str.13, i32 noundef %160, double noundef %168, double noundef %176) #8
  %178 = load ptr, ptr %20, align 8, !tbaa !9
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = add i32 %179, 1
  %181 = load i32, ptr %11, align 4, !tbaa !5
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds { float, float }, ptr %68, i64 %182
  %184 = getelementptr inbounds { float, float }, ptr %183, i32 0, i32 0
  %185 = load float, ptr %184, align 8
  %186 = getelementptr inbounds { float, float }, ptr %183, i32 0, i32 1
  %187 = load float, ptr %186, align 4
  %188 = fpext float %185 to double
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = zext i32 %189 to i64
  %191 = getelementptr inbounds { float, float }, ptr %68, i64 %190
  %192 = getelementptr inbounds { float, float }, ptr %191, i32 0, i32 0
  %193 = load float, ptr %192, align 8
  %194 = getelementptr inbounds { float, float }, ptr %191, i32 0, i32 1
  %195 = load float, ptr %194, align 4
  %196 = fpext float %195 to double
  %197 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef @.str.14, i32 noundef %180, double noundef %188, double noundef %196) #8
  %198 = load ptr, ptr %20, align 8, !tbaa !9
  %199 = load i32, ptr %11, align 4, !tbaa !5
  %200 = add i32 %199, 1
  %201 = load i32, ptr %11, align 4, !tbaa !5
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds float, ptr %71, i64 %202
  %204 = load float, ptr %203, align 4, !tbaa !11
  %205 = fpext float %204 to double
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.15, i32 noundef %200, double noundef %205) #8
  br label %207

207:                                              ; preds = %157
  %208 = load i32, ptr %11, align 4, !tbaa !5
  %209 = add i32 %208, 1
  store i32 %209, ptr %11, align 4, !tbaa !5
  br label %153, !llvm.loop !17

210:                                              ; preds = %153
  %211 = load ptr, ptr %20, align 8, !tbaa !9
  %212 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef @.str.16) #8
  %213 = load ptr, ptr %20, align 8, !tbaa !9
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %213, ptr noundef @.str.17) #8
  %215 = load ptr, ptr %20, align 8, !tbaa !9
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.18) #8
  %217 = load ptr, ptr %20, align 8, !tbaa !9
  %218 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %217, ptr noundef @.str.19) #8
  %219 = load ptr, ptr %20, align 8, !tbaa !9
  %220 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %219, ptr noundef @.str.20) #8
  %221 = load ptr, ptr %20, align 8, !tbaa !9
  %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %221, ptr noundef @.str.21) #8
  %223 = load ptr, ptr %20, align 8, !tbaa !9
  %224 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %223, ptr noundef @.str.22) #8
  %225 = load ptr, ptr %20, align 8, !tbaa !9
  %226 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %225, ptr noundef @.str.23) #8
  %227 = load ptr, ptr %20, align 8, !tbaa !9
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef @.str.24) #8
  %229 = load ptr, ptr %20, align 8, !tbaa !9
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef @.str.25) #8
  %231 = load ptr, ptr %20, align 8, !tbaa !9
  %232 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %231, ptr noundef @.str.26) #8
  %233 = load ptr, ptr %20, align 8, !tbaa !9
  %234 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef @.str.27) #8
  %235 = load ptr, ptr %20, align 8, !tbaa !9
  %236 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %235, ptr noundef @.str.22) #8
  %237 = load ptr, ptr %20, align 8, !tbaa !9
  %238 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %237, ptr noundef @.str.23) #8
  %239 = load ptr, ptr %20, align 8, !tbaa !9
  %240 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %239, ptr noundef @.str.28) #8
  %241 = load ptr, ptr %20, align 8, !tbaa !9
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef @.str.29) #8
  %243 = load ptr, ptr %20, align 8, !tbaa !9
  %244 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %243, ptr noundef @.str.30) #8
  %245 = load ptr, ptr %20, align 8, !tbaa !9
  %246 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %245, ptr noundef @.str.22) #8
  %247 = load ptr, ptr %20, align 8, !tbaa !9
  %248 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %247, ptr noundef @.str.23) #8
  %249 = load ptr, ptr %20, align 8, !tbaa !9
  %250 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %249, ptr noundef @.str.31) #8
  %251 = load ptr, ptr %20, align 8, !tbaa !9
  %252 = call i32 @fclose(ptr noundef %251)
  %253 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, ptr noundef @.str.7)
  %254 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  %255 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %255)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %256

256:                                              ; preds = %210, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %257 = load i32, ptr %3, align 4
  ret i32 %257
}

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #5

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

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

declare ptr @agc_crcf_create() #1

declare i32 @agc_crcf_set_bandwidth(ptr noundef, float noundef) #1

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

declare i32 @agc_crcf_print(ptr noundef) #1

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

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

declare float @agc_crcf_get_rssi(ptr noundef) #1

declare i32 @agc_crcf_destroy(ptr noundef) #1

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

declare i32 @fclose(ptr noundef) #1

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint nounwind willreturn memory(read) 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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind willreturn }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}
!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.4 = external hidden unnamed_addr constant [10 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  br label %.outer

.outer:                                           ; preds = %6, %2
  %.075.ph = phi i32 [ %8, %6 ], [ 2000, %2 ]
  %.074.ph = phi float [ %.074, %6 ], [ 0x3F847AE140000000, %2 ]
  br label %3

3:                                                ; preds = %.outer, %9
  %.074 = phi float [ %12, %9 ], [ %.074.ph, %.outer ]
  %4 = tail call i32 @getopt(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.4) #8
  switch i32 %4, label %13 [
    i32 -1, label %14
    i32 104, label %5
    i32 110, label %6
    i32 98, label %9
  ]

5:                                                ; preds = %3
  tail call void @usage()
  br label %104

6:                                                ; preds = %3
  %7 = load ptr, ptr @optarg, align 8, !tbaa !5
  %8 = tail call i32 @atoi(ptr nocapture noundef %7) #9
  br label %.outer, !llvm.loop !9

9:                                                ; preds = %3
  %10 = load ptr, ptr @optarg, align 8, !tbaa !5
  %11 = tail call double @atof(ptr noundef %10) #9
  %12 = fptrunc double %11 to float
  br label %3, !llvm.loop !9

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

14:                                               ; preds = %3
  %15 = fcmp olt float %.074, 0.000000e+00
  br i1 %15, label %16, label %20

16:                                               ; preds = %14
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = load ptr, ptr %1, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.5, ptr noundef %18) #11
  tail call void @exit(i32 noundef 1) #10
  unreachable

20:                                               ; preds = %14
  %21 = icmp eq i32 %.075.ph, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %20
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.6, ptr noundef %24) #11
  tail call void @exit(i32 noundef 1) #10
  unreachable

26:                                               ; preds = %20
  %27 = tail call ptr @agc_crcf_create() #8
  %28 = tail call i32 @agc_crcf_set_bandwidth(ptr noundef %27, float noundef %.074) #8
  %29 = zext i32 %.075.ph to i64
  %30 = tail call ptr @llvm.stacksave.p0()
  %31 = alloca { float, float }, i64 %29, align 16
  %32 = alloca { float, float }, i64 %29, align 16
  %33 = alloca float, i64 %29, align 16
  %34 = tail call i32 @agc_crcf_print(ptr noundef %27) #8
  br label %35

35:                                               ; preds = %26, %35
  %indvars.iv = phi i64 [ 0, %26 ], [ %indvars.iv.next, %35 ]
  %36 = trunc nuw i64 %indvars.iv to i32
  %37 = uitofp i32 %36 to double
  %38 = fmul double %37, 0x3FBF0B412B6B99F8
  %39 = fptrunc double %38 to float
  %.sroa.030.4.vec.insert = insertelement <2 x float> <float 0.000000e+00, float poison>, float %39, i64 1
  %40 = tail call <2 x float> @cexpf(<2 x float> noundef %.sroa.030.4.vec.insert) #8
  %41 = getelementptr inbounds { float, float }, ptr %31, i64 %indvars.iv
  %42 = fmul <2 x float> %40, <float 0x3F50624DE0000000, float 0x3F50624DE0000000>
  store <2 x float> %42, ptr %41, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %29
  br i1 %exitcond.not, label %.preheader, label %35, !llvm.loop !11

.preheader:                                       ; preds = %35, %.preheader
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.preheader ], [ 0, %35 ]
  %43 = getelementptr inbounds { float, float }, ptr %31, i64 %indvars.iv93
  %44 = load <2 x float>, ptr %43, align 8
  %45 = getelementptr inbounds { float, float }, ptr %32, i64 %indvars.iv93
  %46 = call i32 @agc_crcf_execute(ptr noundef %27, <2 x float> noundef %44, ptr noundef nonnull %45) #8
  %47 = call float @agc_crcf_get_rssi(ptr noundef %27) #8
  %48 = getelementptr inbounds float, ptr %33, i64 %indvars.iv93
  store float %47, ptr %48, align 4, !tbaa !12
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %29
  br i1 %exitcond97.not, label %49, label %.preheader, !llvm.loop !14

49:                                               ; preds = %.preheader
  %50 = call i32 @agc_crcf_destroy(ptr noundef %27) #8
  %51 = call noalias ptr @fopen(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8)
  %.not80 = icmp eq ptr %51, null
  br i1 %.not80, label %52, label %56

52:                                               ; preds = %49
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = load ptr, ptr %1, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.9, ptr noundef %54, ptr noundef nonnull @.str.7) #11
  call void @exit(i32 noundef 1) #10
  unreachable

56:                                               ; preds = %49
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %51, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.7) #8
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %51, ptr noundef nonnull @.str.11) #8
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %51, ptr noundef nonnull @.str.12, i32 noundef %.075.ph) #8
  br label %60

60:                                               ; preds = %56, %60
  %indvars.iv98 = phi i64 [ 0, %56 ], [ %indvars.iv.next99, %60 ]
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %61 = getelementptr inbounds { float, float }, ptr %31, i64 %indvars.iv98
  %62 = load float, ptr %61, align 8
  %63 = getelementptr inbounds i8, ptr %61, i64 4
  %64 = fpext float %62 to double
  %65 = load float, ptr %63, align 4
  %66 = fpext float %65 to double
  %67 = trunc nuw i64 %indvars.iv.next99 to i32
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.13, i32 noundef %67, double noundef %64, double noundef %66) #8
  %69 = getelementptr inbounds { float, float }, ptr %32, i64 %indvars.iv98
  %70 = load float, ptr %69, align 8
  %71 = getelementptr inbounds i8, ptr %69, i64 4
  %72 = fpext float %70 to double
  %73 = load float, ptr %71, align 4
  %74 = fpext float %73 to double
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.14, i32 noundef %67, double noundef %72, double noundef %74) #8
  %76 = getelementptr inbounds float, ptr %33, i64 %indvars.iv98
  %77 = load float, ptr %76, align 4, !tbaa !12
  %78 = fpext float %77 to double
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.15, i32 noundef %67, double noundef %78) #8
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %29
  br i1 %exitcond102.not, label %80, label %60, !llvm.loop !15

80:                                               ; preds = %60
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.16) #8
  %82 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.17) #8
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.18) #8
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.19) #8
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.20) #8
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.21) #8
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.22) #8
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.23) #8
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.24) #8
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.25) #8
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.26) #8
  %92 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.27) #8
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.22) #8
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.23) #8
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.28) #8
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.29) #8
  %97 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.30) #8
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.22) #8
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.23) #8
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.31) #8
  %101 = call i32 @fclose(ptr noundef %51)
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, ptr noundef nonnull @.str.7)
  %103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  call void @llvm.stackrestore.p0(ptr %30)
  br label %104

104:                                              ; preds = %80, %5
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #4

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

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

declare ptr @agc_crcf_create() local_unnamed_addr #6

declare i32 @agc_crcf_set_bandwidth(ptr noundef, float noundef) local_unnamed_addr #6

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

declare i32 @agc_crcf_print(ptr noundef) local_unnamed_addr #6

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

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

declare float @agc_crcf_get_rssi(ptr noundef) local_unnamed_addr #6

declare i32 @agc_crcf_destroy(ptr noundef) local_unnamed_addr #6

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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