; 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 }
%struct.task_func_calc_integration_weights_arg = type { ptr, i64 }
%struct.threadpool_context = type { i64, ptr, i64 }
%struct.task_func_calc_becke_weights_arg = type { ptr, i64, i64 }

@GRID_SCHEME_FULL = external constant i64, align 8
@GRID_SCHEME_SG2 = external constant i64, align 8
@GRID_SCHEME_SG3 = external constant i64, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 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

declare ptr @x_malloc(i64 noundef) #1

declare void @threadpool_add_task(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #1

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

declare void @threadpool_wait_job_done(ptr noundef) #1

declare void @get_wall_time(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @build_molecular_grid(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.timespec, align 8
  %4 = alloca %struct.timespec, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #3
  call void @get_wall_time(ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.molecular_grid_desc, ptr %20, i32 0, i32 76
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  store ptr %22, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.scf_context, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  store ptr %25, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.molecular_grid_desc, ptr %26, i32 0, i32 5
  %28 = load i64, ptr %27, align 8, !tbaa !15
  %29 = call i64 @lebedev_num_points(i64 noundef %28)
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.molecular_grid_desc, ptr %30, i32 0, i32 2
  store i64 %29, ptr %31, align 8, !tbaa !16
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.molecular_grid_desc, ptr %32, i32 0, i32 2
  %34 = load i64, ptr %33, align 8, !tbaa !16
  %35 = mul i64 %34, 3
  %36 = mul i64 %35, 8
  %37 = call ptr @x_malloc(i64 noundef %36)
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.molecular_grid_desc, ptr %38, i32 0, i32 6
  store ptr %37, ptr %39, align 8, !tbaa !17
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.molecular_grid_desc, ptr %40, i32 0, i32 2
  %42 = load i64, ptr %41, align 8, !tbaa !16
  %43 = mul i64 %42, 8
  %44 = call ptr @x_malloc(i64 noundef %43)
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.molecular_grid_desc, ptr %45, i32 0, i32 7
  store ptr %44, ptr %46, align 8, !tbaa !18
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.molecular_grid_desc, ptr %47, i32 0, i32 6
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.molecular_grid_desc, ptr %50, i32 0, i32 7
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.molecular_grid_desc, ptr %53, i32 0, i32 5
  %55 = load i64, ptr %54, align 8, !tbaa !15
  %56 = call i64 @lebedev_gen_grid(ptr noundef %49, ptr noundef %52, i64 noundef %55)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.molecule, ptr %57, i32 0, i32 0
  %59 = load i64, ptr %58, align 8, !tbaa !19
  %60 = mul i64 %59, 64
  %61 = call ptr @x_malloc(i64 noundef %60)
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.molecular_grid_desc, ptr %62, i32 0, i32 0
  store ptr %61, ptr %63, align 8, !tbaa !21
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.molecular_grid_desc, ptr %64, i32 0, i32 8
  store i64 0, ptr %65, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !23
  br label %66

66:                                               ; preds = %184, %1
  %67 = load i64, ptr %7, align 8, !tbaa !23
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.molecule, ptr %68, i32 0, i32 0
  %70 = load i64, ptr %69, align 8, !tbaa !19
  %71 = icmp ult i64 %67, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %187

73:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.molecular_grid_desc, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !21
  %77 = load i64, ptr %7, align 8, !tbaa !23
  %78 = getelementptr inbounds %struct.atomic_grid_desc, ptr %76, i64 %77
  store ptr %78, ptr %8, align 8, !tbaa !5
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.atomic_grid_desc, ptr %80, i32 0, i32 5
  store ptr %79, ptr %81, align 8, !tbaa !24
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.molecule, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !27
  %85 = load i64, ptr %7, align 8, !tbaa !23
  %86 = getelementptr inbounds i64, ptr %84, i64 %85
  %87 = load i64, ptr %86, align 8, !tbaa !23
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.atomic_grid_desc, ptr %88, i32 0, i32 4
  store i64 %87, ptr %89, align 8, !tbaa !28
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.molecular_grid_desc, ptr %90, i32 0, i32 1
  %92 = load i64, ptr %91, align 8, !tbaa !29
  %93 = load i64, ptr @GRID_SCHEME_FULL, align 8, !tbaa !23
  %94 = icmp eq i64 %92, %93
  br i1 %94, label %95, label %122

95:                                               ; preds = %73
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.molecular_grid_desc, ptr %96, i32 0, i32 4
  %98 = load i64, ptr %97, align 8, !tbaa !30
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.molecule, ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !27
  %102 = load i64, ptr %7, align 8, !tbaa !23
  %103 = getelementptr inbounds i64, ptr %101, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !23
  %105 = call i64 @get_num_radial_points(i64 noundef %98, i64 noundef %104)
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.atomic_grid_desc, ptr %106, i32 0, i32 2
  store i64 %105, ptr %107, align 8, !tbaa !31
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.molecular_grid_desc, ptr %108, i32 0, i32 2
  %110 = load i64, ptr %109, align 8, !tbaa !16
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.atomic_grid_desc, ptr %111, i32 0, i32 3
  store i64 %110, ptr %112, align 8, !tbaa !32
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.atomic_grid_desc, ptr %113, i32 0, i32 2
  %115 = load i64, ptr %114, align 8, !tbaa !31
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.atomic_grid_desc, ptr %116, i32 0, i32 3
  %118 = load i64, ptr %117, align 8, !tbaa !32
  %119 = mul i64 %115, %118
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.atomic_grid_desc, ptr %120, i32 0, i32 1
  store i64 %119, ptr %121, align 8, !tbaa !33
  br label %122

122:                                              ; preds = %95, %73
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.molecular_grid_desc, ptr %123, i32 0, i32 1
  %125 = load i64, ptr %124, align 8, !tbaa !29
  %126 = load i64, ptr @GRID_SCHEME_SG2, align 8, !tbaa !23
  %127 = icmp eq i64 %125, %126
  br i1 %127, label %134, label %128

128:                                              ; preds = %122
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.molecular_grid_desc, ptr %129, i32 0, i32 1
  %131 = load i64, ptr %130, align 8, !tbaa !29
  %132 = load i64, ptr @GRID_SCHEME_SG3, align 8, !tbaa !23
  %133 = icmp eq i64 %131, %132
  br i1 %133, label %134, label %153

134:                                              ; preds = %128, %122
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.atomic_grid_desc, ptr %135, i32 0, i32 4
  %137 = load i64, ptr %136, align 8, !tbaa !28
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.molecular_grid_desc, ptr %138, i32 0, i32 1
  %140 = load i64, ptr %139, align 8, !tbaa !29
  %141 = call i64 @get_standard_grid_radial_point_num(i64 noundef %137, i64 noundef %140)
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.atomic_grid_desc, ptr %142, i32 0, i32 2
  store i64 %141, ptr %143, align 8, !tbaa !31
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.atomic_grid_desc, ptr %144, i32 0, i32 4
  %146 = load i64, ptr %145, align 8, !tbaa !28
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.molecular_grid_desc, ptr %147, i32 0, i32 1
  %149 = load i64, ptr %148, align 8, !tbaa !29
  %150 = call i64 @get_standard_grid_point_num(i64 noundef %146, i64 noundef %149)
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.atomic_grid_desc, ptr %151, i32 0, i32 1
  store i64 %150, ptr %152, align 8, !tbaa !33
  br label %153

153:                                              ; preds = %134, %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.molecule, ptr %154, i32 0, i32 4
  %156 = load ptr, ptr %155, align 8, !tbaa !34
  %157 = load i64, ptr %7, align 8, !tbaa !23
  %158 = getelementptr inbounds %struct.vec3d, ptr %156, i64 %157
  store ptr %158, ptr %9, align 8, !tbaa !5
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.vec3d, ptr %159, i32 0, i32 0
  %161 = load double, ptr %160, align 8, !tbaa !35
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.atomic_grid_desc, ptr %162, i32 0, i32 0
  %164 = getelementptr inbounds %struct.vec3d, ptr %163, i32 0, i32 0
  store double %161, ptr %164, align 8, !tbaa !36
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.vec3d, ptr %165, i32 0, i32 1
  %167 = load double, ptr %166, align 8, !tbaa !37
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.atomic_grid_desc, ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds %struct.vec3d, ptr %169, i32 0, i32 1
  store double %167, ptr %170, align 8, !tbaa !38
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.vec3d, ptr %171, i32 0, i32 2
  %173 = load double, ptr %172, align 8, !tbaa !39
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.atomic_grid_desc, ptr %174, i32 0, i32 0
  %176 = getelementptr inbounds %struct.vec3d, ptr %175, i32 0, i32 2
  store double %173, ptr %176, align 8, !tbaa !40
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.atomic_grid_desc, ptr %177, i32 0, i32 1
  %179 = load i64, ptr %178, align 8, !tbaa !33
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.molecular_grid_desc, ptr %180, i32 0, i32 8
  %182 = load i64, ptr %181, align 8, !tbaa !22
  %183 = add i64 %182, %179
  store i64 %183, ptr %181, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %184

184:                                              ; preds = %153
  %185 = load i64, ptr %7, align 8, !tbaa !23
  %186 = add i64 %185, 1
  store i64 %186, ptr %7, align 8, !tbaa !23
  br label %66, !llvm.loop !41

187:                                              ; preds = %72
  br label %188

188:                                              ; preds = %187
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.molecular_grid_desc, ptr %189, i32 0, i32 76
  %191 = load ptr, ptr %190, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.scf_context, ptr %191, i32 0, i32 55
  %193 = load i64, ptr %192, align 8, !tbaa !43
  %194 = icmp ne i64 %193, 0
  br i1 %194, label %200, label %195

195:                                              ; preds = %188
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.molecular_grid_desc, ptr %196, i32 0, i32 8
  %198 = load i64, ptr %197, align 8, !tbaa !22
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %198)
  br label %200

200:                                              ; preds = %195, %188
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %203 = load ptr, ptr %2, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.molecular_grid_desc, ptr %203, i32 0, i32 8
  %205 = load i64, ptr %204, align 8, !tbaa !22
  store i64 %205, ptr %10, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.scf_context, ptr %206, i32 0, i32 1
  %208 = load i64, ptr %207, align 8, !tbaa !44
  store i64 %208, ptr %11, align 8, !tbaa !23
  %209 = load i64, ptr %10, align 8, !tbaa !23
  %210 = mul i64 %209, 24
  %211 = call ptr @x_malloc(i64 noundef %210)
  %212 = load ptr, ptr %2, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.molecular_grid_desc, ptr %212, i32 0, i32 9
  store ptr %211, ptr %213, align 8, !tbaa !45
  %214 = load i64, ptr %10, align 8, !tbaa !23
  %215 = mul i64 %214, 24
  %216 = call ptr @x_malloc(i64 noundef %215)
  %217 = load ptr, ptr %2, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.molecular_grid_desc, ptr %217, i32 0, i32 10
  store ptr %216, ptr %218, align 8, !tbaa !46
  %219 = load i64, ptr %10, align 8, !tbaa !23
  %220 = mul i64 %219, 8
  %221 = call ptr @x_malloc(i64 noundef %220)
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.molecular_grid_desc, ptr %222, i32 0, i32 11
  store ptr %221, ptr %223, align 8, !tbaa !47
  %224 = load i64, ptr %10, align 8, !tbaa !23
  %225 = mul i64 %224, 8
  %226 = call ptr @x_malloc(i64 noundef %225)
  %227 = load ptr, ptr %2, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.molecular_grid_desc, ptr %227, i32 0, i32 12
  store ptr %226, ptr %228, align 8, !tbaa !48
  %229 = load i64, ptr %10, align 8, !tbaa !23
  %230 = mul i64 %229, 8
  %231 = call ptr @x_malloc(i64 noundef %230)
  %232 = load ptr, ptr %2, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.molecular_grid_desc, ptr %232, i32 0, i32 24
  store ptr %231, ptr %233, align 8, !tbaa !49
  %234 = load i64, ptr %10, align 8, !tbaa !23
  %235 = mul i64 %234, 8
  %236 = call ptr @x_malloc(i64 noundef %235)
  %237 = load ptr, ptr %2, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.molecular_grid_desc, ptr %237, i32 0, i32 25
  store ptr %236, ptr %238, align 8, !tbaa !50
  %239 = load i64, ptr %11, align 8, !tbaa !23
  %240 = load i64, ptr %11, align 8, !tbaa !23
  %241 = mul i64 %239, %240
  %242 = mul i64 %241, 8
  %243 = call ptr @x_malloc(i64 noundef %242)
  %244 = load ptr, ptr %2, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.molecular_grid_desc, ptr %244, i32 0, i32 26
  store ptr %243, ptr %245, align 8, !tbaa !51
  %246 = load i64, ptr %11, align 8, !tbaa !23
  %247 = load i64, ptr %11, align 8, !tbaa !23
  %248 = mul i64 %246, %247
  %249 = mul i64 %248, 8
  %250 = call ptr @x_malloc(i64 noundef %249)
  %251 = load ptr, ptr %2, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.molecular_grid_desc, ptr %251, i32 0, i32 27
  store ptr %250, ptr %252, align 8, !tbaa !52
  %253 = load i64, ptr %11, align 8, !tbaa !23
  %254 = load i64, ptr %11, align 8, !tbaa !23
  %255 = mul i64 %253, %254
  %256 = call ptr @x_calloc(i64 noundef %255, i64 noundef 8)
  %257 = load ptr, ptr %2, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.molecular_grid_desc, ptr %257, i32 0, i32 31
  store ptr %256, ptr %258, align 8, !tbaa !53
  %259 = load i64, ptr %11, align 8, !tbaa !23
  %260 = load i64, ptr %11, align 8, !tbaa !23
  %261 = mul i64 %259, %260
  %262 = call ptr @x_calloc(i64 noundef %261, i64 noundef 8)
  %263 = load ptr, ptr %2, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.molecular_grid_desc, ptr %263, i32 0, i32 32
  store ptr %262, ptr %264, align 8, !tbaa !54
  %265 = load i64, ptr %11, align 8, !tbaa !23
  %266 = load i64, ptr %11, align 8, !tbaa !23
  %267 = mul i64 %265, %266
  %268 = call ptr @x_calloc(i64 noundef %267, i64 noundef 8)
  %269 = load ptr, ptr %2, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.molecular_grid_desc, ptr %269, i32 0, i32 33
  store ptr %268, ptr %270, align 8, !tbaa !55
  %271 = load i64, ptr %11, align 8, !tbaa !23
  %272 = load i64, ptr %11, align 8, !tbaa !23
  %273 = mul i64 %271, %272
  %274 = call ptr @x_calloc(i64 noundef %273, i64 noundef 8)
  %275 = load ptr, ptr %2, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.molecular_grid_desc, ptr %275, i32 0, i32 34
  store ptr %274, ptr %276, align 8, !tbaa !56
  %277 = load i64, ptr %10, align 8, !tbaa !23
  %278 = mul i64 %277, 8
  %279 = call ptr @x_malloc(i64 noundef %278)
  %280 = load ptr, ptr %2, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.molecular_grid_desc, ptr %280, i32 0, i32 36
  store ptr %279, ptr %281, align 8, !tbaa !57
  %282 = load i64, ptr %10, align 8, !tbaa !23
  %283 = mul i64 %282, 8
  %284 = call ptr @x_malloc(i64 noundef %283)
  %285 = load ptr, ptr %2, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.molecular_grid_desc, ptr %285, i32 0, i32 37
  store ptr %284, ptr %286, align 8, !tbaa !58
  %287 = load i64, ptr %10, align 8, !tbaa !23
  %288 = mul i64 %287, 8
  %289 = call ptr @x_malloc(i64 noundef %288)
  %290 = load ptr, ptr %2, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.molecular_grid_desc, ptr %290, i32 0, i32 38
  store ptr %289, ptr %291, align 8, !tbaa !59
  %292 = load i64, ptr %10, align 8, !tbaa !23
  %293 = mul i64 %292, 8
  %294 = call ptr @x_malloc(i64 noundef %293)
  %295 = load ptr, ptr %2, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.molecular_grid_desc, ptr %295, i32 0, i32 39
  store ptr %294, ptr %296, align 8, !tbaa !60
  %297 = load i64, ptr %10, align 8, !tbaa !23
  %298 = mul i64 %297, 8
  %299 = call ptr @x_malloc(i64 noundef %298)
  %300 = load ptr, ptr %2, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.molecular_grid_desc, ptr %300, i32 0, i32 40
  store ptr %299, ptr %301, align 8, !tbaa !61
  %302 = load i64, ptr %10, align 8, !tbaa !23
  %303 = mul i64 %302, 8
  %304 = call ptr @x_malloc(i64 noundef %303)
  %305 = load ptr, ptr %2, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.molecular_grid_desc, ptr %305, i32 0, i32 41
  store ptr %304, ptr %306, align 8, !tbaa !62
  %307 = load i64, ptr %10, align 8, !tbaa !23
  %308 = mul i64 %307, 8
  %309 = call ptr @x_malloc(i64 noundef %308)
  %310 = load ptr, ptr %2, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.molecular_grid_desc, ptr %310, i32 0, i32 42
  store ptr %309, ptr %311, align 8, !tbaa !63
  %312 = load i64, ptr %10, align 8, !tbaa !23
  %313 = mul i64 %312, 8
  %314 = call ptr @x_malloc(i64 noundef %313)
  %315 = load ptr, ptr %2, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.molecular_grid_desc, ptr %315, i32 0, i32 43
  store ptr %314, ptr %316, align 8, !tbaa !64
  %317 = load i64, ptr %10, align 8, !tbaa !23
  %318 = mul i64 %317, 8
  %319 = call ptr @x_malloc(i64 noundef %318)
  %320 = load ptr, ptr %2, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.molecular_grid_desc, ptr %320, i32 0, i32 44
  store ptr %319, ptr %321, align 8, !tbaa !65
  %322 = load i64, ptr %10, align 8, !tbaa !23
  %323 = mul i64 %322, 8
  %324 = call ptr @x_malloc(i64 noundef %323)
  %325 = load ptr, ptr %2, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.molecular_grid_desc, ptr %325, i32 0, i32 48
  store ptr %324, ptr %326, align 8, !tbaa !66
  %327 = load i64, ptr %10, align 8, !tbaa !23
  %328 = mul i64 %327, 8
  %329 = call ptr @x_malloc(i64 noundef %328)
  %330 = load ptr, ptr %2, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.molecular_grid_desc, ptr %330, i32 0, i32 49
  store ptr %329, ptr %331, align 8, !tbaa !67
  %332 = load i64, ptr %10, align 8, !tbaa !23
  %333 = mul i64 %332, 8
  %334 = call ptr @x_malloc(i64 noundef %333)
  %335 = load ptr, ptr %2, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.molecular_grid_desc, ptr %335, i32 0, i32 45
  store ptr %334, ptr %336, align 8, !tbaa !68
  %337 = load i64, ptr %10, align 8, !tbaa !23
  %338 = mul i64 %337, 8
  %339 = call ptr @x_malloc(i64 noundef %338)
  %340 = load ptr, ptr %2, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.molecular_grid_desc, ptr %340, i32 0, i32 46
  store ptr %339, ptr %341, align 8, !tbaa !69
  %342 = load i64, ptr %10, align 8, !tbaa !23
  %343 = mul i64 %342, 8
  %344 = call ptr @x_malloc(i64 noundef %343)
  %345 = load ptr, ptr %2, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.molecular_grid_desc, ptr %345, i32 0, i32 47
  store ptr %344, ptr %346, align 8, !tbaa !70
  %347 = load i64, ptr %10, align 8, !tbaa !23
  %348 = mul i64 %347, 8
  %349 = call ptr @x_malloc(i64 noundef %348)
  %350 = load ptr, ptr %2, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.molecular_grid_desc, ptr %350, i32 0, i32 50
  store ptr %349, ptr %351, align 8, !tbaa !71
  %352 = load i64, ptr %10, align 8, !tbaa !23
  %353 = mul i64 %352, 8
  %354 = call ptr @x_malloc(i64 noundef %353)
  %355 = load ptr, ptr %2, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.molecular_grid_desc, ptr %355, i32 0, i32 51
  store ptr %354, ptr %356, align 8, !tbaa !72
  %357 = load i64, ptr %10, align 8, !tbaa !23
  %358 = mul i64 %357, 8
  %359 = call ptr @x_malloc(i64 noundef %358)
  %360 = load ptr, ptr %2, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.molecular_grid_desc, ptr %360, i32 0, i32 52
  store ptr %359, ptr %361, align 8, !tbaa !73
  %362 = load i64, ptr %10, align 8, !tbaa !23
  %363 = mul i64 %362, 8
  %364 = call ptr @x_malloc(i64 noundef %363)
  %365 = load ptr, ptr %2, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.molecular_grid_desc, ptr %365, i32 0, i32 53
  store ptr %364, ptr %366, align 8, !tbaa !74
  %367 = load i64, ptr %10, align 8, !tbaa !23
  %368 = mul i64 %367, 8
  %369 = call ptr @x_malloc(i64 noundef %368)
  %370 = load ptr, ptr %2, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.molecular_grid_desc, ptr %370, i32 0, i32 54
  store ptr %369, ptr %371, align 8, !tbaa !75
  %372 = load i64, ptr %10, align 8, !tbaa !23
  %373 = mul i64 %372, 8
  %374 = call ptr @x_malloc(i64 noundef %373)
  %375 = load ptr, ptr %2, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.molecular_grid_desc, ptr %375, i32 0, i32 55
  store ptr %374, ptr %376, align 8, !tbaa !76
  %377 = load i64, ptr %10, align 8, !tbaa !23
  %378 = mul i64 %377, 8
  %379 = call ptr @x_malloc(i64 noundef %378)
  %380 = load ptr, ptr %2, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.molecular_grid_desc, ptr %380, i32 0, i32 56
  store ptr %379, ptr %381, align 8, !tbaa !77
  %382 = load i64, ptr %10, align 8, !tbaa !23
  %383 = mul i64 %382, 8
  %384 = call ptr @x_malloc(i64 noundef %383)
  %385 = load ptr, ptr %2, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.molecular_grid_desc, ptr %385, i32 0, i32 57
  store ptr %384, ptr %386, align 8, !tbaa !78
  %387 = load i64, ptr %10, align 8, !tbaa !23
  %388 = mul i64 %387, 8
  %389 = call ptr @x_malloc(i64 noundef %388)
  %390 = load ptr, ptr %2, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.molecular_grid_desc, ptr %390, i32 0, i32 58
  store ptr %389, ptr %391, align 8, !tbaa !79
  %392 = load i64, ptr %10, align 8, !tbaa !23
  %393 = mul i64 %392, 8
  %394 = call ptr @x_malloc(i64 noundef %393)
  %395 = load ptr, ptr %2, align 8, !tbaa !5
  %396 = getelementptr inbounds %struct.molecular_grid_desc, ptr %395, i32 0, i32 59
  store ptr %394, ptr %396, align 8, !tbaa !80
  %397 = load i64, ptr %10, align 8, !tbaa !23
  %398 = mul i64 %397, 8
  %399 = call ptr @x_malloc(i64 noundef %398)
  %400 = load ptr, ptr %2, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.molecular_grid_desc, ptr %400, i32 0, i32 60
  store ptr %399, ptr %401, align 8, !tbaa !81
  %402 = load i64, ptr %10, align 8, !tbaa !23
  %403 = mul i64 %402, 8
  %404 = call ptr @x_malloc(i64 noundef %403)
  %405 = load ptr, ptr %2, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.molecular_grid_desc, ptr %405, i32 0, i32 61
  store ptr %404, ptr %406, align 8, !tbaa !82
  %407 = load i64, ptr %10, align 8, !tbaa !23
  %408 = mul i64 %407, 8
  %409 = call ptr @x_malloc(i64 noundef %408)
  %410 = load ptr, ptr %2, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.molecular_grid_desc, ptr %410, i32 0, i32 63
  store ptr %409, ptr %411, align 8, !tbaa !83
  %412 = load i64, ptr %10, align 8, !tbaa !23
  %413 = mul i64 %412, 8
  %414 = call ptr @x_malloc(i64 noundef %413)
  %415 = load ptr, ptr %2, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.molecular_grid_desc, ptr %415, i32 0, i32 64
  store ptr %414, ptr %416, align 8, !tbaa !84
  %417 = load i64, ptr %10, align 8, !tbaa !23
  %418 = mul i64 %417, 8
  %419 = call ptr @x_malloc(i64 noundef %418)
  %420 = load ptr, ptr %2, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.molecular_grid_desc, ptr %420, i32 0, i32 65
  store ptr %419, ptr %421, align 8, !tbaa !85
  %422 = load i64, ptr %10, align 8, !tbaa !23
  %423 = mul i64 %422, 8
  %424 = call ptr @x_malloc(i64 noundef %423)
  %425 = load ptr, ptr %2, align 8, !tbaa !5
  %426 = getelementptr inbounds %struct.molecular_grid_desc, ptr %425, i32 0, i32 66
  store ptr %424, ptr %426, align 8, !tbaa !86
  %427 = load i64, ptr %11, align 8, !tbaa !23
  %428 = load i64, ptr %11, align 8, !tbaa !23
  %429 = mul i64 %427, %428
  %430 = mul i64 %429, 8
  %431 = call ptr @x_malloc(i64 noundef %430)
  %432 = load ptr, ptr %2, align 8, !tbaa !5
  %433 = getelementptr inbounds %struct.molecular_grid_desc, ptr %432, i32 0, i32 72
  store ptr %431, ptr %433, align 8, !tbaa !87
  %434 = load i64, ptr %10, align 8, !tbaa !23
  %435 = mul i64 %434, 8
  %436 = call ptr @x_malloc(i64 noundef %435)
  %437 = load ptr, ptr %2, align 8, !tbaa !5
  %438 = getelementptr inbounds %struct.molecular_grid_desc, ptr %437, i32 0, i32 75
  store ptr %436, ptr %438, align 8, !tbaa !88
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !23
  br label %439

439:                                              ; preds = %506, %202
  %440 = load i64, ptr %12, align 8, !tbaa !23
  %441 = load ptr, ptr %6, align 8, !tbaa !5
  %442 = getelementptr inbounds %struct.molecule, ptr %441, i32 0, i32 0
  %443 = load i64, ptr %442, align 8, !tbaa !19
  %444 = icmp ult i64 %440, %443
  br i1 %444, label %446, label %445

445:                                              ; preds = %439
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %509

446:                                              ; preds = %439
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %447 = load ptr, ptr %2, align 8, !tbaa !5
  %448 = getelementptr inbounds %struct.molecular_grid_desc, ptr %447, i32 0, i32 0
  %449 = load ptr, ptr %448, align 8, !tbaa !21
  %450 = load i64, ptr %12, align 8, !tbaa !23
  %451 = getelementptr inbounds %struct.atomic_grid_desc, ptr %449, i64 %450
  store ptr %451, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %452 = call ptr @x_malloc(i64 noundef 16)
  store ptr %452, ptr %15, align 8, !tbaa !5
  %453 = load ptr, ptr %14, align 8, !tbaa !5
  %454 = load ptr, ptr %15, align 8, !tbaa !5
  %455 = getelementptr inbounds %struct.task_func_calc_integration_weights_arg, ptr %454, i32 0, i32 0
  store ptr %453, ptr %455, align 8, !tbaa !89
  %456 = load i64, ptr %13, align 8, !tbaa !23
  %457 = load ptr, ptr %15, align 8, !tbaa !5
  %458 = getelementptr inbounds %struct.task_func_calc_integration_weights_arg, ptr %457, i32 0, i32 1
  store i64 %456, ptr %458, align 8, !tbaa !91
  %459 = load ptr, ptr %2, align 8, !tbaa !5
  %460 = getelementptr inbounds %struct.molecular_grid_desc, ptr %459, i32 0, i32 1
  %461 = load i64, ptr %460, align 8, !tbaa !29
  %462 = load i64, ptr @GRID_SCHEME_FULL, align 8, !tbaa !23
  %463 = icmp eq i64 %461, %462
  br i1 %463, label %464, label %476

464:                                              ; preds = %446
  %465 = load ptr, ptr %5, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.scf_context, ptr %465, i32 0, i32 36
  %467 = load ptr, ptr %466, align 8, !tbaa !92
  %468 = load i64, ptr %12, align 8, !tbaa !23
  %469 = load ptr, ptr %5, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.scf_context, ptr %469, i32 0, i32 36
  %471 = load ptr, ptr %470, align 8, !tbaa !92
  %472 = getelementptr inbounds %struct.threadpool_context, ptr %471, i32 0, i32 0
  %473 = load i64, ptr %472, align 8, !tbaa !93
  %474 = urem i64 %468, %473
  %475 = load ptr, ptr %15, align 8, !tbaa !5
  call void @threadpool_add_task(ptr noundef %467, i64 noundef %474, ptr noundef @task_func_calc_integration_weights, ptr noundef %475)
  br label %476

476:                                              ; preds = %464, %446
  %477 = load ptr, ptr %2, align 8, !tbaa !5
  %478 = getelementptr inbounds %struct.molecular_grid_desc, ptr %477, i32 0, i32 1
  %479 = load i64, ptr %478, align 8, !tbaa !29
  %480 = load i64, ptr @GRID_SCHEME_SG2, align 8, !tbaa !23
  %481 = icmp eq i64 %479, %480
  br i1 %481, label %488, label %482

482:                                              ; preds = %476
  %483 = load ptr, ptr %2, align 8, !tbaa !5
  %484 = getelementptr inbounds %struct.molecular_grid_desc, ptr %483, i32 0, i32 1
  %485 = load i64, ptr %484, align 8, !tbaa !29
  %486 = load i64, ptr @GRID_SCHEME_SG3, align 8, !tbaa !23
  %487 = icmp eq i64 %485, %486
  br i1 %487, label %488, label %500

488:                                              ; preds = %482, %476
  %489 = load ptr, ptr %5, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.scf_context, ptr %489, i32 0, i32 36
  %491 = load ptr, ptr %490, align 8, !tbaa !92
  %492 = load i64, ptr %12, align 8, !tbaa !23
  %493 = load ptr, ptr %5, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.scf_context, ptr %493, i32 0, i32 36
  %495 = load ptr, ptr %494, align 8, !tbaa !92
  %496 = getelementptr inbounds %struct.threadpool_context, ptr %495, i32 0, i32 0
  %497 = load i64, ptr %496, align 8, !tbaa !93
  %498 = urem i64 %492, %497
  %499 = load ptr, ptr %15, align 8, !tbaa !5
  call void @threadpool_add_task(ptr noundef %491, i64 noundef %498, ptr noundef @task_func_calc_integration_weights_standard_grid, ptr noundef %499)
  br label %500

500:                                              ; preds = %488, %482
  %501 = load ptr, ptr %14, align 8, !tbaa !5
  %502 = getelementptr inbounds %struct.atomic_grid_desc, ptr %501, i32 0, i32 1
  %503 = load i64, ptr %502, align 8, !tbaa !33
  %504 = load i64, ptr %13, align 8, !tbaa !23
  %505 = add i64 %504, %503
  store i64 %505, ptr %13, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %506

506:                                              ; preds = %500
  %507 = load i64, ptr %12, align 8, !tbaa !23
  %508 = add i64 %507, 1
  store i64 %508, ptr %12, align 8, !tbaa !23
  br label %439, !llvm.loop !95

509:                                              ; preds = %445
  %510 = load ptr, ptr %5, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.scf_context, ptr %510, i32 0, i32 36
  %512 = load ptr, ptr %511, align 8, !tbaa !92
  call void @threadpool_wait_job_done(ptr noundef %512)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store i64 0, ptr %17, align 8, !tbaa !23
  br label %513

513:                                              ; preds = %552, %509
  %514 = load i64, ptr %16, align 8, !tbaa !23
  %515 = load ptr, ptr %6, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.molecule, ptr %515, i32 0, i32 0
  %517 = load i64, ptr %516, align 8, !tbaa !19
  %518 = icmp ult i64 %514, %517
  br i1 %518, label %520, label %519

519:                                              ; preds = %513
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %555

520:                                              ; preds = %513
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %521 = load ptr, ptr %2, align 8, !tbaa !5
  %522 = getelementptr inbounds %struct.molecular_grid_desc, ptr %521, i32 0, i32 0
  %523 = load ptr, ptr %522, align 8, !tbaa !21
  %524 = load i64, ptr %16, align 8, !tbaa !23
  %525 = getelementptr inbounds %struct.atomic_grid_desc, ptr %523, i64 %524
  store ptr %525, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %526 = call ptr @x_malloc(i64 noundef 24)
  store ptr %526, ptr %19, align 8, !tbaa !5
  %527 = load ptr, ptr %18, align 8, !tbaa !5
  %528 = load ptr, ptr %19, align 8, !tbaa !5
  %529 = getelementptr inbounds %struct.task_func_calc_becke_weights_arg, ptr %528, i32 0, i32 0
  store ptr %527, ptr %529, align 8, !tbaa !96
  %530 = load i64, ptr %17, align 8, !tbaa !23
  %531 = load ptr, ptr %19, align 8, !tbaa !5
  %532 = getelementptr inbounds %struct.task_func_calc_becke_weights_arg, ptr %531, i32 0, i32 1
  store i64 %530, ptr %532, align 8, !tbaa !98
  %533 = load i64, ptr %16, align 8, !tbaa !23
  %534 = load ptr, ptr %19, align 8, !tbaa !5
  %535 = getelementptr inbounds %struct.task_func_calc_becke_weights_arg, ptr %534, i32 0, i32 2
  store i64 %533, ptr %535, align 8, !tbaa !99
  %536 = load ptr, ptr %5, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct.scf_context, ptr %536, i32 0, i32 36
  %538 = load ptr, ptr %537, align 8, !tbaa !92
  %539 = load i64, ptr %16, align 8, !tbaa !23
  %540 = load ptr, ptr %5, align 8, !tbaa !5
  %541 = getelementptr inbounds %struct.scf_context, ptr %540, i32 0, i32 36
  %542 = load ptr, ptr %541, align 8, !tbaa !92
  %543 = getelementptr inbounds %struct.threadpool_context, ptr %542, i32 0, i32 0
  %544 = load i64, ptr %543, align 8, !tbaa !93
  %545 = urem i64 %539, %544
  %546 = load ptr, ptr %19, align 8, !tbaa !5
  call void @threadpool_add_task(ptr noundef %538, i64 noundef %545, ptr noundef @task_func_calc_becke_weights, ptr noundef %546)
  %547 = load ptr, ptr %18, align 8, !tbaa !5
  %548 = getelementptr inbounds %struct.atomic_grid_desc, ptr %547, i32 0, i32 1
  %549 = load i64, ptr %548, align 8, !tbaa !33
  %550 = load i64, ptr %17, align 8, !tbaa !23
  %551 = add i64 %550, %549
  store i64 %551, ptr %17, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  br label %552

552:                                              ; preds = %520
  %553 = load i64, ptr %16, align 8, !tbaa !23
  %554 = add i64 %553, 1
  store i64 %554, ptr %16, align 8, !tbaa !23
  br label %513, !llvm.loop !100

555:                                              ; preds = %519
  %556 = load ptr, ptr %5, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct.scf_context, ptr %556, i32 0, i32 36
  %558 = load ptr, ptr %557, align 8, !tbaa !92
  call void @threadpool_wait_job_done(ptr noundef %558)
  %559 = load i64, ptr %10, align 8, !tbaa !23
  %560 = load i64, ptr %11, align 8, !tbaa !23
  %561 = mul i64 %559, %560
  %562 = mul i64 %561, 8
  %563 = call ptr @x_malloc(i64 noundef %562)
  %564 = load ptr, ptr %2, align 8, !tbaa !5
  %565 = getelementptr inbounds %struct.molecular_grid_desc, ptr %564, i32 0, i32 13
  store ptr %563, ptr %565, align 8, !tbaa !101
  %566 = load i64, ptr %10, align 8, !tbaa !23
  %567 = load i64, ptr %11, align 8, !tbaa !23
  %568 = mul i64 %566, %567
  %569 = mul i64 %568, 8
  %570 = call ptr @x_malloc(i64 noundef %569)
  %571 = load ptr, ptr %2, align 8, !tbaa !5
  %572 = getelementptr inbounds %struct.molecular_grid_desc, ptr %571, i32 0, i32 14
  store ptr %570, ptr %572, align 8, !tbaa !102
  %573 = load i64, ptr %10, align 8, !tbaa !23
  %574 = load i64, ptr %11, align 8, !tbaa !23
  %575 = mul i64 %573, %574
  %576 = mul i64 %575, 8
  %577 = call ptr @x_malloc(i64 noundef %576)
  %578 = load ptr, ptr %2, align 8, !tbaa !5
  %579 = getelementptr inbounds %struct.molecular_grid_desc, ptr %578, i32 0, i32 15
  store ptr %577, ptr %579, align 8, !tbaa !103
  %580 = load i64, ptr %10, align 8, !tbaa !23
  %581 = load i64, ptr %11, align 8, !tbaa !23
  %582 = mul i64 %580, %581
  %583 = mul i64 %582, 8
  %584 = call ptr @x_malloc(i64 noundef %583)
  %585 = load ptr, ptr %2, align 8, !tbaa !5
  %586 = getelementptr inbounds %struct.molecular_grid_desc, ptr %585, i32 0, i32 16
  store ptr %584, ptr %586, align 8, !tbaa !104
  %587 = load i64, ptr %10, align 8, !tbaa !23
  %588 = load i64, ptr %11, align 8, !tbaa !23
  %589 = mul i64 %587, %588
  %590 = mul i64 %589, 8
  %591 = call ptr @x_malloc(i64 noundef %590)
  %592 = load ptr, ptr %2, align 8, !tbaa !5
  %593 = getelementptr inbounds %struct.molecular_grid_desc, ptr %592, i32 0, i32 17
  store ptr %591, ptr %593, align 8, !tbaa !105
  %594 = load i64, ptr %10, align 8, !tbaa !23
  %595 = load i64, ptr %11, align 8, !tbaa !23
  %596 = mul i64 %594, %595
  %597 = mul i64 %596, 8
  %598 = call ptr @x_malloc(i64 noundef %597)
  %599 = load ptr, ptr %2, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct.molecular_grid_desc, ptr %599, i32 0, i32 18
  store ptr %598, ptr %600, align 8, !tbaa !106
  %601 = load i64, ptr %10, align 8, !tbaa !23
  %602 = load i64, ptr %11, align 8, !tbaa !23
  %603 = mul i64 %601, %602
  %604 = mul i64 %603, 8
  %605 = call ptr @x_malloc(i64 noundef %604)
  %606 = load ptr, ptr %2, align 8, !tbaa !5
  %607 = getelementptr inbounds %struct.molecular_grid_desc, ptr %606, i32 0, i32 19
  store ptr %605, ptr %607, align 8, !tbaa !107
  %608 = load i64, ptr %10, align 8, !tbaa !23
  %609 = load i64, ptr %11, align 8, !tbaa !23
  %610 = mul i64 %608, %609
  %611 = mul i64 %610, 8
  %612 = call ptr @x_malloc(i64 noundef %611)
  %613 = load ptr, ptr %2, align 8, !tbaa !5
  %614 = getelementptr inbounds %struct.molecular_grid_desc, ptr %613, i32 0, i32 20
  store ptr %612, ptr %614, align 8, !tbaa !108
  %615 = load i64, ptr %10, align 8, !tbaa !23
  %616 = load i64, ptr %11, align 8, !tbaa !23
  %617 = mul i64 %615, %616
  %618 = mul i64 %617, 8
  %619 = call ptr @x_malloc(i64 noundef %618)
  %620 = load ptr, ptr %2, align 8, !tbaa !5
  %621 = getelementptr inbounds %struct.molecular_grid_desc, ptr %620, i32 0, i32 21
  store ptr %619, ptr %621, align 8, !tbaa !109
  %622 = load i64, ptr %10, align 8, !tbaa !23
  %623 = load i64, ptr %11, align 8, !tbaa !23
  %624 = mul i64 %622, %623
  %625 = mul i64 %624, 8
  %626 = call ptr @x_malloc(i64 noundef %625)
  %627 = load ptr, ptr %2, align 8, !tbaa !5
  %628 = getelementptr inbounds %struct.molecular_grid_desc, ptr %627, i32 0, i32 22
  store ptr %626, ptr %628, align 8, !tbaa !110
  %629 = load i64, ptr %10, align 8, !tbaa !23
  %630 = load i64, ptr %11, align 8, !tbaa !23
  %631 = mul i64 %629, %630
  %632 = mul i64 %631, 8
  %633 = call ptr @x_malloc(i64 noundef %632)
  %634 = load ptr, ptr %2, align 8, !tbaa !5
  %635 = getelementptr inbounds %struct.molecular_grid_desc, ptr %634, i32 0, i32 23
  store ptr %633, ptr %635, align 8, !tbaa !111
  %636 = load i64, ptr %10, align 8, !tbaa !23
  %637 = load i64, ptr %11, align 8, !tbaa !23
  %638 = mul i64 %636, %637
  %639 = mul i64 %638, 8
  %640 = call ptr @x_malloc(i64 noundef %639)
  %641 = load ptr, ptr %2, align 8, !tbaa !5
  %642 = getelementptr inbounds %struct.molecular_grid_desc, ptr %641, i32 0, i32 62
  store ptr %640, ptr %642, align 8, !tbaa !112
  %643 = load i64, ptr %10, align 8, !tbaa !23
  %644 = load i64, ptr %11, align 8, !tbaa !23
  %645 = mul i64 %643, %644
  %646 = mul i64 %645, 8
  %647 = call ptr @x_malloc(i64 noundef %646)
  %648 = load ptr, ptr %2, align 8, !tbaa !5
  %649 = getelementptr inbounds %struct.molecular_grid_desc, ptr %648, i32 0, i32 67
  store ptr %647, ptr %649, align 8, !tbaa !113
  %650 = load i64, ptr %10, align 8, !tbaa !23
  %651 = load i64, ptr %11, align 8, !tbaa !23
  %652 = mul i64 %650, %651
  %653 = mul i64 %652, 8
  %654 = call ptr @x_malloc(i64 noundef %653)
  %655 = load ptr, ptr %2, align 8, !tbaa !5
  %656 = getelementptr inbounds %struct.molecular_grid_desc, ptr %655, i32 0, i32 68
  store ptr %654, ptr %656, align 8, !tbaa !114
  %657 = load i64, ptr %10, align 8, !tbaa !23
  %658 = load i64, ptr %11, align 8, !tbaa !23
  %659 = mul i64 %657, %658
  %660 = mul i64 %659, 8
  %661 = call ptr @x_malloc(i64 noundef %660)
  %662 = load ptr, ptr %2, align 8, !tbaa !5
  %663 = getelementptr inbounds %struct.molecular_grid_desc, ptr %662, i32 0, i32 69
  store ptr %661, ptr %663, align 8, !tbaa !115
  %664 = load i64, ptr %10, align 8, !tbaa !23
  %665 = load i64, ptr %11, align 8, !tbaa !23
  %666 = mul i64 %664, %665
  %667 = mul i64 %666, 8
  %668 = call ptr @x_malloc(i64 noundef %667)
  %669 = load ptr, ptr %2, align 8, !tbaa !5
  %670 = getelementptr inbounds %struct.molecular_grid_desc, ptr %669, i32 0, i32 73
  store ptr %668, ptr %670, align 8, !tbaa !116
  %671 = load i64, ptr %10, align 8, !tbaa !23
  %672 = load i64, ptr %11, align 8, !tbaa !23
  %673 = mul i64 %671, %672
  %674 = mul i64 %673, 8
  %675 = call ptr @x_malloc(i64 noundef %674)
  %676 = load ptr, ptr %2, align 8, !tbaa !5
  %677 = getelementptr inbounds %struct.molecular_grid_desc, ptr %676, i32 0, i32 74
  store ptr %675, ptr %677, align 8, !tbaa !117
  call void @get_wall_time(ptr noundef %4)
  br label %678

678:                                              ; preds = %555
  %679 = load ptr, ptr %5, align 8, !tbaa !5
  %680 = getelementptr inbounds %struct.scf_context, ptr %679, i32 0, i32 55
  %681 = load i64, ptr %680, align 8, !tbaa !43
  %682 = icmp ne i64 %681, 0
  br i1 %682, label %686, label %683

683:                                              ; preds = %678
  %684 = call double @diff_time_ms(ptr noundef %3, ptr noundef %4)
  %685 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %684)
  br label %686

686:                                              ; preds = %683, %678
  br label %687

687:                                              ; preds = %686
  br label %688

688:                                              ; preds = %687
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #3
  ret void
}

declare i64 @lebedev_num_points(i64 noundef) #1

declare i64 @lebedev_gen_grid(ptr noundef, ptr noundef, i64 noundef) #1

declare i64 @get_num_radial_points(i64 noundef, i64 noundef) #1

declare i64 @get_standard_grid_radial_point_num(i64 noundef, i64 noundef) #1

declare i64 @get_standard_grid_point_num(i64 noundef, i64 noundef) #1

declare ptr @x_calloc(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @task_func_calc_integration_weights(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @task_func_calc_integration_weights_standard_grid(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @task_func_calc_becke_weights(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 = !{!14, !6, i64 0}
!14 = !{!"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}
!15 = !{!10, !11, i64 40}
!16 = !{!10, !11, i64 16}
!17 = !{!10, !6, i64 48}
!18 = !{!10, !6, i64 56}
!19 = !{!20, !11, i64 0}
!20 = !{!"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}
!21 = !{!10, !6, i64 0}
!22 = !{!10, !11, i64 64}
!23 = !{!11, !11, i64 0}
!24 = !{!25, !6, i64 56}
!25 = !{!"atomic_grid_desc", !26, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !6, i64 56}
!26 = !{!"vec3d", !12, i64 0, !12, i64 8, !12, i64 16}
!27 = !{!20, !6, i64 16}
!28 = !{!25, !11, i64 48}
!29 = !{!10, !11, i64 8}
!30 = !{!10, !11, i64 32}
!31 = !{!25, !11, i64 32}
!32 = !{!25, !11, i64 40}
!33 = !{!25, !11, i64 24}
!34 = !{!20, !6, i64 32}
!35 = !{!26, !12, i64 0}
!36 = !{!25, !12, i64 0}
!37 = !{!26, !12, i64 8}
!38 = !{!25, !12, i64 8}
!39 = !{!26, !12, i64 16}
!40 = !{!25, !12, i64 16}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!14, !11, i64 440}
!44 = !{!14, !11, i64 8}
!45 = !{!10, !6, i64 72}
!46 = !{!10, !6, i64 80}
!47 = !{!10, !6, i64 88}
!48 = !{!10, !6, i64 96}
!49 = !{!10, !6, i64 192}
!50 = !{!10, !6, i64 200}
!51 = !{!10, !6, i64 208}
!52 = !{!10, !6, i64 216}
!53 = !{!10, !6, i64 248}
!54 = !{!10, !6, i64 256}
!55 = !{!10, !6, i64 264}
!56 = !{!10, !6, i64 272}
!57 = !{!10, !6, i64 288}
!58 = !{!10, !6, i64 296}
!59 = !{!10, !6, i64 304}
!60 = !{!10, !6, i64 312}
!61 = !{!10, !6, i64 320}
!62 = !{!10, !6, i64 328}
!63 = !{!10, !6, i64 336}
!64 = !{!10, !6, i64 344}
!65 = !{!10, !6, i64 352}
!66 = !{!10, !6, i64 384}
!67 = !{!10, !6, i64 392}
!68 = !{!10, !6, i64 360}
!69 = !{!10, !6, i64 368}
!70 = !{!10, !6, i64 376}
!71 = !{!10, !6, i64 400}
!72 = !{!10, !6, i64 408}
!73 = !{!10, !6, i64 416}
!74 = !{!10, !6, i64 424}
!75 = !{!10, !6, i64 432}
!76 = !{!10, !6, i64 440}
!77 = !{!10, !6, i64 448}
!78 = !{!10, !6, i64 456}
!79 = !{!10, !6, i64 464}
!80 = !{!10, !6, i64 472}
!81 = !{!10, !6, i64 480}
!82 = !{!10, !6, i64 488}
!83 = !{!10, !6, i64 504}
!84 = !{!10, !6, i64 512}
!85 = !{!10, !6, i64 520}
!86 = !{!10, !6, i64 528}
!87 = !{!10, !6, i64 576}
!88 = !{!10, !6, i64 600}
!89 = !{!90, !6, i64 0}
!90 = !{!"task_func_calc_integration_weights_arg", !6, i64 0, !11, i64 8}
!91 = !{!90, !11, i64 8}
!92 = !{!14, !6, i64 288}
!93 = !{!94, !11, i64 0}
!94 = !{!"threadpool_context", !11, i64 0, !6, i64 8, !7, i64 16}
!95 = distinct !{!95, !42}
!96 = !{!97, !6, i64 0}
!97 = !{!"task_func_calc_becke_weights_arg", !6, i64 0, !11, i64 8, !11, i64 16}
!98 = !{!97, !11, i64 8}
!99 = !{!97, !11, i64 16}
!100 = distinct !{!100, !42}
!101 = !{!10, !6, i64 104}
!102 = !{!10, !6, i64 112}
!103 = !{!10, !6, i64 120}
!104 = !{!10, !6, i64 128}
!105 = !{!10, !6, i64 136}
!106 = !{!10, !6, i64 144}
!107 = !{!10, !6, i64 152}
!108 = !{!10, !6, i64 160}
!109 = !{!10, !6, i64 168}
!110 = !{!10, !6, i64 176}
!111 = !{!10, !6, i64 184}
!112 = !{!10, !6, i64 496}
!113 = !{!10, !6, i64 536}
!114 = !{!10, !6, i64 544}
!115 = !{!10, !6, i64 552}
!116 = !{!10, !6, i64 584}
!117 = !{!10, !6, i64 592}


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

@GRID_SCHEME_FULL = external local_unnamed_addr constant i64, align 8
@GRID_SCHEME_SG2 = external local_unnamed_addr constant i64, align 8
@GRID_SCHEME_SG3 = external local_unnamed_addr constant i64, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 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

declare ptr @x_malloc(i64 noundef) local_unnamed_addr #1

declare void @threadpool_add_task(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @threadpool_wait_job_done(ptr noundef) local_unnamed_addr #1

declare void @get_wall_time(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @build_molecular_grid(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %struct.timespec, align 8
  %3 = alloca %struct.timespec, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @get_wall_time(ptr noundef nonnull %2) #4
  %4 = getelementptr inbounds i8, ptr %0, i64 608
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = load i64, ptr %7, align 8, !tbaa !14
  %9 = call i64 @lebedev_num_points(i64 noundef %8) #4
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %9, ptr %10, align 8, !tbaa !15
  %11 = mul i64 %9, 24
  %12 = call ptr @x_malloc(i64 noundef %11) #4
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %12, ptr %13, align 8, !tbaa !16
  %14 = load i64, ptr %10, align 8, !tbaa !15
  %15 = shl i64 %14, 3
  %16 = call ptr @x_malloc(i64 noundef %15) #4
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %16, ptr %17, align 8, !tbaa !17
  %18 = load ptr, ptr %13, align 8, !tbaa !16
  %19 = load i64, ptr %7, align 8, !tbaa !14
  %20 = call i64 @lebedev_gen_grid(ptr noundef %18, ptr noundef %16, i64 noundef %19) #4
  %21 = load i64, ptr %6, align 8, !tbaa !18
  %22 = shl i64 %21, 6
  %23 = call ptr @x_malloc(i64 noundef %22) #4
  store ptr %23, ptr %0, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 0, ptr %24, align 8, !tbaa !21
  %25 = load i64, ptr %6, align 8, !tbaa !18
  %.not264 = icmp eq i64 %25, 0
  br i1 %.not264, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %26 = getelementptr inbounds i8, ptr %6, i64 16
  %27 = getelementptr inbounds i8, ptr %0, i64 8
  %28 = load i64, ptr @GRID_SCHEME_FULL, align 8, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %0, i64 32
  %30 = load i64, ptr @GRID_SCHEME_SG2, align 8
  %31 = load i64, ptr @GRID_SCHEME_SG3, align 8
  %32 = getelementptr inbounds i8, ptr %6, i64 32
  br label %37

._crit_edge:                                      ; preds = %67, %1
  %33 = phi i64 [ 0, %1 ], [ %76, %67 ]
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 440
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %.not = icmp eq i64 %36, 0
  br i1 %.not, label %80, label %82

37:                                               ; preds = %.lr.ph, %67
  %.0253 = phi i64 [ 0, %.lr.ph ], [ %77, %67 ]
  %38 = load ptr, ptr %0, align 8, !tbaa !20
  %39 = getelementptr inbounds %struct.atomic_grid_desc, ptr %38, i64 %.0253
  %40 = getelementptr inbounds i8, ptr %39, i64 56
  store ptr %0, ptr %40, align 8, !tbaa !24
  %41 = load ptr, ptr %26, align 8, !tbaa !27
  %42 = getelementptr inbounds i64, ptr %41, i64 %.0253
  %43 = load i64, ptr %42, align 8, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %39, i64 48
  store i64 %43, ptr %44, align 8, !tbaa !28
  %45 = load i64, ptr %27, align 8, !tbaa !29
  %46 = icmp eq i64 %45, %28
  br i1 %46, label %47, label %55

47:                                               ; preds = %37
  %48 = load i64, ptr %29, align 8, !tbaa !30
  %49 = call i64 @get_num_radial_points(i64 noundef %48, i64 noundef %43) #4
  %50 = getelementptr inbounds i8, ptr %39, i64 32
  store i64 %49, ptr %50, align 8, !tbaa !31
  %51 = load i64, ptr %10, align 8, !tbaa !15
  %52 = getelementptr inbounds i8, ptr %39, i64 40
  store i64 %51, ptr %52, align 8, !tbaa !32
  %53 = mul i64 %51, %49
  %54 = getelementptr inbounds i8, ptr %39, i64 24
  store i64 %53, ptr %54, align 8, !tbaa !33
  %.pre = load i64, ptr %27, align 8, !tbaa !29
  br label %55

55:                                               ; preds = %47, %37
  %56 = phi i64 [ %.pre, %47 ], [ %45, %37 ]
  %57 = icmp eq i64 %56, %30
  %58 = icmp eq i64 %56, %31
  %or.cond = select i1 %57, i1 true, i1 %58
  br i1 %or.cond, label %59, label %._crit_edge267

._crit_edge267:                                   ; preds = %55
  %.phi.trans.insert = getelementptr inbounds i8, ptr %39, i64 24
  %.pre268 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !33
  br label %67

59:                                               ; preds = %55
  %60 = load i64, ptr %44, align 8, !tbaa !28
  %61 = call i64 @get_standard_grid_radial_point_num(i64 noundef %60, i64 noundef %56) #4
  %62 = getelementptr inbounds i8, ptr %39, i64 32
  store i64 %61, ptr %62, align 8, !tbaa !31
  %63 = load i64, ptr %44, align 8, !tbaa !28
  %64 = load i64, ptr %27, align 8, !tbaa !29
  %65 = call i64 @get_standard_grid_point_num(i64 noundef %63, i64 noundef %64) #4
  %66 = getelementptr inbounds i8, ptr %39, i64 24
  store i64 %65, ptr %66, align 8, !tbaa !33
  br label %67

67:                                               ; preds = %._crit_edge267, %59
  %68 = phi i64 [ %.pre268, %._crit_edge267 ], [ %65, %59 ]
  %69 = load ptr, ptr %32, align 8, !tbaa !34
  %70 = getelementptr inbounds %struct.vec3d, ptr %69, i64 %.0253
  %71 = load <2 x double>, ptr %70, align 8, !tbaa !35
  store <2 x double> %71, ptr %39, align 8, !tbaa !35
  %72 = getelementptr inbounds i8, ptr %70, i64 16
  %73 = load double, ptr %72, align 8, !tbaa !36
  %74 = getelementptr inbounds i8, ptr %39, i64 16
  store double %73, ptr %74, align 8, !tbaa !37
  %75 = load i64, ptr %24, align 8, !tbaa !21
  %76 = add i64 %75, %68
  store i64 %76, ptr %24, align 8, !tbaa !21
  %77 = add nuw i64 %.0253, 1
  %78 = load i64, ptr %6, align 8, !tbaa !18
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %37, label %._crit_edge, !llvm.loop !38

80:                                               ; preds = %._crit_edge
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %33)
  %.pre269 = load i64, ptr %24, align 8, !tbaa !21
  br label %82

82:                                               ; preds = %80, %._crit_edge
  %83 = phi i64 [ %.pre269, %80 ], [ %33, %._crit_edge ]
  %84 = getelementptr inbounds i8, ptr %5, i64 8
  %85 = load i64, ptr %84, align 8, !tbaa !40
  %86 = mul i64 %83, 24
  %87 = call ptr @x_malloc(i64 noundef %86) #4
  %88 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %87, ptr %88, align 8, !tbaa !41
  %89 = call ptr @x_malloc(i64 noundef %86) #4
  %90 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %89, ptr %90, align 8, !tbaa !42
  %91 = shl i64 %83, 3
  %92 = call ptr @x_malloc(i64 noundef %91) #4
  %93 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %92, ptr %93, align 8, !tbaa !43
  %94 = call ptr @x_malloc(i64 noundef %91) #4
  %95 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr %94, ptr %95, align 8, !tbaa !44
  %96 = call ptr @x_malloc(i64 noundef %91) #4
  %97 = getelementptr inbounds i8, ptr %0, i64 192
  store ptr %96, ptr %97, align 8, !tbaa !45
  %98 = call ptr @x_malloc(i64 noundef %91) #4
  %99 = getelementptr inbounds i8, ptr %0, i64 200
  store ptr %98, ptr %99, align 8, !tbaa !46
  %100 = mul i64 %85, %85
  %101 = shl i64 %100, 3
  %102 = call ptr @x_malloc(i64 noundef %101) #4
  %103 = getelementptr inbounds i8, ptr %0, i64 208
  store ptr %102, ptr %103, align 8, !tbaa !47
  %104 = call ptr @x_malloc(i64 noundef %101) #4
  %105 = getelementptr inbounds i8, ptr %0, i64 216
  store ptr %104, ptr %105, align 8, !tbaa !48
  %106 = call ptr @x_calloc(i64 noundef %100, i64 noundef 8) #4
  %107 = getelementptr inbounds i8, ptr %0, i64 248
  store ptr %106, ptr %107, align 8, !tbaa !49
  %108 = call ptr @x_calloc(i64 noundef %100, i64 noundef 8) #4
  %109 = getelementptr inbounds i8, ptr %0, i64 256
  store ptr %108, ptr %109, align 8, !tbaa !50
  %110 = call ptr @x_calloc(i64 noundef %100, i64 noundef 8) #4
  %111 = getelementptr inbounds i8, ptr %0, i64 264
  store ptr %110, ptr %111, align 8, !tbaa !51
  %112 = call ptr @x_calloc(i64 noundef %100, i64 noundef 8) #4
  %113 = getelementptr inbounds i8, ptr %0, i64 272
  store ptr %112, ptr %113, align 8, !tbaa !52
  %114 = call ptr @x_malloc(i64 noundef %91) #4
  %115 = getelementptr inbounds i8, ptr %0, i64 288
  store ptr %114, ptr %115, align 8, !tbaa !53
  %116 = call ptr @x_malloc(i64 noundef %91) #4
  %117 = getelementptr inbounds i8, ptr %0, i64 296
  store ptr %116, ptr %117, align 8, !tbaa !54
  %118 = call ptr @x_malloc(i64 noundef %91) #4
  %119 = getelementptr inbounds i8, ptr %0, i64 304
  store ptr %118, ptr %119, align 8, !tbaa !55
  %120 = call ptr @x_malloc(i64 noundef %91) #4
  %121 = getelementptr inbounds i8, ptr %0, i64 312
  store ptr %120, ptr %121, align 8, !tbaa !56
  %122 = call ptr @x_malloc(i64 noundef %91) #4
  %123 = getelementptr inbounds i8, ptr %0, i64 320
  store ptr %122, ptr %123, align 8, !tbaa !57
  %124 = call ptr @x_malloc(i64 noundef %91) #4
  %125 = getelementptr inbounds i8, ptr %0, i64 328
  store ptr %124, ptr %125, align 8, !tbaa !58
  %126 = call ptr @x_malloc(i64 noundef %91) #4
  %127 = getelementptr inbounds i8, ptr %0, i64 336
  store ptr %126, ptr %127, align 8, !tbaa !59
  %128 = call ptr @x_malloc(i64 noundef %91) #4
  %129 = getelementptr inbounds i8, ptr %0, i64 344
  store ptr %128, ptr %129, align 8, !tbaa !60
  %130 = call ptr @x_malloc(i64 noundef %91) #4
  %131 = getelementptr inbounds i8, ptr %0, i64 352
  store ptr %130, ptr %131, align 8, !tbaa !61
  %132 = call ptr @x_malloc(i64 noundef %91) #4
  %133 = getelementptr inbounds i8, ptr %0, i64 384
  store ptr %132, ptr %133, align 8, !tbaa !62
  %134 = call ptr @x_malloc(i64 noundef %91) #4
  %135 = getelementptr inbounds i8, ptr %0, i64 392
  store ptr %134, ptr %135, align 8, !tbaa !63
  %136 = call ptr @x_malloc(i64 noundef %91) #4
  %137 = getelementptr inbounds i8, ptr %0, i64 360
  store ptr %136, ptr %137, align 8, !tbaa !64
  %138 = call ptr @x_malloc(i64 noundef %91) #4
  %139 = getelementptr inbounds i8, ptr %0, i64 368
  store ptr %138, ptr %139, align 8, !tbaa !65
  %140 = call ptr @x_malloc(i64 noundef %91) #4
  %141 = getelementptr inbounds i8, ptr %0, i64 376
  store ptr %140, ptr %141, align 8, !tbaa !66
  %142 = call ptr @x_malloc(i64 noundef %91) #4
  %143 = getelementptr inbounds i8, ptr %0, i64 400
  store ptr %142, ptr %143, align 8, !tbaa !67
  %144 = call ptr @x_malloc(i64 noundef %91) #4
  %145 = getelementptr inbounds i8, ptr %0, i64 408
  store ptr %144, ptr %145, align 8, !tbaa !68
  %146 = call ptr @x_malloc(i64 noundef %91) #4
  %147 = getelementptr inbounds i8, ptr %0, i64 416
  store ptr %146, ptr %147, align 8, !tbaa !69
  %148 = call ptr @x_malloc(i64 noundef %91) #4
  %149 = getelementptr inbounds i8, ptr %0, i64 424
  store ptr %148, ptr %149, align 8, !tbaa !70
  %150 = call ptr @x_malloc(i64 noundef %91) #4
  %151 = getelementptr inbounds i8, ptr %0, i64 432
  store ptr %150, ptr %151, align 8, !tbaa !71
  %152 = call ptr @x_malloc(i64 noundef %91) #4
  %153 = getelementptr inbounds i8, ptr %0, i64 440
  store ptr %152, ptr %153, align 8, !tbaa !72
  %154 = call ptr @x_malloc(i64 noundef %91) #4
  %155 = getelementptr inbounds i8, ptr %0, i64 448
  store ptr %154, ptr %155, align 8, !tbaa !73
  %156 = call ptr @x_malloc(i64 noundef %91) #4
  %157 = getelementptr inbounds i8, ptr %0, i64 456
  store ptr %156, ptr %157, align 8, !tbaa !74
  %158 = call ptr @x_malloc(i64 noundef %91) #4
  %159 = getelementptr inbounds i8, ptr %0, i64 464
  store ptr %158, ptr %159, align 8, !tbaa !75
  %160 = call ptr @x_malloc(i64 noundef %91) #4
  %161 = getelementptr inbounds i8, ptr %0, i64 472
  store ptr %160, ptr %161, align 8, !tbaa !76
  %162 = call ptr @x_malloc(i64 noundef %91) #4
  %163 = getelementptr inbounds i8, ptr %0, i64 480
  store ptr %162, ptr %163, align 8, !tbaa !77
  %164 = call ptr @x_malloc(i64 noundef %91) #4
  %165 = getelementptr inbounds i8, ptr %0, i64 488
  store ptr %164, ptr %165, align 8, !tbaa !78
  %166 = call ptr @x_malloc(i64 noundef %91) #4
  %167 = getelementptr inbounds i8, ptr %0, i64 504
  store ptr %166, ptr %167, align 8, !tbaa !79
  %168 = call ptr @x_malloc(i64 noundef %91) #4
  %169 = getelementptr inbounds i8, ptr %0, i64 512
  store ptr %168, ptr %169, align 8, !tbaa !80
  %170 = call ptr @x_malloc(i64 noundef %91) #4
  %171 = getelementptr inbounds i8, ptr %0, i64 520
  store ptr %170, ptr %171, align 8, !tbaa !81
  %172 = call ptr @x_malloc(i64 noundef %91) #4
  %173 = getelementptr inbounds i8, ptr %0, i64 528
  store ptr %172, ptr %173, align 8, !tbaa !82
  %174 = call ptr @x_malloc(i64 noundef %101) #4
  %175 = getelementptr inbounds i8, ptr %0, i64 576
  store ptr %174, ptr %175, align 8, !tbaa !83
  %176 = call ptr @x_malloc(i64 noundef %91) #4
  %177 = getelementptr inbounds i8, ptr %0, i64 600
  store ptr %176, ptr %177, align 8, !tbaa !84
  %178 = load i64, ptr %6, align 8, !tbaa !18
  %.not265 = icmp eq i64 %178, 0
  br i1 %.not265, label %._crit_edge258, label %.lr.ph257

.lr.ph257:                                        ; preds = %82
  %179 = getelementptr inbounds i8, ptr %0, i64 8
  %180 = load i64, ptr @GRID_SCHEME_FULL, align 8
  %181 = getelementptr inbounds i8, ptr %5, i64 288
  %182 = load i64, ptr @GRID_SCHEME_SG2, align 8
  %183 = load i64, ptr @GRID_SCHEME_SG3, align 8
  br label %187

._crit_edge258:                                   ; preds = %206, %82
  %184 = getelementptr inbounds i8, ptr %5, i64 288
  %185 = load ptr, ptr %184, align 8, !tbaa !85
  call void @threadpool_wait_job_done(ptr noundef %185) #4
  %186 = load i64, ptr %6, align 8, !tbaa !18
  %.not266 = icmp eq i64 %186, 0
  br i1 %.not266, label %._crit_edge263, label %.lr.ph262

187:                                              ; preds = %.lr.ph257, %206
  %.0243255 = phi i64 [ 0, %.lr.ph257 ], [ %210, %206 ]
  %.0246254 = phi i64 [ 0, %.lr.ph257 ], [ %209, %206 ]
  %188 = load ptr, ptr %0, align 8, !tbaa !20
  %189 = getelementptr inbounds %struct.atomic_grid_desc, ptr %188, i64 %.0243255
  %190 = call ptr @x_malloc(i64 noundef 16) #4
  store ptr %189, ptr %190, align 8, !tbaa !86
  %191 = getelementptr inbounds i8, ptr %190, i64 8
  store i64 %.0246254, ptr %191, align 8, !tbaa !88
  %192 = load i64, ptr %179, align 8, !tbaa !29
  %193 = icmp eq i64 %192, %180
  br i1 %193, label %194, label %198

194:                                              ; preds = %187
  %195 = load ptr, ptr %181, align 8, !tbaa !85
  %196 = load i64, ptr %195, align 8, !tbaa !89
  %197 = urem i64 %.0243255, %196
  call void @threadpool_add_task(ptr noundef nonnull %195, i64 noundef %197, ptr noundef nonnull @task_func_calc_integration_weights, ptr noundef nonnull %190) #4
  %.pre270 = load i64, ptr %179, align 8, !tbaa !29
  br label %198

198:                                              ; preds = %194, %187
  %199 = phi i64 [ %.pre270, %194 ], [ %192, %187 ]
  %200 = icmp eq i64 %199, %182
  %201 = icmp eq i64 %199, %183
  %or.cond252 = select i1 %200, i1 true, i1 %201
  br i1 %or.cond252, label %202, label %206

202:                                              ; preds = %198
  %203 = load ptr, ptr %181, align 8, !tbaa !85
  %204 = load i64, ptr %203, align 8, !tbaa !89
  %205 = urem i64 %.0243255, %204
  call void @threadpool_add_task(ptr noundef nonnull %203, i64 noundef %205, ptr noundef nonnull @task_func_calc_integration_weights_standard_grid, ptr noundef nonnull %190) #4
  br label %206

206:                                              ; preds = %198, %202
  %207 = getelementptr inbounds i8, ptr %189, i64 24
  %208 = load i64, ptr %207, align 8, !tbaa !33
  %209 = add i64 %208, %.0246254
  %210 = add nuw i64 %.0243255, 1
  %211 = load i64, ptr %6, align 8, !tbaa !18
  %212 = icmp ult i64 %210, %211
  br i1 %212, label %187, label %._crit_edge258, !llvm.loop !91

._crit_edge263:                                   ; preds = %.lr.ph262, %._crit_edge258
  %213 = load ptr, ptr %184, align 8, !tbaa !85
  call void @threadpool_wait_job_done(ptr noundef %213) #4
  %214 = mul i64 %91, %85
  %215 = call ptr @x_malloc(i64 noundef %214) #4
  %216 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr %215, ptr %216, align 8, !tbaa !92
  %217 = call ptr @x_malloc(i64 noundef %214) #4
  %218 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %217, ptr %218, align 8, !tbaa !93
  %219 = call ptr @x_malloc(i64 noundef %214) #4
  %220 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr %219, ptr %220, align 8, !tbaa !94
  %221 = call ptr @x_malloc(i64 noundef %214) #4
  %222 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr %221, ptr %222, align 8, !tbaa !95
  %223 = call ptr @x_malloc(i64 noundef %214) #4
  %224 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr %223, ptr %224, align 8, !tbaa !96
  %225 = call ptr @x_malloc(i64 noundef %214) #4
  %226 = getelementptr inbounds i8, ptr %0, i64 144
  store ptr %225, ptr %226, align 8, !tbaa !97
  %227 = call ptr @x_malloc(i64 noundef %214) #4
  %228 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %227, ptr %228, align 8, !tbaa !98
  %229 = call ptr @x_malloc(i64 noundef %214) #4
  %230 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %229, ptr %230, align 8, !tbaa !99
  %231 = call ptr @x_malloc(i64 noundef %214) #4
  %232 = getelementptr inbounds i8, ptr %0, i64 168
  store ptr %231, ptr %232, align 8, !tbaa !100
  %233 = call ptr @x_malloc(i64 noundef %214) #4
  %234 = getelementptr inbounds i8, ptr %0, i64 176
  store ptr %233, ptr %234, align 8, !tbaa !101
  %235 = call ptr @x_malloc(i64 noundef %214) #4
  %236 = getelementptr inbounds i8, ptr %0, i64 184
  store ptr %235, ptr %236, align 8, !tbaa !102
  %237 = call ptr @x_malloc(i64 noundef %214) #4
  %238 = getelementptr inbounds i8, ptr %0, i64 496
  store ptr %237, ptr %238, align 8, !tbaa !103
  %239 = call ptr @x_malloc(i64 noundef %214) #4
  %240 = getelementptr inbounds i8, ptr %0, i64 536
  store ptr %239, ptr %240, align 8, !tbaa !104
  %241 = call ptr @x_malloc(i64 noundef %214) #4
  %242 = getelementptr inbounds i8, ptr %0, i64 544
  store ptr %241, ptr %242, align 8, !tbaa !105
  %243 = call ptr @x_malloc(i64 noundef %214) #4
  %244 = getelementptr inbounds i8, ptr %0, i64 552
  store ptr %243, ptr %244, align 8, !tbaa !106
  %245 = call ptr @x_malloc(i64 noundef %214) #4
  %246 = getelementptr inbounds i8, ptr %0, i64 584
  store ptr %245, ptr %246, align 8, !tbaa !107
  %247 = call ptr @x_malloc(i64 noundef %214) #4
  %248 = getelementptr inbounds i8, ptr %0, i64 592
  store ptr %247, ptr %248, align 8, !tbaa !108
  call void @get_wall_time(ptr noundef nonnull %3) #4
  %249 = getelementptr inbounds i8, ptr %5, i64 440
  %250 = load i64, ptr %249, align 8, !tbaa !23
  %.not249 = icmp eq i64 %250, 0
  br i1 %.not249, label %265, label %268

.lr.ph262:                                        ; preds = %._crit_edge258, %.lr.ph262
  %.0244260 = phi i64 [ %261, %.lr.ph262 ], [ 0, %._crit_edge258 ]
  %.0245259 = phi i64 [ %262, %.lr.ph262 ], [ 0, %._crit_edge258 ]
  %251 = load ptr, ptr %0, align 8, !tbaa !20
  %252 = getelementptr inbounds %struct.atomic_grid_desc, ptr %251, i64 %.0245259
  %253 = call ptr @x_malloc(i64 noundef 24) #4
  store ptr %252, ptr %253, align 8, !tbaa !109
  %254 = getelementptr inbounds i8, ptr %253, i64 8
  store i64 %.0244260, ptr %254, align 8, !tbaa !111
  %255 = getelementptr inbounds i8, ptr %253, i64 16
  store i64 %.0245259, ptr %255, align 8, !tbaa !112
  %256 = load ptr, ptr %184, align 8, !tbaa !85
  %257 = load i64, ptr %256, align 8, !tbaa !89
  %258 = urem i64 %.0245259, %257
  call void @threadpool_add_task(ptr noundef nonnull %256, i64 noundef %258, ptr noundef nonnull @task_func_calc_becke_weights, ptr noundef nonnull %253) #4
  %259 = getelementptr inbounds i8, ptr %252, i64 24
  %260 = load i64, ptr %259, align 8, !tbaa !33
  %261 = add i64 %260, %.0244260
  %262 = add nuw i64 %.0245259, 1
  %263 = load i64, ptr %6, align 8, !tbaa !18
  %264 = icmp ult i64 %262, %263
  br i1 %264, label %.lr.ph262, label %._crit_edge263, !llvm.loop !113

265:                                              ; preds = %._crit_edge263
  %266 = call double @diff_time_ms(ptr noundef nonnull %2, ptr noundef nonnull %3) #4
  %267 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %266)
  br label %268

268:                                              ; preds = %265, %._crit_edge263
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  ret void
}

declare i64 @lebedev_num_points(i64 noundef) local_unnamed_addr #1

declare i64 @lebedev_gen_grid(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i64 @get_num_radial_points(i64 noundef, i64 noundef) local_unnamed_addr #1

declare i64 @get_standard_grid_radial_point_num(i64 noundef, i64 noundef) local_unnamed_addr #1

declare i64 @get_standard_grid_point_num(i64 noundef, i64 noundef) local_unnamed_addr #1

declare ptr @x_calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @task_func_calc_integration_weights(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @task_func_calc_integration_weights_standard_grid(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @task_func_calc_becke_weights(ptr noundef) #3

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

!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 = !{!13, !7, i64 0}
!13 = !{!"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}
!14 = !{!6, !10, i64 40}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !7, i64 48}
!17 = !{!6, !7, i64 56}
!18 = !{!19, !10, i64 0}
!19 = !{!"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}
!20 = !{!6, !7, i64 0}
!21 = !{!6, !10, i64 64}
!22 = !{!10, !10, i64 0}
!23 = !{!13, !10, i64 440}
!24 = !{!25, !7, i64 56}
!25 = !{!"atomic_grid_desc", !26, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56}
!26 = !{!"vec3d", !11, i64 0, !11, i64 8, !11, i64 16}
!27 = !{!19, !7, i64 16}
!28 = !{!25, !10, i64 48}
!29 = !{!6, !10, i64 8}
!30 = !{!6, !10, i64 32}
!31 = !{!25, !10, i64 32}
!32 = !{!25, !10, i64 40}
!33 = !{!25, !10, i64 24}
!34 = !{!19, !7, i64 32}
!35 = !{!11, !11, i64 0}
!36 = !{!26, !11, i64 16}
!37 = !{!25, !11, i64 16}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!13, !10, i64 8}
!41 = !{!6, !7, i64 72}
!42 = !{!6, !7, i64 80}
!43 = !{!6, !7, i64 88}
!44 = !{!6, !7, i64 96}
!45 = !{!6, !7, i64 192}
!46 = !{!6, !7, i64 200}
!47 = !{!6, !7, i64 208}
!48 = !{!6, !7, i64 216}
!49 = !{!6, !7, i64 248}
!50 = !{!6, !7, i64 256}
!51 = !{!6, !7, i64 264}
!52 = !{!6, !7, i64 272}
!53 = !{!6, !7, i64 288}
!54 = !{!6, !7, i64 296}
!55 = !{!6, !7, i64 304}
!56 = !{!6, !7, i64 312}
!57 = !{!6, !7, i64 320}
!58 = !{!6, !7, i64 328}
!59 = !{!6, !7, i64 336}
!60 = !{!6, !7, i64 344}
!61 = !{!6, !7, i64 352}
!62 = !{!6, !7, i64 384}
!63 = !{!6, !7, i64 392}
!64 = !{!6, !7, i64 360}
!65 = !{!6, !7, i64 368}
!66 = !{!6, !7, i64 376}
!67 = !{!6, !7, i64 400}
!68 = !{!6, !7, i64 408}
!69 = !{!6, !7, i64 416}
!70 = !{!6, !7, i64 424}
!71 = !{!6, !7, i64 432}
!72 = !{!6, !7, i64 440}
!73 = !{!6, !7, i64 448}
!74 = !{!6, !7, i64 456}
!75 = !{!6, !7, i64 464}
!76 = !{!6, !7, i64 472}
!77 = !{!6, !7, i64 480}
!78 = !{!6, !7, i64 488}
!79 = !{!6, !7, i64 504}
!80 = !{!6, !7, i64 512}
!81 = !{!6, !7, i64 520}
!82 = !{!6, !7, i64 528}
!83 = !{!6, !7, i64 576}
!84 = !{!6, !7, i64 600}
!85 = !{!13, !7, i64 288}
!86 = !{!87, !7, i64 0}
!87 = !{!"task_func_calc_integration_weights_arg", !7, i64 0, !10, i64 8}
!88 = !{!87, !10, i64 8}
!89 = !{!90, !10, i64 0}
!90 = !{!"threadpool_context", !10, i64 0, !7, i64 8, !8, i64 16}
!91 = distinct !{!91, !39}
!92 = !{!6, !7, i64 104}
!93 = !{!6, !7, i64 112}
!94 = !{!6, !7, i64 120}
!95 = !{!6, !7, i64 128}
!96 = !{!6, !7, i64 136}
!97 = !{!6, !7, i64 144}
!98 = !{!6, !7, i64 152}
!99 = !{!6, !7, i64 160}
!100 = !{!6, !7, i64 168}
!101 = !{!6, !7, i64 176}
!102 = !{!6, !7, i64 184}
!103 = !{!6, !7, i64 496}
!104 = !{!6, !7, i64 536}
!105 = !{!6, !7, i64 544}
!106 = !{!6, !7, i64 552}
!107 = !{!6, !7, i64 584}
!108 = !{!6, !7, i64 592}
!109 = !{!110, !7, i64 0}
!110 = !{!"task_func_calc_becke_weights_arg", !7, i64 0, !10, i64 8, !10, i64 16}
!111 = !{!110, !10, i64 8}
!112 = !{!110, !10, i64 16}
!113 = distinct !{!113, !39}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass