; LLVM IR from ANL-CESAR/XSBench :: openmp-threading (GridInit)

; 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, i64, 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 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.grid_init_do_not_profile = external hidden unnamed_addr constant [53 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [53 x i8], align 1

; 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) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca double, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, 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)
  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 8, !tbaa !15
  %33 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 11
  %34 = load i32, ptr %33, align 8, !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.1, ptr noundef @.str.2, i32 noundef 37, 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 8, !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 %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %100, %44
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 11
  %54 = load i32, ptr %53, align 8, !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 %8) #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 %8, 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 %8, 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 %8, 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 %8, 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 %8, 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 %8, 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 %8, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !5
  br label %51, !llvm.loop !26

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

104:                                              ; preds = %122, %103
  %105 = load i32, ptr %9, 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 %9) #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 %9, 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 %9, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %9, 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 i64 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 %376

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.3)
  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.4, ptr noundef @.str.2, i32 noundef 81, 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 %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %186, %160
  %168 = load i32, ptr %10, 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 %10) #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 %10, 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 %10, 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 %10, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %10, 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 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  store i64 %200, ptr %201, align 8, !tbaa !31
  %202 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 10
  %203 = load i64, ptr %202, align 8, !tbaa !31
  %204 = mul i64 %203, 4
  %205 = call noalias ptr @malloc(i64 noundef %204) #8
  %206 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  store ptr %205, ptr %206, align 8, !tbaa !35
  %207 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !35
  %209 = icmp ne ptr %208, null
  br i1 %209, label %210, label %211

210:                                              ; preds = %189
  br label %212

211:                                              ; preds = %189
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 94, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

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

223:                                              ; preds = %212
  br label %225

224:                                              ; preds = %212
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 99, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

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

232:                                              ; preds = %225
  br label %234

233:                                              ; preds = %225
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 101, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

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

235:                                              ; preds = %258, %234
  %236 = load i32, ptr %13, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %239 = load i64, ptr %238, align 8, !tbaa !11
  %240 = icmp slt i64 %237, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %261

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

258:                                              ; preds = %242
  %259 = load i32, ptr %13, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %13, align 4, !tbaa !5
  br label %235, !llvm.loop !37

261:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %262

262:                                              ; preds = %370, %261
  %263 = load i64, ptr %14, align 8, !tbaa !9
  %264 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 9
  %265 = load i32, ptr %264, align 4, !tbaa !30
  %266 = sext i32 %265 to i64
  %267 = icmp slt i64 %263, %266
  br i1 %267, label %269, label %268

268:                                              ; preds = %262
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %373

269:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %270 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 3
  %271 = load ptr, ptr %270, align 8, !tbaa !32
  %272 = load i64, ptr %14, align 8, !tbaa !9
  %273 = getelementptr inbounds double, ptr %271, i64 %272
  %274 = load double, ptr %273, align 8, !tbaa !33
  store double %274, ptr %16, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %275

275:                                              ; preds = %366, %269
  %276 = load i64, ptr %17, align 8, !tbaa !9
  %277 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %278 = load i64, ptr %277, align 8, !tbaa !11
  %279 = icmp slt i64 %276, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %275
  store i32 17, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %369

281:                                              ; preds = %275
  %282 = load double, ptr %16, align 8, !tbaa !33
  %283 = load ptr, ptr %12, align 8, !tbaa !36
  %284 = load i64, ptr %17, align 8, !tbaa !9
  %285 = getelementptr inbounds double, ptr %283, i64 %284
  %286 = load double, ptr %285, align 8, !tbaa !33
  %287 = fcmp olt double %282, %286
  br i1 %287, label %288, label %302

288:                                              ; preds = %281
  %289 = load ptr, ptr %11, align 8, !tbaa !36
  %290 = load i64, ptr %17, align 8, !tbaa !9
  %291 = getelementptr inbounds i32, ptr %289, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %294 = load ptr, ptr %293, align 8, !tbaa !35
  %295 = load i64, ptr %14, align 8, !tbaa !9
  %296 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %297 = load i64, ptr %296, align 8, !tbaa !11
  %298 = mul nsw i64 %295, %297
  %299 = load i64, ptr %17, align 8, !tbaa !9
  %300 = add nsw i64 %298, %299
  %301 = getelementptr inbounds i32, ptr %294, i64 %300
  store i32 %292, ptr %301, align 4, !tbaa !5
  br label %365

