; LLVM IR from jgaeddert/liquid-dsp :: examples (qdsync_cccf_performance_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 [43 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 float, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca { float, float }, align 4
  %25 = alloca { float, float }, align 4
  %26 = alloca ptr, align 8
  %27 = alloca float, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca float, align 4
  %32 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1024, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 7, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store float 0x3FD3333340000000, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 7, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store float 0x3FB99999A0000000, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 10, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 100, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 4, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store float -2.500000e+01, ptr %15, align 4, !tbaa !11
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = zext i32 %33 to i64
  %35 = call ptr @llvm.stacksave.p0()
  store ptr %35, ptr %16, align 8
  %36 = alloca { float, float }, i64 %34, align 16
  store i64 %34, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %66, %2
  %38 = load i32, ptr %18, align 4, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = icmp ult i32 %38, %39
  br i1 %40, label %41, label %69

41:                                               ; preds = %37
  %42 = call i32 @rand() #5
  %43 = srem i32 %42, 2
  %44 = icmp ne i32 %43, 0
  %45 = zext i1 %44 to i64
  %46 = select i1 %44, float 1.000000e+00, float -1.000000e+00
  %47 = fpext float %46 to double
  %48 = fmul double %47, 0x3FE6A09E667F3BCD
  %49 = call i32 @rand() #5
  %50 = srem i32 %49, 2
  %51 = icmp ne i32 %50, 0
  %52 = zext i1 %51 to i64
  %53 = select i1 %51, float 1.000000e+00, float -1.000000e+00
  %54 = fpext float %53 to double
  %55 = fmul double %54, 0x3FE6A09E667F3BCD
  %56 = fmul double %55, 0.000000e+00
  %57 = fmul double %55, 1.000000e+00
  %58 = fadd double %48, %56
  %59 = fptrunc double %58 to float
  %60 = fptrunc double %57 to float
  %61 = load i32, ptr %18, align 4, !tbaa !5
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds { float, float }, ptr %36, i64 %62
  %64 = getelementptr inbounds { float, float }, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds { float, float }, ptr %63, i32 0, i32 1
  store float %59, ptr %64, align 8
  store float %60, ptr %65, align 4
  br label %66

66:                                               ; preds = %41
  %67 = load i32, ptr %18, align 4, !tbaa !5
  %68 = add i32 %67, 1
  store i32 %68, ptr %18, align 4, !tbaa !5
  br label %37, !llvm.loop !13

69:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = load float, ptr %9, align 4, !tbaa !11
  %74 = call ptr @firinterp_crcf_create_prototype(i32 noundef %70, i32 noundef %71, i32 noundef %72, float noundef %73, float noundef 0.000000e+00)
  store ptr %74, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = mul i32 2, %76
  %78 = add i32 %75, %77
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = mul i32 3, %79
  %81 = add i32 %78, %80
  store i32 %81, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %82 = load i32, ptr %20, align 4, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = mul i32 %82, %83
  store i32 %84, ptr %21, align 4, !tbaa !5
  %85 = load i32, ptr %21, align 4, !tbaa !5
  %86 = zext i32 %85 to i64
  %87 = alloca { float, float }, i64 %86, align 16
  store i64 %86, ptr %22, align 8
  %88 = load i32, ptr %21, align 4, !tbaa !5
  %89 = zext i32 %88 to i64
  %90 = alloca { float, float }, i64 %89, align 16
  store i64 %89, ptr %23, align 8
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %127, %69
  %92 = load i32, ptr %18, align 4, !tbaa !5
  %93 = load i32, ptr %20, align 4, !tbaa !5
  %94 = icmp ult i32 %92, %93
  br i1 %94, label %95, label %130

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %96 = load i32, ptr %18, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = icmp ult i32 %96, %97
  br i1 %98, label %99, label %107

99:                                               ; preds = %95
  %100 = load i32, ptr %18, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds { float, float }, ptr %36, i64 %101
  %103 = getelementptr inbounds { float, float }, ptr %102, i32 0, i32 0
  %104 = load float, ptr %103, align 8
  %105 = getelementptr inbounds { float, float }, ptr %102, i32 0, i32 1
  %106 = load float, ptr %105, align 4
  br label %108

107:                                              ; preds = %95
  br label %108

108:                                              ; preds = %107, %99
  %109 = phi float [ %104, %99 ], [ 0.000000e+00, %107 ]
  %110 = phi float [ %106, %99 ], [ 0.000000e+00, %107 ]
  %111 = getelementptr inbounds { float, float }, ptr %24, i32 0, i32 0
  %112 = getelementptr inbounds { float, float }, ptr %24, i32 0, i32 1
  store float %109, ptr %111, align 4
  store float %110, ptr %112, align 4
  %113 = load ptr, ptr %19, align 8, !tbaa !9
  %114 = getelementptr inbounds { float, float }, ptr %24, i32 0, i32 0
  %115 = load float, ptr %114, align 4
  %116 = getelementptr inbounds { float, float }, ptr %24, i32 0, i32 1
  %117 = load float, ptr %116, align 4
  %118 = load i32, ptr %18, align 4, !tbaa !5
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = mul i32 %118, %119
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds { float, float }, ptr %87, i64 %121
  %123 = getelementptr inbounds { float, float }, ptr %25, i32 0, i32 0
  %124 = getelementptr inbounds { float, float }, ptr %25, i32 0, i32 1
  store float %115, ptr %123, align 4
  store float %117, ptr %124, align 4
  %125 = load <2 x float>, ptr %25, align 4
  %126 = call i32 @firinterp_crcf_execute(ptr noundef %113, <2 x float> noundef %125, ptr noundef %122)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %127

127:                                              ; preds = %108
  %128 = load i32, ptr %18, align 4, !tbaa !5
  %129 = add i32 %128, 1
  store i32 %129, ptr %18, align 4, !tbaa !5
  br label %91, !llvm.loop !15

130:                                              ; preds = %91
  %131 = load ptr, ptr %19, align 8, !tbaa !9
  %132 = call i32 @firinterp_crcf_destroy(ptr noundef %131)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = load i32, ptr %8, align 4, !tbaa !5
  %137 = load float, ptr %9, align 4, !tbaa !11
  %138 = call ptr @qdsync_cccf_create_linear(ptr noundef %36, i32 noundef %133, i32 noundef %134, i32 noundef %135, i32 noundef %136, float noundef %137, ptr noundef null, ptr noundef null)
  store ptr %138, ptr %26, align 8, !tbaa !9
  %139 = load ptr, ptr %26, align 8, !tbaa !9
  %140 = load float, ptr %11, align 4, !tbaa !11
  %141 = call i32 @qdsync_cccf_set_threshold(ptr noundef %139, float noundef %140)
  br label %142

142:                                              ; preds = %251, %130
  %143 = load float, ptr %15, align 4, !tbaa !11
  %144 = fcmp ole float %143, 5.000000e+00
  br i1 %144, label %145, label %252

145:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %146 = load float, ptr %15, align 4, !tbaa !11
  %147 = fneg float %146
  %148 = fdiv float %147, 2.000000e+01
  %149 = call float @powf(float noundef 1.000000e+01, float noundef %148) #5
  %150 = fpext float %149 to double
  %151 = fmul double %150, 0x3FF6A09E667F3BCD
  %152 = fptrunc double %151 to float
  store float %152, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 0, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %227, %145
  br label %154

154:                                              ; preds = %153
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %211, %154
  %156 = load i32, ptr %28, align 4, !tbaa !5
  %157 = load i32, ptr %12, align 4, !tbaa !5
  %158 = icmp ult i32 %156, %157
  br i1 %158, label %159, label %214

159:                                              ; preds = %155
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %195, %159
  %161 = load i32, ptr %18, align 4, !tbaa !5
  %162 = load i32, ptr %21, align 4, !tbaa !5
  %163 = icmp ult i32 %161, %162
  br i1 %163, label %164, label %198

164:                                              ; preds = %160
  %165 = load i32, ptr %18, align 4, !tbaa !5
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds { float, float }, ptr %87, i64 %166
  %168 = getelementptr inbounds { float, float }, ptr %167, i32 0, i32 0
  %169 = load float, ptr %168, align 8
  %170 = getelementptr inbounds { float, float }, ptr %167, i32 0, i32 1
  %171 = load float, ptr %170, align 4
  %172 = fpext float %169 to double
  %173 = fpext float %171 to double
  %174 = load float, ptr %27, align 4, !tbaa !11
  %175 = call float (...) @randnf()
  %176 = call float (...) @randnf()
  %177 = fmul float 0.000000e+00, %176
  %178 = fmul float 1.000000e+00, %176
  %179 = fadd float %175, %177
  %180 = fmul float %174, %179
  %181 = fmul float %174, %178
  %182 = fpext float %180 to double
  %183 = fpext float %181 to double
  %184 = fmul double %182, 0x3FE6A09E667F3BCD
  %185 = fmul double %183, 0x3FE6A09E667F3BCD
  %186 = fadd double %172, %184
  %187 = fadd double %173, %185
  %188 = fptrunc double %186 to float
  %189 = fptrunc double %187 to float
  %190 = load i32, ptr %18, align 4, !tbaa !5
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds { float, float }, ptr %90, i64 %191
  %193 = getelementptr inbounds { float, float }, ptr %192, i32 0, i32 0
  %194 = getelementptr inbounds { float, float }, ptr %192, i32 0, i32 1
  store float %188, ptr %193, align 8
  store float %189, ptr %194, align 4
  br label %195

195:                                              ; preds = %164
  %196 = load i32, ptr %18, align 4, !tbaa !5
  %197 = add i32 %196, 1
  store i32 %197, ptr %18, align 4, !tbaa !5
  br label %160, !llvm.loop !16

198:                                              ; preds = %160
  %199 = load ptr, ptr %26, align 8, !tbaa !9
  %200 = call i32 @qdsync_cccf_reset(ptr noundef %199)
  %201 = load ptr, ptr %26, align 8, !tbaa !9
  %202 = load i32, ptr %21, align 4, !tbaa !5
  %203 = call i32 @qdsync_cccf_execute(ptr noundef %201, ptr noundef %90, i32 noundef %202)
  %204 = load ptr, ptr %26, align 8, !tbaa !9
  %205 = call i32 @qdsync_cccf_is_detected(ptr noundef %204)
  %206 = icmp ne i32 %205, 0
  %207 = zext i1 %206 to i64
  %208 = select i1 %206, i32 0, i32 1
  %209 = load i32, ptr %30, align 4, !tbaa !5
  %210 = add i32 %209, %208
  store i32 %210, ptr %30, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %198
  %212 = load i32, ptr %28, align 4, !tbaa !5
  %213 = add i32 %212, 1
  store i32 %213, ptr %28, align 4, !tbaa !5
  br label %155, !llvm.loop !17

214:                                              ; preds = %155
  %215 = load i32, ptr %12, align 4, !tbaa !5
  %216 = load i32, ptr %29, align 4, !tbaa !5
  %217 = add i32 %216, %215
  store i32 %217, ptr %29, align 4, !tbaa !5
  %218 = load i32, ptr %30, align 4, !tbaa !5
  %219 = load i32, ptr %14, align 4, !tbaa !5
  %220 = icmp uge i32 %218, %219
  br i1 %220, label %221, label %222

221:                                              ; preds = %214
  br label %228

222:                                              ; preds = %214
  %223 = load i32, ptr %29, align 4, !tbaa !5
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = icmp uge i32 %223, %224
  br i1 %225, label %226, label %227

226:                                              ; preds = %222
  br label %228

227:                                              ; preds = %222
  br label %153

228:                                              ; preds = %226, %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %229 = load i32, ptr %30, align 4, !tbaa !5
  %230 = uitofp i32 %229 to float
  %231 = load i32, ptr %29, align 4, !tbaa !5
  %232 = uitofp i32 %231 to float
  %233 = fdiv float %230, %232
  store float %233, ptr %31, align 4, !tbaa !11
  %234 = load float, ptr %15, align 4, !tbaa !11
  %235 = fpext float %234 to double
  %236 = load i32, ptr %30, align 4, !tbaa !5
  %237 = load i32, ptr %29, align 4, !tbaa !5
  %238 = load float, ptr %31, align 4, !tbaa !11
  %239 = fmul float %238, 1.000000e+02
  %240 = fpext float %239 to double
  %241 = call i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %235, i32 noundef %236, i32 noundef %237, double noundef %240)
  %242 = load i32, ptr %30, align 4, !tbaa !5
  %243 = load i32, ptr %14, align 4, !tbaa !5
  %244 = icmp ult i32 %242, %243
  br i1 %244, label %245, label %246

245:                                              ; preds = %228
  store i32 9, ptr %32, align 4
  br label %249

246:                                              ; preds = %228
  %247 = load float, ptr %15, align 4, !tbaa !11
  %248 = fadd float %247, 1.000000e+00
  store float %248, ptr %15, align 4, !tbaa !11
  store i32 0, ptr %32, align 4
  br label %249

249:                                              ; preds = %246, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  %250 = load i32, ptr %32, align 4
  switch i32 %250, label %257 [
    i32 0, label %251
    i32 9, label %252
  ]

251:                                              ; preds = %249
  br label %142, !llvm.loop !18

252:                                              ; preds = %249, %142
  %253 = load ptr, ptr %26, align 8, !tbaa !9
  %254 = call i32 @qdsync_cccf_destroy(ptr noundef %253)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %255 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %255)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  %256 = load i32, ptr %3, align 4
  ret i32 %256

