; LLVM IR from ytopt-team/ytopt :: ytopt-libe/xsbench/ytopt/xsbench (Main)

; 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.SimulationData = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, i32 }
%struct.Inputs = type { i32, i64, i64, i32, ptr, i32, i32, i32, i32, i32, i32 }
%struct.NuclideGridPoint = type { double, double, double, double, double, double }

@.str.83 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.grid_init_do_not_profile = external hidden unnamed_addr constant [53 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [53 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 @grid_init_do_not_profile(ptr dead_on_unwind noalias writable sret(%struct.SimulationData) align 8 %0, ptr noundef byval(%struct.Inputs) align 8 %1, i32 noundef %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca i64, align 8
  store i32 %2, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 42, ptr %6, align 8, !tbaa !9
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %25

23:                                               ; preds = %3
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.95)
  br label %25

25:                                               ; preds = %23, %3
  %26 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %29 = load i64, ptr %28, align 8, !tbaa !14
  %30 = mul nsw i64 %27, %29
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 11
  store i32 %31, ptr %32, align 4, !tbaa !15
  %33 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 11
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = sext i32 %34 to i64
  %36 = mul i64 %35, 48
  %37 = call noalias ptr @malloc(i64 noundef %36) #8
  %38 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  store ptr %37, ptr %38, align 8, !tbaa !17
  %39 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %25
  br label %44

43:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.96, ptr noundef @.str.83, i32 noundef 1485, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

44:                                               ; preds = %42
  %45 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 11
  %46 = load i32, ptr %45, align 4, !tbaa !15
  %47 = sext i32 %46 to i64
  %48 = mul i64 %47, 48
  %49 = load i64, ptr %5, align 8, !tbaa !9
  %50 = add i64 %49, %48
  store i64 %50, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %100, %44
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 11
  %54 = load i32, ptr %53, align 4, !tbaa !15
  %55 = icmp slt i32 %52, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %103

57:                                               ; preds = %51
  %58 = call double @LCG_random_double(ptr noundef %6)
  %59 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.NuclideGridPoint, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.NuclideGridPoint, ptr %63, i32 0, i32 0
  store double %58, ptr %64, align 8, !tbaa !18
  %65 = call double @LCG_random_double(ptr noundef %6)
  %66 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %struct.NuclideGridPoint, ptr %67, i64 %69
  %71 = getelementptr inbounds %struct.NuclideGridPoint, ptr %70, i32 0, i32 1
  store double %65, ptr %71, align 8, !tbaa !21
  %72 = call double @LCG_random_double(ptr noundef %6)
  %73 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %struct.NuclideGridPoint, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct.NuclideGridPoint, ptr %77, i32 0, i32 2
  store double %72, ptr %78, align 8, !tbaa !22
  %79 = call double @LCG_random_double(ptr noundef %6)
  %80 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %struct.NuclideGridPoint, ptr %81, i64 %83
  %85 = getelementptr inbounds %struct.NuclideGridPoint, ptr %84, i32 0, i32 3
  store double %79, ptr %85, align 8, !tbaa !23
  %86 = call double @LCG_random_double(ptr noundef %6)
  %87 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds %struct.NuclideGridPoint, ptr %88, i64 %90
  %92 = getelementptr inbounds %struct.NuclideGridPoint, ptr %91, i32 0, i32 4
  store double %86, ptr %92, align 8, !tbaa !24
  %93 = call double @LCG_random_double(ptr noundef %6)
  %94 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !17
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct.NuclideGridPoint, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct.NuclideGridPoint, ptr %98, i32 0, i32 5
  store double %93, ptr %99, align 8, !tbaa !25
  br label %100

100:                                              ; preds = %57
  %101 = load i32, ptr %7, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %7, align 4, !tbaa !5
  br label %51, !llvm.loop !26

103:                                              ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %122, %103
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !11
  %109 = icmp slt i64 %106, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %125

111:                                              ; preds = %104
  %112 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %113 = load ptr, ptr %112, align 8, !tbaa !17
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %117 = load i64, ptr %116, align 8, !tbaa !14
  %118 = mul nsw i64 %115, %117
  %119 = getelementptr inbounds %struct.NuclideGridPoint, ptr %113, i64 %118
  %120 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %121 = load i64, ptr %120, align 8, !tbaa !14
  call void @qsort(ptr noundef %119, i64 noundef %121, i64 noundef 48, ptr noundef @NGP_compare)
  br label %122

122:                                              ; preds = %111
  %123 = load i32, ptr %8, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %8, align 4, !tbaa !5
  br label %104, !llvm.loop !28

125:                                              ; preds = %110
  %126 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 5
  %127 = load i32, ptr %126, align 8, !tbaa !29
  %128 = icmp eq i32 %127, 1
  br i1 %128, label %129, label %132

129:                                              ; preds = %125
  %130 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  store i32 0, ptr %130, align 4, !tbaa !30
  %131 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  store i32 0, ptr %131, align 8, !tbaa !31
  br label %132

132:                                              ; preds = %129, %125
  %133 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 5
  %134 = load i32, ptr %133, align 8, !tbaa !29
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %379

136:                                              ; preds = %132
  %137 = load i32, ptr %4, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %141

139:                                              ; preds = %136
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.97)
  br label %141

141:                                              ; preds = %139, %136
  %142 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %143 = load i64, ptr %142, align 8, !tbaa !11
  %144 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %145 = load i64, ptr %144, align 8, !tbaa !14
  %146 = mul nsw i64 %143, %145
  %147 = trunc i64 %146 to i32
  %148 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  store i32 %147, ptr %148, align 4, !tbaa !30
  %149 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %150 = load i32, ptr %149, align 4, !tbaa !30
  %151 = sext i32 %150 to i64
  %152 = mul i64 %151, 8
  %153 = call noalias ptr @malloc(i64 noundef %152) #8
  %154 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 3
  store ptr %153, ptr %154, align 8, !tbaa !32
  %155 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 3
  %156 = load ptr, ptr %155, align 8, !tbaa !32
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %159

158:                                              ; preds = %141
  br label %160

159:                                              ; preds = %141
  call void @__assert_fail(ptr noundef @.str.98, ptr noundef @.str.83, i32 noundef 1529, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

160:                                              ; preds = %158
  %161 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %162 = load i32, ptr %161, align 4, !tbaa !30
  %163 = sext i32 %162 to i64
  %164 = mul i64 %163, 8
  %165 = load i64, ptr %5, align 8, !tbaa !9
  %166 = add i64 %165, %164
  store i64 %166, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %186, %160
  %168 = load i32, ptr %9, align 4, !tbaa !5
  %169 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %170 = load i32, ptr %169, align 4, !tbaa !30
  %171 = icmp slt i32 %168, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %189

173:                                              ; preds = %167
  %174 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %175 = load ptr, ptr %174, align 8, !tbaa !17
  %176 = load i32, ptr %9, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds %struct.NuclideGridPoint, ptr %175, i64 %177
  %179 = getelementptr inbounds %struct.NuclideGridPoint, ptr %178, i32 0, i32 0
  %180 = load double, ptr %179, align 8, !tbaa !18
  %181 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 3
  %182 = load ptr, ptr %181, align 8, !tbaa !32
  %183 = load i32, ptr %9, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds double, ptr %182, i64 %184
  store double %180, ptr %185, align 8, !tbaa !33
  br label %186

186:                                              ; preds = %173
  %187 = load i32, ptr %9, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %9, align 4, !tbaa !5
  br label %167, !llvm.loop !34

189:                                              ; preds = %172
  %190 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 3
  %191 = load ptr, ptr %190, align 8, !tbaa !32
  %192 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %193 = load i32, ptr %192, align 4, !tbaa !30
  %194 = sext i32 %193 to i64
  call void @qsort(ptr noundef %191, i64 noundef %194, i64 noundef 8, ptr noundef @double_compare)
  %195 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %196 = load i32, ptr %195, align 4, !tbaa !30
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %199 = load i64, ptr %198, align 8, !tbaa !11
  %200 = mul nsw i64 %197, %199
  %201 = trunc i64 %200 to i32
  %202 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  store i32 %201, ptr %202, align 8, !tbaa !31
  %203 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  %204 = load i32, ptr %203, align 8, !tbaa !31
  %205 = sext i32 %204 to i64
  %206 = mul i64 %205, 4
  %207 = call noalias ptr @malloc(i64 noundef %206) #8
  %208 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  store ptr %207, ptr %208, align 8, !tbaa !35
  %209 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %210 = load ptr, ptr %209, align 8, !tbaa !35
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %213

212:                                              ; preds = %189
  br label %214

213:                                              ; preds = %189
  call void @__assert_fail(ptr noundef @.str.99, ptr noundef @.str.83, i32 noundef 1542, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

214:                                              ; preds = %212
  %215 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  %216 = load i32, ptr %215, align 8, !tbaa !31
  %217 = sext i32 %216 to i64
  %218 = mul i64 %217, 4
  %219 = load i64, ptr %5, align 8, !tbaa !9
  %220 = add i64 %219, %218
  store i64 %220, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %221 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %222 = load i64, ptr %221, align 8, !tbaa !11
  %223 = call noalias ptr @calloc(i64 noundef %222, i64 noundef 4) #10
  store ptr %223, ptr %10, align 8, !tbaa !36
  %224 = load ptr, ptr %10, align 8, !tbaa !36
  %225 = icmp ne ptr %224, null
  br i1 %225, label %226, label %227

226:                                              ; preds = %214
  br label %228

227:                                              ; preds = %214
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.83, i32 noundef 1547, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

228:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %229 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %230 = load i64, ptr %229, align 8, !tbaa !11
  %231 = mul i64 %230, 8
  %232 = call noalias ptr @malloc(i64 noundef %231) #8
  store ptr %232, ptr %11, align 8, !tbaa !36
  %233 = load ptr, ptr %11, align 8, !tbaa !36
  %234 = icmp ne ptr %233, null
  br i1 %234, label %235, label %236

235:                                              ; preds = %228
  br label %237

236:                                              ; preds = %228
  call void @__assert_fail(ptr noundef @.str.101, ptr noundef @.str.83, i32 noundef 1549, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

237:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %261, %237
  %239 = load i32, ptr %12, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %242 = load i64, ptr %241, align 8, !tbaa !11
  %243 = icmp slt i64 %240, %242
  br i1 %243, label %245, label %244

244:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %264

245:                                              ; preds = %238
  %246 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %247 = load ptr, ptr %246, align 8, !tbaa !17
  %248 = load i32, ptr %12, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %251 = load i64, ptr %250, align 8, !tbaa !14
  %252 = mul nsw i64 %249, %251
  %253 = add nsw i64 %252, 1
  %254 = getelementptr inbounds %struct.NuclideGridPoint, ptr %247, i64 %253
  %255 = getelementptr inbounds %struct.NuclideGridPoint, ptr %254, i32 0, i32 0
  %256 = load double, ptr %255, align 8, !tbaa !18
  %257 = load ptr, ptr %11, align 8, !tbaa !36
  %258 = load i32, ptr %12, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds double, ptr %257, i64 %259
  store double %256, ptr %260, align 8, !tbaa !33
  br label %261

261:                                              ; preds = %245
  %262 = load i32, ptr %12, align 4, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %12, align 4, !tbaa !5
  br label %238, !llvm.loop !37

264:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %265

265:                                              ; preds = %373, %264
  %266 = load i64, ptr %13, align 8, !tbaa !9
  %267 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %268 = load i32, ptr %267, align 4, !tbaa !30
  %269 = sext i32 %268 to i64
  %270 = icmp slt i64 %266, %269
  br i1 %270, label %272, label %271

271:                                              ; preds = %265
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %376

272:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %273 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 3
  %274 = load ptr, ptr %273, align 8, !tbaa !32
  %275 = load i64, ptr %13, align 8, !tbaa !9
  %276 = getelementptr inbounds double, ptr %274, i64 %275
  %277 = load double, ptr %276, align 8, !tbaa !33
  store double %277, ptr %15, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %278

278:                                              ; preds = %369, %272
  %279 = load i64, ptr %16, align 8, !tbaa !9
  %280 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %281 = load i64, ptr %280, align 8, !tbaa !11
  %282 = icmp slt i64 %279, %281
  br i1 %282, label %284, label %283

283:                                              ; preds = %278
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %372

284:                                              ; preds = %278
  %285 = load double, ptr %15, align 8, !tbaa !33
  %286 = load ptr, ptr %11, align 8, !tbaa !36
  %287 = load i64, ptr %16, align 8, !tbaa !9
  %288 = getelementptr inbounds double, ptr %286, i64 %287
  %289 = load double, ptr %288, align 8, !tbaa !33
  %290 = fcmp olt double %285, %289
  br i1 %290, label %291, label %305

291:                                              ; preds = %284
  %292 = load ptr, ptr %10, align 8, !tbaa !36
  %293 = load i64, ptr %16, align 8, !tbaa !9
  %294 = getelementptr inbounds i32, ptr %292, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %296 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %297 = load ptr, ptr %296, align 8, !tbaa !35
  %298 = load i64, ptr %13, align 8, !tbaa !9
  %299 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %300 = load i64, ptr %299, align 8, !tbaa !11
  %301 = mul nsw i64 %298, %300
  %302 = load i64, ptr %16, align 8, !tbaa !9
  %303 = add nsw i64 %301, %302
  %304 = getelementptr inbounds i32, ptr %297, i64 %303
  store i32 %295, ptr %304, align 4, !tbaa !5
  br label %368

305:                                              ; preds = %284
  %306 = load ptr, ptr %10, align 8, !tbaa !36
  %307 = load i64, ptr %16, align 8, !tbaa !9
  %308 = getelementptr inbounds i32, ptr %306, i64 %307
  %309 = load i32, ptr %308, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %312 = load i64, ptr %311, align 8, !tbaa !14
  %313 = sub nsw i64 %312, 2
  %314 = icmp eq i64 %310, %313
  br i1 %314, label %315, label %329

315:                                              ; preds = %305
  %316 = load ptr, ptr %10, align 8, !tbaa !36
  %317 = load i64, ptr %16, align 8, !tbaa !9
  %318 = getelementptr inbounds i32, ptr %316, i64 %317
  %319 = load i32, ptr %318, align 4, !tbaa !5
  %320 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %321 = load ptr, ptr %320, align 8, !tbaa !35
  %322 = load i64, ptr %13, align 8, !tbaa !9
  %323 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %324 = load i64, ptr %323, align 8, !tbaa !11
  %325 = mul nsw i64 %322, %324
  %326 = load i64, ptr %16, align 8, !tbaa !9
  %327 = add nsw i64 %325, %326
  %328 = getelementptr inbounds i32, ptr %321, i64 %327
  store i32 %319, ptr %328, align 4, !tbaa !5
  br label %367

329:                                              ; preds = %305
  %330 = load ptr, ptr %10, align 8, !tbaa !36
  %331 = load i64, ptr %16, align 8, !tbaa !9
  %332 = getelementptr inbounds i32, ptr %330, i64 %331
  %333 = load i32, ptr %332, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %332, align 4, !tbaa !5
  %335 = load ptr, ptr %10, align 8, !tbaa !36
  %336 = load i64, ptr %16, align 8, !tbaa !9
  %337 = getelementptr inbounds i32, ptr %335, i64 %336
  %338 = load i32, ptr %337, align 4, !tbaa !5
  %339 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %340 = load ptr, ptr %339, align 8, !tbaa !35
  %341 = load i64, ptr %13, align 8, !tbaa !9
  %342 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %343 = load i64, ptr %342, align 8, !tbaa !11
  %344 = mul nsw i64 %341, %343
  %345 = load i64, ptr %16, align 8, !tbaa !9
  %346 = add nsw i64 %344, %345
  %347 = getelementptr inbounds i32, ptr %340, i64 %346
  store i32 %338, ptr %347, align 4, !tbaa !5
  %348 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %349 = load ptr, ptr %348, align 8, !tbaa !17
  %350 = load i64, ptr %16, align 8, !tbaa !9
  %351 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %352 = load i64, ptr %351, align 8, !tbaa !14
  %353 = mul nsw i64 %350, %352
  %354 = load ptr, ptr %10, align 8, !tbaa !36
  %355 = load i64, ptr %16, align 8, !tbaa !9
  %356 = getelementptr inbounds i32, ptr %354, i64 %355
  %357 = load i32, ptr %356, align 4, !tbaa !5
  %358 = sext i32 %357 to i64
  %359 = add nsw i64 %353, %358
  %360 = add nsw i64 %359, 1
  %361 = getelementptr inbounds %struct.NuclideGridPoint, ptr %349, i64 %360
  %362 = getelementptr inbounds %struct.NuclideGridPoint, ptr %361, i32 0, i32 0
  %363 = load double, ptr %362, align 8, !tbaa !18
  %364 = load ptr, ptr %11, align 8, !tbaa !36
  %365 = load i64, ptr %16, align 8, !tbaa !9
  %366 = getelementptr inbounds double, ptr %364, i64 %365
  store double %363, ptr %366, align 8, !tbaa !33
  br label %367

367:                                              ; preds = %329, %315
  br label %368

368:                                              ; preds = %367, %291
  br label %369

369:                                              ; preds = %368
  %370 = load i64, ptr %16, align 8, !tbaa !9
  %371 = add nsw i64 %370, 1
  store i64 %371, ptr %16, align 8, !tbaa !9
  br label %278, !llvm.loop !38

372:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %373

373:                                              ; preds = %372
  %374 = load i64, ptr %13, align 8, !tbaa !9
  %375 = add nsw i64 %374, 1
  store i64 %375, ptr %13, align 8, !tbaa !9
  br label %265, !llvm.loop !39

376:                                              ; preds = %271
  %377 = load ptr, ptr %10, align 8, !tbaa !36
  call void @free(ptr noundef %377) #7
  %378 = load ptr, ptr %11, align 8, !tbaa !36
  call void @free(ptr noundef %378) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %379

379:                                              ; preds = %376, %132
  %380 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 5
  %381 = load i32, ptr %380, align 8, !tbaa !29
  %382 = icmp eq i32 %381, 2
  br i1 %382, label %383, label %471

383:                                              ; preds = %379
  %384 = load i32, ptr %4, align 4, !tbaa !5
  %385 = icmp eq i32 %384, 0
  br i1 %385, label %386, label %388

386:                                              ; preds = %383
  %387 = call i32 (ptr, ...) @printf(ptr noundef @.str.102)
  br label %388

388:                                              ; preds = %386, %383
  %389 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  store i32 0, ptr %389, align 4, !tbaa !30
  %390 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 6
  %391 = load i32, ptr %390, align 4, !tbaa !40
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %394 = load i64, ptr %393, align 8, !tbaa !11
  %395 = mul nsw i64 %392, %394
  %396 = trunc i64 %395 to i32
  %397 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  store i32 %396, ptr %397, align 8, !tbaa !31
  %398 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  %399 = load i32, ptr %398, align 8, !tbaa !31
  %400 = sext i32 %399 to i64
  %401 = mul i64 %400, 4
  %402 = call noalias ptr @malloc(i64 noundef %401) #8
  %403 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  store ptr %402, ptr %403, align 8, !tbaa !35
  %404 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %405 = load ptr, ptr %404, align 8, !tbaa !35
  %406 = icmp ne ptr %405, null
  br i1 %406, label %407, label %408

407:                                              ; preds = %388
  br label %409

408:                                              ; preds = %388
  call void @__assert_fail(ptr noundef @.str.99, ptr noundef @.str.83, i32 noundef 1582, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

409:                                              ; preds = %407
  %410 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  %411 = load i32, ptr %410, align 8, !tbaa !31
  %412 = sext i32 %411 to i64
  %413 = mul i64 %412, 4
  %414 = load i64, ptr %5, align 8, !tbaa !9
  %415 = add i64 %414, %413
  store i64 %415, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %416 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 6
  %417 = load i32, ptr %416, align 4, !tbaa !40
  %418 = sitofp i32 %417 to double
  %419 = fdiv double 1.000000e+00, %418
  store double %419, ptr %17, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !9
  br label %420

420:                                              ; preds = %467, %409
  %421 = load i64, ptr %18, align 8, !tbaa !9
  %422 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 6
  %423 = load i32, ptr %422, align 4, !tbaa !40
  %424 = sext i32 %423 to i64
  %425 = icmp slt i64 %421, %424
  br i1 %425, label %427, label %426

426:                                              ; preds = %420
  store i32 20, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %470

427:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %428 = load i64, ptr %18, align 8, !tbaa !9
  %429 = sitofp i64 %428 to double
  %430 = load double, ptr %17, align 8, !tbaa !33
  %431 = fmul double %429, %430
  store double %431, ptr %19, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !9
  br label %432

432:                                              ; preds = %463, %427
  %433 = load i64, ptr %20, align 8, !tbaa !9
  %434 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %435 = load i64, ptr %434, align 8, !tbaa !11
  %436 = icmp slt i64 %433, %435
  br i1 %436, label %438, label %437

437:                                              ; preds = %432
  store i32 23, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %466

438:                                              ; preds = %432
  %439 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %440 = load i64, ptr %439, align 8, !tbaa !14
  %441 = load double, ptr %19, align 8, !tbaa !33
  %442 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 5
  %443 = load ptr, ptr %442, align 8, !tbaa !17
  %444 = load i64, ptr %20, align 8, !tbaa !9
  %445 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %446 = load i64, ptr %445, align 8, !tbaa !14
  %447 = mul nsw i64 %444, %446
  %448 = getelementptr inbounds %struct.NuclideGridPoint, ptr %443, i64 %447
  %449 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %450 = load i64, ptr %449, align 8, !tbaa !14
  %451 = sub nsw i64 %450, 1
  %452 = call i64 @grid_search_nuclide(i64 noundef %440, double noundef %441, ptr noundef %448, i64 noundef 0, i64 noundef %451)
  %453 = trunc i64 %452 to i32
  %454 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %455 = load ptr, ptr %454, align 8, !tbaa !35
  %456 = load i64, ptr %18, align 8, !tbaa !9
  %457 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %458 = load i64, ptr %457, align 8, !tbaa !11
  %459 = mul nsw i64 %456, %458
  %460 = load i64, ptr %20, align 8, !tbaa !9
  %461 = add nsw i64 %459, %460
  %462 = getelementptr inbounds i32, ptr %455, i64 %461
  store i32 %453, ptr %462, align 4, !tbaa !5
  br label %463

463:                                              ; preds = %438
  %464 = load i64, ptr %20, align 8, !tbaa !9
  %465 = add nsw i64 %464, 1
  store i64 %465, ptr %20, align 8, !tbaa !9
  br label %432, !llvm.loop !41

466:                                              ; preds = %437
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %467

467:                                              ; preds = %466
  %468 = load i64, ptr %18, align 8, !tbaa !9
  %469 = add nsw i64 %468, 1
  store i64 %469, ptr %18, align 8, !tbaa !9
  br label %420, !llvm.loop !42

470:                                              ; preds = %426
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %471

471:                                              ; preds = %470, %379
  %472 = load i32, ptr %4, align 4, !tbaa !5
  %473 = icmp eq i32 %472, 0
  br i1 %473, label %474, label %476

474:                                              ; preds = %471
  %475 = call i32 (ptr, ...) @printf(ptr noundef @.str.103)
  br label %476

476:                                              ; preds = %474, %471
  %477 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %478 = load i64, ptr %477, align 8, !tbaa !11
  %479 = call ptr @load_num_nucs(i64 noundef %478)
  %480 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 0
  store ptr %479, ptr %480, align 8, !tbaa !43
  %481 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 6
  store i32 12, ptr %481, align 8, !tbaa !44
  %482 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 0
  %483 = load ptr, ptr %482, align 8, !tbaa !43
  %484 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %485 = load i64, ptr %484, align 8, !tbaa !11
  %486 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 12
  %487 = call ptr @load_mats(ptr noundef %483, i64 noundef %485, ptr noundef %486)
  %488 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 2
  store ptr %487, ptr %488, align 8, !tbaa !45
  %489 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 6
  %490 = load i32, ptr %489, align 8, !tbaa !44
  %491 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 12
  %492 = load i32, ptr %491, align 8, !tbaa !46
  %493 = mul nsw i32 %490, %492
  %494 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 8
  store i32 %493, ptr %494, align 8, !tbaa !47
  %495 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 0
  %496 = load ptr, ptr %495, align 8, !tbaa !43
  %497 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 12
  %498 = load i32, ptr %497, align 8, !tbaa !46
  %499 = call ptr @load_concs(ptr noundef %496, i32 noundef %498)
  %500 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 1
  store ptr %499, ptr %500, align 8, !tbaa !48
  %501 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 8
  %502 = load i32, ptr %501, align 8, !tbaa !47
  %503 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 7
  store i32 %502, ptr %503, align 4, !tbaa !49
  %504 = load i32, ptr %4, align 4, !tbaa !5
  %505 = icmp eq i32 %504, 0
  br i1 %505, label %506, label %512

506:                                              ; preds = %476
  %507 = load i64, ptr %5, align 8, !tbaa !9
  %508 = uitofp i64 %507 to double
  %509 = fdiv double %508, 1.024000e+03
  %510 = fdiv double %509, 1.024000e+03
  %511 = call i32 (ptr, ...) @printf(ptr noundef @.str.104, double noundef %510)
  br label %512

512:                                              ; preds = %506, %476
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void
}

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local double @LCG_random_double(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @grid_search_nuclide(i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef) #1

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

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #5

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

declare ptr @load_num_nucs(i64 noundef) #2

declare ptr @load_mats(ptr noundef, i64 noundef, ptr noundef) #2

declare ptr @load_concs(ptr noundef, i32 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 = { nounwind allocsize(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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0,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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { noreturn nounwind }
attributes #10 = { nounwind allocsize(0,1) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !13, i64 32, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !10, i64 16}
!15 = !{!16, !6, i64 68}
!16 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !13, i64 80, !6, i64 88, !13, i64 96, !6, i64 104}
!17 = !{!16, !13, i64 40}
!18 = !{!19, !20, i64 0}
!19 = !{!"", !20, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !20, i64 32, !20, i64 40}
!20 = !{!"double", !7, i64 0}
!21 = !{!19, !20, i64 8}
!22 = !{!19, !20, i64 16}
!23 = !{!19, !20, i64 24}
!24 = !{!19, !20, i64 32}
!25 = !{!19, !20, i64 40}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = !{!12, !6, i64 40}
!30 = !{!16, !6, i64 60}
!31 = !{!16, !6, i64 64}
!32 = !{!16, !13, i64 24}
!33 = !{!20, !20, i64 0}
!34 = distinct !{!34, !27}
!35 = !{!16, !13, i64 32}
!36 = !{!13, !13, i64 0}
!37 = distinct !{!37, !27}
!38 = distinct !{!38, !27}
!39 = distinct !{!39, !27}
!40 = !{!12, !6, i64 44}
!41 = distinct !{!41, !27}
!42 = distinct !{!42, !27}
!43 = !{!16, !13, i64 0}
!44 = !{!16, !6, i64 48}
!45 = !{!16, !13, i64 16}
!46 = !{!16, !6, i64 72}
!47 = !{!16, !6, i64 56}
!48 = !{!16, !13, i64 8}
!49 = !{!16, !6, i64 52}


; 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.SimulationData = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, ptr, i32, ptr, i32 }
%struct.Inputs = type { i32, i64, i64, i32, ptr, i32, i32, i32, i32, i32, i32 }
%struct.NuclideGridPoint = type { double, double, double, double, double, double }

@.str.83 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__.grid_init_do_not_profile = external hidden unnamed_addr constant [53 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [53 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 @grid_init_do_not_profile(ptr dead_on_unwind noalias writable sret(%struct.SimulationData) align 8 %0, ptr nocapture noundef readonly byval(%struct.Inputs) align 8 %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  store i64 42, ptr %4, align 8, !tbaa !5
  %5 = icmp eq i32 %2, 0
  br i1 %5, label %6, label %8

6:                                                ; preds = %3
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.95)
  br label %8

8:                                                ; preds = %6, %3
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = load i64, ptr %11, align 8, !tbaa !13
  %13 = mul nsw i64 %12, %10
  %14 = trunc i64 %13 to i32
  %15 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %14, ptr %15, align 4, !tbaa !14
  %sext = shl i64 %13, 32
  %16 = ashr exact i64 %sext, 32
  %17 = mul nsw i64 %16, 48
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #10
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %18, ptr %19, align 8, !tbaa !16
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %20, label %21

20:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.96, ptr noundef nonnull @.str.83, i32 noundef 1485, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

21:                                               ; preds = %8
  %22 = icmp sgt i32 %14, 0
  br i1 %22, label %.lr.ph.preheader, label %.preheader96

.lr.ph.preheader:                                 ; preds = %21
  %23 = and i64 %13, 2147483647
  br label %.lr.ph

.preheader96:                                     ; preds = %.lr.ph, %21
  %24 = icmp sgt i64 %10, 0
  br i1 %24, label %.lr.ph99, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %25 = call double @LCG_random_double(ptr noundef nonnull %4)
  %26 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv
  store double %25, ptr %26, align 8, !tbaa !17
  %27 = call double @LCG_random_double(ptr noundef nonnull %4)
  %28 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv, i32 1
  store double %27, ptr %28, align 8, !tbaa !20
  %29 = call double @LCG_random_double(ptr noundef nonnull %4)
  %30 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv, i32 2
  store double %29, ptr %30, align 8, !tbaa !21
  %31 = call double @LCG_random_double(ptr noundef nonnull %4)
  %32 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv, i32 3
  store double %31, ptr %32, align 8, !tbaa !22
  %33 = call double @LCG_random_double(ptr noundef nonnull %4)
  %34 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv, i32 4
  store double %33, ptr %34, align 8, !tbaa !23
  %35 = call double @LCG_random_double(ptr noundef nonnull %4)
  %36 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv, i32 5
  store double %35, ptr %36, align 8, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = icmp ult i64 %indvars.iv.next, %23
  br i1 %37, label %.lr.ph, label %.preheader96, !llvm.loop !25

._crit_edge:                                      ; preds = %.lr.ph99, %.preheader96
  %38 = getelementptr inbounds i8, ptr %1, i64 40
  %39 = load i32, ptr %38, align 8, !tbaa !27
  switch i32 %39, label %142 [
    i32 1, label %.thread92
    i32 0, label %44
  ]

.lr.ph99:                                         ; preds = %.preheader96, %.lr.ph99
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.lr.ph99 ], [ 0, %.preheader96 ]
  %40 = mul nsw i64 %indvars.iv123, %12
  %41 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %40
  call void @qsort(ptr noundef nonnull %41, i64 noundef %12, i64 noundef 48, ptr noundef nonnull @NGP_compare) #9
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next124, %10
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph99, !llvm.loop !28

.thread92:                                        ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 0, ptr %42, align 4, !tbaa !29
  %43 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 0, ptr %43, align 8, !tbaa !30
  br label %.loopexit

44:                                               ; preds = %._crit_edge
  br i1 %5, label %45, label %47

45:                                               ; preds = %44
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.97)
  br label %47

47:                                               ; preds = %45, %44
  %48 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %14, ptr %48, align 4, !tbaa !29
  %49 = ashr exact i64 %sext, 29
  %50 = call noalias ptr @malloc(i64 noundef %49) #10
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %50, ptr %51, align 8, !tbaa !31
  %.not87 = icmp eq ptr %50, null
  br i1 %.not87, label %52, label %53

52:                                               ; preds = %47
  call void @__assert_fail(ptr noundef nonnull @.str.98, ptr noundef nonnull @.str.83, i32 noundef 1529, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

53:                                               ; preds = %47
  %54 = add nsw i64 %17, %49
  br i1 %22, label %.lr.ph102, label %._crit_edge103

.lr.ph102:                                        ; preds = %53
  %wide.trip.count = and i64 %13, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %vector.body, %.lr.ph102
  %indvars.iv126.ph = phi i64 [ 0, %.lr.ph102 ], [ %n.vec, %vector.body ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph102
  %n.mod.vf = and i64 %13, 3
  %55 = icmp eq i64 %n.mod.vf, 0
  %56 = select i1 %55, i64 4, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count, %56
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %57 = or disjoint i64 %index, 1
  %58 = or disjoint i64 %index, 2
  %59 = or disjoint i64 %index, 3
  %60 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %index
  %61 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %57
  %62 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %58
  %63 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %59
  %64 = load double, ptr %60, align 8, !tbaa !17
  %65 = load double, ptr %61, align 8, !tbaa !17
  %66 = insertelement <2 x double> poison, double %64, i64 0
  %67 = insertelement <2 x double> %66, double %65, i64 1
  %68 = load double, ptr %62, align 8, !tbaa !17
  %69 = load double, ptr %63, align 8, !tbaa !17
  %70 = insertelement <2 x double> poison, double %68, i64 0
  %71 = insertelement <2 x double> %70, double %69, i64 1
  %72 = getelementptr inbounds double, ptr %50, i64 %index
  %73 = getelementptr inbounds i8, ptr %72, i64 16
  store <2 x double> %67, ptr %72, align 8, !tbaa !32
  store <2 x double> %71, ptr %73, align 8, !tbaa !32
  %index.next = add nuw i64 %index, 4
  %74 = icmp eq i64 %index.next, %n.vec
  br i1 %74, label %scalar.ph.preheader, label %vector.body, !llvm.loop !33

._crit_edge103:                                   ; preds = %scalar.ph, %53
  call void @qsort(ptr noundef nonnull %50, i64 noundef %16, i64 noundef 8, ptr noundef nonnull @double_compare) #9
  %75 = trunc i64 %10 to i32
  %76 = mul i32 %14, %75
  %77 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %76, ptr %77, align 8, !tbaa !30
  %78 = sext i32 %76 to i64
  %79 = shl nsw i64 %78, 2
  %80 = call noalias ptr @malloc(i64 noundef %79) #10
  %81 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %80, ptr %81, align 8, !tbaa !36
  %.not88 = icmp eq ptr %80, null
  br i1 %.not88, label %85, label %86

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %scalar.ph ], [ %indvars.iv126.ph, %scalar.ph.preheader ]
  %82 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv126
  %83 = load double, ptr %82, align 8, !tbaa !17
  %84 = getelementptr inbounds double, ptr %50, i64 %indvars.iv126
  store double %83, ptr %84, align 8, !tbaa !32
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %exitcond129.not = icmp eq i64 %indvars.iv.next127, %wide.trip.count
  br i1 %exitcond129.not, label %._crit_edge103, label %scalar.ph, !llvm.loop !37

85:                                               ; preds = %._crit_edge103
  call void @__assert_fail(ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.83, i32 noundef 1542, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

86:                                               ; preds = %._crit_edge103
  %87 = add nsw i64 %54, %79
  %88 = call noalias ptr @calloc(i64 noundef %10, i64 noundef 4) #12
  %.not89 = icmp eq ptr %88, null
  br i1 %.not89, label %89, label %90

89:                                               ; preds = %86
  call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.83, i32 noundef 1547, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

90:                                               ; preds = %86
  %91 = shl i64 %10, 3
  %92 = call noalias ptr @malloc(i64 noundef %91) #10
  %.not90 = icmp eq ptr %92, null
  br i1 %.not90, label %94, label %.preheader95

.preheader95:                                     ; preds = %90
  br i1 %24, label %.lr.ph105, label %._crit_edge112

.lr.ph105:                                        ; preds = %.preheader95
  %invariant.gep = getelementptr i8, ptr %18, i64 48
  %xtraiter = and i64 %10, 3
  %93 = icmp ult i64 %10, 4
  br i1 %93, label %.preheader.unr-lcssa, label %.lr.ph105.new

.lr.ph105.new:                                    ; preds = %.lr.ph105
  %unroll_iter = and i64 %10, 9223372036854775804
  br label %129

94:                                               ; preds = %90
  call void @__assert_fail(ptr noundef nonnull @.str.101, ptr noundef nonnull @.str.83, i32 noundef 1549, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

.preheader.unr-lcssa:                             ; preds = %129, %.lr.ph105
  %indvars.iv130.unr = phi i64 [ 0, %.lr.ph105 ], [ %indvars.iv.next131.3, %129 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.unr-lcssa, %.epil.preheader
  %indvars.iv130.epil = phi i64 [ %indvars.iv.next131.epil, %.epil.preheader ], [ %indvars.iv130.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader.unr-lcssa ]
  %95 = mul nsw i64 %indvars.iv130.epil, %12
  %gep.epil = getelementptr %struct.NuclideGridPoint, ptr %invariant.gep, i64 %95
  %96 = load double, ptr %gep.epil, align 8, !tbaa !17
  %97 = getelementptr inbounds double, ptr %92, i64 %indvars.iv130.epil
  store double %96, ptr %97, align 8, !tbaa !32
  %indvars.iv.next131.epil = add nuw nsw i64 %indvars.iv130.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 %.preheader, label %.epil.preheader, !llvm.loop !38

.preheader:                                       ; preds = %.epil.preheader, %.preheader.unr-lcssa
  %sext138 = shl i64 %13, 32
  %98 = ashr exact i64 %sext138, 32
  br i1 %22, label %.lr.ph111, label %._crit_edge112

.lr.ph111:                                        ; preds = %.preheader
  %99 = add nsw i64 %12, -2
  br i1 %24, label %.lr.ph108.us, label %._crit_edge112

.lr.ph108.us:                                     ; preds = %.lr.ph111, %._crit_edge109.us
  %.077110.us = phi i64 [ %128, %._crit_edge109.us ], [ 0, %.lr.ph111 ]
  %100 = getelementptr inbounds double, ptr %50, i64 %.077110.us
  %101 = load double, ptr %100, align 8, !tbaa !32
  %102 = mul nuw nsw i64 %.077110.us, %10
  %103 = getelementptr i32, ptr %80, i64 %102
  br label %104

104:                                              ; preds = %.lr.ph108.us, %126
  %.075106.us = phi i64 [ 0, %.lr.ph108.us ], [ %127, %126 ]
  %105 = getelementptr inbounds double, ptr %92, i64 %.075106.us
  %106 = load double, ptr %105, align 8, !tbaa !32
  %107 = fcmp olt double %101, %106
  %108 = getelementptr inbounds i32, ptr %88, i64 %.075106.us
  %109 = load i32, ptr %108, align 4, !tbaa !40
  br i1 %107, label %124, label %110

110:                                              ; preds = %104
  %111 = sext i32 %109 to i64
  %112 = icmp eq i64 %99, %111
  br i1 %112, label %122, label %113

113:                                              ; preds = %110
  %114 = add nsw i32 %109, 1
  store i32 %114, ptr %108, align 4, !tbaa !40
  %115 = getelementptr i32, ptr %103, i64 %.075106.us
  store i32 %114, ptr %115, align 4, !tbaa !40
  %116 = mul nsw i64 %.075106.us, %12
  %117 = sext i32 %114 to i64
  %118 = getelementptr %struct.NuclideGridPoint, ptr %18, i64 %116
  %119 = getelementptr %struct.NuclideGridPoint, ptr %118, i64 %117
  %120 = getelementptr i8, ptr %119, i64 48
  %121 = load double, ptr %120, align 8, !tbaa !17
  store double %121, ptr %105, align 8, !tbaa !32
  br label %126

122:                                              ; preds = %110
  %123 = getelementptr i32, ptr %103, i64 %.075106.us
  store i32 %109, ptr %123, align 4, !tbaa !40
  br label %126

124:                                              ; preds = %104
  %125 = getelementptr i32, ptr %103, i64 %.075106.us
  store i32 %109, ptr %125, align 4, !tbaa !40
  br label %126

126:                                              ; preds = %124, %122, %113
  %127 = add nuw nsw i64 %.075106.us, 1
  %exitcond134.not = icmp eq i64 %127, %10
  br i1 %exitcond134.not, label %._crit_edge109.us, label %104, !llvm.loop !41

._crit_edge109.us:                                ; preds = %126
  %128 = add nuw nsw i64 %.077110.us, 1
  %exitcond135.not = icmp eq i64 %128, %98
  br i1 %exitcond135.not, label %._crit_edge112, label %.lr.ph108.us, !llvm.loop !42

129:                                              ; preds = %129, %.lr.ph105.new
  %indvars.iv130 = phi i64 [ 0, %.lr.ph105.new ], [ %indvars.iv.next131.3, %129 ]
  %niter = phi i64 [ 0, %.lr.ph105.new ], [ %niter.next.3, %129 ]
  %130 = mul nsw i64 %indvars.iv130, %12
  %gep = getelementptr %struct.NuclideGridPoint, ptr %invariant.gep, i64 %130
  %131 = load double, ptr %gep, align 8, !tbaa !17
  %132 = getelementptr inbounds double, ptr %92, i64 %indvars.iv130
  store double %131, ptr %132, align 8, !tbaa !32
  %indvars.iv.next131 = or disjoint i64 %indvars.iv130, 1
  %133 = mul nsw i64 %indvars.iv.next131, %12
  %gep.1 = getelementptr %struct.NuclideGridPoint, ptr %invariant.gep, i64 %133
  %134 = load double, ptr %gep.1, align 8, !tbaa !17
  %135 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next131
  store double %134, ptr %135, align 8, !tbaa !32
  %indvars.iv.next131.1 = or disjoint i64 %indvars.iv130, 2
  %136 = mul nsw i64 %indvars.iv.next131.1, %12
  %gep.2 = getelementptr %struct.NuclideGridPoint, ptr %invariant.gep, i64 %136
  %137 = load double, ptr %gep.2, align 8, !tbaa !17
  %138 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next131.1
  store double %137, ptr %138, align 8, !tbaa !32
  %indvars.iv.next131.2 = or disjoint i64 %indvars.iv130, 3
  %139 = mul nsw i64 %indvars.iv.next131.2, %12
  %gep.3 = getelementptr %struct.NuclideGridPoint, ptr %invariant.gep, i64 %139
  %140 = load double, ptr %gep.3, align 8, !tbaa !17
  %141 = getelementptr inbounds double, ptr %92, i64 %indvars.iv.next131.2
  store double %140, ptr %141, align 8, !tbaa !32
  %indvars.iv.next131.3 = add nuw nsw i64 %indvars.iv130, 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 %.preheader.unr-lcssa, label %129, !llvm.loop !43

._crit_edge112:                                   ; preds = %._crit_edge109.us, %.preheader95, %.lr.ph111, %.preheader
  call void @free(ptr noundef %88) #9
  call void @free(ptr noundef nonnull %92) #9
  br label %142

142:                                              ; preds = %._crit_edge, %._crit_edge112
  %.072 = phi i64 [ %87, %._crit_edge112 ], [ %17, %._crit_edge ]
  %143 = icmp eq i32 %39, 2
  br i1 %143, label %144, label %.loopexit

144:                                              ; preds = %142
  br i1 %5, label %145, label %147

145:                                              ; preds = %144
  %146 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.102)
  br label %147

147:                                              ; preds = %145, %144
  %148 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 0, ptr %148, align 4, !tbaa !29
  %149 = getelementptr inbounds i8, ptr %1, i64 44
  %150 = load i32, ptr %149, align 4, !tbaa !44
  %151 = trunc i64 %10 to i32
  %152 = mul i32 %150, %151
  %153 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %152, ptr %153, align 8, !tbaa !30
  %154 = sext i32 %152 to i64
  %155 = shl nsw i64 %154, 2
  %156 = call noalias ptr @malloc(i64 noundef %155) #10
  %157 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %156, ptr %157, align 8, !tbaa !36
  %.not91 = icmp eq ptr %156, null
  br i1 %.not91, label %158, label %159

158:                                              ; preds = %147
  call void @__assert_fail(ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.83, i32 noundef 1582, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

159:                                              ; preds = %147
  %160 = add nsw i64 %155, %.072
  %161 = sitofp i32 %150 to double
  %162 = fdiv double 1.000000e+00, %161
  %163 = sext i32 %150 to i64
  %164 = icmp sgt i32 %150, 0
  br i1 %164, label %.lr.ph119, label %.loopexit

.lr.ph119:                                        ; preds = %159
  %165 = add nsw i64 %12, -1
  br i1 %24, label %.lr.ph115.us, label %.loopexit

.lr.ph115.us:                                     ; preds = %.lr.ph119, %._crit_edge116.us
  %.073117.us = phi i64 [ %177, %._crit_edge116.us ], [ 0, %.lr.ph119 ]
  %166 = uitofp nneg i64 %.073117.us to double
  %167 = fmul double %162, %166
  %168 = mul nuw nsw i64 %.073117.us, %10
  %169 = getelementptr i32, ptr %156, i64 %168
  br label %170

170:                                              ; preds = %.lr.ph115.us, %170
  %.0113.us = phi i64 [ 0, %.lr.ph115.us ], [ %176, %170 ]
  %171 = mul nsw i64 %.0113.us, %12
  %172 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %171
  %173 = call i64 @grid_search_nuclide(i64 noundef %12, double noundef %167, ptr noundef nonnull %172, i64 noundef 0, i64 noundef %165)
  %174 = trunc i64 %173 to i32
  %175 = getelementptr i32, ptr %169, i64 %.0113.us
  store i32 %174, ptr %175, align 4, !tbaa !40
  %176 = add nuw nsw i64 %.0113.us, 1
  %exitcond136.not = icmp eq i64 %176, %10
  br i1 %exitcond136.not, label %._crit_edge116.us, label %170, !llvm.loop !45

._crit_edge116.us:                                ; preds = %170
  %177 = add nuw nsw i64 %.073117.us, 1
  %exitcond137.not = icmp eq i64 %177, %163
  br i1 %exitcond137.not, label %.loopexit, label %.lr.ph115.us, !llvm.loop !46

.loopexit:                                        ; preds = %._crit_edge116.us, %.lr.ph119, %159, %.thread92, %142
  %.1 = phi i64 [ %.072, %142 ], [ %17, %.thread92 ], [ %160, %159 ], [ %160, %.lr.ph119 ], [ %160, %._crit_edge116.us ]
  br i1 %5, label %178, label %180

178:                                              ; preds = %.loopexit
  %179 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.103)
  br label %180

180:                                              ; preds = %178, %.loopexit
  %181 = call ptr @load_num_nucs(i64 noundef %10) #9
  store ptr %181, ptr %0, align 8, !tbaa !47
  %182 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 12, ptr %182, align 8, !tbaa !48
  %183 = getelementptr inbounds i8, ptr %0, i64 72
  %184 = call ptr @load_mats(ptr noundef %181, i64 noundef %10, ptr noundef nonnull %183) #9
  %185 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %184, ptr %185, align 8, !tbaa !49
  %186 = load i32, ptr %182, align 8, !tbaa !48
  %187 = load i32, ptr %183, align 8, !tbaa !50
  %188 = mul nsw i32 %187, %186
  %189 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %188, ptr %189, align 8, !tbaa !51
  %190 = load ptr, ptr %0, align 8, !tbaa !47
  %191 = call ptr @load_concs(ptr noundef %190, i32 noundef %187) #9
  %192 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %191, ptr %192, align 8, !tbaa !52
  %193 = load i32, ptr %189, align 8, !tbaa !51
  %194 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %193, ptr %194, align 4, !tbaa !53
  br i1 %5, label %195, label %200

195:                                              ; preds = %180
  %196 = uitofp i64 %.1 to double
  %197 = fmul double %196, 0x3F50000000000000
  %198 = fmul double %197, 0x3F50000000000000
  %199 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.104, double noundef %198)
  br label %200

200:                                              ; preds = %195, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  ret void
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local double @LCG_random_double(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @grid_search_nuclide(i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5

declare i32 @NGP_compare(ptr noundef, ptr noundef) #6

declare i32 @double_compare(ptr noundef, ptr noundef) #6

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7

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

declare ptr @load_num_nucs(i64 noundef) local_unnamed_addr #6

declare ptr @load_mats(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

declare ptr @load_concs(ptr noundef, i32 noundef) local_unnamed_addr #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 = { 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree "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 = { "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 #7 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind allocsize(0,1) }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60}
!11 = !{!"int", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!10, !6, i64 16}
!14 = !{!15, !11, i64 68}
!15 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !12, i64 80, !11, i64 88, !12, i64 96, !11, i64 104}
!16 = !{!15, !12, i64 40}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40}
!19 = !{!"double", !7, i64 0}
!20 = !{!18, !19, i64 8}
!21 = !{!18, !19, i64 16}
!22 = !{!18, !19, i64 24}
!23 = !{!18, !19, i64 32}
!24 = !{!18, !19, i64 40}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !11, i64 40}
!28 = distinct !{!28, !26}
!29 = !{!15, !11, i64 60}
!30 = !{!15, !11, i64 64}
!31 = !{!15, !12, i64 24}
!32 = !{!19, !19, i64 0}
!33 = distinct !{!33, !26, !34, !35}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = !{!"llvm.loop.unroll.runtime.disable"}
!36 = !{!15, !12, i64 32}
!37 = distinct !{!37, !26, !35, !34}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.unroll.disable"}
!40 = !{!11, !11, i64 0}
!41 = distinct !{!41, !26}
!42 = distinct !{!42, !26}
!43 = distinct !{!43, !26}
!44 = !{!10, !11, i64 44}
!45 = distinct !{!45, !26}
!46 = distinct !{!46, !26}
!47 = !{!15, !12, i64 0}
!48 = !{!15, !11, i64 48}
!49 = !{!15, !12, i64 16}
!50 = !{!15, !11, i64 72}
!51 = !{!15, !11, i64 56}
!52 = !{!15, !12, i64 8}
!53 = !{!15, !11, i64 52}


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