; LLVM IR from berquist/rchem :: libpyquante2 (cints)

; 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: nounwind
declare double @pow(double noundef, double noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local double @coulomb_repulsion(double noundef %0, double noundef %1, double noundef %2, double noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, double noundef %7, double noundef %8, double noundef %9, double noundef %10, double noundef %11, i32 noundef %12, i32 noundef %13, i32 noundef %14, double noundef %15, double noundef %16, double noundef %17, double noundef %18, double noundef %19, i32 noundef %20, i32 noundef %21, i32 noundef %22, double noundef %23, double noundef %24, double noundef %25, double noundef %26, double noundef %27, i32 noundef %28, i32 noundef %29, i32 noundef %30, double noundef %31) #2 {
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca double, align 8
  %44 = alloca double, align 8
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca double, align 8
  %49 = alloca double, align 8
  %50 = alloca double, align 8
  %51 = alloca double, align 8
  %52 = alloca double, align 8
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca double, align 8
  %57 = alloca double, align 8
  %58 = alloca double, align 8
  %59 = alloca double, align 8
  %60 = alloca double, align 8
  %61 = alloca i32, align 4
  %62 = alloca i32, align 4
  %63 = alloca i32, align 4
  %64 = alloca double, align 8
  %65 = alloca double, align 8
  %66 = alloca double, align 8
  %67 = alloca double, align 8
  %68 = alloca double, align 8
  %69 = alloca double, align 8
  %70 = alloca double, align 8
  %71 = alloca double, align 8
  %72 = alloca double, align 8
  %73 = alloca double, align 8
  %74 = alloca double, align 8
  %75 = alloca double, align 8
  %76 = alloca double, align 8
  %77 = alloca double, align 8
  %78 = alloca ptr, align 8
  %79 = alloca ptr, align 8
  %80 = alloca ptr, align 8
  %81 = alloca i32, align 4
  %82 = alloca i32, align 4
  %83 = alloca i32, align 4
  store double %0, ptr %33, align 8, !tbaa !5
  store double %1, ptr %34, align 8, !tbaa !5
  store double %2, ptr %35, align 8, !tbaa !5
  store double %3, ptr %36, align 8, !tbaa !5
  store i32 %4, ptr %37, align 4, !tbaa !9
  store i32 %5, ptr %38, align 4, !tbaa !9
  store i32 %6, ptr %39, align 4, !tbaa !9
  store double %7, ptr %40, align 8, !tbaa !5
  store double %8, ptr %41, align 8, !tbaa !5
  store double %9, ptr %42, align 8, !tbaa !5
  store double %10, ptr %43, align 8, !tbaa !5
  store double %11, ptr %44, align 8, !tbaa !5
  store i32 %12, ptr %45, align 4, !tbaa !9
  store i32 %13, ptr %46, align 4, !tbaa !9
  store i32 %14, ptr %47, align 4, !tbaa !9
  store double %15, ptr %48, align 8, !tbaa !5
  store double %16, ptr %49, align 8, !tbaa !5
  store double %17, ptr %50, align 8, !tbaa !5
  store double %18, ptr %51, align 8, !tbaa !5
  store double %19, ptr %52, align 8, !tbaa !5
  store i32 %20, ptr %53, align 4, !tbaa !9
  store i32 %21, ptr %54, align 4, !tbaa !9
  store i32 %22, ptr %55, align 4, !tbaa !9
  store double %23, ptr %56, align 8, !tbaa !5
  store double %24, ptr %57, align 8, !tbaa !5
  store double %25, ptr %58, align 8, !tbaa !5
  store double %26, ptr %59, align 8, !tbaa !5
  store double %27, ptr %60, align 8, !tbaa !5
  store i32 %28, ptr %61, align 4, !tbaa !9
  store i32 %29, ptr %62, align 4, !tbaa !9
  store i32 %30, ptr %63, align 4, !tbaa !9
  store double %31, ptr %64, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %74) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %78) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %79) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %80) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %82) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #4
  %84 = load double, ptr %33, align 8, !tbaa !5
  %85 = load double, ptr %34, align 8, !tbaa !5
  %86 = load double, ptr %35, align 8, !tbaa !5
  %87 = load double, ptr %41, align 8, !tbaa !5
  %88 = load double, ptr %42, align 8, !tbaa !5
  %89 = load double, ptr %43, align 8, !tbaa !5
  %90 = call double @dist2(double noundef %84, double noundef %85, double noundef %86, double noundef %87, double noundef %88, double noundef %89)
  store double %90, ptr %65, align 8, !tbaa !5
  %91 = load double, ptr %49, align 8, !tbaa !5
  %92 = load double, ptr %50, align 8, !tbaa !5
  %93 = load double, ptr %51, align 8, !tbaa !5
  %94 = load double, ptr %57, align 8, !tbaa !5
  %95 = load double, ptr %58, align 8, !tbaa !5
  %96 = load double, ptr %59, align 8, !tbaa !5
  %97 = call double @dist2(double noundef %91, double noundef %92, double noundef %93, double noundef %94, double noundef %95, double noundef %96)
  store double %97, ptr %66, align 8, !tbaa !5
  %98 = load double, ptr %40, align 8, !tbaa !5
  %99 = load double, ptr %33, align 8, !tbaa !5
  %100 = load double, ptr %48, align 8, !tbaa !5
  %101 = load double, ptr %41, align 8, !tbaa !5
  %102 = call double @product_center_1D(double noundef %98, double noundef %99, double noundef %100, double noundef %101)
  store double %102, ptr %68, align 8, !tbaa !5
  %103 = load double, ptr %40, align 8, !tbaa !5
  %104 = load double, ptr %34, align 8, !tbaa !5
  %105 = load double, ptr %48, align 8, !tbaa !5
  %106 = load double, ptr %42, align 8, !tbaa !5
  %107 = call double @product_center_1D(double noundef %103, double noundef %104, double noundef %105, double noundef %106)
  store double %107, ptr %69, align 8, !tbaa !5
  %108 = load double, ptr %40, align 8, !tbaa !5
  %109 = load double, ptr %35, align 8, !tbaa !5
  %110 = load double, ptr %48, align 8, !tbaa !5
  %111 = load double, ptr %43, align 8, !tbaa !5
  %112 = call double @product_center_1D(double noundef %108, double noundef %109, double noundef %110, double noundef %111)
  store double %112, ptr %70, align 8, !tbaa !5
  %113 = load double, ptr %56, align 8, !tbaa !5
  %114 = load double, ptr %49, align 8, !tbaa !5
  %115 = load double, ptr %64, align 8, !tbaa !5
  %116 = load double, ptr %57, align 8, !tbaa !5
  %117 = call double @product_center_1D(double noundef %113, double noundef %114, double noundef %115, double noundef %116)
  store double %117, ptr %71, align 8, !tbaa !5
  %118 = load double, ptr %56, align 8, !tbaa !5
  %119 = load double, ptr %50, align 8, !tbaa !5
  %120 = load double, ptr %64, align 8, !tbaa !5
  %121 = load double, ptr %58, align 8, !tbaa !5
  %122 = call double @product_center_1D(double noundef %118, double noundef %119, double noundef %120, double noundef %121)
  store double %122, ptr %72, align 8, !tbaa !5
  %123 = load double, ptr %56, align 8, !tbaa !5
  %124 = load double, ptr %51, align 8, !tbaa !5
  %125 = load double, ptr %64, align 8, !tbaa !5
  %126 = load double, ptr %59, align 8, !tbaa !5
  %127 = call double @product_center_1D(double noundef %123, double noundef %124, double noundef %125, double noundef %126)
  store double %127, ptr %73, align 8, !tbaa !5
  %128 = load double, ptr %68, align 8, !tbaa !5
  %129 = load double, ptr %69, align 8, !tbaa !5
  %130 = load double, ptr %70, align 8, !tbaa !5
  %131 = load double, ptr %71, align 8, !tbaa !5
  %132 = load double, ptr %72, align 8, !tbaa !5
  %133 = load double, ptr %73, align 8, !tbaa !5
  %134 = call double @dist2(double noundef %128, double noundef %129, double noundef %130, double noundef %131, double noundef %132, double noundef %133)
  store double %134, ptr %67, align 8, !tbaa !5
  %135 = load double, ptr %40, align 8, !tbaa !5
  %136 = load double, ptr %48, align 8, !tbaa !5
  %137 = fadd double %135, %136
  store double %137, ptr %74, align 8, !tbaa !5
  %138 = load double, ptr %56, align 8, !tbaa !5
  %139 = load double, ptr %64, align 8, !tbaa !5
  %140 = fadd double %138, %139
  store double %140, ptr %75, align 8, !tbaa !5
  %141 = load double, ptr %74, align 8, !tbaa !5
  %142 = fdiv double 1.000000e+00, %141
  %143 = load double, ptr %75, align 8, !tbaa !5
  %144 = fdiv double 1.000000e+00, %143
  %145 = fadd double %142, %144
  %146 = fdiv double %145, 4.000000e+00
  store double %146, ptr %76, align 8, !tbaa !5
  %147 = load i32, ptr %37, align 4, !tbaa !9
  %148 = load i32, ptr %45, align 4, !tbaa !9
  %149 = load i32, ptr %53, align 4, !tbaa !9
  %150 = load i32, ptr %61, align 4, !tbaa !9
  %151 = load double, ptr %68, align 8, !tbaa !5
  %152 = load double, ptr %33, align 8, !tbaa !5
  %153 = load double, ptr %41, align 8, !tbaa !5
  %154 = load double, ptr %71, align 8, !tbaa !5
  %155 = load double, ptr %49, align 8, !tbaa !5
  %156 = load double, ptr %57, align 8, !tbaa !5
  %157 = load double, ptr %74, align 8, !tbaa !5
  %158 = load double, ptr %75, align 8, !tbaa !5
  %159 = load double, ptr %76, align 8, !tbaa !5
  %160 = call ptr @B_array(i32 noundef %147, i32 noundef %148, i32 noundef %149, i32 noundef %150, double noundef %151, double noundef %152, double noundef %153, double noundef %154, double noundef %155, double noundef %156, double noundef %157, double noundef %158, double noundef %159)
  store ptr %160, ptr %78, align 8, !tbaa !11
  %161 = load i32, ptr %38, align 4, !tbaa !9
  %162 = load i32, ptr %46, align 4, !tbaa !9
  %163 = load i32, ptr %54, align 4, !tbaa !9
  %164 = load i32, ptr %62, align 4, !tbaa !9
  %165 = load double, ptr %69, align 8, !tbaa !5
  %166 = load double, ptr %34, align 8, !tbaa !5
  %167 = load double, ptr %42, align 8, !tbaa !5
  %168 = load double, ptr %72, align 8, !tbaa !5
  %169 = load double, ptr %50, align 8, !tbaa !5
  %170 = load double, ptr %58, align 8, !tbaa !5
  %171 = load double, ptr %74, align 8, !tbaa !5
  %172 = load double, ptr %75, align 8, !tbaa !5
  %173 = load double, ptr %76, align 8, !tbaa !5
  %174 = call ptr @B_array(i32 noundef %161, i32 noundef %162, i32 noundef %163, i32 noundef %164, double noundef %165, double noundef %166, double noundef %167, double noundef %168, double noundef %169, double noundef %170, double noundef %171, double noundef %172, double noundef %173)
  store ptr %174, ptr %79, align 8, !tbaa !11
  %175 = load i32, ptr %39, align 4, !tbaa !9
  %176 = load i32, ptr %47, align 4, !tbaa !9
  %177 = load i32, ptr %55, align 4, !tbaa !9
  %178 = load i32, ptr %63, align 4, !tbaa !9
  %179 = load double, ptr %70, align 8, !tbaa !5
  %180 = load double, ptr %35, align 8, !tbaa !5
  %181 = load double, ptr %43, align 8, !tbaa !5
  %182 = load double, ptr %73, align 8, !tbaa !5
  %183 = load double, ptr %51, align 8, !tbaa !5
  %184 = load double, ptr %59, align 8, !tbaa !5
  %185 = load double, ptr %74, align 8, !tbaa !5
  %186 = load double, ptr %75, align 8, !tbaa !5
  %187 = load double, ptr %76, align 8, !tbaa !5
  %188 = call ptr @B_array(i32 noundef %175, i32 noundef %176, i32 noundef %177, i32 noundef %178, double noundef %179, double noundef %180, double noundef %181, double noundef %182, double noundef %183, double noundef %184, double noundef %185, double noundef %186, double noundef %187)
  store ptr %188, ptr %80, align 8, !tbaa !11
  store double 0.000000e+00, ptr %77, align 8, !tbaa !5
  store i32 0, ptr %81, align 4, !tbaa !9
  br label %189