257:                                              ; preds = %249
  unreachable
}

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

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

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

declare ptr @firinterp_crcf_create_prototype(i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef) #4

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

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

declare i32 @firinterp_crcf_destroy(ptr noundef) #4

declare ptr @qdsync_cccf_create_linear(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #4

declare i32 @qdsync_cccf_set_threshold(ptr noundef, float noundef) #4

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

declare float @randnf(...) #4

declare i32 @qdsync_cccf_reset(ptr noundef) #4

declare i32 @qdsync_cccf_execute(ptr noundef, ptr noundef, i32 noundef) #4

declare i32 @qdsync_cccf_is_detected(ptr noundef) #4

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

declare i32 @qdsync_cccf_destroy(ptr noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
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 = { "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}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !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 [43 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 = alloca [1024 x { float, float }], align 16
  br label %4

4:                                                ; preds = %2, %4
  %indvars.iv = phi i64 [ 0, %2 ], [ %indvars.iv.next, %4 ]
  %5 = tail call i32 @rand() #6
  %6 = and i32 %5, 1
  %.not77 = icmp eq i32 %6, 0
  %7 = select i1 %.not77, double 0xBFE6A09E667F3BCD, double 0x3FE6A09E667F3BCD
  %8 = tail call i32 @rand() #6
  %9 = and i32 %8, 1
  %.not78 = icmp eq i32 %9, 0
  %10 = select i1 %.not78, double 0xBFE6A09E667F3BCD, double 0x3FE6A09E667F3BCD
  %11 = tail call double @llvm.copysign.f64(double 0.000000e+00, double %10)
  %12 = fadd double %7, %11
  %13 = getelementptr inbounds { float, float }, ptr %3, i64 %indvars.iv
  %14 = insertelement <2 x double> poison, double %12, i64 0
  %15 = insertelement <2 x double> %14, double %10, i64 1
  %16 = fptrunc <2 x double> %15 to <2 x float>
  store <2 x float> %16, ptr %13, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1024
  br i1 %exitcond.not, label %17, label %4, !llvm.loop !5

17:                                               ; preds = %4
  %18 = tail call ptr @firinterp_crcf_create_prototype(i32 noundef 7, i32 noundef 2, i32 noundef 7, float noundef 0x3FD3333340000000, float noundef 0.000000e+00) #6
  %19 = alloca [8220 x { float, float }], align 16
  %20 = alloca [8220 x { float, float }], align 16
  br label %21

21:                                               ; preds = %17, %26
  %indvars.iv86 = phi i64 [ 0, %17 ], [ %indvars.iv.next87, %26 ]
  %22 = icmp ult i64 %indvars.iv86, 1024
  br i1 %22, label %23, label %26

23:                                               ; preds = %21
  %24 = getelementptr inbounds { float, float }, ptr %3, i64 %indvars.iv86
  %25 = load <2 x float>, ptr %24, align 8
  br label %26

26:                                               ; preds = %21, %23
  %27 = phi <2 x float> [ %25, %23 ], [ zeroinitializer, %21 ]
  %.idx = shl nsw i64 %indvars.iv86, 4
  %28 = getelementptr inbounds i8, ptr %19, i64 %.idx
  %29 = call i32 @firinterp_crcf_execute(ptr noundef %18, <2 x float> noundef %27, ptr noundef nonnull %28) #6
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next87, 4110
  br i1 %exitcond89.not, label %30, label %21, !llvm.loop !7

30:                                               ; preds = %26
  %31 = call i32 @firinterp_crcf_destroy(ptr noundef %18) #6
  %32 = call ptr @qdsync_cccf_create_linear(ptr noundef nonnull %3, i32 noundef 1024, i32 noundef 7, i32 noundef 2, i32 noundef 7, float noundef 0x3FD3333340000000, ptr noundef null, ptr noundef null) #6
  %33 = call i32 @qdsync_cccf_set_threshold(ptr noundef %32, float noundef 0x3FB99999A0000000) #6
  br label %34

34:                                               ; preds = %72, %30
  %.072 = phi float [ -2.500000e+01, %30 ], [ %81, %72 ]
  %35 = fcmp ugt float %.072, 5.000000e+00
  br i1 %35, label %82, label %36

36:                                               ; preds = %34
  %37 = fdiv float %.072, -2.000000e+01
  %38 = call float @powf(float noundef 1.000000e+01, float noundef %37) #6
  %39 = fpext float %38 to double
  %40 = fmul double %39, 0x3FF6A09E667F3BCD
  %41 = fptrunc double %40 to float
  %42 = insertelement <2 x float> poison, float %41, i64 0
  %43 = shufflevector <2 x float> %42, <2 x float> poison, <2 x i32> zeroinitializer
  br label %44

44:                                               ; preds = %68, %36
  %.070 = phi i32 [ 0, %36 ], [ %69, %68 ]
  %.069 = phi i32 [ 0, %36 ], [ %66, %68 ]
  br label %.preheader

.preheader:                                       ; preds = %44, %61
  %.183 = phi i32 [ %.069, %44 ], [ %66, %61 ]
  %.07182 = phi i32 [ 0, %44 ], [ %67, %61 ]
  br label %45

45:                                               ; preds = %.preheader, %45
  %indvars.iv90 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next91, %45 ]
  %46 = getelementptr inbounds { float, float }, ptr %19, i64 %indvars.iv90
  %47 = getelementptr inbounds { float, float }, ptr %20, i64 %indvars.iv90
  %48 = load <2 x float>, ptr %46, align 8
  %49 = fpext <2 x float> %48 to <2 x double>
  %50 = call float (...) @randnf() #6
  %51 = call float (...) @randnf() #6
  %52 = fmul float %51, 0.000000e+00
  %53 = fadd float %50, %52
  %54 = insertelement <2 x float> poison, float %53, i64 0
  %55 = insertelement <2 x float> %54, float %51, i64 1
  %56 = fmul <2 x float> %55, %43
  %57 = fpext <2 x float> %56 to <2 x double>
  %58 = fmul <2 x double> %57, <double 0x3FE6A09E667F3BCD, double 0x3FE6A09E667F3BCD>
  %59 = fadd <2 x double> %58, %49
  %60 = fptrunc <2 x double> %59 to <2 x float>
  store <2 x float> %60, ptr %47, align 8
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond93.not = icmp eq i64 %indvars.iv.next91, 8220
  br i1 %exitcond93.not, label %61, label %45, !llvm.loop !8

61:                                               ; preds = %45
  %62 = call i32 @qdsync_cccf_reset(ptr noundef %32) #6
  %63 = call i32 @qdsync_cccf_execute(ptr noundef %32, ptr noundef nonnull %20, i32 noundef 8220) #6
  %64 = call i32 @qdsync_cccf_is_detected(ptr noundef %32) #6
  %.not = icmp eq i32 %64, 0
  %65 = zext i1 %.not to i32
  %66 = add i32 %.183, %65
  %67 = add nuw nsw i32 %.07182, 1
  %exitcond94.not = icmp eq i32 %67, 10
  br i1 %exitcond94.not, label %68, label %.preheader, !llvm.loop !9

68:                                               ; preds = %61
  %69 = add nuw nsw i32 %.070, 10
  %70 = icmp ugt i32 %66, 3
  %71 = icmp ugt i32 %.070, 89
  %or.cond = select i1 %70, i1 true, i1 %71
  br i1 %or.cond, label %72, label %44

72:                                               ; preds = %68
  %73 = uitofp i32 %66 to float
  %74 = uitofp nneg i32 %69 to float
  %75 = fdiv float %73, %74
  %76 = fpext float %.072 to double
  %77 = fmul float %75, 1.000000e+02
  %78 = fpext float %77 to double
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %76, i32 noundef %66, i32 noundef %69, double noundef %78)
  %80 = icmp ult i32 %66, 4
  %81 = fadd float %.072, 1.000000e+00
  br i1 %80, label %82, label %34

82:                                               ; preds = %72, %34
  %83 = call i32 @qdsync_cccf_destroy(ptr noundef %32) #6
  ret i32 0
}

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

declare ptr @firinterp_crcf_create_prototype(i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef) local_unnamed_addr #2

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

declare i32 @firinterp_crcf_destroy(ptr noundef) local_unnamed_addr #2

declare ptr @qdsync_cccf_create_linear(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @qdsync_cccf_set_threshold(ptr noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @powf(float noundef, float noundef) local_unnamed_addr #3

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

declare i32 @qdsync_cccf_reset(ptr noundef) local_unnamed_addr #2

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

declare i32 @qdsync_cccf_is_detected(ptr noundef) local_unnamed_addr #2

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

declare i32 @qdsync_cccf_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.copysign.f64(double, double) #5

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 = { 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 = { "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 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}


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