; LLVM IR from microsoft/LightAIMD :: src (molecular_grid)

; 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.timespec = type { i64, i64 }
%struct.molecular_grid_desc = type { ptr, i64, i64, i64, i64, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr, ptr, ptr, ptr }
%struct.scf_context = type { ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, i64, double, double, double, i64, double, double, i64, double, i64, i64, ptr, ptr, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, i64 }
%struct.molecule = type { i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct.atomic_grid_desc = type { %struct.vec3d, i64, i64, i64, i64, ptr }
%struct.vec3d = type { double, double, double }

@.str = external hidden unnamed_addr constant [38 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local void @calc_rho_sigma_lapl_tau(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.timespec, align 8
  %4 = alloca %struct.timespec, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca double, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca double, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca double, align 8
  %38 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  call void @get_wall_time(ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.molecular_grid_desc, ptr %39, i32 0, i32 76
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  store ptr %41, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.molecular_grid_desc, ptr %42, i32 0, i32 8
  %44 = load i64, ptr %43, align 8, !tbaa !13
  store i64 %44, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.scf_context, ptr %45, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !15
  store i64 %47, ptr %7, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.scf_context, ptr %48, i32 0, i32 22
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  store ptr %50, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.molecular_grid_desc, ptr %51, i32 0, i32 13
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  store ptr %53, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.molecular_grid_desc, ptr %54, i32 0, i32 14
  %56 = load ptr, ptr %55, align 8, !tbaa !19
  store ptr %56, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.molecular_grid_desc, ptr %57, i32 0, i32 15
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  store ptr %59, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.molecular_grid_desc, ptr %60, i32 0, i32 16
  %62 = load ptr, ptr %61, align 8, !tbaa !21
  store ptr %62, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.molecular_grid_desc, ptr %63, i32 0, i32 17
  %65 = load ptr, ptr %64, align 8, !tbaa !22
  store ptr %65, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.molecular_grid_desc, ptr %66, i32 0, i32 36
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  store ptr %68, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.molecular_grid_desc, ptr %69, i32 0, i32 37
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  store ptr %71, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.molecular_grid_desc, ptr %72, i32 0, i32 38
  %74 = load ptr, ptr %73, align 8, !tbaa !25
  store ptr %74, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.molecular_grid_desc, ptr %75, i32 0, i32 39
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  store ptr %77, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.molecular_grid_desc, ptr %78, i32 0, i32 41
  %80 = load ptr, ptr %79, align 8, !tbaa !27
  store ptr %80, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.molecular_grid_desc, ptr %81, i32 0, i32 42
  %83 = load ptr, ptr %82, align 8, !tbaa !28
  store ptr %83, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.molecular_grid_desc, ptr %84, i32 0, i32 73
  %86 = load ptr, ptr %85, align 8, !tbaa !29
  store ptr %86, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %87 = load ptr, ptr %2, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.molecular_grid_desc, ptr %87, i32 0, i32 74
  %89 = load ptr, ptr %88, align 8, !tbaa !30
  store ptr %89, ptr %21, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load ptr, ptr %20, align 8, !tbaa !5
  %93 = load i64, ptr %6, align 8, !tbaa !14
  %94 = load i64, ptr %7, align 8, !tbaa !14
  %95 = load i64, ptr %7, align 8, !tbaa !14
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.scf_context, ptr %96, i32 0, i32 36
  %98 = load ptr, ptr %97, align 8, !tbaa !31
  call void @einsum_mn_np__mp_parallel(ptr noundef %90, ptr noundef %91, ptr noundef %92, i64 noundef %93, i64 noundef %94, i64 noundef %95, ptr noundef %98)
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %20, align 8, !tbaa !5
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = load i64, ptr %6, align 8, !tbaa !14
  %103 = load i64, ptr %7, align 8, !tbaa !14
  call void @einsum_mn_mn__m(ptr noundef %99, ptr noundef %100, ptr noundef %101, i64 noundef %102, i64 noundef %103)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = call ptr @tag_transpose(ptr noundef %104)
  store ptr %105, ptr %22, align 8, !tbaa !5
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = load i64, ptr %6, align 8, !tbaa !14
  %110 = load i64, ptr %7, align 8, !tbaa !14
  call void @einsum_mn_mn__m(ptr noundef %106, ptr noundef %107, ptr noundef %108, i64 noundef %109, i64 noundef %110)
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_scalar_multiply(ptr noundef %111, ptr noundef %112, i64 noundef %113, i64 noundef 1, double noundef 2.000000e+00)
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %22, align 8, !tbaa !5
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  %117 = load i64, ptr %6, align 8, !tbaa !14
  %118 = load i64, ptr %7, align 8, !tbaa !14
  %119 = load i64, ptr %7, align 8, !tbaa !14
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.scf_context, ptr %120, i32 0, i32 36
  %122 = load ptr, ptr %121, align 8, !tbaa !31
  call void @einsum_mn_np__mp_parallel(ptr noundef %114, ptr noundef %115, ptr noundef %116, i64 noundef %117, i64 noundef %118, i64 noundef %119, ptr noundef %122)
  %123 = load ptr, ptr %21, align 8, !tbaa !5
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  %126 = load i64, ptr %6, align 8, !tbaa !14
  %127 = load i64, ptr %7, align 8, !tbaa !14
  call void @einsum_mn_mn__m(ptr noundef %123, ptr noundef %124, ptr noundef %125, i64 noundef %126, i64 noundef %127)
  %128 = load ptr, ptr %20, align 8, !tbaa !5
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = load ptr, ptr %16, align 8, !tbaa !5
  %131 = load i64, ptr %6, align 8, !tbaa !14
  %132 = load i64, ptr %7, align 8, !tbaa !14
  call void @einsum_mn_mn__m(ptr noundef %128, ptr noundef %129, ptr noundef %130, i64 noundef %131, i64 noundef %132)
  %133 = load ptr, ptr %16, align 8, !tbaa !5
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  %135 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_scalar_multiply(ptr noundef %133, ptr noundef %134, i64 noundef %135, i64 noundef 1, double noundef 2.000000e+00)
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = load ptr, ptr %22, align 8, !tbaa !5
  %138 = load ptr, ptr %21, align 8, !tbaa !5
  %139 = load i64, ptr %6, align 8, !tbaa !14
  %140 = load i64, ptr %7, align 8, !tbaa !14
  %141 = load i64, ptr %7, align 8, !tbaa !14
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.scf_context, ptr %142, i32 0, i32 36
  %144 = load ptr, ptr %143, align 8, !tbaa !31
  call void @einsum_mn_np__mp_parallel(ptr noundef %136, ptr noundef %137, ptr noundef %138, i64 noundef %139, i64 noundef %140, i64 noundef %141, ptr noundef %144)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store i64 0, ptr %23, align 8, !tbaa !14
  br label %145

145:                                              ; preds = %184, %1
  %146 = load i64, ptr %23, align 8, !tbaa !14
  %147 = load i64, ptr %6, align 8, !tbaa !14
  %148 = icmp ult i64 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %187

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  store double 0.000000e+00, ptr %25, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %151 = load i64, ptr %23, align 8, !tbaa !14
  %152 = load i64, ptr %7, align 8, !tbaa !14
  %153 = mul i64 %151, %152
  store i64 %153, ptr %26, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store i64 0, ptr %27, align 8, !tbaa !14
  br label %154

154:                                              ; preds = %174, %150
  %155 = load i64, ptr %27, align 8, !tbaa !14
  %156 = load i64, ptr %7, align 8, !tbaa !14
  %157 = icmp ult i64 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %177

159:                                              ; preds = %154
  %160 = load ptr, ptr %21, align 8, !tbaa !5
  %161 = load i64, ptr %26, align 8, !tbaa !14
  %162 = load i64, ptr %27, align 8, !tbaa !14
  %163 = add i64 %161, %162
  %164 = getelementptr inbounds double, ptr %160, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !32
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = load i64, ptr %26, align 8, !tbaa !14
  %168 = load i64, ptr %27, align 8, !tbaa !14
  %169 = add i64 %167, %168
  %170 = getelementptr inbounds double, ptr %166, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !32
  %172 = load double, ptr %25, align 8, !tbaa !32
  %173 = call double @llvm.fmuladd.f64(double %165, double %171, double %172)
  store double %173, ptr %25, align 8, !tbaa !32
  br label %174

174:                                              ; preds = %159
  %175 = load i64, ptr %27, align 8, !tbaa !14
  %176 = add i64 %175, 1
  store i64 %176, ptr %27, align 8, !tbaa !14
  br label %154, !llvm.loop !33

177:                                              ; preds = %158
  %178 = load double, ptr %25, align 8, !tbaa !32
  %179 = load ptr, ptr %19, align 8, !tbaa !5
  %180 = load i64, ptr %23, align 8, !tbaa !14
  %181 = getelementptr inbounds double, ptr %179, i64 %180
  %182 = load double, ptr %181, align 8, !tbaa !32
  %183 = fadd double %182, %178
  store double %183, ptr %181, align 8, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %184

184:                                              ; preds = %177
  %185 = load i64, ptr %23, align 8, !tbaa !14
  %186 = add i64 %185, 1
  store i64 %186, ptr %23, align 8, !tbaa !14
  br label %145, !llvm.loop !35

187:                                              ; preds = %149
  %188 = load ptr, ptr %20, align 8, !tbaa !5
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  %190 = load ptr, ptr %17, align 8, !tbaa !5
  %191 = load i64, ptr %6, align 8, !tbaa !14
  %192 = load i64, ptr %7, align 8, !tbaa !14
  call void @einsum_mn_mn__m(ptr noundef %188, ptr noundef %189, ptr noundef %190, i64 noundef %191, i64 noundef %192)
  %193 = load ptr, ptr %17, align 8, !tbaa !5
  %194 = load ptr, ptr %17, align 8, !tbaa !5
  %195 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_scalar_multiply(ptr noundef %193, ptr noundef %194, i64 noundef %195, i64 noundef 1, double noundef 2.000000e+00)
  %196 = load ptr, ptr %12, align 8, !tbaa !5
  %197 = load ptr, ptr %22, align 8, !tbaa !5
  %198 = load ptr, ptr %21, align 8, !tbaa !5
  %199 = load i64, ptr %6, align 8, !tbaa !14
  %200 = load i64, ptr %7, align 8, !tbaa !14
  %201 = load i64, ptr %7, align 8, !tbaa !14
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.scf_context, ptr %202, i32 0, i32 36
  %204 = load ptr, ptr %203, align 8, !tbaa !31
  call void @einsum_mn_np__mp_parallel(ptr noundef %196, ptr noundef %197, ptr noundef %198, i64 noundef %199, i64 noundef %200, i64 noundef %201, ptr noundef %204)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  store i64 0, ptr %28, align 8, !tbaa !14
  br label %205

205:                                              ; preds = %276, %187
  %206 = load i64, ptr %28, align 8, !tbaa !14
  %207 = load i64, ptr %6, align 8, !tbaa !14
  %208 = icmp ult i64 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  store i32 8, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  br label %279

210:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  store double 0.000000e+00, ptr %29, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %211 = load i64, ptr %28, align 8, !tbaa !14
  %212 = load i64, ptr %7, align 8, !tbaa !14
  %213 = mul i64 %211, %212
  store i64 %213, ptr %30, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store i64 0, ptr %31, align 8, !tbaa !14
  br label %214

214:                                              ; preds = %234, %210
  %215 = load i64, ptr %31, align 8, !tbaa !14
  %216 = load i64, ptr %7, align 8, !tbaa !14
  %217 = icmp ult i64 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 11, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  br label %237

219:                                              ; preds = %214
  %220 = load ptr, ptr %21, align 8, !tbaa !5
  %221 = load i64, ptr %30, align 8, !tbaa !14
  %222 = load i64, ptr %31, align 8, !tbaa !14
  %223 = add i64 %221, %222
  %224 = getelementptr inbounds double, ptr %220, i64 %223
  %225 = load double, ptr %224, align 8, !tbaa !32
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  %227 = load i64, ptr %30, align 8, !tbaa !14
  %228 = load i64, ptr %31, align 8, !tbaa !14
  %229 = add i64 %227, %228
  %230 = getelementptr inbounds double, ptr %226, i64 %229
  %231 = load double, ptr %230, align 8, !tbaa !32
  %232 = load double, ptr %29, align 8, !tbaa !32
  %233 = call double @llvm.fmuladd.f64(double %225, double %231, double %232)
  store double %233, ptr %29, align 8, !tbaa !32
  br label %234

234:                                              ; preds = %219
  %235 = load i64, ptr %31, align 8, !tbaa !14
  %236 = add i64 %235, 1
  store i64 %236, ptr %31, align 8, !tbaa !14
  br label %214, !llvm.loop !36

237:                                              ; preds = %218
  %238 = load double, ptr %29, align 8, !tbaa !32
  %239 = load ptr, ptr %19, align 8, !tbaa !5
  %240 = load i64, ptr %28, align 8, !tbaa !14
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  %242 = load double, ptr %241, align 8, !tbaa !32
  %243 = fadd double %242, %238
  store double %243, ptr %241, align 8, !tbaa !32
  %244 = load ptr, ptr %15, align 8, !tbaa !5
  %245 = load i64, ptr %28, align 8, !tbaa !14
  %246 = getelementptr inbounds double, ptr %244, i64 %245
  %247 = load double, ptr %246, align 8, !tbaa !32
  %248 = load ptr, ptr %15, align 8, !tbaa !5
  %249 = load i64, ptr %28, align 8, !tbaa !14
  %250 = getelementptr inbounds double, ptr %248, i64 %249
  %251 = load double, ptr %250, align 8, !tbaa !32
  %252 = load ptr, ptr %16, align 8, !tbaa !5
  %253 = load i64, ptr %28, align 8, !tbaa !14
  %254 = getelementptr inbounds double, ptr %252, i64 %253
  %255 = load double, ptr %254, align 8, !tbaa !32
  %256 = load ptr, ptr %16, align 8, !tbaa !5
  %257 = load i64, ptr %28, align 8, !tbaa !14
  %258 = getelementptr inbounds double, ptr %256, i64 %257
  %259 = load double, ptr %258, align 8, !tbaa !32
  %260 = fmul double %255, %259
  %261 = call double @llvm.fmuladd.f64(double %247, double %251, double %260)
  %262 = load ptr, ptr %17, align 8, !tbaa !5
  %263 = load i64, ptr %28, align 8, !tbaa !14
  %264 = getelementptr inbounds double, ptr %262, i64 %263
  %265 = load double, ptr %264, align 8, !tbaa !32
  %266 = load ptr, ptr %17, align 8, !tbaa !5
  %267 = load i64, ptr %28, align 8, !tbaa !14
  %268 = getelementptr inbounds double, ptr %266, i64 %267
  %269 = load double, ptr %268, align 8, !tbaa !32
  %270 = call double @llvm.fmuladd.f64(double %265, double %269, double %261)
  %271 = load ptr, ptr %2, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.molecular_grid_desc, ptr %271, i32 0, i32 40
  %273 = load ptr, ptr %272, align 8, !tbaa !37
  %274 = load i64, ptr %28, align 8, !tbaa !14
  %275 = getelementptr inbounds double, ptr %273, i64 %274
  store double %270, ptr %275, align 8, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %276

276:                                              ; preds = %237
  %277 = load i64, ptr %28, align 8, !tbaa !14
  %278 = add i64 %277, 1
  store i64 %278, ptr %28, align 8, !tbaa !14
  br label %205, !llvm.loop !38

279:                                              ; preds = %209
  %280 = load ptr, ptr %20, align 8, !tbaa !5
  %281 = load ptr, ptr %13, align 8, !tbaa !5
  %282 = load ptr, ptr %18, align 8, !tbaa !5
  %283 = load i64, ptr %6, align 8, !tbaa !14
  %284 = load i64, ptr %7, align 8, !tbaa !14
  call void @einsum_mn_mn__m(ptr noundef %280, ptr noundef %281, ptr noundef %282, i64 noundef %283, i64 noundef %284)
  %285 = load ptr, ptr %18, align 8, !tbaa !5
  %286 = load ptr, ptr %19, align 8, !tbaa !5
  %287 = load ptr, ptr %18, align 8, !tbaa !5
  %288 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_add(ptr noundef %285, ptr noundef %286, ptr noundef %287, i64 noundef %288, i64 noundef 1)
  %289 = load ptr, ptr %18, align 8, !tbaa !5
  %290 = load ptr, ptr %18, align 8, !tbaa !5
  %291 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_scalar_multiply(ptr noundef %289, ptr noundef %290, i64 noundef %291, i64 noundef 1, double noundef 2.000000e+00)
  %292 = load ptr, ptr %19, align 8, !tbaa !5
  %293 = load ptr, ptr %19, align 8, !tbaa !5
  %294 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_scalar_multiply(ptr noundef %292, ptr noundef %293, i64 noundef %294, i64 noundef 1, double noundef 5.000000e-01)
  %295 = load ptr, ptr %14, align 8, !tbaa !5
  %296 = load ptr, ptr %14, align 8, !tbaa !5
  %297 = load i64, ptr %6, align 8, !tbaa !14
  call void @mat_scalar_multiply(ptr noundef %295, ptr noundef %296, i64 noundef %297, i64 noundef 1, double noundef 2.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  store double 0.000000e+00, ptr %32, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 0, ptr %33, align 4, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  store i32 0, ptr %34, align 4, !tbaa !39
  br label %298

298:                                              ; preds = %355, %279
  %299 = load i32, ptr %33, align 4, !tbaa !39
  %300 = sext i32 %299 to i64
  %301 = load ptr, ptr %5, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.scf_context, ptr %301, i32 0, i32 0
  %303 = load ptr, ptr %302, align 8, !tbaa !41
  %304 = getelementptr inbounds %struct.molecule, ptr %303, i32 0, i32 0
  %305 = load i64, ptr %304, align 8, !tbaa !42
  %306 = icmp ult i64 %300, %305
  br i1 %306, label %308, label %307

307:                                              ; preds = %298
  store i32 14, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  br label %358

308:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %309 = load ptr, ptr %2, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.molecular_grid_desc, ptr %309, i32 0, i32 0
  %311 = load ptr, ptr %310, align 8, !tbaa !44
  %312 = load i32, ptr %33, align 4, !tbaa !39
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds %struct.atomic_grid_desc, ptr %311, i64 %313
  store ptr %314, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  store i32 0, ptr %36, align 4, !tbaa !39
  br label %315

315:                                              ; preds = %344, %308
  %316 = load i32, ptr %36, align 4, !tbaa !39
  %317 = sext i32 %316 to i64
  %318 = load ptr, ptr %35, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.atomic_grid_desc, ptr %318, i32 0, i32 1
  %320 = load i64, ptr %319, align 8, !tbaa !45
  %321 = icmp ult i64 %317, %320
  br i1 %321, label %323, label %322

322:                                              ; preds = %315
  store i32 17, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %347

323:                                              ; preds = %315
  %324 = load ptr, ptr %2, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.molecular_grid_desc, ptr %324, i32 0, i32 11
  %326 = load ptr, ptr %325, align 8, !tbaa !48
  %327 = load i32, ptr %34, align 4, !tbaa !39
  %328 = load i32, ptr %36, align 4, !tbaa !39
  %329 = add nsw i32 %327, %328
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds double, ptr %326, i64 %330
  %332 = load double, ptr %331, align 8, !tbaa !32
  %333 = load ptr, ptr %2, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.molecular_grid_desc, ptr %333, i32 0, i32 36
  %335 = load ptr, ptr %334, align 8, !tbaa !23
  %336 = load i32, ptr %34, align 4, !tbaa !39
  %337 = load i32, ptr %36, align 4, !tbaa !39
  %338 = add nsw i32 %336, %337
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds double, ptr %335, i64 %339
  %341 = load double, ptr %340, align 8, !tbaa !32
  %342 = load double, ptr %32, align 8, !tbaa !32
  %343 = call double @llvm.fmuladd.f64(double %332, double %341, double %342)
  store double %343, ptr %32, align 8, !tbaa !32
  br label %344

344:                                              ; preds = %323
  %345 = load i32, ptr %36, align 4, !tbaa !39
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %36, align 4, !tbaa !39
  br label %315, !llvm.loop !49

347:                                              ; preds = %322
  %348 = load ptr, ptr %35, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.atomic_grid_desc, ptr %348, i32 0, i32 1
  %350 = load i64, ptr %349, align 8, !tbaa !45
  %351 = load i32, ptr %34, align 4, !tbaa !39
  %352 = sext i32 %351 to i64
  %353 = add i64 %352, %350
  %354 = trunc i64 %353 to i32
  store i32 %354, ptr %34, align 4, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  br label %355

355:                                              ; preds = %347
  %356 = load i32, ptr %33, align 4, !tbaa !39
  %357 = add nsw i32 %356, 1
  store i32 %357, ptr %33, align 4, !tbaa !39
  br label %298, !llvm.loop !50

358:                                              ; preds = %307
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  %359 = load ptr, ptr %5, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.scf_context, ptr %359, i32 0, i32 0
  %361 = load ptr, ptr %360, align 8, !tbaa !41
  %362 = getelementptr inbounds %struct.molecule, ptr %361, i32 0, i32 1
  %363 = load i64, ptr %362, align 8, !tbaa !51
  %364 = uitofp i64 %363 to double
  %365 = load double, ptr %32, align 8, !tbaa !32
  %366 = fdiv double %364, %365
  store double %366, ptr %37, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  store i64 0, ptr %38, align 8, !tbaa !14
  br label %367

367:                                              ; preds = %383, %358
  %368 = load i64, ptr %38, align 8, !tbaa !14
  %369 = load ptr, ptr %2, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.molecular_grid_desc, ptr %369, i32 0, i32 8
  %371 = load i64, ptr %370, align 8, !tbaa !13
  %372 = icmp ult i64 %368, %371
  br i1 %372, label %374, label %373

373:                                              ; preds = %367
  store i32 20, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  br label %386

374:                                              ; preds = %367
  %375 = load double, ptr %37, align 8, !tbaa !32
  %376 = load ptr, ptr %2, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.molecular_grid_desc, ptr %376, i32 0, i32 36
  %378 = load ptr, ptr %377, align 8, !tbaa !23
  %379 = load i64, ptr %38, align 8, !tbaa !14
  %380 = getelementptr inbounds double, ptr %378, i64 %379
  %381 = load double, ptr %380, align 8, !tbaa !32
  %382 = fmul double %381, %375
  store double %382, ptr %380, align 8, !tbaa !32
  br label %383

383:                                              ; preds = %374
  %384 = load i64, ptr %38, align 8, !tbaa !14
  %385 = add i64 %384, 1
  store i64 %385, ptr %38, align 8, !tbaa !14
  br label %367, !llvm.loop !52

386:                                              ; preds = %373
  call void @get_wall_time(ptr noundef %4)
  br label %387

387:                                              ; preds = %386
  %388 = load ptr, ptr %5, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.scf_context, ptr %388, i32 0, i32 55
  %390 = load i64, ptr %389, align 8, !tbaa !53
  %391 = icmp ne i64 %390, 0
  br i1 %391, label %395, label %392

392:                                              ; preds = %387
  %393 = call double @diff_time_ms(ptr noundef %3, ptr noundef %4)
  %394 = call i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %393)
  br label %395

395:                                              ; preds = %392, %387
  br label %396

396:                                              ; preds = %395
  br label %397

397:                                              ; preds = %396
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #5
  ret void
}

declare void @get_wall_time(ptr noundef) #2

declare void @einsum_mn_np__mp_parallel(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare void @einsum_mn_mn__m(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @tag_transpose(ptr noundef) #3

declare void @mat_scalar_multiply(ptr noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) #2

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

declare void @mat_add(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint 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 nosync nounwind speculatable willreturn memory(none) }
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, !6, i64 608}
!10 = !{!"molecular_grid_desc", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !11, i64 560, !11, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !6, i64 608}
!11 = !{!"long", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 64}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !11, i64 8}
!16 = !{!"scf_context", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !12, i64 192, !11, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !11, i64 232, !12, i64 240, !12, i64 248, !11, i64 256, !12, i64 264, !11, i64 272, !11, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !12, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !11, i64 440}
!17 = !{!16, !6, i64 176}
!18 = !{!10, !6, i64 104}
!19 = !{!10, !6, i64 112}
!20 = !{!10, !6, i64 120}
!21 = !{!10, !6, i64 128}
!22 = !{!10, !6, i64 136}
!23 = !{!10, !6, i64 288}
!24 = !{!10, !6, i64 296}
!25 = !{!10, !6, i64 304}
!26 = !{!10, !6, i64 312}
!27 = !{!10, !6, i64 328}
!28 = !{!10, !6, i64 336}
!29 = !{!10, !6, i64 584}
!30 = !{!10, !6, i64 592}
!31 = !{!16, !6, i64 288}
!32 = !{!12, !12, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}
!37 = !{!10, !6, i64 320}
!38 = distinct !{!38, !34}
!39 = !{!40, !40, i64 0}
!40 = !{!"int", !7, i64 0}
!41 = !{!16, !6, i64 0}
!42 = !{!43, !11, i64 0}
!43 = !{!"molecule", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !6, i64 72}
!44 = !{!10, !6, i64 0}
!45 = !{!46, !11, i64 24}
!46 = !{!"atomic_grid_desc", !47, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !6, i64 56}
!47 = !{!"vec3d", !12, i64 0, !12, i64 8, !12, i64 16}
!48 = !{!10, !6, i64 88}
!49 = distinct !{!49, !34}
!50 = distinct !{!50, !34}
!51 = !{!43, !11, i64 8}
!52 = distinct !{!52, !34}
!53 = !{!16, !11, i64 440}


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

%struct.timespec = type { i64, i64 }
%struct.atomic_grid_desc = type { %struct.vec3d, i64, i64, i64, i64, ptr }
%struct.vec3d = type { double, double, double }

@.str = external hidden unnamed_addr constant [38 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local void @calc_rho_sigma_lapl_tau(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = alloca %struct.timespec, align 8
  %3 = alloca %struct.timespec, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @get_wall_time(ptr noundef nonnull %2) #7
  %4 = getelementptr inbounds i8, ptr %0, i64 608
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 64
  %7 = load i64, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %5, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %5, i64 176
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %0, i64 104
  %13 = load ptr, ptr %12, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %0, i64 112
  %15 = load ptr, ptr %14, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %0, i64 120
  %17 = load ptr, ptr %16, align 8, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %0, i64 128
  %19 = load ptr, ptr %18, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %0, i64 136
  %21 = load ptr, ptr %20, align 8, !tbaa !20
  %22 = getelementptr inbounds i8, ptr %0, i64 288
  %23 = load ptr, ptr %22, align 8, !tbaa !21
  %24 = getelementptr inbounds i8, ptr %0, i64 296
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %0, i64 304
  %27 = load ptr, ptr %26, align 8, !tbaa !23
  %28 = getelementptr inbounds i8, ptr %0, i64 312
  %29 = load ptr, ptr %28, align 8, !tbaa !24
  %30 = getelementptr inbounds i8, ptr %0, i64 328
  %31 = load ptr, ptr %30, align 8, !tbaa !25
  %32 = getelementptr inbounds i8, ptr %0, i64 336
  %33 = load ptr, ptr %32, align 8, !tbaa !26
  %34 = getelementptr inbounds i8, ptr %0, i64 584
  %35 = load ptr, ptr %34, align 8, !tbaa !27
  %36 = getelementptr inbounds i8, ptr %0, i64 592
  %37 = load ptr, ptr %36, align 8, !tbaa !28
  %38 = getelementptr inbounds i8, ptr %5, i64 288
  %39 = load ptr, ptr %38, align 8, !tbaa !29
  call void @einsum_mn_np__mp_parallel(ptr noundef %13, ptr noundef %11, ptr noundef %35, i64 noundef %7, i64 noundef %9, i64 noundef %9, ptr noundef %39) #7
  call void @einsum_mn_mn__m(ptr noundef %13, ptr noundef %35, ptr noundef %23, i64 noundef %7, i64 noundef %9) #7
  %40 = call ptr @tag_transpose(ptr noundef %11)
  call void @einsum_mn_mn__m(ptr noundef %35, ptr noundef %15, ptr noundef %25, i64 noundef %7, i64 noundef %9) #7
  call void @mat_scalar_multiply(ptr noundef %25, ptr noundef %25, i64 noundef %7, i64 noundef 1, double noundef 2.000000e+00) #7
  %41 = load ptr, ptr %38, align 8, !tbaa !29
  call void @einsum_mn_np__mp_parallel(ptr noundef %15, ptr noundef %40, ptr noundef %37, i64 noundef %7, i64 noundef %9, i64 noundef %9, ptr noundef %41) #7
  call void @einsum_mn_mn__m(ptr noundef %37, ptr noundef %15, ptr noundef %33, i64 noundef %7, i64 noundef %9) #7
  call void @einsum_mn_mn__m(ptr noundef %35, ptr noundef %17, ptr noundef %27, i64 noundef %7, i64 noundef %9) #7
  call void @mat_scalar_multiply(ptr noundef %27, ptr noundef %27, i64 noundef %7, i64 noundef 1, double noundef 2.000000e+00) #7
  %42 = load ptr, ptr %38, align 8, !tbaa !29
  call void @einsum_mn_np__mp_parallel(ptr noundef %17, ptr noundef %40, ptr noundef %37, i64 noundef %7, i64 noundef %9, i64 noundef %9, ptr noundef %42) #7
  %.not217 = icmp eq i64 %7, 0
  br i1 %.not217, label %._crit_edge198.critedge, label %.lr.ph191

.lr.ph191:                                        ; preds = %1
  %.not218 = icmp eq i64 %9, 0
  br i1 %.not218, label %.lr.ph191.split.preheader, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph191
  %xtraiter = and i64 %9, 3
  %43 = icmp ult i64 %9, 4
  %unroll_iter = and i64 %9, -4
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph191.split.preheader:                        ; preds = %.lr.ph191
  %min.iters.check = icmp ult i64 %7, 4
  br i1 %min.iters.check, label %.lr.ph191.split.preheader309, label %vector.ph

.lr.ph191.split.preheader309:                     ; preds = %middle.block, %.lr.ph191.split.preheader
  %.0173189.ph = phi i64 [ 0, %.lr.ph191.split.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph191.split

vector.ph:                                        ; preds = %.lr.ph191.split.preheader
  %n.vec = and i64 %7, -4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %44 = getelementptr inbounds double, ptr %33, i64 %index
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load = load <2 x double>, ptr %44, align 8, !tbaa !30
  %wide.load248 = load <2 x double>, ptr %45, align 8, !tbaa !30
  %46 = fadd <2 x double> %wide.load, zeroinitializer
  %47 = fadd <2 x double> %wide.load248, zeroinitializer
  store <2 x double> %46, ptr %44, align 8, !tbaa !30
  store <2 x double> %47, ptr %45, align 8, !tbaa !30
  %index.next = add nuw i64 %index, 4
  %48 = icmp eq i64 %index.next, %n.vec
  br i1 %48, label %middle.block, label %vector.body, !llvm.loop !31

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %7, %n.vec
  br i1 %cmp.n, label %._crit_edge192, label %.lr.ph191.split.preheader309

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %.0173189.us = phi i64 [ %88, %._crit_edge.us ], [ 0, %.lr.ph.us.preheader ]
  %49 = mul i64 %.0173189.us, %9
  br i1 %43, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

.lr.ph.us.new:                                    ; preds = %.lr.ph.us, %.lr.ph.us.new
  %.0179188.us = phi double [ %76, %.lr.ph.us.new ], [ 0.000000e+00, %.lr.ph.us ]
  %.0182187.us = phi i64 [ %77, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %50 = add i64 %.0182187.us, %49
  %51 = getelementptr inbounds double, ptr %37, i64 %50
  %52 = load double, ptr %51, align 8, !tbaa !30
  %53 = getelementptr inbounds double, ptr %17, i64 %50
  %54 = load double, ptr %53, align 8, !tbaa !30
  %55 = call double @llvm.fmuladd.f64(double %52, double %54, double %.0179188.us)
  %56 = or disjoint i64 %.0182187.us, 1
  %57 = add i64 %56, %49
  %58 = getelementptr inbounds double, ptr %37, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !30
  %60 = getelementptr inbounds double, ptr %17, i64 %57
  %61 = load double, ptr %60, align 8, !tbaa !30
  %62 = call double @llvm.fmuladd.f64(double %59, double %61, double %55)
  %63 = or disjoint i64 %.0182187.us, 2
  %64 = add i64 %63, %49
  %65 = getelementptr inbounds double, ptr %37, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !30
  %67 = getelementptr inbounds double, ptr %17, i64 %64
  %68 = load double, ptr %67, align 8, !tbaa !30
  %69 = call double @llvm.fmuladd.f64(double %66, double %68, double %62)
  %70 = or disjoint i64 %.0182187.us, 3
  %71 = add i64 %70, %49
  %72 = getelementptr inbounds double, ptr %37, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !30
  %74 = getelementptr inbounds double, ptr %17, i64 %71
  %75 = load double, ptr %74, align 8, !tbaa !30
  %76 = call double @llvm.fmuladd.f64(double %73, double %75, double %69)
  %77 = add nuw i64 %.0182187.us, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new, !llvm.loop !35

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us.new, %.lr.ph.us
  %.lcssa311.ph = phi double [ poison, %.lr.ph.us ], [ %76, %.lr.ph.us.new ]
  %.0179188.us.unr = phi double [ 0.000000e+00, %.lr.ph.us ], [ %76, %.lr.ph.us.new ]
  %.0182187.us.unr = phi i64 [ 0, %.lr.ph.us ], [ %77, %.lr.ph.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %.0179188.us.epil = phi double [ %83, %.epil.preheader ], [ %.0179188.us.unr, %._crit_edge.us.unr-lcssa ]
  %.0182187.us.epil = phi i64 [ %84, %.epil.preheader ], [ %.0182187.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %78 = add i64 %.0182187.us.epil, %49
  %79 = getelementptr inbounds double, ptr %37, i64 %78
  %80 = load double, ptr %79, align 8, !tbaa !30
  %81 = getelementptr inbounds double, ptr %17, i64 %78
  %82 = load double, ptr %81, align 8, !tbaa !30
  %83 = call double @llvm.fmuladd.f64(double %80, double %82, double %.0179188.us.epil)
  %84 = add nuw i64 %.0182187.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us, label %.epil.preheader, !llvm.loop !36

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %.lcssa311 = phi double [ %.lcssa311.ph, %._crit_edge.us.unr-lcssa ], [ %83, %.epil.preheader ]
  %85 = getelementptr inbounds double, ptr %33, i64 %.0173189.us
  %86 = load double, ptr %85, align 8, !tbaa !30
  %87 = fadd double %.lcssa311, %86
  store double %87, ptr %85, align 8, !tbaa !30
  %88 = add nuw i64 %.0173189.us, 1
  %exitcond228.not = icmp eq i64 %88, %7
  br i1 %exitcond228.not, label %._crit_edge192, label %.lr.ph.us, !llvm.loop !38

._crit_edge192:                                   ; preds = %._crit_edge.us, %.lr.ph191.split, %middle.block
  call void @einsum_mn_mn__m(ptr noundef %35, ptr noundef %19, ptr noundef %29, i64 noundef %7, i64 noundef %9) #7
  call void @mat_scalar_multiply(ptr noundef %29, ptr noundef %29, i64 noundef %7, i64 noundef 1, double noundef 2.000000e+00) #7
  %89 = load ptr, ptr %38, align 8, !tbaa !29
  call void @einsum_mn_np__mp_parallel(ptr noundef %19, ptr noundef %40, ptr noundef %37, i64 noundef %7, i64 noundef %9, i64 noundef %9, ptr noundef %89) #7
  br i1 %.not217, label %._crit_edge198, label %.lr.ph197

.lr.ph197:                                        ; preds = %._crit_edge192
  %.not220 = icmp eq i64 %9, 0
  %90 = getelementptr inbounds i8, ptr %0, i64 320
  %91 = load ptr, ptr %90, align 8, !tbaa !39
  br i1 %.not220, label %.lr.ph197.split.preheader, label %.lr.ph.us199.preheader

.lr.ph.us199.preheader:                           ; preds = %.lr.ph197
  %xtraiter314 = and i64 %9, 3
  %92 = icmp ult i64 %9, 4
  %unroll_iter318 = and i64 %9, -4
  %lcmp.mod316.not = icmp eq i64 %xtraiter314, 0
  br label %.lr.ph.us199

.lr.ph197.split.preheader:                        ; preds = %.lr.ph197
  %min.iters.check278 = icmp ult i64 %7, 14
  br i1 %min.iters.check278, label %.lr.ph197.split.preheader306, label %vector.memcheck

.lr.ph197.split.preheader306:                     ; preds = %middle.block276, %vector.memcheck, %.lr.ph197.split.preheader
  %.0181195.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph197.split.preheader ], [ %n.vec281, %middle.block276 ]
  br label %.lr.ph197.split

vector.memcheck:                                  ; preds = %.lr.ph197.split.preheader
  %93 = shl i64 %7, 3
  %scevgep = getelementptr i8, ptr %33, i64 %93
  %scevgep249 = getelementptr i8, ptr %91, i64 %93
  %scevgep250 = getelementptr i8, ptr %25, i64 %93
  %scevgep251 = getelementptr i8, ptr %27, i64 %93
  %scevgep252 = getelementptr i8, ptr %29, i64 %93
  %94 = insertelement <4 x ptr> poison, ptr %33, i64 0
  %95 = shufflevector <4 x ptr> %94, <4 x ptr> poison, <4 x i32> zeroinitializer
  %96 = insertelement <4 x ptr> poison, ptr %scevgep250, i64 0
  %97 = insertelement <4 x ptr> %96, ptr %scevgep251, i64 1
  %98 = insertelement <4 x ptr> %97, ptr %scevgep252, i64 2
  %99 = insertelement <4 x ptr> %98, ptr %scevgep249, i64 3
  %100 = icmp ult <4 x ptr> %95, %99
  %101 = insertelement <4 x ptr> poison, ptr %25, i64 0
  %102 = insertelement <4 x ptr> %101, ptr %27, i64 1
  %103 = insertelement <4 x ptr> %102, ptr %29, i64 2
  %104 = insertelement <4 x ptr> %103, ptr %91, i64 3
  %105 = insertelement <4 x ptr> poison, ptr %scevgep, i64 0
  %106 = shufflevector <4 x ptr> %105, <4 x ptr> poison, <4 x i32> zeroinitializer
  %107 = icmp ult <4 x ptr> %104, %106
  %108 = and <4 x i1> %100, %107
  %bound0264 = icmp ult ptr %91, %scevgep250
  %bound1265 = icmp ult ptr %25, %scevgep249
  %found.conflict266 = and i1 %bound0264, %bound1265
  %bound0268 = icmp ult ptr %91, %scevgep251
  %bound1269 = icmp ult ptr %27, %scevgep249
  %found.conflict270 = and i1 %bound0268, %bound1269
  %bound0272 = icmp ult ptr %91, %scevgep252
  %bound1273 = icmp ult ptr %29, %scevgep249
  %found.conflict274 = and i1 %bound0272, %bound1273
  %109 = bitcast <4 x i1> %108 to i4
  %110 = icmp ne i4 %109, 0
  %op.rdx = or i1 %110, %found.conflict266
  %op.rdx304 = or i1 %found.conflict270, %found.conflict274
  %op.rdx305 = or i1 %op.rdx, %op.rdx304
  br i1 %op.rdx305, label %.lr.ph197.split.preheader306, label %vector.ph279

vector.ph279:                                     ; preds = %vector.memcheck
  %n.vec281 = and i64 %7, -2
  br label %vector.body283

vector.body283:                                   ; preds = %vector.body283, %vector.ph279
  %index284 = phi i64 [ 0, %vector.ph279 ], [ %index.next289, %vector.body283 ]
  %111 = getelementptr inbounds double, ptr %33, i64 %index284
  %wide.load285 = load <2 x double>, ptr %111, align 8, !tbaa !30, !alias.scope !40, !noalias !43
  %112 = fadd <2 x double> %wide.load285, zeroinitializer
  store <2 x double> %112, ptr %111, align 8, !tbaa !30, !alias.scope !40, !noalias !43
  %113 = getelementptr inbounds double, ptr %25, i64 %index284
  %wide.load286 = load <2 x double>, ptr %113, align 8, !tbaa !30, !alias.scope !48
  %114 = getelementptr inbounds double, ptr %27, i64 %index284
  %wide.load287 = load <2 x double>, ptr %114, align 8, !tbaa !30, !alias.scope !49
  %115 = fmul <2 x double> %wide.load287, %wide.load287
  %116 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load286, <2 x double> %wide.load286, <2 x double> %115)
  %117 = getelementptr inbounds double, ptr %29, i64 %index284
  %wide.load288 = load <2 x double>, ptr %117, align 8, !tbaa !30, !alias.scope !50
  %118 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load288, <2 x double> %wide.load288, <2 x double> %116)
  %119 = getelementptr inbounds double, ptr %91, i64 %index284
  store <2 x double> %118, ptr %119, align 8, !tbaa !30, !alias.scope !51, !noalias !52
  %index.next289 = add nuw i64 %index284, 2
  %120 = icmp eq i64 %index.next289, %n.vec281
  br i1 %120, label %middle.block276, label %vector.body283, !llvm.loop !53

middle.block276:                                  ; preds = %vector.body283
  %cmp.n290 = icmp eq i64 %7, %n.vec281
  br i1 %cmp.n290, label %._crit_edge198, label %.lr.ph197.split.preheader306

.lr.ph.us199:                                     ; preds = %.lr.ph.us199.preheader, %._crit_edge.us200
  %.0181195.us = phi i64 [ %170, %._crit_edge.us200 ], [ 0, %.lr.ph.us199.preheader ]
  %121 = mul i64 %.0181195.us, %9
  br i1 %92, label %._crit_edge.us200.unr-lcssa, label %.lr.ph.us199.new

.lr.ph.us199.new:                                 ; preds = %.lr.ph.us199, %.lr.ph.us199.new
  %.0178194.us = phi i64 [ %149, %.lr.ph.us199.new ], [ 0, %.lr.ph.us199 ]
  %.0180193.us = phi double [ %148, %.lr.ph.us199.new ], [ 0.000000e+00, %.lr.ph.us199 ]
  %niter319 = phi i64 [ %niter319.next.3, %.lr.ph.us199.new ], [ 0, %.lr.ph.us199 ]
  %122 = add i64 %.0178194.us, %121
  %123 = getelementptr inbounds double, ptr %37, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !30
  %125 = getelementptr inbounds double, ptr %19, i64 %122
  %126 = load double, ptr %125, align 8, !tbaa !30
  %127 = call double @llvm.fmuladd.f64(double %124, double %126, double %.0180193.us)
  %128 = or disjoint i64 %.0178194.us, 1
  %129 = add i64 %128, %121
  %130 = getelementptr inbounds double, ptr %37, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !30
  %132 = getelementptr inbounds double, ptr %19, i64 %129
  %133 = load double, ptr %132, align 8, !tbaa !30
  %134 = call double @llvm.fmuladd.f64(double %131, double %133, double %127)
  %135 = or disjoint i64 %.0178194.us, 2
  %136 = add i64 %135, %121
  %137 = getelementptr inbounds double, ptr %37, i64 %136
  %138 = load double, ptr %137, align 8, !tbaa !30
  %139 = getelementptr inbounds double, ptr %19, i64 %136
  %140 = load double, ptr %139, align 8, !tbaa !30
  %141 = call double @llvm.fmuladd.f64(double %138, double %140, double %134)
  %142 = or disjoint i64 %.0178194.us, 3
  %143 = add i64 %142, %121
  %144 = getelementptr inbounds double, ptr %37, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !30
  %146 = getelementptr inbounds double, ptr %19, i64 %143
  %147 = load double, ptr %146, align 8, !tbaa !30
  %148 = call double @llvm.fmuladd.f64(double %145, double %147, double %141)
  %149 = add nuw i64 %.0178194.us, 4
  %niter319.next.3 = add i64 %niter319, 4
  %niter319.ncmp.3 = icmp eq i64 %niter319.next.3, %unroll_iter318
  br i1 %niter319.ncmp.3, label %._crit_edge.us200.unr-lcssa, label %.lr.ph.us199.new, !llvm.loop !54

._crit_edge.us200.unr-lcssa:                      ; preds = %.lr.ph.us199.new, %.lr.ph.us199
  %.lcssa308.ph = phi double [ poison, %.lr.ph.us199 ], [ %148, %.lr.ph.us199.new ]
  %.0178194.us.unr = phi i64 [ 0, %.lr.ph.us199 ], [ %149, %.lr.ph.us199.new ]
  %.0180193.us.unr = phi double [ 0.000000e+00, %.lr.ph.us199 ], [ %148, %.lr.ph.us199.new ]
  br i1 %lcmp.mod316.not, label %._crit_edge.us200, label %.epil.preheader313

.epil.preheader313:                               ; preds = %._crit_edge.us200.unr-lcssa, %.epil.preheader313
  %.0178194.us.epil = phi i64 [ %156, %.epil.preheader313 ], [ %.0178194.us.unr, %._crit_edge.us200.unr-lcssa ]
  %.0180193.us.epil = phi double [ %155, %.epil.preheader313 ], [ %.0180193.us.unr, %._crit_edge.us200.unr-lcssa ]
  %epil.iter315 = phi i64 [ %epil.iter315.next, %.epil.preheader313 ], [ 0, %._crit_edge.us200.unr-lcssa ]
  %150 = add i64 %.0178194.us.epil, %121
  %151 = getelementptr inbounds double, ptr %37, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !30
  %153 = getelementptr inbounds double, ptr %19, i64 %150
  %154 = load double, ptr %153, align 8, !tbaa !30
  %155 = call double @llvm.fmuladd.f64(double %152, double %154, double %.0180193.us.epil)
  %156 = add nuw i64 %.0178194.us.epil, 1
  %epil.iter315.next = add i64 %epil.iter315, 1
  %epil.iter315.cmp.not = icmp eq i64 %epil.iter315.next, %xtraiter314
  br i1 %epil.iter315.cmp.not, label %._crit_edge.us200, label %.epil.preheader313, !llvm.loop !55

._crit_edge.us200:                                ; preds = %.epil.preheader313, %._crit_edge.us200.unr-lcssa
  %.lcssa308 = phi double [ %.lcssa308.ph, %._crit_edge.us200.unr-lcssa ], [ %155, %.epil.preheader313 ]
  %157 = getelementptr inbounds double, ptr %33, i64 %.0181195.us
  %158 = load double, ptr %157, align 8, !tbaa !30
  %159 = fadd double %.lcssa308, %158
  store double %159, ptr %157, align 8, !tbaa !30
  %160 = getelementptr inbounds double, ptr %25, i64 %.0181195.us
  %161 = load double, ptr %160, align 8, !tbaa !30
  %162 = getelementptr inbounds double, ptr %27, i64 %.0181195.us
  %163 = load double, ptr %162, align 8, !tbaa !30
  %164 = fmul double %163, %163
  %165 = call double @llvm.fmuladd.f64(double %161, double %161, double %164)
  %166 = getelementptr inbounds double, ptr %29, i64 %.0181195.us
  %167 = load double, ptr %166, align 8, !tbaa !30
  %168 = call double @llvm.fmuladd.f64(double %167, double %167, double %165)
  %169 = getelementptr inbounds double, ptr %91, i64 %.0181195.us
  store double %168, ptr %169, align 8, !tbaa !30
  %170 = add nuw i64 %.0181195.us, 1
  %exitcond231.not = icmp eq i64 %170, %7
  br i1 %exitcond231.not, label %._crit_edge198, label %.lr.ph.us199, !llvm.loop !56

.lr.ph191.split:                                  ; preds = %.lr.ph191.split.preheader309, %.lr.ph191.split
  %.0173189 = phi i64 [ %174, %.lr.ph191.split ], [ %.0173189.ph, %.lr.ph191.split.preheader309 ]
  %171 = getelementptr inbounds double, ptr %33, i64 %.0173189
  %172 = load double, ptr %171, align 8, !tbaa !30
  %173 = fadd double %172, 0.000000e+00
  store double %173, ptr %171, align 8, !tbaa !30
  %174 = add nuw i64 %.0173189, 1
  %exitcond229.not = icmp eq i64 %174, %7
  br i1 %exitcond229.not, label %._crit_edge192, label %.lr.ph191.split, !llvm.loop !57

._crit_edge198.critedge:                          ; preds = %1
  call void @einsum_mn_mn__m(ptr noundef %35, ptr noundef %19, ptr noundef %29, i64 noundef %7, i64 noundef %9) #7
  call void @mat_scalar_multiply(ptr noundef %29, ptr noundef %29, i64 noundef %7, i64 noundef 1, double noundef 2.000000e+00) #7
  %175 = load ptr, ptr %38, align 8, !tbaa !29
  call void @einsum_mn_np__mp_parallel(ptr noundef %19, ptr noundef %40, ptr noundef %37, i64 noundef %7, i64 noundef %9, i64 noundef %9, ptr noundef %175) #7
  br label %._crit_edge198

._crit_edge198:                                   ; preds = %._crit_edge.us200, %.lr.ph197.split, %middle.block276, %._crit_edge198.critedge, %._crit_edge192
  call void @einsum_mn_mn__m(ptr noundef %35, ptr noundef %21, ptr noundef %31, i64 noundef %7, i64 noundef %9) #7
  call void @mat_add(ptr noundef %31, ptr noundef %33, ptr noundef %31, i64 noundef %7, i64 noundef 1) #7
  call void @mat_scalar_multiply(ptr noundef %31, ptr noundef %31, i64 noundef %7, i64 noundef 1, double noundef 2.000000e+00) #7
  call void @mat_scalar_multiply(ptr noundef %33, ptr noundef %33, i64 noundef %7, i64 noundef 1, double noundef 5.000000e-01) #7
  call void @mat_scalar_multiply(ptr noundef %23, ptr noundef %23, i64 noundef %7, i64 noundef 1, double noundef 2.000000e+00) #7
  %176 = load ptr, ptr %5, align 8, !tbaa !58
  %177 = load i64, ptr %176, align 8, !tbaa !59
  %.not221 = icmp eq i64 %177, 0
  br i1 %.not221, label %._crit_edge210, label %.lr.ph209

.lr.ph209:                                        ; preds = %._crit_edge198
  %178 = load ptr, ptr %0, align 8, !tbaa !61
  %179 = getelementptr inbounds i8, ptr %0, i64 88
  br label %205

.lr.ph197.split:                                  ; preds = %.lr.ph197.split.preheader306, %.lr.ph197.split
  %.0181195 = phi i64 [ %193, %.lr.ph197.split ], [ %.0181195.ph, %.lr.ph197.split.preheader306 ]
  %180 = getelementptr inbounds double, ptr %33, i64 %.0181195
  %181 = load double, ptr %180, align 8, !tbaa !30
  %182 = fadd double %181, 0.000000e+00
  store double %182, ptr %180, align 8, !tbaa !30
  %183 = getelementptr inbounds double, ptr %25, i64 %.0181195
  %184 = load double, ptr %183, align 8, !tbaa !30
  %185 = getelementptr inbounds double, ptr %27, i64 %.0181195
  %186 = load double, ptr %185, align 8, !tbaa !30
  %187 = fmul double %186, %186
  %188 = call double @llvm.fmuladd.f64(double %184, double %184, double %187)
  %189 = getelementptr inbounds double, ptr %29, i64 %.0181195
  %190 = load double, ptr %189, align 8, !tbaa !30
  %191 = call double @llvm.fmuladd.f64(double %190, double %190, double %188)
  %192 = getelementptr inbounds double, ptr %91, i64 %.0181195
  store double %191, ptr %192, align 8, !tbaa !30
  %193 = add nuw i64 %.0181195, 1
  %exitcond232.not = icmp eq i64 %193, %7
  br i1 %exitcond232.not, label %._crit_edge198, label %.lr.ph197.split, !llvm.loop !62

._crit_edge210:                                   ; preds = %._crit_edge, %._crit_edge198
  %.0177.lcssa = phi double [ 0.000000e+00, %._crit_edge198 ], [ %.1.lcssa, %._crit_edge ]
  %194 = getelementptr inbounds i8, ptr %176, i64 8
  %195 = load i64, ptr %194, align 8, !tbaa !63
  %196 = uitofp i64 %195 to double
  %197 = fdiv double %196, %.0177.lcssa
  %198 = load i64, ptr %6, align 8, !tbaa !12
  %.not223 = icmp eq i64 %198, 0
  br i1 %.not223, label %._crit_edge216, label %.lr.ph215

.lr.ph215:                                        ; preds = %._crit_edge210
  %199 = load ptr, ptr %22, align 8, !tbaa !21
  %min.iters.check293 = icmp ult i64 %198, 4
  br i1 %min.iters.check293, label %scalar.ph292.preheader, label %vector.ph294

scalar.ph292.preheader:                           ; preds = %middle.block291, %.lr.ph215
  %.0213.ph = phi i64 [ 0, %.lr.ph215 ], [ %n.vec296, %middle.block291 ]
  br label %scalar.ph292

vector.ph294:                                     ; preds = %.lr.ph215
  %n.vec296 = and i64 %198, -4
  %broadcast.splatinsert = insertelement <2 x double> poison, double %197, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body298

vector.body298:                                   ; preds = %vector.body298, %vector.ph294
  %index299 = phi i64 [ 0, %vector.ph294 ], [ %index.next302, %vector.body298 ]
  %200 = getelementptr inbounds double, ptr %199, i64 %index299
  %201 = getelementptr inbounds i8, ptr %200, i64 16
  %wide.load300 = load <2 x double>, ptr %200, align 8, !tbaa !30
  %wide.load301 = load <2 x double>, ptr %201, align 8, !tbaa !30
  %202 = fmul <2 x double> %broadcast.splat, %wide.load300
  %203 = fmul <2 x double> %broadcast.splat, %wide.load301
  store <2 x double> %202, ptr %200, align 8, !tbaa !30
  store <2 x double> %203, ptr %201, align 8, !tbaa !30
  %index.next302 = add nuw i64 %index299, 4
  %204 = icmp eq i64 %index.next302, %n.vec296
  br i1 %204, label %middle.block291, label %vector.body298, !llvm.loop !64

middle.block291:                                  ; preds = %vector.body298
  %cmp.n303 = icmp eq i64 %198, %n.vec296
  br i1 %cmp.n303, label %._crit_edge216, label %scalar.ph292.preheader

205:                                              ; preds = %.lr.ph209, %._crit_edge
  %indvars.iv235 = phi i64 [ 0, %.lr.ph209 ], [ %indvars.iv.next236, %._crit_edge ]
  %.0175207 = phi i32 [ 0, %.lr.ph209 ], [ %219, %._crit_edge ]
  %.0177205 = phi double [ 0.000000e+00, %.lr.ph209 ], [ %.1.lcssa, %._crit_edge ]
  %206 = getelementptr inbounds %struct.atomic_grid_desc, ptr %178, i64 %indvars.iv235, i32 1
  %207 = load i64, ptr %206, align 8, !tbaa !65
  %.not222 = icmp eq i64 %207, 0
  br i1 %.not222, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %205
  %208 = load ptr, ptr %179, align 8, !tbaa !68
  %209 = load ptr, ptr %22, align 8, !tbaa !21
  %210 = sext i32 %.0175207 to i64
  %xtraiter321 = and i64 %207, 3
  %211 = icmp ult i64 %207, 4
  br i1 %211, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter325 = and i64 %207, -4
  br label %220

._crit_edge.loopexit.unr-lcssa:                   ; preds = %220, %.lr.ph
  %.lcssa.ph = phi double [ poison, %.lr.ph ], [ %244, %220 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %220 ]
  %.1202.unr = phi double [ %.0177205, %.lr.ph ], [ %244, %220 ]
  %lcmp.mod323.not = icmp eq i64 %xtraiter321, 0
  br i1 %lcmp.mod323.not, label %._crit_edge, label %.epil.preheader320

.epil.preheader320:                               ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader320
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader320 ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.1202.epil = phi double [ %217, %.epil.preheader320 ], [ %.1202.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter322 = phi i64 [ %epil.iter322.next, %.epil.preheader320 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %212 = add nsw i64 %indvars.iv.epil, %210
  %213 = getelementptr inbounds double, ptr %208, i64 %212
  %214 = load double, ptr %213, align 8, !tbaa !30
  %215 = getelementptr inbounds double, ptr %209, i64 %212
  %216 = load double, ptr %215, align 8, !tbaa !30
  %217 = call double @llvm.fmuladd.f64(double %214, double %216, double %.1202.epil)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter322.next = add i64 %epil.iter322, 1
  %epil.iter322.cmp.not = icmp eq i64 %epil.iter322.next, %xtraiter321
  br i1 %epil.iter322.cmp.not, label %._crit_edge, label %.epil.preheader320, !llvm.loop !69

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader320, %205
  %.1.lcssa = phi double [ %.0177205, %205 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %217, %.epil.preheader320 ]
  %218 = trunc i64 %207 to i32
  %219 = add i32 %.0175207, %218
  %indvars.iv.next236 = add nuw nsw i64 %indvars.iv235, 1
  %exitcond238.not = icmp eq i64 %indvars.iv.next236, %177
  br i1 %exitcond238.not, label %._crit_edge210, label %205, !llvm.loop !70

220:                                              ; preds = %220, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %220 ]
  %.1202 = phi double [ %.0177205, %.lr.ph.new ], [ %244, %220 ]
  %niter326 = phi i64 [ 0, %.lr.ph.new ], [ %niter326.next.3, %220 ]
  %221 = add nsw i64 %indvars.iv, %210
  %222 = getelementptr inbounds double, ptr %208, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !30
  %224 = getelementptr inbounds double, ptr %209, i64 %221
  %225 = load double, ptr %224, align 8, !tbaa !30
  %226 = call double @llvm.fmuladd.f64(double %223, double %225, double %.1202)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %227 = add nsw i64 %indvars.iv.next, %210
  %228 = getelementptr inbounds double, ptr %208, i64 %227
  %229 = load double, ptr %228, align 8, !tbaa !30
  %230 = getelementptr inbounds double, ptr %209, i64 %227
  %231 = load double, ptr %230, align 8, !tbaa !30
  %232 = call double @llvm.fmuladd.f64(double %229, double %231, double %226)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %233 = add nsw i64 %indvars.iv.next.1, %210
  %234 = getelementptr inbounds double, ptr %208, i64 %233
  %235 = load double, ptr %234, align 8, !tbaa !30
  %236 = getelementptr inbounds double, ptr %209, i64 %233
  %237 = load double, ptr %236, align 8, !tbaa !30
  %238 = call double @llvm.fmuladd.f64(double %235, double %237, double %232)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %239 = add nsw i64 %indvars.iv.next.2, %210
  %240 = getelementptr inbounds double, ptr %208, i64 %239
  %241 = load double, ptr %240, align 8, !tbaa !30
  %242 = getelementptr inbounds double, ptr %209, i64 %239
  %243 = load double, ptr %242, align 8, !tbaa !30
  %244 = call double @llvm.fmuladd.f64(double %241, double %243, double %238)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter326.next.3 = add i64 %niter326, 4
  %niter326.ncmp.3 = icmp eq i64 %niter326.next.3, %unroll_iter325
  br i1 %niter326.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %220, !llvm.loop !71

._crit_edge216:                                   ; preds = %scalar.ph292, %middle.block291, %._crit_edge210
  call void @get_wall_time(ptr noundef nonnull %3) #7
  %245 = getelementptr inbounds i8, ptr %5, i64 440
  %246 = load i64, ptr %245, align 8, !tbaa !72
  %.not = icmp eq i64 %246, 0
  br i1 %.not, label %251, label %254

scalar.ph292:                                     ; preds = %scalar.ph292.preheader, %scalar.ph292
  %.0213 = phi i64 [ %250, %scalar.ph292 ], [ %.0213.ph, %scalar.ph292.preheader ]
  %247 = getelementptr inbounds double, ptr %199, i64 %.0213
  %248 = load double, ptr %247, align 8, !tbaa !30
  %249 = fmul double %197, %248
  store double %249, ptr %247, align 8, !tbaa !30
  %250 = add nuw i64 %.0213, 1
  %exitcond239.not = icmp eq i64 %250, %198
  br i1 %exitcond239.not, label %._crit_edge216, label %scalar.ph292, !llvm.loop !73

251:                                              ; preds = %._crit_edge216
  %252 = call double @diff_time_ms(ptr noundef nonnull %2, ptr noundef nonnull %3) #7
  %253 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %252)
  br label %254

254:                                              ; preds = %251, %._crit_edge216
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  ret void
}

declare void @get_wall_time(ptr noundef) local_unnamed_addr #2

declare void @einsum_mn_np__mp_parallel(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @einsum_mn_mn__m(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @tag_transpose(ptr noundef) local_unnamed_addr #3

declare void @mat_scalar_multiply(ptr noundef, ptr noundef, i64 noundef, i64 noundef, double noundef) local_unnamed_addr #2

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

declare void @mat_add(ptr noundef, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; 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>) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint 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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 608}
!6 = !{!"molecular_grid_desc", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !10, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !10, i64 560, !10, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !10, i64 64}
!13 = !{!14, !10, i64 8}
!14 = !{!"scf_context", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !11, i64 192, !10, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !10, i64 232, !11, i64 240, !11, i64 248, !10, i64 256, !11, i64 264, !10, i64 272, !10, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !11, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !10, i64 440}
!15 = !{!14, !7, i64 176}
!16 = !{!6, !7, i64 104}
!17 = !{!6, !7, i64 112}
!18 = !{!6, !7, i64 120}
!19 = !{!6, !7, i64 128}
!20 = !{!6, !7, i64 136}
!21 = !{!6, !7, i64 288}
!22 = !{!6, !7, i64 296}
!23 = !{!6, !7, i64 304}
!24 = !{!6, !7, i64 312}
!25 = !{!6, !7, i64 328}
!26 = !{!6, !7, i64 336}
!27 = !{!6, !7, i64 584}
!28 = !{!6, !7, i64 592}
!29 = !{!14, !7, i64 288}
!30 = !{!11, !11, i64 0}
!31 = distinct !{!31, !32, !33, !34}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!"llvm.loop.isvectorized", i32 1}
!34 = !{!"llvm.loop.unroll.runtime.disable"}
!35 = distinct !{!35, !32}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.unroll.disable"}
!38 = distinct !{!38, !32}
!39 = !{!6, !7, i64 320}
!40 = !{!41}
!41 = distinct !{!41, !42}
!42 = distinct !{!42, !"LVerDomain"}
!43 = !{!44, !45, !46, !47}
!44 = distinct !{!44, !42}
!45 = distinct !{!45, !42}
!46 = distinct !{!46, !42}
!47 = distinct !{!47, !42}
!48 = !{!45}
!49 = !{!46}
!50 = !{!47}
!51 = !{!44}
!52 = !{!45, !46, !47}
!53 = distinct !{!53, !32, !33, !34}
!54 = distinct !{!54, !32}
!55 = distinct !{!55, !37}
!56 = distinct !{!56, !32}
!57 = distinct !{!57, !32, !34, !33}
!58 = !{!14, !7, i64 0}
!59 = !{!60, !10, i64 0}
!60 = !{!"molecule", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72}
!61 = !{!6, !7, i64 0}
!62 = distinct !{!62, !32, !33}
!63 = !{!60, !10, i64 8}
!64 = distinct !{!64, !32, !33, !34}
!65 = !{!66, !10, i64 24}
!66 = !{!"atomic_grid_desc", !67, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56}
!67 = !{!"vec3d", !11, i64 0, !11, i64 8, !11, i64 16}
!68 = !{!6, !7, i64 88}
!69 = distinct !{!69, !37}
!70 = distinct !{!70, !32}
!71 = distinct !{!71, !32}
!72 = !{!14, !10, i64 440}
!73 = distinct !{!73, !32, !34, !33}


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