189:                                              ; preds = %263, %32
  %190 = load i32, ptr %81, align 4, !tbaa !9
  %191 = load i32, ptr %37, align 4, !tbaa !9
  %192 = load i32, ptr %45, align 4, !tbaa !9
  %193 = add nsw i32 %191, %192
  %194 = load i32, ptr %53, align 4, !tbaa !9
  %195 = add nsw i32 %193, %194
  %196 = load i32, ptr %61, align 4, !tbaa !9
  %197 = add nsw i32 %195, %196
  %198 = add nsw i32 %197, 1
  %199 = icmp slt i32 %190, %198
  br i1 %199, label %200, label %266

200:                                              ; preds = %189
  store i32 0, ptr %82, align 4, !tbaa !9
  br label %201

201:                                              ; preds = %259, %200
  %202 = load i32, ptr %82, align 4, !tbaa !9
  %203 = load i32, ptr %38, align 4, !tbaa !9
  %204 = load i32, ptr %46, align 4, !tbaa !9
  %205 = add nsw i32 %203, %204
  %206 = load i32, ptr %54, align 4, !tbaa !9
  %207 = add nsw i32 %205, %206
  %208 = load i32, ptr %62, align 4, !tbaa !9
  %209 = add nsw i32 %207, %208
  %210 = add nsw i32 %209, 1
  %211 = icmp slt i32 %202, %210
  br i1 %211, label %212, label %262