302:                                              ; preds = %281
  %303 = load ptr, ptr %11, align 8, !tbaa !36
  %304 = load i64, ptr %17, align 8, !tbaa !9
  %305 = getelementptr inbounds i32, ptr %303, i64 %304
  %306 = load i32, ptr %305, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 2
  %309 = load i64, ptr %308, align 8, !tbaa !14
  %310 = sub nsw i64 %309, 2
  %311 = icmp eq i64 %307, %310
  br i1 %311, label %312, label %326

312:                                              ; preds = %302
  %313 = load ptr, ptr %11, align 8, !tbaa !36
  %314 = load i64, ptr %17, align 8, !tbaa !9
  %315 = getelementptr inbounds i32, ptr %313, i64 %314
  %316 = load i32, ptr %315, align 4, !tbaa !5
  %317 = getelementptr inbounds %struct.SimulationData, ptr %0, i32 0, i32 4
  %318 = load ptr, ptr %317, align 8, !tbaa !35
  %319 = load i64, ptr %14, align 8, !tbaa !9
  %320 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %321 = load i64, ptr %320, align 8, !tbaa !11
  %322 = mul nsw i64 %319, %321
  %323 = load i64, ptr %17, align 8, !tbaa !9
  %324 = add nsw i64 %322, %323
  %325 = getelementptr inbounds i32, ptr %318, i64 %324
  store i32 %316, ptr %325, align 4, !tbaa !5
  br label %364

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

364:                                              ; preds = %326, %312
  br label %365

365:                                              ; preds = %364, %288
  br label %366

366:                                              ; preds = %365
  %367 = load i64, ptr %17, align 8, !tbaa !9
  %368 = add nsw i64 %367, 1
  store i64 %368, ptr %17, align 8, !tbaa !9
  br label %275, !llvm.loop !38

369:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %370

370:                                              ; preds = %369
  %371 = load i64, ptr %14, align 8, !tbaa !9
  %372 = add nsw i64 %371, 1
  store i64 %372, ptr %14, align 8, !tbaa !9
  br label %262, !llvm.loop !39

373:                                              ; preds = %268
  %374 = load ptr, ptr %11, align 8, !tbaa !36
  call void @free(ptr noundef %374) #7
  %375 = load ptr, ptr %12, align 8, !tbaa !36
  call void @free(ptr noundef %375) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %376

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

380:                                              ; preds = %376
  %381 = load i32, ptr %4, align 4, !tbaa !5
  %382 = icmp eq i32 %381, 0
  br i1 %382, label %383, label %385

383:                                              ; preds = %380
  %384 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %385

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

402:                                              ; preds = %385
  br label %404

403:                                              ; preds = %385
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 134, ptr noundef @__PRETTY_FUNCTION__.grid_init_do_not_profile) #9
  unreachable

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

414:                                              ; preds = %460, %404
  %415 = load i64, ptr %7, align 8, !tbaa !9
  %416 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 6
  %417 = load i32, ptr %416, align 4, !tbaa !40
  %418 = sext i32 %417 to i64
  %419 = icmp slt i64 %415, %418
  br i1 %419, label %420, label %463

420:                                              ; preds = %414
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %421 = load i64, ptr %7, align 8, !tbaa !9
  %422 = sitofp i64 %421 to double
  %423 = load double, ptr %18, align 8, !tbaa !33
  %424 = fmul double %422, %423
  store double %424, 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 %425

425:                                              ; preds = %456, %420
  %426 = load i64, ptr %20, align 8, !tbaa !9
  %427 = getelementptr inbounds %struct.Inputs, ptr %1, i32 0, i32 1
  %428 = load i64, ptr %427, align 8, !tbaa !11
  %429 = icmp slt i64 %426, %428
  br i1 %429, label %431, label %430

430:                                              ; preds = %425
  store i32 23, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %459

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

456:                                              ; preds = %431
  %457 = load i64, ptr %20, align 8, !tbaa !9
  %458 = add nsw i64 %457, 1
  store i64 %458, ptr %20, align 8, !tbaa !9
  br label %425, !llvm.loop !41

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

460:                                              ; preds = %459
  %461 = load i64, ptr %7, align 8, !tbaa !9
  %462 = add nsw i64 %461, 1
  store i64 %462, ptr %7, align 8, !tbaa !9
  br label %414, !llvm.loop !42

463:                                              ; preds = %414
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %464

464:                                              ; preds = %463, %376
  %465 = load i32, ptr %4, align 4, !tbaa !5
  %466 = icmp eq i32 %465, 0
  br i1 %466, label %467, label %469

467:                                              ; preds = %464
  %468 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %469

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

499:                                              ; preds = %469
  %500 = load i64, ptr %5, align 8, !tbaa !9
  %501 = uitofp i64 %500 to double
  %502 = fdiv double %501, 1.024000e+03
  %503 = fdiv double %502, 1.024000e+03
  %504 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %503)
  br label %505

505:                                              ; preds = %499, %469
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void
}

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

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

declare double @LCG_random_double(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 i64 @grid_search_nuclide(i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef) #2

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 72}
!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, !10, i64 64, !6, i64 72, !6, i64 76, !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, !10, 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 76}
!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, i64, 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 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.grid_init_do_not_profile = external hidden unnamed_addr constant [53 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [53 x i8], align 1

; 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 #0 {
  %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)
  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 72
  store i32 %14, ptr %15, align 8, !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.1, ptr noundef nonnull @.str.2, i32 noundef 37, 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) #9
  %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) #9
  %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) #9
  %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) #9
  %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) #9
  %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) #9
  %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 %140 [
    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 i64 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.3)
  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.4, ptr noundef nonnull @.str.2, i32 noundef 81, 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
  %sext138 = shl i64 %13, 32
  %75 = ashr exact i64 %sext138, 32
  %76 = mul nsw i64 %10, %75
  %77 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 %76, ptr %77, align 8, !tbaa !30
  %78 = shl i64 %76, 2
  %79 = call noalias ptr @malloc(i64 noundef %78) #10
  %80 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %79, ptr %80, align 8, !tbaa !36
  %.not88 = icmp eq ptr %79, null
  br i1 %.not88, label %84, label %85

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %scalar.ph ], [ %indvars.iv126.ph, %scalar.ph.preheader ]
  %81 = getelementptr inbounds %struct.NuclideGridPoint, ptr %18, i64 %indvars.iv126
  %82 = load double, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds double, ptr %50, i64 %indvars.iv126
  store double %82, ptr %83, 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

84:                                               ; preds = %._crit_edge103
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, i32 noundef 94, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

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

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

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

.preheader95:                                     ; preds = %89
  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
  %92 = icmp ult i64 %10, 4
  br i1 %92, label %.preheader.unr-lcssa, label %.lr.ph105.new

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

93:                                               ; preds = %89
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 101, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

.preheader.unr-lcssa:                             ; preds = %127, %.lr.ph105
  %indvars.iv130.unr = phi i64 [ 0, %.lr.ph105 ], [ %indvars.iv.next131.3, %127 ]
  %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 ]
  %94 = mul nsw i64 %indvars.iv130.epil, %12
  %gep.epil = getelementptr %struct.NuclideGridPoint, ptr %invariant.gep, i64 %94
  %95 = load double, ptr %gep.epil, align 8, !tbaa !17
  %96 = getelementptr inbounds double, ptr %91, i64 %indvars.iv130.epil
  store double %95, ptr %96, 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
  br i1 %22, label %.lr.ph111, label %._crit_edge112

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

.lr.ph108.us:                                     ; preds = %.lr.ph111, %._crit_edge109.us
  %.076110.us = phi i64 [ %126, %._crit_edge109.us ], [ 0, %.lr.ph111 ]
  %98 = getelementptr inbounds double, ptr %50, i64 %.076110.us
  %99 = load double, ptr %98, align 8, !tbaa !32
  %100 = mul nuw nsw i64 %.076110.us, %10
  %101 = getelementptr i32, ptr %79, i64 %100
  br label %102

102:                                              ; preds = %.lr.ph108.us, %124
  %.074106.us = phi i64 [ 0, %.lr.ph108.us ], [ %125, %124 ]
  %103 = getelementptr inbounds double, ptr %91, i64 %.074106.us
  %104 = load double, ptr %103, align 8, !tbaa !32
  %105 = fcmp olt double %99, %104
  %106 = getelementptr inbounds i32, ptr %87, i64 %.074106.us
  %107 = load i32, ptr %106, align 4, !tbaa !40
  br i1 %105, label %122, label %108

108:                                              ; preds = %102
  %109 = sext i32 %107 to i64
  %110 = icmp eq i64 %97, %109
  br i1 %110, label %120, label %111

111:                                              ; preds = %108
  %112 = add nsw i32 %107, 1
  store i32 %112, ptr %106, align 4, !tbaa !40
  %113 = getelementptr i32, ptr %101, i64 %.074106.us
  store i32 %112, ptr %113, align 4, !tbaa !40
  %114 = mul nsw i64 %.074106.us, %12
  %115 = sext i32 %112 to i64
  %116 = getelementptr %struct.NuclideGridPoint, ptr %18, i64 %114
  %117 = getelementptr %struct.NuclideGridPoint, ptr %116, i64 %115
  %118 = getelementptr i8, ptr %117, i64 48
  %119 = load double, ptr %118, align 8, !tbaa !17
  store double %119, ptr %103, align 8, !tbaa !32
  br label %124

120:                                              ; preds = %108
  %121 = getelementptr i32, ptr %101, i64 %.074106.us
  store i32 %107, ptr %121, align 4, !tbaa !40
  br label %124

122:                                              ; preds = %102
  %123 = getelementptr i32, ptr %101, i64 %.074106.us
  store i32 %107, ptr %123, align 4, !tbaa !40
  br label %124

124:                                              ; preds = %122, %120, %111
  %125 = add nuw nsw i64 %.074106.us, 1
  %exitcond134.not = icmp eq i64 %125, %10
  br i1 %exitcond134.not, label %._crit_edge109.us, label %102, !llvm.loop !41

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

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

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

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

142:                                              ; preds = %140
  br i1 %5, label %143, label %145

143:                                              ; preds = %142
  %144 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %145

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

155:                                              ; preds = %145
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, i32 noundef 134, ptr noundef nonnull @__PRETTY_FUNCTION__.grid_init_do_not_profile) #11
  unreachable

156:                                              ; preds = %145
  %157 = add i64 %152, %.072
  %158 = sitofp i32 %148 to double
  %159 = fdiv double 1.000000e+00, %158
  %160 = icmp sgt i32 %148, 0
  br i1 %160, label %.lr.ph119, label %.loopexit

.lr.ph119:                                        ; preds = %156
  %161 = 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 [ %173, %._crit_edge116.us ], [ 0, %.lr.ph119 ]
  %162 = uitofp nneg i64 %.073117.us to double
  %163 = fmul double %159, %162
  %164 = mul nuw nsw i64 %.073117.us, %10
  %165 = getelementptr i32, ptr %153, i64 %164
  br label %166

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

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

.loopexit:                                        ; preds = %._crit_edge116.us, %.lr.ph119, %156, %.thread92, %140
  %.1 = phi i64 [ %.072, %140 ], [ %17, %.thread92 ], [ %157, %156 ], [ %157, %.lr.ph119 ], [ %157, %._crit_edge116.us ]
  br i1 %5, label %174, label %176

174:                                              ; preds = %.loopexit
  %175 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %176

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

191:                                              ; preds = %176
  %192 = uitofp i64 %.1 to double
  %193 = fmul double %192, 0x3F50000000000000
  %194 = fmul double %193, 0x3F50000000000000
  %195 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %194)
  br label %196

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

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

; 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

declare double @LCG_random_double(ptr noundef) local_unnamed_addr #5

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

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

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

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

; 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 i64 @grid_search_nuclide(i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #5

declare ptr @load_num_nucs(i64 noundef) local_unnamed_addr #5

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

declare ptr @load_concs(ptr noundef, i32 noundef) local_unnamed_addr #5

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