; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (geom_r)

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

%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, ptr, ptr, ptr, %struct.qhmemT, %struct.qhstatT }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhmemT = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }

@.str.25 = external hidden unnamed_addr constant [47 x i8], align 1

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

declare void @qh_fprintf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) #2

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

declare double @qh_divzero(double noundef, double noundef, double noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @qh_normalize2(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store double 0.000000e+00, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds double, ptr %23, i64 1
  store ptr %24, ptr %18, align 8, !tbaa !5
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds double, ptr %25, i64 2
  store ptr %26, ptr %19, align 8, !tbaa !5
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 3
  store ptr %28, ptr %20, align 8, !tbaa !5
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = icmp eq i32 %29, 2
  br i1 %30, label %31, label %43

31:                                               ; preds = %6
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load double, ptr %32, align 8, !tbaa !11
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = load ptr, ptr %18, align 8, !tbaa !5
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  %39 = load double, ptr %38, align 8, !tbaa !11
  %40 = fmul double %37, %39
  %41 = call double @llvm.fmuladd.f64(double %33, double %35, double %40)
  %42 = call double @sqrt(double noundef %41) #5
  store double %42, ptr %16, align 8, !tbaa !11
  br label %136

43:                                               ; preds = %6
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = icmp eq i32 %44, 3
  br i1 %45, label %46, label %63

46:                                               ; preds = %43
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  %52 = load double, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %18, align 8, !tbaa !5
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = fmul double %52, %54
  %56 = call double @llvm.fmuladd.f64(double %48, double %50, double %55)
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = call double @llvm.fmuladd.f64(double %58, double %60, double %56)
  %62 = call double @sqrt(double noundef %61) #5
  store double %62, ptr %16, align 8, !tbaa !11
  br label %135

63:                                               ; preds = %43
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 4
  br i1 %65, label %66, label %88

66:                                               ; preds = %63
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load double, ptr %67, align 8, !tbaa !11
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load double, ptr %69, align 8, !tbaa !11
  %71 = load ptr, ptr %18, align 8, !tbaa !5
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = load double, ptr %73, align 8, !tbaa !11
  %75 = fmul double %72, %74
  %76 = call double @llvm.fmuladd.f64(double %68, double %70, double %75)
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = load ptr, ptr %19, align 8, !tbaa !5
  %80 = load double, ptr %79, align 8, !tbaa !11
  %81 = call double @llvm.fmuladd.f64(double %78, double %80, double %76)
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = load double, ptr %82, align 8, !tbaa !11
  %84 = load ptr, ptr %20, align 8, !tbaa !5
  %85 = load double, ptr %84, align 8, !tbaa !11
  %86 = call double @llvm.fmuladd.f64(double %83, double %85, double %81)
  %87 = call double @sqrt(double noundef %86) #5
  store double %87, ptr %16, align 8, !tbaa !11
  br label %134

88:                                               ; preds = %63
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = icmp sgt i32 %89, 4
  br i1 %90, label %91, label %133

91:                                               ; preds = %88
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = load double, ptr %98, align 8, !tbaa !11
  %100 = fmul double %97, %99
  %101 = call double @llvm.fmuladd.f64(double %93, double %95, double %100)
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = load ptr, ptr %19, align 8, !tbaa !5
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = call double @llvm.fmuladd.f64(double %103, double %105, double %101)
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = load ptr, ptr %20, align 8, !tbaa !5
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = call double @llvm.fmuladd.f64(double %108, double %110, double %106)
  store double %111, ptr %16, align 8, !tbaa !11
  %112 = load i32, ptr %9, align 4, !tbaa !9
  %113 = sub nsw i32 %112, 4
  store i32 %113, ptr %13, align 4, !tbaa !9
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds double, ptr %114, i64 4
  store ptr %115, ptr %14, align 8, !tbaa !5
  br label %116

116:                                              ; preds = %127, %91
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = add nsw i32 %117, -1
  store i32 %118, ptr %13, align 4, !tbaa !9
  %119 = icmp ne i32 %117, 0
  br i1 %119, label %120, label %130

120:                                              ; preds = %116
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = load double, ptr %16, align 8, !tbaa !11
  %126 = call double @llvm.fmuladd.f64(double %122, double %124, double %125)
  store double %126, ptr %16, align 8, !tbaa !11
  br label %127

127:                                              ; preds = %120
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = getelementptr inbounds double, ptr %128, i32 1
  store ptr %129, ptr %14, align 8, !tbaa !5
  br label %116, !llvm.loop !13

130:                                              ; preds = %116
  %131 = load double, ptr %16, align 8, !tbaa !11
  %132 = call double @sqrt(double noundef %131) #5
  store double %132, ptr %16, align 8, !tbaa !11
  br label %133

133:                                              ; preds = %130, %88
  br label %134

134:                                              ; preds = %133, %66
  br label %135

135:                                              ; preds = %134, %46
  br label %136

136:                                              ; preds = %135, %31
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %149

139:                                              ; preds = %136
  %140 = load double, ptr %16, align 8, !tbaa !11
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = load double, ptr %141, align 8, !tbaa !11
  %143 = fcmp olt double %140, %142
  br i1 %143, label %144, label %146

144:                                              ; preds = %139
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %145, align 4, !tbaa !9
  br label %148

146:                                              ; preds = %139
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %147, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %146, %144
  br label %149

149:                                              ; preds = %148, %136
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.qhT, ptr %150, i32 0, i32 258
  %152 = getelementptr inbounds %struct.qhstatT, ptr %151, i32 0, i32 0
  %153 = getelementptr inbounds [249 x %union.intrealT], ptr %152, i64 0, i64 140
  %154 = load double, ptr %153, align 8, !tbaa !15
  %155 = load double, ptr %16, align 8, !tbaa !11
  %156 = fcmp ogt double %154, %155
  br i1 %156, label %157, label %163

157:                                              ; preds = %149
  %158 = load double, ptr %16, align 8, !tbaa !11
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.qhT, ptr %159, i32 0, i32 258
  %161 = getelementptr inbounds %struct.qhstatT, ptr %160, i32 0, i32 0
  %162 = getelementptr inbounds [249 x %union.intrealT], ptr %161, i64 0, i64 140
  store double %158, ptr %162, align 8, !tbaa !15
  br label %163

163:                                              ; preds = %157, %149
  %164 = load double, ptr %16, align 8, !tbaa !11
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.qhT, ptr %165, i32 0, i32 141
  %167 = load double, ptr %166, align 8, !tbaa !16
  %168 = fcmp ogt double %164, %167
  br i1 %168, label %169, label %238

169:                                              ; preds = %163
  %170 = load i32, ptr %10, align 4, !tbaa !9
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %175, label %172

172:                                              ; preds = %169
  %173 = load double, ptr %16, align 8, !tbaa !11
  %174 = fneg double %173
  store double %174, ptr %16, align 8, !tbaa !11
  br label %175

175:                                              ; preds = %172, %169
  %176 = load double, ptr %16, align 8, !tbaa !11
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = load double, ptr %177, align 8, !tbaa !11
  %179 = fdiv double %178, %176
  store double %179, ptr %177, align 8, !tbaa !11
  %180 = load double, ptr %16, align 8, !tbaa !11
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = load double, ptr %181, align 8, !tbaa !11
  %183 = fdiv double %182, %180
  store double %183, ptr %181, align 8, !tbaa !11
  %184 = load i32, ptr %9, align 4, !tbaa !9
  %185 = icmp eq i32 %184, 2
  br i1 %185, label %186, label %187

186:                                              ; preds = %175
  br label %237

187:                                              ; preds = %175
  %188 = load i32, ptr %9, align 4, !tbaa !9
  %189 = icmp eq i32 %188, 3
  br i1 %189, label %190, label %195

190:                                              ; preds = %187
  %191 = load double, ptr %16, align 8, !tbaa !11
  %192 = load ptr, ptr %19, align 8, !tbaa !5
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = fdiv double %193, %191
  store double %194, ptr %192, align 8, !tbaa !11
  br label %236

195:                                              ; preds = %187
  %196 = load i32, ptr %9, align 4, !tbaa !9
  %197 = icmp eq i32 %196, 4
  br i1 %197, label %198, label %207

198:                                              ; preds = %195
  %199 = load double, ptr %16, align 8, !tbaa !11
  %200 = load ptr, ptr %19, align 8, !tbaa !5
  %201 = load double, ptr %200, align 8, !tbaa !11
  %202 = fdiv double %201, %199
  store double %202, ptr %200, align 8, !tbaa !11
  %203 = load double, ptr %16, align 8, !tbaa !11
  %204 = load ptr, ptr %20, align 8, !tbaa !5
  %205 = load double, ptr %204, align 8, !tbaa !11
  %206 = fdiv double %205, %203
  store double %206, ptr %204, align 8, !tbaa !11
  br label %235

207:                                              ; preds = %195
  %208 = load i32, ptr %9, align 4, !tbaa !9
  %209 = icmp sgt i32 %208, 4
  br i1 %209, label %210, label %234

210:                                              ; preds = %207
  %211 = load double, ptr %16, align 8, !tbaa !11
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = load double, ptr %212, align 8, !tbaa !11
  %214 = fdiv double %213, %211
  store double %214, ptr %212, align 8, !tbaa !11
  %215 = load double, ptr %16, align 8, !tbaa !11
  %216 = load ptr, ptr %20, align 8, !tbaa !5
  %217 = load double, ptr %216, align 8, !tbaa !11
  %218 = fdiv double %217, %215
  store double %218, ptr %216, align 8, !tbaa !11
  %219 = load i32, ptr %9, align 4, !tbaa !9
  %220 = sub nsw i32 %219, 4
  store i32 %220, ptr %13, align 4, !tbaa !9
  %221 = load ptr, ptr %8, align 8, !tbaa !5
  %222 = getelementptr inbounds double, ptr %221, i64 4
  store ptr %222, ptr %14, align 8, !tbaa !5
  br label %223

223:                                              ; preds = %227, %210
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = add nsw i32 %224, -1
  store i32 %225, ptr %13, align 4, !tbaa !9
  %226 = icmp ne i32 %224, 0
  br i1 %226, label %227, label %233

227:                                              ; preds = %223
  %228 = load double, ptr %16, align 8, !tbaa !11
  %229 = load ptr, ptr %14, align 8, !tbaa !5
  %230 = getelementptr inbounds double, ptr %229, i32 1
  store ptr %230, ptr %14, align 8, !tbaa !5
  %231 = load double, ptr %229, align 8, !tbaa !11
  %232 = fdiv double %231, %228
  store double %232, ptr %229, align 8, !tbaa !11
  br label %223, !llvm.loop !21

233:                                              ; preds = %223
  br label %234

234:                                              ; preds = %233, %207
  br label %235

235:                                              ; preds = %234, %198
  br label %236

236:                                              ; preds = %235, %190
  br label %237

237:                                              ; preds = %236, %186
  br label %334

238:                                              ; preds = %163
  %239 = load double, ptr %16, align 8, !tbaa !11
  %240 = fcmp oeq double %239, 0.000000e+00
  br i1 %240, label %241, label %257

241:                                              ; preds = %238
  %242 = load i32, ptr %9, align 4, !tbaa !9
  %243 = sitofp i32 %242 to double
  %244 = fdiv double 1.000000e+00, %243
  %245 = call double @sqrt(double noundef %244) #5
  store double %245, ptr %17, align 8, !tbaa !11
  %246 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %246, ptr %13, align 4, !tbaa !9
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %247, ptr %14, align 8, !tbaa !5
  br label %248

248:                                              ; preds = %252, %241
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = add nsw i32 %249, -1
  store i32 %250, ptr %13, align 4, !tbaa !9
  %251 = icmp ne i32 %249, 0
  br i1 %251, label %252, label %256

252:                                              ; preds = %248
  %253 = load double, ptr %17, align 8, !tbaa !11
  %254 = load ptr, ptr %14, align 8, !tbaa !5
  %255 = getelementptr inbounds double, ptr %254, i32 1
  store ptr %255, ptr %14, align 8, !tbaa !5
  store double %253, ptr %254, align 8, !tbaa !11
  br label %248, !llvm.loop !22

256:                                              ; preds = %248
  br label %333

257:                                              ; preds = %238
  %258 = load i32, ptr %10, align 4, !tbaa !9
  %259 = icmp ne i32 %258, 0
  br i1 %259, label %263, label %260

260:                                              ; preds = %257
  %261 = load double, ptr %16, align 8, !tbaa !11
  %262 = fneg double %261
  store double %262, ptr %16, align 8, !tbaa !11
  br label %263

263:                                              ; preds = %260, %257
  %264 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %264, ptr %13, align 4, !tbaa !9
  %265 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %265, ptr %14, align 8, !tbaa !5
  br label %266

266:                                              ; preds = %329, %263
  %267 = load i32, ptr %13, align 4, !tbaa !9
  %268 = add nsw i32 %267, -1
  store i32 %268, ptr %13, align 4, !tbaa !9
  %269 = icmp ne i32 %267, 0
  br i1 %269, label %270, label %332

270:                                              ; preds = %266
  %271 = load ptr, ptr %14, align 8, !tbaa !5
  %272 = load double, ptr %271, align 8, !tbaa !11
  %273 = load double, ptr %16, align 8, !tbaa !11
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.qhT, ptr %274, i32 0, i32 140
  %276 = load double, ptr %275, align 8, !tbaa !23
  %277 = call double @qh_divzero(double noundef %272, double noundef %273, double noundef %276, ptr noundef %21)
  store double %277, ptr %17, align 8, !tbaa !11
  %278 = load i32, ptr %21, align 4, !tbaa !9
  %279 = icmp ne i32 %278, 0
  br i1 %279, label %283, label %280

280:                                              ; preds = %270
  %281 = load double, ptr %17, align 8, !tbaa !11
  %282 = load ptr, ptr %14, align 8, !tbaa !5
  store double %281, ptr %282, align 8, !tbaa !11
  br label %328

283:                                              ; preds = %270
  %284 = load ptr, ptr %8, align 8, !tbaa !5
  %285 = load i32, ptr %9, align 4, !tbaa !9
  %286 = call ptr @qh_maxabsval(ptr noundef %284, i32 noundef %285)
  store ptr %286, ptr %15, align 8, !tbaa !5
  %287 = load ptr, ptr %15, align 8, !tbaa !5
  %288 = load double, ptr %287, align 8, !tbaa !11
  %289 = load double, ptr %16, align 8, !tbaa !11
  %290 = fmul double %288, %289
  %291 = fcmp oge double %290, 0.000000e+00
  %292 = zext i1 %291 to i64
  %293 = select i1 %291, double 1.000000e+00, double -1.000000e+00
  store double %293, ptr %17, align 8, !tbaa !11
  %294 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %294, ptr %13, align 4, !tbaa !9
  %295 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %295, ptr %14, align 8, !tbaa !5
  br label %296

296:                                              ; preds = %302, %283
  %297 = load i32, ptr %13, align 4, !tbaa !9
  %298 = add nsw i32 %297, -1
  store i32 %298, ptr %13, align 4, !tbaa !9
  %299 = icmp ne i32 %297, 0
  br i1 %299, label %300, label %305

300:                                              ; preds = %296
  %301 = load ptr, ptr %14, align 8, !tbaa !5
  store double 0.000000e+00, ptr %301, align 8, !tbaa !11
  br label %302

302:                                              ; preds = %300
  %303 = load ptr, ptr %14, align 8, !tbaa !5
  %304 = getelementptr inbounds double, ptr %303, i32 1
  store ptr %304, ptr %14, align 8, !tbaa !5
  br label %296, !llvm.loop !24

305:                                              ; preds = %296
  %306 = load double, ptr %17, align 8, !tbaa !11
  %307 = load ptr, ptr %15, align 8, !tbaa !5
  store double %306, ptr %307, align 8, !tbaa !11
  %308 = load ptr, ptr %7, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.qhT, ptr %308, i32 0, i32 258
  %310 = getelementptr inbounds %struct.qhstatT, ptr %309, i32 0, i32 0
  %311 = getelementptr inbounds [249 x %union.intrealT], ptr %310, i64 0, i64 144
  %312 = load i32, ptr %311, align 8, !tbaa !15
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %311, align 8, !tbaa !15
  %314 = load ptr, ptr %7, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.qhT, ptr %314, i32 0, i32 29
  %316 = load i32, ptr %315, align 8, !tbaa !25
  %317 = icmp ne i32 %316, 0
  br i1 %317, label %318, label %327

318:                                              ; preds = %305
  %319 = load ptr, ptr %7, align 8, !tbaa !5
  %320 = load ptr, ptr %7, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.qhT, ptr %320, i32 0, i32 158
  %322 = load ptr, ptr %321, align 8, !tbaa !26
  %323 = load double, ptr %16, align 8, !tbaa !11
  %324 = load ptr, ptr %7, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.qhT, ptr %324, i32 0, i32 190
  %326 = load i32, ptr %325, align 4, !tbaa !27
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %319, ptr noundef %322, i32 noundef 1, ptr noundef @.str.25, double noundef %323, i32 noundef %326)
  br label %327

327:                                              ; preds = %318, %305
  store i32 1, ptr %22, align 4
  br label %335

328:                                              ; preds = %280
  br label %329

329:                                              ; preds = %328
  %330 = load ptr, ptr %14, align 8, !tbaa !5
  %331 = getelementptr inbounds double, ptr %330, i32 1
  store ptr %331, ptr %14, align 8, !tbaa !5
  br label %266, !llvm.loop !28

332:                                              ; preds = %266
  br label %333

333:                                              ; preds = %332, %256
  br label %334

334:                                              ; preds = %333, %237
  store i32 0, ptr %22, align 4
  br label %335

335:                                              ; preds = %334, %327
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %336 = load i32, ptr %22, align 4
  switch i32 %336, label %338 [
    i32 0, label %337
    i32 1, label %337
  ]

337:                                              ; preds = %335, %335
  ret void

338:                                              ; preds = %335
  unreachable
}

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !12, i64 1840}
!17 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !12, i64 64, !12, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !12, i64 160, !12, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !12, i64 192, !12, i64 200, !10, i64 208, !10, i64 212, !12, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !7, i64 300, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !12, i64 448, !12, i64 456, !12, i64 464, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !10, i64 512, !10, i64 516, !10, i64 520, !10, i64 524, !10, i64 528, !10, i64 532, !10, i64 536, !10, i64 540, !10, i64 544, !12, i64 552, !10, i64 560, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !12, i64 592, !10, i64 600, !6, i64 608, !6, i64 616, !10, i64 624, !10, i64 628, !10, i64 632, !10, i64 636, !10, i64 640, !6, i64 648, !10, i64 656, !6, i64 664, !10, i64 672, !7, i64 676, !10, i64 932, !7, i64 936, !7, i64 1192, !10, i64 1704, !10, i64 1708, !10, i64 1712, !10, i64 1716, !10, i64 1720, !10, i64 1724, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !12, i64 1760, !12, i64 1768, !12, i64 1776, !12, i64 1784, !12, i64 1792, !12, i64 1800, !12, i64 1808, !12, i64 1816, !12, i64 1824, !12, i64 1832, !12, i64 1840, !12, i64 1848, !12, i64 1856, !12, i64 1864, !6, i64 1872, !12, i64 1880, !12, i64 1888, !12, i64 1896, !12, i64 1904, !10, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !6, i64 2408, !6, i64 2416, !6, i64 2424, !6, i64 2432, !10, i64 2440, !10, i64 2444, !10, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !10, i64 2496, !10, i64 2500, !6, i64 2504, !10, i64 2512, !6, i64 2520, !10, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !10, i64 2568, !10, i64 2572, !10, i64 2576, !10, i64 2580, !10, i64 2584, !10, i64 2588, !10, i64 2592, !10, i64 2596, !18, i64 2600, !10, i64 2608, !10, i64 2612, !10, i64 2616, !10, i64 2620, !10, i64 2624, !6, i64 2632, !6, i64 2640, !10, i64 2648, !10, i64 2652, !10, i64 2656, !12, i64 2664, !10, i64 2672, !12, i64 2680, !12, i64 2688, !12, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !12, i64 2728, !12, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !12, i64 2768, !12, i64 2776, !10, i64 2784, !10, i64 2788, !10, i64 2792, !10, i64 2796, !6, i64 2800, !6, i64 2808, !6, i64 2816, !6, i64 2824, !6, i64 2832, !6, i64 2840, !6, i64 2848, !6, i64 2856, !6, i64 2864, !10, i64 2872, !6, i64 2880, !6, i64 2888, !10, i64 2896, !10, i64 2900, !10, i64 2904, !6, i64 2912, !12, i64 2920, !12, i64 2928, !12, i64 2936, !12, i64 2944, !10, i64 2952, !10, i64 2956, !10, i64 2960, !10, i64 2964, !10, i64 2968, !10, i64 2972, !6, i64 2976, !10, i64 2984, !10, i64 2988, !7, i64 2992, !7, i64 3192, !10, i64 3232, !12, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !19, i64 3272, !20, i64 3424}
!18 = !{!"long", !7, i64 0}
!19 = !{!"qhmemT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144}
!20 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !10, i64 5320, !10, i64 5324, !10, i64 5328, !10, i64 5332, !12, i64 5336}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = !{!17, !12, i64 1832}
!24 = distinct !{!24, !14}
!25 = !{!17, !10, i64 136}
!26 = !{!17, !6, i64 2424}
!27 = !{!17, !10, i64 2620}
!28 = distinct !{!28, !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.25 = external hidden unnamed_addr constant [47 x i8], align 1

; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

declare void @qh_fprintf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare double @qh_divzero(double noundef, double noundef, double noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @qh_normalize2(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef readonly %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #3 {
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  %10 = getelementptr inbounds i8, ptr %1, i64 24
  %11 = icmp eq i32 %2, 2
  br i1 %11, label %12, label %17

12:                                               ; preds = %6
  %13 = load double, ptr %1, align 8, !tbaa !5
  %14 = load double, ptr %8, align 8, !tbaa !5
  %15 = fmul double %14, %14
  %16 = tail call double @llvm.fmuladd.f64(double %13, double %13, double %15)
  %sqrt = tail call double @llvm.sqrt.f64(double %16)
  br label %66

17:                                               ; preds = %6
  switch i32 %2, label %34 [
    i32 3, label %18
    i32 4, label %25
  ]

18:                                               ; preds = %17
  %19 = load double, ptr %1, align 8, !tbaa !5
  %20 = load double, ptr %8, align 8, !tbaa !5
  %21 = fmul double %20, %20
  %22 = tail call double @llvm.fmuladd.f64(double %19, double %19, double %21)
  %23 = load double, ptr %9, align 8, !tbaa !5
  %24 = tail call double @llvm.fmuladd.f64(double %23, double %23, double %22)
  %sqrt132 = tail call double @llvm.sqrt.f64(double %24)
  br label %66

25:                                               ; preds = %17
  %26 = load double, ptr %1, align 8, !tbaa !5
  %27 = load double, ptr %8, align 8, !tbaa !5
  %28 = fmul double %27, %27
  %29 = tail call double @llvm.fmuladd.f64(double %26, double %26, double %28)
  %30 = load double, ptr %9, align 8, !tbaa !5
  %31 = tail call double @llvm.fmuladd.f64(double %30, double %30, double %29)
  %32 = load double, ptr %10, align 8, !tbaa !5
  %33 = tail call double @llvm.fmuladd.f64(double %32, double %32, double %31)
  %sqrt133 = tail call double @llvm.sqrt.f64(double %33)
  br label %66

34:                                               ; preds = %17
  %35 = icmp sgt i32 %2, 4
  br i1 %35, label %.lr.ph.preheader, label %66

.lr.ph.preheader:                                 ; preds = %34
  %36 = load double, ptr %1, align 8, !tbaa !5
  %37 = load double, ptr %8, align 8, !tbaa !5
  %38 = fmul double %37, %37
  %39 = tail call double @llvm.fmuladd.f64(double %36, double %36, double %38)
  %40 = load double, ptr %9, align 8, !tbaa !5
  %41 = tail call double @llvm.fmuladd.f64(double %40, double %40, double %39)
  %42 = load double, ptr %10, align 8, !tbaa !5
  %43 = tail call double @llvm.fmuladd.f64(double %42, double %42, double %41)
  %44 = add nsw i32 %2, -4
  %45 = getelementptr inbounds i8, ptr %1, i64 32
  %46 = add nsw i32 %2, -5
  %xtraiter = and i32 %2, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.0139.prol = phi i32 [ %47, %.lr.ph.prol ], [ %44, %.lr.ph.preheader ]
  %.0111138.prol = phi ptr [ %50, %.lr.ph.prol ], [ %45, %.lr.ph.preheader ]
  %.0116137.prol = phi double [ %49, %.lr.ph.prol ], [ %43, %.lr.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %47 = add nsw i32 %.0139.prol, -1
  %48 = load double, ptr %.0111138.prol, align 8, !tbaa !5
  %49 = tail call double @llvm.fmuladd.f64(double %48, double %48, double %.0116137.prol)
  %50 = getelementptr inbounds i8, ptr %.0111138.prol, i64 8
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !9

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %.lcssa.unr = phi double [ poison, %.lr.ph.preheader ], [ %49, %.lr.ph.prol ]
  %.0139.unr = phi i32 [ %44, %.lr.ph.preheader ], [ %47, %.lr.ph.prol ]
  %.0111138.unr = phi ptr [ %45, %.lr.ph.preheader ], [ %50, %.lr.ph.prol ]
  %.0116137.unr = phi double [ %43, %.lr.ph.preheader ], [ %49, %.lr.ph.prol ]
  %51 = icmp ult i32 %46, 3
  br i1 %51, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.0139 = phi i32 [ %61, %.lr.ph ], [ %.0139.unr, %.lr.ph.prol.loopexit ]
  %.0111138 = phi ptr [ %64, %.lr.ph ], [ %.0111138.unr, %.lr.ph.prol.loopexit ]
  %.0116137 = phi double [ %63, %.lr.ph ], [ %.0116137.unr, %.lr.ph.prol.loopexit ]
  %52 = load double, ptr %.0111138, align 8, !tbaa !5
  %53 = tail call double @llvm.fmuladd.f64(double %52, double %52, double %.0116137)
  %54 = getelementptr inbounds i8, ptr %.0111138, i64 8
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = tail call double @llvm.fmuladd.f64(double %55, double %55, double %53)
  %57 = getelementptr inbounds i8, ptr %.0111138, i64 16
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = tail call double @llvm.fmuladd.f64(double %58, double %58, double %56)
  %60 = getelementptr inbounds i8, ptr %.0111138, i64 24
  %61 = add nsw i32 %.0139, -4
  %62 = load double, ptr %60, align 8, !tbaa !5
  %63 = tail call double @llvm.fmuladd.f64(double %62, double %62, double %59)
  %64 = getelementptr inbounds i8, ptr %.0111138, i64 32
  %.not.3 = icmp eq i32 %61, 0
  br i1 %.not.3, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph.prol.loopexit
  %.lcssa = phi double [ %.lcssa.unr, %.lr.ph.prol.loopexit ], [ %63, %.lr.ph ]
  %65 = tail call double @sqrt(double noundef %.lcssa) #7
  br label %66

66:                                               ; preds = %18, %34, %._crit_edge, %25, %12
  %.1117 = phi double [ %sqrt, %12 ], [ %sqrt132, %18 ], [ %sqrt133, %25 ], [ %65, %._crit_edge ], [ 0.000000e+00, %34 ]
  %.not123 = icmp eq ptr %4, null
  br i1 %.not123, label %69, label %.sink.split

.sink.split:                                      ; preds = %66
  %67 = load double, ptr %4, align 8, !tbaa !5
  %68 = fcmp olt double %.1117, %67
  %. = zext i1 %68 to i32
  store i32 %., ptr %5, align 4, !tbaa !13
  br label %69

69:                                               ; preds = %.sink.split, %66
  %70 = getelementptr inbounds i8, ptr %0, i64 4544
  %71 = load double, ptr %70, align 8, !tbaa !15
  %72 = fcmp ogt double %71, %.1117
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  store double %.1117, ptr %70, align 8, !tbaa !15
  br label %74

74:                                               ; preds = %73, %69
  %75 = getelementptr inbounds i8, ptr %0, i64 1840
  %76 = load double, ptr %75, align 8, !tbaa !16
  %77 = fcmp ogt double %.1117, %76
  br i1 %77, label %78, label %105

78:                                               ; preds = %74
  %.not130 = icmp eq i32 %3, 0
  %79 = fneg double %.1117
  %.2118 = select i1 %.not130, double %79, double %.1117
  %80 = load <2 x double>, ptr %1, align 8, !tbaa !5
  %81 = insertelement <2 x double> poison, double %.2118, i64 0
  %82 = shufflevector <2 x double> %81, <2 x double> poison, <2 x i32> zeroinitializer
  %83 = fdiv <2 x double> %80, %82
  store <2 x double> %83, ptr %1, align 8, !tbaa !5
  br i1 %11, label %.loopexit, label %84

84:                                               ; preds = %78
  switch i32 %2, label %91 [
    i32 3, label %85
    i32 4, label %88
  ]

85:                                               ; preds = %84
  %86 = load double, ptr %9, align 8, !tbaa !5
  %87 = fdiv double %86, %.2118
  store double %87, ptr %9, align 8, !tbaa !5
  br label %.loopexit

88:                                               ; preds = %84
  %89 = load <2 x double>, ptr %9, align 8, !tbaa !5
  %90 = fdiv <2 x double> %89, %82
  store <2 x double> %90, ptr %9, align 8, !tbaa !5
  br label %.loopexit

91:                                               ; preds = %84
  %92 = icmp sgt i32 %2, 4
  br i1 %92, label %.lr.ph155.preheader, label %.loopexit

.lr.ph155.preheader:                              ; preds = %91
  %93 = load <2 x double>, ptr %9, align 8, !tbaa !5
  %94 = fdiv <2 x double> %93, %82
  store <2 x double> %94, ptr %9, align 8, !tbaa !5
  %95 = add nsw i32 %2, -4
  %96 = getelementptr inbounds i8, ptr %1, i64 32
  %97 = zext i32 %95 to i64
  %min.iters.check167 = icmp ult i32 %95, 2
  br i1 %min.iters.check167, label %.lr.ph155.preheader184, label %vector.ph168

vector.ph168:                                     ; preds = %.lr.ph155.preheader
  %n.vec170 = and i64 %97, 4294967294
  %.cast171 = trunc nuw i64 %n.vec170 to i32
  %ind.end172 = sub i32 %95, %.cast171
  %98 = shl nuw nsw i64 %n.vec170, 3
  %ind.end174 = getelementptr i8, ptr %96, i64 %98
  %broadcast.splatinsert180 = insertelement <2 x double> poison, double %.2118, i64 0
  %broadcast.splat181 = shufflevector <2 x double> %broadcast.splatinsert180, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body176

vector.body176:                                   ; preds = %vector.body176, %vector.ph168
  %index177 = phi i64 [ 0, %vector.ph168 ], [ %index.next182, %vector.body176 ]
  %offset.idx178 = shl i64 %index177, 3
  %next.gep179 = getelementptr i8, ptr %96, i64 %offset.idx178
  %wide.load = load <2 x double>, ptr %next.gep179, align 8, !tbaa !5
  %99 = fdiv <2 x double> %wide.load, %broadcast.splat181
  store <2 x double> %99, ptr %next.gep179, align 8, !tbaa !5
  %index.next182 = add nuw i64 %index177, 2
  %100 = icmp eq i64 %index.next182, %n.vec170
  br i1 %100, label %middle.block165, label %vector.body176, !llvm.loop !22

middle.block165:                                  ; preds = %vector.body176
  %cmp.n183 = icmp eq i64 %n.vec170, %97
  br i1 %cmp.n183, label %.loopexit, label %.lr.ph155.preheader184

.lr.ph155.preheader184:                           ; preds = %middle.block165, %.lr.ph155.preheader
  %.1153.ph = phi i32 [ %95, %.lr.ph155.preheader ], [ %ind.end172, %middle.block165 ]
  %.1112152.ph = phi ptr [ %96, %.lr.ph155.preheader ], [ %ind.end174, %middle.block165 ]
  br label %.lr.ph155

.lr.ph155:                                        ; preds = %.lr.ph155.preheader184, %.lr.ph155
  %.1153 = phi i32 [ %101, %.lr.ph155 ], [ %.1153.ph, %.lr.ph155.preheader184 ]
  %.1112152 = phi ptr [ %102, %.lr.ph155 ], [ %.1112152.ph, %.lr.ph155.preheader184 ]
  %101 = add nsw i32 %.1153, -1
  %102 = getelementptr inbounds i8, ptr %.1112152, i64 8
  %103 = load double, ptr %.1112152, align 8, !tbaa !5
  %104 = fdiv double %103, %.2118
  store double %104, ptr %.1112152, align 8, !tbaa !5
  %.not131 = icmp eq i32 %101, 0
  br i1 %.not131, label %.loopexit, label %.lr.ph155, !llvm.loop !25

105:                                              ; preds = %74
  %106 = fcmp oeq double %.1117, 0.000000e+00
  %.not129146 = icmp eq i32 %2, 0
  br i1 %106, label %107, label %117

107:                                              ; preds = %105
  %108 = sitofp i32 %2 to double
  %109 = fdiv double 1.000000e+00, %108
  %110 = tail call double @sqrt(double noundef %109) #7
  br i1 %.not129146, label %.loopexit, label %.lr.ph150.preheader

.lr.ph150.preheader:                              ; preds = %107
  %111 = zext i32 %2 to i64
  %min.iters.check = icmp ult i32 %2, 4
  br i1 %min.iters.check, label %.lr.ph150.preheader185, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph150.preheader
  %n.vec = and i64 %111, 4294967292
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end = sub i32 %2, %.cast
  %112 = shl nuw nsw i64 %n.vec, 3
  %ind.end162 = getelementptr i8, ptr %1, i64 %112
  %broadcast.splatinsert = insertelement <2 x double> poison, double %110, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 3
  %next.gep = getelementptr i8, ptr %1, i64 %offset.idx
  %113 = getelementptr i8, ptr %next.gep, i64 16
  store <2 x double> %broadcast.splat, ptr %next.gep, align 8, !tbaa !5
  store <2 x double> %broadcast.splat, ptr %113, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %114 = icmp eq i64 %index.next, %n.vec
  br i1 %114, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %111
  br i1 %cmp.n, label %.loopexit, label %.lr.ph150.preheader185

.lr.ph150.preheader185:                           ; preds = %middle.block, %.lr.ph150.preheader
  %.2148.ph = phi i32 [ %2, %.lr.ph150.preheader ], [ %ind.end, %middle.block ]
  %.2113147.ph = phi ptr [ %1, %.lr.ph150.preheader ], [ %ind.end162, %middle.block ]
  br label %.lr.ph150

.lr.ph150:                                        ; preds = %.lr.ph150.preheader185, %.lr.ph150
  %.2148 = phi i32 [ %115, %.lr.ph150 ], [ %.2148.ph, %.lr.ph150.preheader185 ]
  %.2113147 = phi ptr [ %116, %.lr.ph150 ], [ %.2113147.ph, %.lr.ph150.preheader185 ]
  %115 = add nsw i32 %.2148, -1
  %116 = getelementptr inbounds i8, ptr %.2113147, i64 8
  store double %110, ptr %.2113147, align 8, !tbaa !5
  %.not129 = icmp eq i32 %115, 0
  br i1 %.not129, label %.loopexit, label %.lr.ph150, !llvm.loop !27

117:                                              ; preds = %105
  %.not124 = icmp eq i32 %3, 0
  %118 = fneg double %.1117
  %.3119 = select i1 %.not124, double %118, double %.1117
  br i1 %.not129146, label %.loopexit, label %.lr.ph143

.lr.ph143:                                        ; preds = %117
  %119 = getelementptr inbounds i8, ptr %0, i64 1832
  br label %120

120:                                              ; preds = %.lr.ph143, %125
  %.in = phi i32 [ %2, %.lr.ph143 ], [ %126, %125 ]
  %.3114141 = phi ptr [ %1, %.lr.ph143 ], [ %127, %125 ]
  %121 = load double, ptr %.3114141, align 8, !tbaa !5
  %122 = load double, ptr %119, align 8, !tbaa !28
  %123 = call double @qh_divzero(double noundef %121, double noundef %.3119, double noundef %122, ptr noundef nonnull %7) #7
  %124 = load i32, ptr %7, align 4, !tbaa !13
  %.not126 = icmp eq i32 %124, 0
  br i1 %.not126, label %125, label %128

125:                                              ; preds = %120
  %126 = add nsw i32 %.in, -1
  store double %123, ptr %.3114141, align 8, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %.3114141, i64 8
  %.not125 = icmp eq i32 %126, 0
  br i1 %.not125, label %.loopexit, label %120, !llvm.loop !29

128:                                              ; preds = %120
  %129 = call ptr @qh_maxabsval(ptr noundef %1, i32 noundef %2) #7
  %130 = load double, ptr %129, align 8, !tbaa !5
  %131 = fmul double %.3119, %130
  %132 = fcmp oge double %131, 0.000000e+00
  %133 = zext i32 %2 to i64
  %134 = shl nuw nsw i64 %133, 3
  call void @llvm.memset.p0.i64(ptr align 8 %1, i8 0, i64 %134, i1 false), !tbaa !5
  %135 = select i1 %132, double 1.000000e+00, double -1.000000e+00
  store double %135, ptr %129, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %0, i64 4576
  %137 = load i32, ptr %136, align 8, !tbaa !15
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %136, align 8, !tbaa !15
  %139 = getelementptr inbounds i8, ptr %0, i64 136
  %140 = load i32, ptr %139, align 8, !tbaa !30
  %.not128 = icmp eq i32 %140, 0
  br i1 %.not128, label %.loopexit, label %141

141:                                              ; preds = %128
  %142 = getelementptr inbounds i8, ptr %0, i64 2424
  %143 = load ptr, ptr %142, align 8, !tbaa !31
  %144 = getelementptr inbounds i8, ptr %0, i64 2620
  %145 = load i32, ptr %144, align 4, !tbaa !32
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %143, i32 noundef 1, ptr noundef nonnull @.str.25, double noundef %.3119, i32 noundef %145) #7
  br label %.loopexit

.loopexit:                                        ; preds = %125, %.lr.ph150, %.lr.ph155, %middle.block, %middle.block165, %117, %107, %85, %91, %88, %78, %128, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  ret void
}

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !6, i64 1840}
!17 = !{!"qhT", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !6, i64 24, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !6, i64 64, !6, i64 72, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !18, i64 104, !14, i64 112, !14, i64 116, !18, i64 120, !14, i64 128, !14, i64 132, !14, i64 136, !14, i64 140, !14, i64 144, !14, i64 148, !14, i64 152, !6, i64 160, !6, i64 168, !14, i64 176, !14, i64 180, !14, i64 184, !14, i64 188, !6, i64 192, !6, i64 200, !14, i64 208, !14, i64 212, !6, i64 216, !14, i64 224, !14, i64 228, !14, i64 232, !14, i64 236, !14, i64 240, !14, i64 244, !14, i64 248, !14, i64 252, !14, i64 256, !14, i64 260, !14, i64 264, !14, i64 268, !14, i64 272, !14, i64 276, !14, i64 280, !14, i64 284, !14, i64 288, !14, i64 292, !14, i64 296, !7, i64 300, !14, i64 416, !14, i64 420, !14, i64 424, !14, i64 428, !14, i64 432, !14, i64 436, !14, i64 440, !14, i64 444, !6, i64 448, !6, i64 456, !6, i64 464, !14, i64 472, !14, i64 476, !14, i64 480, !14, i64 484, !14, i64 488, !14, i64 492, !14, i64 496, !14, i64 500, !14, i64 504, !14, i64 508, !14, i64 512, !14, i64 516, !14, i64 520, !14, i64 524, !14, i64 528, !14, i64 532, !14, i64 536, !14, i64 540, !14, i64 544, !6, i64 552, !14, i64 560, !14, i64 564, !14, i64 568, !14, i64 572, !14, i64 576, !14, i64 580, !14, i64 584, !14, i64 588, !6, i64 592, !14, i64 600, !18, i64 608, !18, i64 616, !14, i64 624, !14, i64 628, !14, i64 632, !14, i64 636, !14, i64 640, !18, i64 648, !14, i64 656, !18, i64 664, !14, i64 672, !7, i64 676, !14, i64 932, !7, i64 936, !7, i64 1192, !14, i64 1704, !14, i64 1708, !14, i64 1712, !14, i64 1716, !14, i64 1720, !14, i64 1724, !18, i64 1728, !18, i64 1736, !18, i64 1744, !18, i64 1752, !6, i64 1760, !6, i64 1768, !6, i64 1776, !6, i64 1784, !6, i64 1792, !6, i64 1800, !6, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !6, i64 1840, !6, i64 1848, !6, i64 1856, !6, i64 1864, !18, i64 1872, !6, i64 1880, !6, i64 1888, !6, i64 1896, !6, i64 1904, !14, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !18, i64 2408, !18, i64 2416, !18, i64 2424, !18, i64 2432, !14, i64 2440, !14, i64 2444, !14, i64 2448, !18, i64 2456, !18, i64 2464, !18, i64 2472, !18, i64 2480, !18, i64 2488, !14, i64 2496, !14, i64 2500, !18, i64 2504, !14, i64 2512, !18, i64 2520, !14, i64 2528, !18, i64 2536, !18, i64 2544, !18, i64 2552, !18, i64 2560, !14, i64 2568, !14, i64 2572, !14, i64 2576, !14, i64 2580, !14, i64 2584, !14, i64 2588, !14, i64 2592, !14, i64 2596, !19, i64 2600, !14, i64 2608, !14, i64 2612, !14, i64 2616, !14, i64 2620, !14, i64 2624, !18, i64 2632, !18, i64 2640, !14, i64 2648, !14, i64 2652, !14, i64 2656, !6, i64 2664, !14, i64 2672, !6, i64 2680, !6, i64 2688, !6, i64 2696, !14, i64 2704, !14, i64 2708, !14, i64 2712, !14, i64 2716, !14, i64 2720, !6, i64 2728, !6, i64 2736, !14, i64 2744, !14, i64 2748, !14, i64 2752, !14, i64 2756, !14, i64 2760, !14, i64 2764, !6, i64 2768, !6, i64 2776, !14, i64 2784, !14, i64 2788, !14, i64 2792, !14, i64 2796, !18, i64 2800, !18, i64 2808, !18, i64 2816, !18, i64 2824, !18, i64 2832, !18, i64 2840, !18, i64 2848, !18, i64 2856, !18, i64 2864, !14, i64 2872, !18, i64 2880, !18, i64 2888, !14, i64 2896, !14, i64 2900, !14, i64 2904, !18, i64 2912, !6, i64 2920, !6, i64 2928, !6, i64 2936, !6, i64 2944, !14, i64 2952, !14, i64 2956, !14, i64 2960, !14, i64 2964, !14, i64 2968, !14, i64 2972, !18, i64 2976, !14, i64 2984, !14, i64 2988, !7, i64 2992, !7, i64 3192, !14, i64 3232, !6, i64 3240, !18, i64 3248, !18, i64 3256, !18, i64 3264, !20, i64 3272, !21, i64 3424}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"qhmemT", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !18, i64 24, !18, i64 32, !18, i64 40, !18, i64 48, !18, i64 56, !14, i64 64, !18, i64 72, !18, i64 80, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !14, i64 136, !14, i64 140, !14, i64 144}
!21 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !14, i64 5320, !14, i64 5324, !14, i64 5328, !14, i64 5332, !6, i64 5336}
!22 = distinct !{!22, !12, !23, !24}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !12, !24, !23}
!26 = distinct !{!26, !12, !23, !24}
!27 = distinct !{!27, !12, !24, !23}
!28 = !{!17, !6, i64 1832}
!29 = distinct !{!29, !12}
!30 = !{!17, !14, i64 136}
!31 = !{!17, !18, i64 2424}
!32 = !{!17, !14, i64 2620}


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