212:                                              ; preds = %201
  store i32 0, ptr %83, align 4, !tbaa !9
  br label %213

213:                                              ; preds = %255, %212
  %214 = load i32, ptr %83, align 4, !tbaa !9
  %215 = load i32, ptr %39, align 4, !tbaa !9
  %216 = load i32, ptr %47, align 4, !tbaa !9
  %217 = add nsw i32 %215, %216
  %218 = load i32, ptr %55, align 4, !tbaa !9
  %219 = add nsw i32 %217, %218
  %220 = load i32, ptr %63, align 4, !tbaa !9
  %221 = add nsw i32 %219, %220
  %222 = add nsw i32 %221, 1
  %223 = icmp slt i32 %214, %222
  br i1 %223, label %224, label %258

224:                                              ; preds = %213
  %225 = load ptr, ptr %78, align 8, !tbaa !11
  %226 = load i32, ptr %81, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds double, ptr %225, i64 %227
  %229 = load double, ptr %228, align 8, !tbaa !5
  %230 = load ptr, ptr %79, align 8, !tbaa !11
  %231 = load i32, ptr %82, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds double, ptr %230, i64 %232
  %234 = load double, ptr %233, align 8, !tbaa !5
  %235 = fmul double %229, %234
  %236 = load ptr, ptr %80, align 8, !tbaa !11
  %237 = load i32, ptr %83, align 4, !tbaa !9
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds double, ptr %236, i64 %238
  %240 = load double, ptr %239, align 8, !tbaa !5
  %241 = fmul double %235, %240
  %242 = load i32, ptr %81, align 4, !tbaa !9
  %243 = load i32, ptr %82, align 4, !tbaa !9
  %244 = add nsw i32 %242, %243
  %245 = load i32, ptr %83, align 4, !tbaa !9
  %246 = add nsw i32 %244, %245
  %247 = sitofp i32 %246 to double
  %248 = load double, ptr %67, align 8, !tbaa !5
  %249 = fmul double 2.500000e-01, %248
  %250 = load double, ptr %76, align 8, !tbaa !5
  %251 = fdiv double %249, %250
  %252 = call double @Fgamma(double noundef %247, double noundef %251)
  %253 = load double, ptr %77, align 8, !tbaa !5
  %254 = call double @llvm.fmuladd.f64(double %241, double %252, double %253)
  store double %254, ptr %77, align 8, !tbaa !5
  br label %255

255:                                              ; preds = %224
  %256 = load i32, ptr %83, align 4, !tbaa !9
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %83, align 4, !tbaa !9
  br label %213, !llvm.loop !13

258:                                              ; preds = %213
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %82, align 4, !tbaa !9
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %82, align 4, !tbaa !9
  br label %201, !llvm.loop !15

262:                                              ; preds = %201
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %81, align 4, !tbaa !9
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %81, align 4, !tbaa !9
  br label %189, !llvm.loop !16

266:                                              ; preds = %189
  %267 = load ptr, ptr %78, align 8, !tbaa !11
  call void @free(ptr noundef %267) #4
  %268 = load ptr, ptr %79, align 8, !tbaa !11
  call void @free(ptr noundef %268) #4
  %269 = load ptr, ptr %80, align 8, !tbaa !11
  call void @free(ptr noundef %269) #4
  %270 = call double @pow(double noundef 0x400921FB54442D18, double noundef 2.500000e+00) #4
  %271 = fmul double 2.000000e+00, %270
  %272 = load double, ptr %74, align 8, !tbaa !5
  %273 = load double, ptr %75, align 8, !tbaa !5
  %274 = fmul double %272, %273
  %275 = load double, ptr %74, align 8, !tbaa !5
  %276 = load double, ptr %75, align 8, !tbaa !5
  %277 = fadd double %275, %276
  %278 = call double @sqrt(double noundef %277) #4
  %279 = fmul double %274, %278
  %280 = fdiv double %271, %279
  %281 = load double, ptr %40, align 8, !tbaa !5
  %282 = fneg double %281
  %283 = load double, ptr %48, align 8, !tbaa !5
  %284 = fmul double %282, %283
  %285 = load double, ptr %65, align 8, !tbaa !5
  %286 = fmul double %284, %285
  %287 = load double, ptr %74, align 8, !tbaa !5
  %288 = fdiv double %286, %287
  %289 = call double @exp(double noundef %288) #4
  %290 = fmul double %280, %289
  %291 = load double, ptr %56, align 8, !tbaa !5
  %292 = fneg double %291
  %293 = load double, ptr %64, align 8, !tbaa !5
  %294 = fmul double %292, %293
  %295 = load double, ptr %66, align 8, !tbaa !5
  %296 = fmul double %294, %295
  %297 = load double, ptr %75, align 8, !tbaa !5
  %298 = fdiv double %296, %297
  %299 = call double @exp(double noundef %298) #4
  %300 = fmul double %290, %299
  %301 = load double, ptr %77, align 8, !tbaa !5
  %302 = fmul double %300, %301
  %303 = load double, ptr %36, align 8, !tbaa !5
  %304 = fmul double %302, %303
  %305 = load double, ptr %44, align 8, !tbaa !5
  %306 = fmul double %304, %305
  %307 = load double, ptr %52, align 8, !tbaa !5
  %308 = fmul double %306, %307
  %309 = load double, ptr %60, align 8, !tbaa !5
  %310 = fmul double %308, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %79) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %78) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #4
  ret double %310
}

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @dist2(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local double @product_center_1D(double noundef, double noundef, double noundef, double noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local double @Fgamma(double noundef, double noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #0

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

; Function Attrs: nounwind
declare double @exp(double noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !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}


; 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: nounwind uwtable
define dso_local double @coulomb_repulsion(double noundef %0, double noundef %1, double noundef %2, double noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, double noundef %7, double noundef %8, double noundef %9, double noundef %10, double noundef %11, i32 noundef %12, i32 noundef %13, i32 noundef %14, double noundef %15, double noundef %16, double noundef %17, double noundef %18, double noundef %19, i32 noundef %20, i32 noundef %21, i32 noundef %22, double noundef %23, double noundef %24, double noundef %25, double noundef %26, double noundef %27, i32 noundef %28, i32 noundef %29, i32 noundef %30, double noundef %31) local_unnamed_addr #0 {
  %33 = tail call double @dist2(double noundef %0, double noundef %1, double noundef %2, double noundef %8, double noundef %9, double noundef %10)
  %34 = tail call double @dist2(double noundef %16, double noundef %17, double noundef %18, double noundef %24, double noundef %25, double noundef %26)
  %35 = tail call double @product_center_1D(double noundef %7, double noundef %0, double noundef %15, double noundef %8)
  %36 = tail call double @product_center_1D(double noundef %7, double noundef %1, double noundef %15, double noundef %9)
  %37 = tail call double @product_center_1D(double noundef %7, double noundef %2, double noundef %15, double noundef %10)
  %38 = tail call double @product_center_1D(double noundef %23, double noundef %16, double noundef %31, double noundef %24)
  %39 = tail call double @product_center_1D(double noundef %23, double noundef %17, double noundef %31, double noundef %25)
  %40 = tail call double @product_center_1D(double noundef %23, double noundef %18, double noundef %31, double noundef %26)
  %41 = tail call double @dist2(double noundef %35, double noundef %36, double noundef %37, double noundef %38, double noundef %39, double noundef %40)
  %42 = fadd double %7, %15
  %43 = fadd double %23, %31
  %44 = fdiv double 1.000000e+00, %42
  %45 = fdiv double 1.000000e+00, %43
  %46 = fadd double %44, %45
  %47 = fmul double %46, 2.500000e-01
  %48 = tail call ptr @B_array(i32 noundef %4, i32 noundef %12, i32 noundef %20, i32 noundef %28, double noundef %35, double noundef %0, double noundef %8, double noundef %38, double noundef %16, double noundef %24, double noundef %42, double noundef %43, double noundef %47)
  %49 = tail call ptr @B_array(i32 noundef %5, i32 noundef %13, i32 noundef %21, i32 noundef %29, double noundef %36, double noundef %1, double noundef %9, double noundef %39, double noundef %17, double noundef %25, double noundef %42, double noundef %43, double noundef %47)
  %50 = tail call ptr @B_array(i32 noundef %6, i32 noundef %14, i32 noundef %22, i32 noundef %30, double noundef %37, double noundef %2, double noundef %10, double noundef %40, double noundef %18, double noundef %26, double noundef %42, double noundef %43, double noundef %47)
  %51 = add nsw i32 %12, %4
  %52 = add nsw i32 %51, %20
  %53 = add nsw i32 %52, %28
  %.not150 = icmp slt i32 %53, 0
  br i1 %.not150, label %._crit_edge154, label %.preheader141.lr.ph

.preheader141.lr.ph:                              ; preds = %32
  %54 = add nsw i32 %13, %5
  %55 = add nsw i32 %54, %21
  %56 = add nsw i32 %55, %29
  %.not139145 = icmp slt i32 %56, 0
  %57 = fmul double %41, 2.500000e-01
  %58 = fdiv double %57, %47
  br i1 %.not139145, label %._crit_edge154, label %.preheader141.lr.ph.split

.preheader141.lr.ph.split:                        ; preds = %.preheader141.lr.ph
  %59 = add nsw i32 %14, %6
  %60 = add nsw i32 %59, %22
  %61 = add nsw i32 %60, %30
  %.not140142 = icmp slt i32 %61, 0
  br i1 %.not140142, label %._crit_edge154, label %.preheader141.preheader

.preheader141.preheader:                          ; preds = %.preheader141.lr.ph.split
  %62 = add i32 %30, %22
  %63 = add i32 %62, %14
  %64 = add i32 %63, %6
  %65 = add i32 %64, 1
  %66 = add i32 %29, %21
  %67 = add i32 %66, %13
  %68 = add i32 %67, %5
  %69 = add i32 %68, 1
  %70 = add i32 %28, %20
  %71 = add i32 %70, %12
  %72 = add i32 %71, %4
  %73 = add i32 %72, 1
  %wide.trip.count174 = zext i32 %73 to i64
  %wide.trip.count169 = zext i32 %69 to i64
  %wide.trip.count = zext i32 %65 to i64
  br label %.preheader141

.preheader141:                                    ; preds = %.preheader141.preheader, %._crit_edge148.split
  %indvars.iv171 = phi i64 [ 0, %.preheader141.preheader ], [ %indvars.iv.next172, %._crit_edge148.split ]
  %.0138151 = phi double [ 0.000000e+00, %.preheader141.preheader ], [ %88, %._crit_edge148.split ]
  %74 = getelementptr inbounds double, ptr %48, i64 %indvars.iv171
  br label %.preheader

.preheader:                                       ; preds = %.preheader141, %._crit_edge
  %indvars.iv166 = phi i64 [ 0, %.preheader141 ], [ %indvars.iv.next167, %._crit_edge ]
  %.1146 = phi double [ %.0138151, %.preheader141 ], [ %88, %._crit_edge ]
  %75 = getelementptr inbounds double, ptr %49, i64 %indvars.iv166
  %76 = add nuw nsw i64 %indvars.iv166, %indvars.iv171
  br label %77

77:                                               ; preds = %.preheader, %77
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %77 ]
  %.2143 = phi double [ %.1146, %.preheader ], [ %88, %77 ]
  %78 = load double, ptr %74, align 8, !tbaa !5
  %79 = load double, ptr %75, align 8, !tbaa !5
  %80 = fmul double %78, %79
  %81 = getelementptr inbounds double, ptr %50, i64 %indvars.iv
  %82 = load double, ptr %81, align 8, !tbaa !5
  %83 = fmul double %80, %82
  %84 = add nuw nsw i64 %76, %indvars.iv
  %85 = trunc nuw nsw i64 %84 to i32
  %86 = uitofp nneg i32 %85 to double
  %87 = tail call double @Fgamma(double noundef %86, double noundef %58)
  %88 = tail call double @llvm.fmuladd.f64(double %83, double %87, double %.2143)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %77, !llvm.loop !9

._crit_edge:                                      ; preds = %77
  %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 %._crit_edge148.split, label %.preheader, !llvm.loop !11

._crit_edge148.split:                             ; preds = %._crit_edge
  %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_edge154, label %.preheader141, !llvm.loop !12

._crit_edge154:                                   ; preds = %._crit_edge148.split, %.preheader141.lr.ph.split, %.preheader141.lr.ph, %32
  %.0138.lcssa = phi double [ 0.000000e+00, %32 ], [ 0.000000e+00, %.preheader141.lr.ph ], [ 0.000000e+00, %.preheader141.lr.ph.split ], [ %88, %._crit_edge148.split ]
  tail call void @free(ptr noundef %48) #4
  tail call void @free(ptr noundef %49) #4
  tail call void @free(ptr noundef %50) #4
  %89 = fmul double %42, %43
  %90 = fadd double %42, %43
  %91 = tail call double @sqrt(double noundef %90) #4
  %92 = fmul double %89, %91
  %93 = fdiv double 0x40417E50A9DC6553, %92
  %94 = fneg double %7
  %95 = fmul double %94, %15
  %96 = fmul double %95, %33
  %97 = fdiv double %96, %42
  %98 = tail call double @exp(double noundef %97) #4
  %99 = fmul double %98, %93
  %100 = fneg double %23
  %101 = fmul double %100, %31
  %102 = fmul double %101, %34
  %103 = fdiv double %102, %43
  %104 = tail call double @exp(double noundef %103) #4
  %105 = fmul double %104, %99
  %106 = fmul double %.0138.lcssa, %105
  %107 = fmul double %106, %3
  %108 = fmul double %107, %11
  %109 = fmul double %108, %19
  %110 = fmul double %109, %27
  ret double %110
}

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

; Function Attrs: nounwind uwtable
declare dso_local double @dist2(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local double @product_center_1D(double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local double @Fgamma(double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass