; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (hyperspherical)

; 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"

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

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

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

; Function Attrs: nounwind
declare double @sin(double noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @get_CF1(i32 noundef, i32 noundef, double noundef, double noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @CF1_from_Gegenbauer(i32 noundef, i32 noundef, double noundef, double noundef, ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @hyperspherical_backwards_recurrence_chunk(i32 noundef %0, i32 noundef %1, double noundef %2, ptr noalias noundef %3, ptr noalias noundef %4, ptr noalias noundef %5, i32 noundef %6, ptr noalias noundef %7, ptr noalias noundef %8, ptr noalias noundef %9) #3 {
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca [16 x double], align 16
  store i32 %0, ptr %11, align 4, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !5
  store double %2, ptr %13, align 8, !tbaa !9
  store ptr %3, ptr %14, align 8, !tbaa !11
  store ptr %4, ptr %15, align 8, !tbaa !11
  store ptr %5, ptr %16, align 8, !tbaa !11
  store i32 %6, ptr %17, align 4, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !11
  store ptr %8, ptr %19, align 8, !tbaa !11
  store ptr %9, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 1, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr %29) #5
  call void @llvm.memset.p0.i64(ptr align 16 %29, i8 0, i64 128, i1 false)
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %125, %10
  %31 = load i32, ptr %28, align 4, !tbaa !5
  %32 = load i32, ptr %17, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %34, label %128

34:                                               ; preds = %30
  %35 = load i32, ptr %11, align 4, !tbaa !5
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %73

37:                                               ; preds = %34
  %38 = load double, ptr %13, align 8, !tbaa !9
  %39 = load i32, ptr %12, align 4, !tbaa !5
  %40 = sitofp i32 %39 to double
  %41 = fmul double 1.500000e+00, %40
  %42 = fcmp ogt double %38, %41
  br i1 %42, label %43, label %53

43:                                               ; preds = %37
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = load i32, ptr %12, align 4, !tbaa !5
  %46 = load double, ptr %13, align 8, !tbaa !9
  %47 = load ptr, ptr %16, align 8, !tbaa !11
  %48 = load i32, ptr %28, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %47, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !9
  %52 = call i32 @get_CF1(i32 noundef %44, i32 noundef %45, double noundef %46, double noundef %51, ptr noundef %23, ptr noundef %26)
  store i32 %52, ptr %27, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %43, %37
  %54 = load i32, ptr %27, align 4, !tbaa !5
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %72

56:                                               ; preds = %53
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = load double, ptr %13, align 8, !tbaa !9
  %59 = fadd double %58, 2.000000e-01
  %60 = fptosi double %59 to i32
  %61 = load ptr, ptr %15, align 8, !tbaa !11
  %62 = load i32, ptr %28, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %61, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = load ptr, ptr %16, align 8, !tbaa !11
  %67 = load i32, ptr %28, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds double, ptr %66, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = call i32 @CF1_from_Gegenbauer(i32 noundef %57, i32 noundef %60, double noundef %65, double noundef %70, ptr noundef %23)
  br label %72

72:                                               ; preds = %56, %53
  store double 1.000000e+00, ptr %22, align 8, !tbaa !9
  br label %88

73:                                               ; preds = %34
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = load i32, ptr %12, align 4, !tbaa !5
  %76 = load double, ptr %13, align 8, !tbaa !9
  %77 = load ptr, ptr %16, align 8, !tbaa !11
  %78 = load i32, ptr %28, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds double, ptr %77, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = call i32 @get_CF1(i32 noundef %74, i32 noundef %75, double noundef %76, double noundef %81, ptr noundef %23, ptr noundef %26)
  %83 = load i32, ptr %26, align 4, !tbaa !5
  %84 = sitofp i32 %83 to double
  store double %84, ptr %22, align 8, !tbaa !9
  %85 = load double, ptr %22, align 8, !tbaa !9
  %86 = load double, ptr %23, align 8, !tbaa !9
  %87 = fmul double %86, %85
  store double %87, ptr %23, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %73, %72
  %89 = load double, ptr %22, align 8, !tbaa !9
  %90 = load ptr, ptr %20, align 8, !tbaa !11
  %91 = load i32, ptr %12, align 4, !tbaa !5
  %92 = load i32, ptr %17, align 4, !tbaa !5
  %93 = mul nsw i32 %91, %92
  %94 = load i32, ptr %28, align 4, !tbaa !5
  %95 = add nsw i32 %93, %94
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %90, i64 %96
  store double %89, ptr %97, align 8, !tbaa !9
  %98 = load ptr, ptr %19, align 8, !tbaa !11
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds double, ptr %98, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !9
  %103 = load i32, ptr %12, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  %105 = sitofp i32 %104 to double
  %106 = load ptr, ptr %16, align 8, !tbaa !11
  %107 = load i32, ptr %28, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds double, ptr %106, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !9
  %111 = fmul double %105, %110
  %112 = load double, ptr %22, align 8, !tbaa !9
  %113 = load double, ptr %23, align 8, !tbaa !9
  %114 = call double @llvm.fmuladd.f64(double %111, double %112, double %113)
  %115 = fmul double %102, %114
  %116 = load ptr, ptr %20, align 8, !tbaa !11
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  %119 = load i32, ptr %17, align 4, !tbaa !5
  %120 = mul nsw i32 %118, %119
  %121 = load i32, ptr %28, align 4, !tbaa !5
  %122 = add nsw i32 %120, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds double, ptr %116, i64 %123
  store double %115, ptr %124, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %88
  %126 = load i32, ptr %28, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %28, align 4, !tbaa !5
  br label %30, !llvm.loop !13

128:                                              ; preds = %30
  %129 = load i32, ptr %12, align 4, !tbaa !5
  %130 = sub nsw i32 %129, 2
  store i32 %130, ptr %24, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %265, %128
  %132 = load i32, ptr %24, align 4, !tbaa !5
  %133 = icmp sge i32 %132, 0
  br i1 %133, label %134, label %268

134:                                              ; preds = %131
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %194, %134
  %136 = load i32, ptr %28, align 4, !tbaa !5
  %137 = load i32, ptr %17, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %139, label %197

139:                                              ; preds = %135
  %140 = load ptr, ptr %19, align 8, !tbaa !11
  %141 = load i32, ptr %24, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds double, ptr %140, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !9
  %146 = load i32, ptr %24, align 4, !tbaa !5
  %147 = mul nsw i32 2, %146
  %148 = add nsw i32 %147, 3
  %149 = sitofp i32 %148 to double
  %150 = load ptr, ptr %16, align 8, !tbaa !11
  %151 = load i32, ptr %28, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds double, ptr %150, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !9
  %155 = fmul double %149, %154
  %156 = load ptr, ptr %20, align 8, !tbaa !11
  %157 = load i32, ptr %24, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  %159 = load i32, ptr %17, align 4, !tbaa !5
  %160 = mul nsw i32 %158, %159
  %161 = load i32, ptr %28, align 4, !tbaa !5
  %162 = add nsw i32 %160, %161
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds double, ptr %156, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !9
  %166 = load ptr, ptr %18, align 8, !tbaa !11
  %167 = load i32, ptr %24, align 4, !tbaa !5
  %168 = add nsw i32 %167, 2
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds double, ptr %166, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !9
  %172 = load ptr, ptr %20, align 8, !tbaa !11
  %173 = load i32, ptr %24, align 4, !tbaa !5
  %174 = add nsw i32 %173, 2
  %175 = load i32, ptr %17, align 4, !tbaa !5
  %176 = mul nsw i32 %174, %175
  %177 = load i32, ptr %28, align 4, !tbaa !5
  %178 = add nsw i32 %176, %177
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %172, i64 %179
  %181 = load double, ptr %180, align 8, !tbaa !9
  %182 = fmul double %171, %181
  %183 = fneg double %182
  %184 = call double @llvm.fmuladd.f64(double %155, double %165, double %183)
  %185 = fmul double %145, %184
  %186 = load ptr, ptr %20, align 8, !tbaa !11
  %187 = load i32, ptr %24, align 4, !tbaa !5
  %188 = load i32, ptr %17, align 4, !tbaa !5
  %189 = mul nsw i32 %187, %188
  %190 = load i32, ptr %28, align 4, !tbaa !5
  %191 = add nsw i32 %189, %190
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds double, ptr %186, i64 %192
  store double %185, ptr %193, align 8, !tbaa !9
  br label %194

194:                                              ; preds = %139
  %195 = load i32, ptr %28, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %28, align 4, !tbaa !5
  br label %135, !llvm.loop !15

197:                                              ; preds = %135
  %198 = load ptr, ptr %20, align 8, !tbaa !11
  %199 = load i32, ptr %24, align 4, !tbaa !5
  %200 = load i32, ptr %17, align 4, !tbaa !5
  %201 = mul nsw i32 %199, %200
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds double, ptr %198, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !9
  %205 = call double @llvm.fabs.f64(double %204)
  %206 = fcmp ogt double %205, 0x6974E718D7D7625A
  br i1 %206, label %207, label %264

207:                                              ; preds = %197
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %227, %207
  %209 = load i32, ptr %28, align 4, !tbaa !5
  %210 = load i32, ptr %17, align 4, !tbaa !5
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %212, label %230

212:                                              ; preds = %208
  %213 = load ptr, ptr %20, align 8, !tbaa !11
  %214 = load i32, ptr %24, align 4, !tbaa !5
  %215 = load i32, ptr %17, align 4, !tbaa !5
  %216 = mul nsw i32 %214, %215
  %217 = load i32, ptr %28, align 4, !tbaa !5
  %218 = add nsw i32 %216, %217
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds double, ptr %213, i64 %219
  %221 = load double, ptr %220, align 8, !tbaa !9
  %222 = fdiv double 1.000000e+00, %221
  %223 = call double @llvm.fabs.f64(double %222)
  %224 = load i32, ptr %28, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [16 x double], ptr %29, i64 0, i64 %225
  store double %223, ptr %226, align 8, !tbaa !9
  br label %227

227:                                              ; preds = %212
  %228 = load i32, ptr %28, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %28, align 4, !tbaa !5
  br label %208, !llvm.loop !16

230:                                              ; preds = %208
  %231 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %231, ptr %25, align 4, !tbaa !5
  br label %232

232:                                              ; preds = %260, %230
  %233 = load i32, ptr %25, align 4, !tbaa !5
  %234 = load i32, ptr %12, align 4, !tbaa !5
  %235 = icmp sle i32 %233, %234
  br i1 %235, label %236, label %263

236:                                              ; preds = %232
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %256, %236
  %238 = load i32, ptr %28, align 4, !tbaa !5
  %239 = load i32, ptr %17, align 4, !tbaa !5
  %240 = icmp slt i32 %238, %239
  br i1 %240, label %241, label %259

241:                                              ; preds = %237
  %242 = load i32, ptr %28, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [16 x double], ptr %29, i64 0, i64 %243
  %245 = load double, ptr %244, align 8, !tbaa !9
  %246 = load ptr, ptr %20, align 8, !tbaa !11
  %247 = load i32, ptr %25, align 4, !tbaa !5
  %248 = load i32, ptr %17, align 4, !tbaa !5
  %249 = mul nsw i32 %247, %248
  %250 = load i32, ptr %28, align 4, !tbaa !5
  %251 = add nsw i32 %249, %250
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds double, ptr %246, i64 %252
  %254 = load double, ptr %253, align 8, !tbaa !9
  %255 = fmul double %254, %245
  store double %255, ptr %253, align 8, !tbaa !9
  br label %256

256:                                              ; preds = %241
  %257 = load i32, ptr %28, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %28, align 4, !tbaa !5
  br label %237, !llvm.loop !17

259:                                              ; preds = %237
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %25, align 4, !tbaa !5
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %25, align 4, !tbaa !5
  br label %232, !llvm.loop !18

263:                                              ; preds = %232
  br label %264

264:                                              ; preds = %263, %197
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %24, align 4, !tbaa !5
  %267 = add nsw i32 %266, -1
  store i32 %267, ptr %24, align 4, !tbaa !5
  br label %131, !llvm.loop !19

268:                                              ; preds = %131
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %269

269:                                              ; preds = %300, %268
  %270 = load i32, ptr %28, align 4, !tbaa !5
  %271 = load i32, ptr %17, align 4, !tbaa !5
  %272 = icmp slt i32 %270, %271
  br i1 %272, label %273, label %303

273:                                              ; preds = %269
  %274 = load double, ptr %13, align 8, !tbaa !9
  %275 = load ptr, ptr %14, align 8, !tbaa !11
  %276 = load i32, ptr %28, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds double, ptr %275, i64 %277
  %279 = load double, ptr %278, align 8, !tbaa !9
  %280 = fmul double %274, %279
  %281 = call double @sin(double noundef %280) #5
  %282 = load double, ptr %13, align 8, !tbaa !9
  %283 = load ptr, ptr %15, align 8, !tbaa !11
  %284 = load i32, ptr %28, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds double, ptr %283, i64 %285
  %287 = load double, ptr %286, align 8, !tbaa !9
  %288 = fmul double %282, %287
  %289 = fdiv double %281, %288
  store double %289, ptr %21, align 8, !tbaa !9
  %290 = load double, ptr %21, align 8, !tbaa !9
  %291 = load ptr, ptr %20, align 8, !tbaa !11
  %292 = load i32, ptr %28, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds double, ptr %291, i64 %293
  %295 = load double, ptr %294, align 8, !tbaa !9
  %296 = fdiv double %290, %295
  %297 = load i32, ptr %28, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [16 x double], ptr %29, i64 0, i64 %298
  store double %296, ptr %299, align 8, !tbaa !9
  br label %300

300:                                              ; preds = %273
  %301 = load i32, ptr %28, align 4, !tbaa !5
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %28, align 4, !tbaa !5
  br label %269, !llvm.loop !20

303:                                              ; preds = %269
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %304

304:                                              ; preds = %332, %303
  %305 = load i32, ptr %25, align 4, !tbaa !5
  %306 = load i32, ptr %12, align 4, !tbaa !5
  %307 = icmp sle i32 %305, %306
  br i1 %307, label %308, label %335

308:                                              ; preds = %304
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %309

309:                                              ; preds = %328, %308
  %310 = load i32, ptr %28, align 4, !tbaa !5
  %311 = load i32, ptr %17, align 4, !tbaa !5
  %312 = icmp slt i32 %310, %311
  br i1 %312, label %313, label %331

313:                                              ; preds = %309
  %314 = load i32, ptr %28, align 4, !tbaa !5
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [16 x double], ptr %29, i64 0, i64 %315
  %317 = load double, ptr %316, align 8, !tbaa !9
  %318 = load ptr, ptr %20, align 8, !tbaa !11
  %319 = load i32, ptr %25, align 4, !tbaa !5
  %320 = load i32, ptr %17, align 4, !tbaa !5
  %321 = mul nsw i32 %319, %320
  %322 = load i32, ptr %28, align 4, !tbaa !5
  %323 = add nsw i32 %321, %322
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds double, ptr %318, i64 %324
  %326 = load double, ptr %325, align 8, !tbaa !9
  %327 = fmul double %326, %317
  store double %327, ptr %325, align 8, !tbaa !9
  br label %328

328:                                              ; preds = %313
  %329 = load i32, ptr %28, align 4, !tbaa !5
  %330 = add nsw i32 %329, 1
  store i32 %330, ptr %28, align 4, !tbaa !5
  br label %309, !llvm.loop !21

331:                                              ; preds = %309
  br label %332

332:                                              ; preds = %331
  %333 = load i32, ptr %25, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %25, align 4, !tbaa !5
  br label %304, !llvm.loop !22

335:                                              ; preds = %304
  call void @llvm.lifetime.end.p0(i64 128, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  ret i32 0
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"double", !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}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !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"

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @get_CF1(i32 noundef, i32 noundef, double noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @CF1_from_Gegenbauer(i32 noundef, i32 noundef, double noundef, double noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @hyperspherical_backwards_recurrence_chunk(i32 noundef %0, i32 noundef %1, double noundef %2, ptr noalias nocapture noundef readonly %3, ptr noalias nocapture noundef readonly %4, ptr noalias nocapture noundef readonly %5, i32 noundef %6, ptr noalias nocapture noundef readonly %7, ptr noalias nocapture noundef readonly %8, ptr noalias nocapture noundef %9) local_unnamed_addr #3 {
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca [16 x double], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %13) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %13, i8 0, i64 128, i1 false)
  %14 = icmp slt i32 %6, 1
  br i1 %14, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %10
  %15 = icmp eq i32 %0, 1
  %16 = sitofp i32 %1 to double
  %17 = fmul double %16, 1.500000e+00
  %18 = fcmp olt double %17, %2
  %19 = fadd double %2, 2.000000e-01
  %20 = fptosi double %19 to i32
  %21 = mul nsw i32 %6, %1
  %22 = sext i32 %1 to i64
  %23 = getelementptr inbounds double, ptr %8, i64 %22
  %24 = add nsw i32 %1, 1
  %25 = sitofp i32 %24 to double
  %26 = add nsw i32 %1, -1
  %27 = mul nsw i32 %26, %6
  %28 = sext i32 %21 to i64
  %29 = sext i32 %27 to i64
  %wide.trip.count159 = zext nneg i32 %6 to i64
  %invariant.gep207 = getelementptr double, ptr %9, i64 %28
  %invariant.gep209 = getelementptr double, ptr %9, i64 %29
  br i1 %15, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %42
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %42 ], [ 0, %.lr.ph ]
  %.0110129.us = phi i32 [ %.1111.us, %42 ], [ 1, %.lr.ph ]
  br i1 %18, label %30, label %34

30:                                               ; preds = %.lr.ph.split.us
  %31 = getelementptr inbounds double, ptr %5, i64 %indvars.iv156
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = call i32 @get_CF1(i32 noundef 1, i32 noundef %1, double noundef %2, double noundef %32, ptr noundef nonnull %11, ptr noundef nonnull %12)
  br label %34

34:                                               ; preds = %30, %.lr.ph.split.us
  %.1111.us = phi i32 [ %33, %30 ], [ %.0110129.us, %.lr.ph.split.us ]
  %35 = icmp eq i32 %.1111.us, 1
  br i1 %35, label %36, label %._crit_edge198

._crit_edge198:                                   ; preds = %34
  %.phi.trans.insert = getelementptr inbounds double, ptr %5, i64 %indvars.iv156
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !5
  br label %42

36:                                               ; preds = %34
  %37 = getelementptr inbounds double, ptr %4, i64 %indvars.iv156
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds double, ptr %5, i64 %indvars.iv156
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = call i32 @CF1_from_Gegenbauer(i32 noundef %1, i32 noundef %20, double noundef %38, double noundef %40, ptr noundef nonnull %11)
  br label %42

42:                                               ; preds = %._crit_edge198, %36
  %43 = phi double [ %40, %36 ], [ %.pre, %._crit_edge198 ]
  %gep208 = getelementptr double, ptr %invariant.gep207, i64 %indvars.iv156
  store double 1.000000e+00, ptr %gep208, align 8, !tbaa !5
  %44 = load double, ptr %23, align 8, !tbaa !5
  %45 = fmul double %43, %25
  %46 = load double, ptr %11, align 8, !tbaa !5
  %47 = fadd double %45, %46
  %48 = fmul double %44, %47
  %gep210 = getelementptr double, ptr %invariant.gep209, i64 %indvars.iv156
  store double %48, ptr %gep210, align 8, !tbaa !5
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %exitcond160.not = icmp eq i64 %indvars.iv.next157, %wide.trip.count159
  br i1 %exitcond160.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !9

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split ], [ 0, %.lr.ph ]
  %49 = getelementptr inbounds double, ptr %5, i64 %indvars.iv
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = call i32 @get_CF1(i32 noundef %0, i32 noundef %1, double noundef %2, double noundef %50, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %52 = load i32, ptr %12, align 4, !tbaa !11
  %53 = sitofp i32 %52 to double
  %54 = load double, ptr %11, align 8, !tbaa !5
  %55 = fmul double %54, %53
  store double %55, ptr %11, align 8, !tbaa !5
  %gep = getelementptr double, ptr %invariant.gep207, i64 %indvars.iv
  store double %53, ptr %gep, align 8, !tbaa !5
  %56 = load double, ptr %23, align 8, !tbaa !5
  %57 = fmul double %50, %25
  %58 = call double @llvm.fmuladd.f64(double %57, double %53, double %55)
  %59 = fmul double %56, %58
  %gep206 = getelementptr double, ptr %invariant.gep209, i64 %indvars.iv
  store double %59, ptr %gep206, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count159
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph.split, %42, %10
  %60 = icmp sgt i32 %1, 1
  br i1 %60, label %.preheader128.lr.ph, label %.preheader124

.preheader128.lr.ph:                              ; preds = %._crit_edge
  %61 = add nsw i32 %1, -2
  %62 = zext nneg i32 %61 to i64
  %63 = sext i32 %6 to i64
  %64 = add nuw i32 %1, 1
  %65 = zext nneg i32 %1 to i64
  %wide.trip.count164 = zext i32 %6 to i64
  %wide.trip.count169 = zext nneg i32 %6 to i64
  %wide.trip.count174 = zext nneg i32 %6 to i64
  %min.iters.check245 = icmp ult i32 %6, 4
  %n.vec248 = and i64 %wide.trip.count164, 2147483644
  %cmp.n263 = icmp eq i64 %n.vec248, %wide.trip.count164
  %min.iters.check233 = icmp eq i32 %6, 1
  %n.vec236 = and i64 %wide.trip.count164, 2147483646
  %cmp.n242 = icmp eq i64 %n.vec236, %wide.trip.count164
  %min.iters.check = icmp ult i32 %6, 4
  %n.vec = and i64 %wide.trip.count164, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count164
  br label %.preheader128

.preheader128:                                    ; preds = %.preheader128.lr.ph, %.loopexit
  %indvars.iv176 = phi i64 [ %62, %.preheader128.lr.ph ], [ %indvars.iv.next177, %.loopexit ]
  br i1 %14, label %.loopexit, label %.lr.ph132

.lr.ph132:                                        ; preds = %.preheader128
  %66 = add nuw nsw i64 %indvars.iv176, 1
  %67 = getelementptr inbounds double, ptr %8, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !5
  %indvars.iv176.tr = trunc i64 %indvars.iv176 to i32
  %69 = shl i32 %indvars.iv176.tr, 1
  %70 = add i32 %69, 3
  %71 = uitofp nneg i32 %70 to double
  %72 = mul nsw i64 %66, %63
  %73 = add nuw nsw i64 %indvars.iv176, 2
  %74 = getelementptr inbounds double, ptr %7, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !5
  %76 = mul nsw i64 %73, %63
  %77 = fneg double %75
  %78 = mul nsw i64 %indvars.iv176, %63
  %invariant.gep211 = getelementptr double, ptr %9, i64 %72
  %invariant.gep213 = getelementptr double, ptr %9, i64 %76
  %invariant.gep215 = getelementptr double, ptr %9, i64 %78
  br i1 %min.iters.check245, label %scalar.ph244.preheader, label %vector.ph246

scalar.ph244.preheader:                           ; preds = %middle.block243, %.lr.ph132
  %indvars.iv161.ph = phi i64 [ 0, %.lr.ph132 ], [ %n.vec248, %middle.block243 ]
  br label %scalar.ph244

vector.ph246:                                     ; preds = %.lr.ph132
  %broadcast.splatinsert = insertelement <2 x double> poison, double %71, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert258 = insertelement <2 x double> poison, double %77, i64 0
  %broadcast.splat259 = shufflevector <2 x double> %broadcast.splatinsert258, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert260 = insertelement <2 x double> poison, double %68, i64 0
  %broadcast.splat261 = shufflevector <2 x double> %broadcast.splatinsert260, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body250

vector.body250:                                   ; preds = %vector.body250, %vector.ph246
  %index251 = phi i64 [ 0, %vector.ph246 ], [ %index.next262, %vector.body250 ]
  %79 = getelementptr inbounds double, ptr %5, i64 %index251
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %wide.load252 = load <2 x double>, ptr %79, align 8, !tbaa !5
  %wide.load253 = load <2 x double>, ptr %80, align 8, !tbaa !5
  %81 = fmul <2 x double> %wide.load252, %broadcast.splat
  %82 = fmul <2 x double> %wide.load253, %broadcast.splat
  %83 = getelementptr double, ptr %invariant.gep211, i64 %index251
  %84 = getelementptr i8, ptr %83, i64 16
  %wide.load254 = load <2 x double>, ptr %83, align 8, !tbaa !5
  %wide.load255 = load <2 x double>, ptr %84, align 8, !tbaa !5
  %85 = getelementptr double, ptr %invariant.gep213, i64 %index251
  %86 = getelementptr i8, ptr %85, i64 16
  %wide.load256 = load <2 x double>, ptr %85, align 8, !tbaa !5
  %wide.load257 = load <2 x double>, ptr %86, align 8, !tbaa !5
  %87 = fmul <2 x double> %wide.load256, %broadcast.splat259
  %88 = fmul <2 x double> %wide.load257, %broadcast.splat259
  %89 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %81, <2 x double> %wide.load254, <2 x double> %87)
  %90 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> %wide.load255, <2 x double> %88)
  %91 = fmul <2 x double> %broadcast.splat261, %89
  %92 = fmul <2 x double> %broadcast.splat261, %90
  %93 = getelementptr double, ptr %invariant.gep215, i64 %index251
  %94 = getelementptr i8, ptr %93, i64 16
  store <2 x double> %91, ptr %93, align 8, !tbaa !5
  store <2 x double> %92, ptr %94, align 8, !tbaa !5
  %index.next262 = add nuw i64 %index251, 4
  %95 = icmp eq i64 %index.next262, %n.vec248
  br i1 %95, label %middle.block243, label %vector.body250, !llvm.loop !13

middle.block243:                                  ; preds = %vector.body250
  br i1 %cmp.n263, label %._crit_edge133, label %scalar.ph244.preheader

.preheader124:                                    ; preds = %.loopexit, %._crit_edge
  br i1 %14, label %._crit_edge151, label %.lr.ph145.preheader

.lr.ph145.preheader:                              ; preds = %.preheader124
  %wide.trip.count186 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %wide.trip.count186, 1
  %96 = icmp eq i32 %6, 1
  br i1 %96, label %.preheader123.unr-lcssa, label %.lr.ph145.preheader.new

.lr.ph145.preheader.new:                          ; preds = %.lr.ph145.preheader
  %unroll_iter = and i64 %wide.trip.count186, 2147483646
  br label %.lr.ph145

scalar.ph244:                                     ; preds = %scalar.ph244.preheader, %scalar.ph244
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %scalar.ph244 ], [ %indvars.iv161.ph, %scalar.ph244.preheader ]
  %97 = getelementptr inbounds double, ptr %5, i64 %indvars.iv161
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = fmul double %98, %71
  %gep212 = getelementptr double, ptr %invariant.gep211, i64 %indvars.iv161
  %100 = load double, ptr %gep212, align 8, !tbaa !5
  %gep214 = getelementptr double, ptr %invariant.gep213, i64 %indvars.iv161
  %101 = load double, ptr %gep214, align 8, !tbaa !5
  %102 = fmul double %101, %77
  %103 = call double @llvm.fmuladd.f64(double %99, double %100, double %102)
  %104 = fmul double %68, %103
  %gep216 = getelementptr double, ptr %invariant.gep215, i64 %indvars.iv161
  store double %104, ptr %gep216, align 8, !tbaa !5
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164
  br i1 %exitcond165.not, label %._crit_edge133, label %scalar.ph244, !llvm.loop !16

._crit_edge133:                                   ; preds = %scalar.ph244, %middle.block243
  %105 = getelementptr inbounds double, ptr %9, i64 %78
  %106 = load double, ptr %105, align 8, !tbaa !5
  %107 = call double @llvm.fabs.f64(double %106)
  %108 = fcmp ogt double %107, 0x6974E718D7D7625A
  br i1 %108, label %.preheader127, label %.loopexit

.preheader127:                                    ; preds = %._crit_edge133
  br i1 %14, label %.preheader126, label %.lr.ph135.preheader

.lr.ph135.preheader:                              ; preds = %.preheader127
  %invariant.gep217 = getelementptr double, ptr %9, i64 %78
  br i1 %min.iters.check233, label %.lr.ph135.preheader279, label %vector.body238

.lr.ph135.preheader279:                           ; preds = %middle.block231, %.lr.ph135.preheader
  %indvars.iv166.ph = phi i64 [ 0, %.lr.ph135.preheader ], [ %n.vec236, %middle.block231 ]
  br label %.lr.ph135

vector.body238:                                   ; preds = %.lr.ph135.preheader, %vector.body238
  %index239 = phi i64 [ %index.next241, %vector.body238 ], [ 0, %.lr.ph135.preheader ]
  %109 = getelementptr double, ptr %invariant.gep217, i64 %index239
  %wide.load240 = load <2 x double>, ptr %109, align 8, !tbaa !5
  %110 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %wide.load240
  %111 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %110)
  %112 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %index239
  store <2 x double> %111, ptr %112, align 16, !tbaa !5
  %index.next241 = add nuw i64 %index239, 2
  %113 = icmp eq i64 %index.next241, %n.vec236
  br i1 %113, label %middle.block231, label %vector.body238, !llvm.loop !17

middle.block231:                                  ; preds = %vector.body238
  br i1 %cmp.n242, label %.preheader126, label %.lr.ph135.preheader279

.preheader126:                                    ; preds = %.lr.ph135, %middle.block231, %.preheader127
  %.not122139.old = icmp sgt i64 %indvars.iv176, %65
  %brmerge224 = or i1 %.not122139.old, %14
  br i1 %brmerge224, label %.loopexit, label %.preheader125.us

.preheader125.us:                                 ; preds = %.preheader126, %._crit_edge138.us
  %indvars.iv178 = phi i64 [ %indvars.iv.next179, %._crit_edge138.us ], [ %indvars.iv176, %.preheader126 ]
  %114 = mul nsw i64 %indvars.iv178, %63
  %invariant.gep219 = getelementptr double, ptr %9, i64 %114
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader125.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader125.us ]
  %115 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %index
  %116 = getelementptr inbounds i8, ptr %115, i64 16
  %wide.load = load <2 x double>, ptr %115, align 16, !tbaa !5
  %wide.load228 = load <2 x double>, ptr %116, align 16, !tbaa !5
  %117 = getelementptr double, ptr %invariant.gep219, i64 %index
  %118 = getelementptr i8, ptr %117, i64 16
  %wide.load229 = load <2 x double>, ptr %117, align 8, !tbaa !5
  %wide.load230 = load <2 x double>, ptr %118, align 8, !tbaa !5
  %119 = fmul <2 x double> %wide.load, %wide.load229
  %120 = fmul <2 x double> %wide.load228, %wide.load230
  store <2 x double> %119, ptr %117, align 8, !tbaa !5
  store <2 x double> %120, ptr %118, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %121 = icmp eq i64 %index.next, %n.vec
  br i1 %121, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge138.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader125.us
  %indvars.iv171.ph = phi i64 [ 0, %.preheader125.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv171 = phi i64 [ %indvars.iv.next172, %scalar.ph ], [ %indvars.iv171.ph, %scalar.ph.preheader ]
  %122 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %indvars.iv171
  %123 = load double, ptr %122, align 8, !tbaa !5
  %gep220 = getelementptr double, ptr %invariant.gep219, i64 %indvars.iv171
  %124 = load double, ptr %gep220, align 8, !tbaa !5
  %125 = fmul double %123, %124
  store double %125, ptr %gep220, align 8, !tbaa !5
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %exitcond175.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count174
  br i1 %exitcond175.not, label %._crit_edge138.us, label %scalar.ph, !llvm.loop !19

._crit_edge138.us:                                ; preds = %scalar.ph, %middle.block
  %indvars.iv.next179 = add nsw i64 %indvars.iv178, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next179 to i32
  %exitcond181.not = icmp eq i32 %64, %lftr.wideiv
  br i1 %exitcond181.not, label %.loopexit, label %.preheader125.us, !llvm.loop !20

.lr.ph135:                                        ; preds = %.lr.ph135.preheader279, %.lr.ph135
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %.lr.ph135 ], [ %indvars.iv166.ph, %.lr.ph135.preheader279 ]
  %gep218 = getelementptr double, ptr %invariant.gep217, i64 %indvars.iv166
  %126 = load double, ptr %gep218, align 8, !tbaa !5
  %127 = fdiv double 1.000000e+00, %126
  %128 = call double @llvm.fabs.f64(double %127)
  %129 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %indvars.iv166
  store double %128, ptr %129, align 8, !tbaa !5
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next167, %wide.trip.count169
  br i1 %exitcond170.not, label %.preheader126, label %.lr.ph135, !llvm.loop !21

.loopexit:                                        ; preds = %._crit_edge138.us, %.preheader128, %.preheader126, %._crit_edge133
  %indvars.iv.next177 = add nsw i64 %indvars.iv176, -1
  %130 = icmp sgt i64 %indvars.iv176, 0
  br i1 %130, label %.preheader128, label %.preheader124, !llvm.loop !22

.preheader123.unr-lcssa:                          ; preds = %.lr.ph145, %.lr.ph145.preheader
  %indvars.iv183.unr = phi i64 [ 0, %.lr.ph145.preheader ], [ %indvars.iv.next184.1, %.lr.ph145 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader123, label %.lr.ph145.epil

.lr.ph145.epil:                                   ; preds = %.preheader123.unr-lcssa
  %131 = getelementptr inbounds double, ptr %3, i64 %indvars.iv183.unr
  %132 = load double, ptr %131, align 8, !tbaa !5
  %133 = fmul double %132, %2
  %134 = call double @sin(double noundef %133) #6
  %135 = getelementptr inbounds double, ptr %4, i64 %indvars.iv183.unr
  %136 = load double, ptr %135, align 8, !tbaa !5
  %137 = fmul double %136, %2
  %138 = fdiv double %134, %137
  %139 = getelementptr inbounds double, ptr %9, i64 %indvars.iv183.unr
  %140 = load double, ptr %139, align 8, !tbaa !5
  %141 = fdiv double %138, %140
  %142 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %indvars.iv183.unr
  store double %141, ptr %142, align 8, !tbaa !5
  br label %.preheader123

.preheader123:                                    ; preds = %.preheader123.unr-lcssa, %.lr.ph145.epil
  %.not149 = icmp slt i32 %1, 0
  %brmerge226 = or i1 %.not149, %14
  br i1 %brmerge226, label %._crit_edge151, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader123
  %143 = zext nneg i32 %6 to i64
  %144 = add nuw i32 %1, 1
  %wide.trip.count196 = zext i32 %144 to i64
  %min.iters.check266 = icmp ult i32 %6, 4
  %n.vec269 = and i64 %wide.trip.count186, 2147483644
  %cmp.n278 = icmp eq i64 %n.vec269, %wide.trip.count186
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge148.us
  %indvars.iv193 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next194, %._crit_edge148.us ]
  %145 = mul nuw nsw i64 %indvars.iv193, %143
  %invariant.gep221 = getelementptr inbounds double, ptr %9, i64 %145
  br i1 %min.iters.check266, label %scalar.ph265.preheader, label %vector.body271

vector.body271:                                   ; preds = %.preheader.us, %vector.body271
  %index272 = phi i64 [ %index.next277, %vector.body271 ], [ 0, %.preheader.us ]
  %146 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %index272
  %147 = getelementptr inbounds i8, ptr %146, i64 16
  %wide.load273 = load <2 x double>, ptr %146, align 16, !tbaa !5
  %wide.load274 = load <2 x double>, ptr %147, align 16, !tbaa !5
  %148 = getelementptr inbounds double, ptr %invariant.gep221, i64 %index272
  %149 = getelementptr inbounds i8, ptr %148, i64 16
  %wide.load275 = load <2 x double>, ptr %148, align 8, !tbaa !5
  %wide.load276 = load <2 x double>, ptr %149, align 8, !tbaa !5
  %150 = fmul <2 x double> %wide.load273, %wide.load275
  %151 = fmul <2 x double> %wide.load274, %wide.load276
  store <2 x double> %150, ptr %148, align 8, !tbaa !5
  store <2 x double> %151, ptr %149, align 8, !tbaa !5
  %index.next277 = add nuw i64 %index272, 4
  %152 = icmp eq i64 %index.next277, %n.vec269
  br i1 %152, label %middle.block264, label %vector.body271, !llvm.loop !23

middle.block264:                                  ; preds = %vector.body271
  br i1 %cmp.n278, label %._crit_edge148.us, label %scalar.ph265.preheader

scalar.ph265.preheader:                           ; preds = %middle.block264, %.preheader.us
  %indvars.iv188.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec269, %middle.block264 ]
  br label %scalar.ph265

scalar.ph265:                                     ; preds = %scalar.ph265.preheader, %scalar.ph265
  %indvars.iv188 = phi i64 [ %indvars.iv.next189, %scalar.ph265 ], [ %indvars.iv188.ph, %scalar.ph265.preheader ]
  %153 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %indvars.iv188
  %154 = load double, ptr %153, align 8, !tbaa !5
  %gep222 = getelementptr inbounds double, ptr %invariant.gep221, i64 %indvars.iv188
  %155 = load double, ptr %gep222, align 8, !tbaa !5
  %156 = fmul double %154, %155
  store double %156, ptr %gep222, align 8, !tbaa !5
  %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
  %exitcond192.not = icmp eq i64 %indvars.iv.next189, %143
  br i1 %exitcond192.not, label %._crit_edge148.us, label %scalar.ph265, !llvm.loop !24

._crit_edge148.us:                                ; preds = %scalar.ph265, %middle.block264
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %exitcond197.not = icmp eq i64 %indvars.iv.next194, %wide.trip.count196
  br i1 %exitcond197.not, label %._crit_edge151, label %.preheader.us, !llvm.loop !25

.lr.ph145:                                        ; preds = %.lr.ph145, %.lr.ph145.preheader.new
  %indvars.iv183 = phi i64 [ 0, %.lr.ph145.preheader.new ], [ %indvars.iv.next184.1, %.lr.ph145 ]
  %niter = phi i64 [ 0, %.lr.ph145.preheader.new ], [ %niter.next.1, %.lr.ph145 ]
  %157 = getelementptr inbounds double, ptr %3, i64 %indvars.iv183
  %158 = load double, ptr %157, align 8, !tbaa !5
  %159 = fmul double %158, %2
  %160 = call double @sin(double noundef %159) #6
  %161 = getelementptr inbounds double, ptr %4, i64 %indvars.iv183
  %162 = load double, ptr %161, align 8, !tbaa !5
  %163 = fmul double %162, %2
  %164 = fdiv double %160, %163
  %165 = getelementptr inbounds double, ptr %9, i64 %indvars.iv183
  %166 = load double, ptr %165, align 8, !tbaa !5
  %167 = fdiv double %164, %166
  %168 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %indvars.iv183
  store double %167, ptr %168, align 16, !tbaa !5
  %indvars.iv.next184 = or disjoint i64 %indvars.iv183, 1
  %169 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next184
  %170 = load double, ptr %169, align 8, !tbaa !5
  %171 = fmul double %170, %2
  %172 = call double @sin(double noundef %171) #6
  %173 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next184
  %174 = load double, ptr %173, align 8, !tbaa !5
  %175 = fmul double %174, %2
  %176 = fdiv double %172, %175
  %177 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.next184
  %178 = load double, ptr %177, align 8, !tbaa !5
  %179 = fdiv double %176, %178
  %180 = getelementptr inbounds [16 x double], ptr %13, i64 0, i64 %indvars.iv.next184
  store double %179, ptr %180, align 8, !tbaa !5
  %indvars.iv.next184.1 = add nuw nsw i64 %indvars.iv183, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader123.unr-lcssa, label %.lr.ph145, !llvm.loop !26

._crit_edge151:                                   ; preds = %._crit_edge148.us, %.preheader123, %.preheader124
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fabs.v2f64(<2 x double>) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !15, !14}
!17 = distinct !{!17, !10, !14, !15}
!18 = distinct !{!18, !10, !14, !15}
!19 = distinct !{!19, !10, !15, !14}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !15, !14}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10, !14, !15}
!24 = distinct !{!24, !10, !15, !14}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


; Effective O3 passes: ADCEPass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass