; LLVM IR from hpcg-benchmark/hpcg :: src/GenerateGeometry.ll (Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT)

; 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.Geometry_STRUCT = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i64, i64, i64, i64, i64, i64 }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT = external hidden unnamed_addr constant [134 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, ptr noundef %12) #0 {
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i32, align 4
  %39 = alloca i64, align 8
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  store i32 %0, ptr %14, align 4, !tbaa !5
  store i32 %1, ptr %15, align 4, !tbaa !5
  store i32 %2, ptr %16, align 4, !tbaa !5
  store i32 %3, ptr %17, align 4, !tbaa !5
  store i32 %4, ptr %18, align 4, !tbaa !5
  store i32 %5, ptr %19, align 4, !tbaa !5
  store i32 %6, ptr %20, align 4, !tbaa !5
  store i32 %7, ptr %21, align 4, !tbaa !5
  store i32 %8, ptr %22, align 4, !tbaa !5
  store i32 %9, ptr %23, align 4, !tbaa !5
  store i32 %10, ptr %24, align 4, !tbaa !5
  store i32 %11, ptr %25, align 4, !tbaa !5
  store ptr %12, ptr %26, align 8, !tbaa !9
  %45 = load i32, ptr %23, align 4, !tbaa !5
  %46 = load i32, ptr %24, align 4, !tbaa !5
  %47 = mul nsw i32 %45, %46
  %48 = load i32, ptr %25, align 4, !tbaa !5
  %49 = mul nsw i32 %47, %48
  %50 = icmp sle i32 %49, 0
  br i1 %50, label %59, label %51

51:                                               ; preds = %13
  %52 = load i32, ptr %23, align 4, !tbaa !5
  %53 = load i32, ptr %24, align 4, !tbaa !5
  %54 = mul nsw i32 %52, %53
  %55 = load i32, ptr %25, align 4, !tbaa !5
  %56 = mul nsw i32 %54, %55
  %57 = load i32, ptr %14, align 4, !tbaa !5
  %58 = icmp sgt i32 %56, %57
  br i1 %58, label %59, label %61

59:                                               ; preds = %51, %13
  %60 = load i32, ptr %14, align 4, !tbaa !5
  call void @_Z22ComputeOptimalShapeXYZiRiS_S_(i32 noundef %60, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
  br label %61

61:                                               ; preds = %59, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  store ptr null, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  store ptr null, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 0, ptr %29, align 4, !tbaa !5
  %62 = load i32, ptr %17, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %73

64:                                               ; preds = %61
  store i32 1, ptr %29, align 4, !tbaa !5
  %65 = call noalias noundef nonnull ptr @_Znam(i64 noundef 4) #6
  store ptr %65, ptr %27, align 8, !tbaa !9
  %66 = call noalias noundef nonnull ptr @_Znam(i64 noundef 4) #6
  store ptr %66, ptr %28, align 8, !tbaa !9
  %67 = load i32, ptr %25, align 4, !tbaa !5
  %68 = load ptr, ptr %27, align 8, !tbaa !9
  %69 = getelementptr inbounds i32, ptr %68, i64 0
  store i32 %67, ptr %69, align 4, !tbaa !5
  %70 = load i32, ptr %22, align 4, !tbaa !5
  %71 = load ptr, ptr %28, align 8, !tbaa !9
  %72 = getelementptr inbounds i32, ptr %71, i64 0
  store i32 %70, ptr %72, align 4, !tbaa !5
  br label %88

73:                                               ; preds = %61
  store i32 2, ptr %29, align 4, !tbaa !5
  %74 = call noalias noundef nonnull ptr @_Znam(i64 noundef 8) #6
  store ptr %74, ptr %27, align 8, !tbaa !9
  %75 = load i32, ptr %17, align 4, !tbaa !5
  %76 = load ptr, ptr %27, align 8, !tbaa !9
  %77 = getelementptr inbounds i32, ptr %76, i64 0
  store i32 %75, ptr %77, align 4, !tbaa !5
  %78 = load i32, ptr %25, align 4, !tbaa !5
  %79 = load ptr, ptr %27, align 8, !tbaa !9
  %80 = getelementptr inbounds i32, ptr %79, i64 1
  store i32 %78, ptr %80, align 4, !tbaa !5
  %81 = call noalias noundef nonnull ptr @_Znam(i64 noundef 8) #6
  store ptr %81, ptr %28, align 8, !tbaa !9
  %82 = load i32, ptr %18, align 4, !tbaa !5
  %83 = load ptr, ptr %28, align 8, !tbaa !9
  %84 = getelementptr inbounds i32, ptr %83, i64 0
  store i32 %82, ptr %84, align 4, !tbaa !5
  %85 = load i32, ptr %19, align 4, !tbaa !5
  %86 = load ptr, ptr %28, align 8, !tbaa !9
  %87 = getelementptr inbounds i32, ptr %86, i64 1
  store i32 %85, ptr %87, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %73, %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 0, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %111, %88
  %90 = load i32, ptr %31, align 4, !tbaa !5
  %91 = load i32, ptr %29, align 4, !tbaa !5
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %114

94:                                               ; preds = %89
  %95 = load i32, ptr %30, align 4, !tbaa !5
  %96 = load ptr, ptr %27, align 8, !tbaa !9
  %97 = load i32, ptr %31, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp slt i32 %95, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %94
  br label %105

103:                                              ; preds = %94
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 81, ptr noundef @__PRETTY_FUNCTION__._Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT) #7
  unreachable

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104, %102
  %106 = load ptr, ptr %27, align 8, !tbaa !9
  %107 = load i32, ptr %31, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr %106, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr %30, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %105
  %112 = load i32, ptr %31, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %31, align 4, !tbaa !5
  br label %89, !llvm.loop !11

114:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = load i32, ptr %23, align 4, !tbaa !5
  %117 = load i32, ptr %24, align 4, !tbaa !5
  %118 = mul nsw i32 %116, %117
  %119 = sdiv i32 %115, %118
  store i32 %119, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = load i32, ptr %32, align 4, !tbaa !5
  %122 = load i32, ptr %23, align 4, !tbaa !5
  %123 = mul nsw i32 %121, %122
  %124 = load i32, ptr %24, align 4, !tbaa !5
  %125 = mul nsw i32 %123, %124
  %126 = sub nsw i32 %120, %125
  %127 = load i32, ptr %23, align 4, !tbaa !5
  %128 = sdiv i32 %126, %127
  store i32 %128, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %129 = load i32, ptr %15, align 4, !tbaa !5
  %130 = load i32, ptr %23, align 4, !tbaa !5
  %131 = srem i32 %129, %130
  store i32 %131, ptr %34, align 4, !tbaa !5
  %132 = load i32, ptr %14, align 4, !tbaa !5
  %133 = load ptr, ptr %26, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %133, i32 0, i32 0
  store i32 %132, ptr %134, align 8, !tbaa !13
  %135 = load i32, ptr %15, align 4, !tbaa !5
  %136 = load ptr, ptr %26, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %136, i32 0, i32 1
  store i32 %135, ptr %137, align 4, !tbaa !16
  %138 = load i32, ptr %16, align 4, !tbaa !5
  %139 = load ptr, ptr %26, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %139, i32 0, i32 2
  store i32 %138, ptr %140, align 8, !tbaa !17
  %141 = load i32, ptr %20, align 4, !tbaa !5
  %142 = load ptr, ptr %26, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %142, i32 0, i32 3
  store i32 %141, ptr %143, align 4, !tbaa !18
  %144 = load i32, ptr %21, align 4, !tbaa !5
  %145 = load ptr, ptr %26, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %145, i32 0, i32 4
  store i32 %144, ptr %146, align 8, !tbaa !19
  %147 = load i32, ptr %22, align 4, !tbaa !5
  %148 = load ptr, ptr %26, align 8, !tbaa !9
  %149 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %148, i32 0, i32 5
  store i32 %147, ptr %149, align 4, !tbaa !20
  %150 = load i32, ptr %23, align 4, !tbaa !5
  %151 = load ptr, ptr %26, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %151, i32 0, i32 6
  store i32 %150, ptr %152, align 8, !tbaa !21
  %153 = load i32, ptr %24, align 4, !tbaa !5
  %154 = load ptr, ptr %26, align 8, !tbaa !9
  %155 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %154, i32 0, i32 7
  store i32 %153, ptr %155, align 4, !tbaa !22
  %156 = load i32, ptr %25, align 4, !tbaa !5
  %157 = load ptr, ptr %26, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %157, i32 0, i32 8
  store i32 %156, ptr %158, align 8, !tbaa !23
  %159 = load i32, ptr %17, align 4, !tbaa !5
  %160 = load ptr, ptr %26, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %160, i32 0, i32 9
  store i32 %159, ptr %161, align 4, !tbaa !24
  %162 = load i32, ptr %29, align 4, !tbaa !5
  %163 = load ptr, ptr %26, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %163, i32 0, i32 10
  store i32 %162, ptr %164, align 8, !tbaa !25
  %165 = load ptr, ptr %27, align 8, !tbaa !9
  %166 = load ptr, ptr %26, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %166, i32 0, i32 11
  store ptr %165, ptr %167, align 8, !tbaa !26
  %168 = load ptr, ptr %28, align 8, !tbaa !9
  %169 = load ptr, ptr %26, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %169, i32 0, i32 12
  store ptr %168, ptr %170, align 8, !tbaa !27
  %171 = load i32, ptr %34, align 4, !tbaa !5
  %172 = load ptr, ptr %26, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %172, i32 0, i32 13
  store i32 %171, ptr %173, align 8, !tbaa !28
  %174 = load i32, ptr %33, align 4, !tbaa !5
  %175 = load ptr, ptr %26, align 8, !tbaa !9
  %176 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %175, i32 0, i32 14
  store i32 %174, ptr %176, align 4, !tbaa !29
  %177 = load i32, ptr %32, align 4, !tbaa !5
  %178 = load ptr, ptr %26, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %178, i32 0, i32 15
  store i32 %177, ptr %179, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %180 = load i32, ptr %23, align 4, !tbaa !5
  %181 = load i32, ptr %20, align 4, !tbaa !5
  %182 = mul nsw i32 %180, %181
  %183 = sext i32 %182 to i64
  store i64 %183, ptr %35, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %184 = load i32, ptr %24, align 4, !tbaa !5
  %185 = load i32, ptr %21, align 4, !tbaa !5
  %186 = mul nsw i32 %184, %185
  %187 = sext i32 %186 to i64
  store i64 %187, ptr %36, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  store i64 0, ptr %37, align 8, !tbaa !31
  store i32 0, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  store i32 0, ptr %38, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %211, %114
  %189 = load i32, ptr %38, align 4, !tbaa !5
  %190 = load i32, ptr %29, align 4, !tbaa !5
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %214

193:                                              ; preds = %188
  %194 = load ptr, ptr %27, align 8, !tbaa !9
  %195 = load i32, ptr %38, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds i32, ptr %194, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = load i32, ptr %30, align 4, !tbaa !5
  %200 = sub nsw i32 %198, %199
  store i32 %200, ptr %30, align 4, !tbaa !5
  %201 = load ptr, ptr %28, align 8, !tbaa !9
  %202 = load i32, ptr %38, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds i32, ptr %201, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = load i32, ptr %30, align 4, !tbaa !5
  %207 = mul nsw i32 %205, %206
  %208 = sext i32 %207 to i64
  %209 = load i64, ptr %37, align 8, !tbaa !31
  %210 = add nsw i64 %209, %208
  store i64 %210, ptr %37, align 8, !tbaa !31
  br label %211

211:                                              ; preds = %193
  %212 = load i32, ptr %38, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %38, align 4, !tbaa !5
  br label %188, !llvm.loop !32

214:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  store i64 0, ptr %39, align 8, !tbaa !31
  store i32 0, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #5
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %258, %214
  %216 = load i32, ptr %40, align 4, !tbaa !5
  %217 = load i32, ptr %29, align 4, !tbaa !5
  %218 = icmp slt i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  store i32 8, ptr %41, align 4
  br label %261

220:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #5
  %221 = load ptr, ptr %28, align 8, !tbaa !9
  %222 = load i32, ptr %40, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i32, ptr %221, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !5
  store i32 %225, ptr %42, align 4, !tbaa !5
  %226 = load i32, ptr %32, align 4, !tbaa !5
  %227 = load ptr, ptr %27, align 8, !tbaa !9
  %228 = load i32, ptr %40, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds i32, ptr %227, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = icmp slt i32 %226, %231
  br i1 %232, label %233, label %242

233:                                              ; preds = %220
  %234 = load i32, ptr %32, align 4, !tbaa !5
  %235 = load i32, ptr %30, align 4, !tbaa !5
  %236 = sub nsw i32 %234, %235
  %237 = load i32, ptr %42, align 4, !tbaa !5
  %238 = mul nsw i32 %236, %237
  %239 = sext i32 %238 to i64
  %240 = load i64, ptr %39, align 8, !tbaa !31
  %241 = add nsw i64 %240, %239
  store i64 %241, ptr %39, align 8, !tbaa !31
  store i32 8, ptr %41, align 4
  br label %255

242:                                              ; preds = %220
  %243 = load ptr, ptr %27, align 8, !tbaa !9
  %244 = load i32, ptr %40, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i32, ptr %243, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  store i32 %247, ptr %30, align 4, !tbaa !5
  %248 = load i32, ptr %30, align 4, !tbaa !5
  %249 = load i32, ptr %42, align 4, !tbaa !5
  %250 = mul nsw i32 %248, %249
  %251 = sext i32 %250 to i64
  %252 = load i64, ptr %39, align 8, !tbaa !31
  %253 = add nsw i64 %252, %251
  store i64 %253, ptr %39, align 8, !tbaa !31
  br label %254

254:                                              ; preds = %242
  store i32 0, ptr %41, align 4
  br label %255

255:                                              ; preds = %254, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  %256 = load i32, ptr %41, align 4
  switch i32 %256, label %261 [
    i32 0, label %257
  ]

257:                                              ; preds = %255
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %40, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %40, align 4, !tbaa !5
  br label %215, !llvm.loop !33

261:                                              ; preds = %255, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #5
  br label %262

262:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %263 = load i32, ptr %34, align 4, !tbaa !5
  %264 = load i32, ptr %20, align 4, !tbaa !5
  %265 = mul nsw i32 %263, %264
  %266 = sext i32 %265 to i64
  store i64 %266, ptr %43, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #5
  %267 = load i32, ptr %33, align 4, !tbaa !5
  %268 = load i32, ptr %21, align 4, !tbaa !5
  %269 = mul nsw i32 %267, %268
  %270 = sext i32 %269 to i64
  store i64 %270, ptr %44, align 8, !tbaa !31
  %271 = load i64, ptr %35, align 8, !tbaa !31
  %272 = load ptr, ptr %26, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %272, i32 0, i32 16
  store i64 %271, ptr %273, align 8, !tbaa !34
  %274 = load i64, ptr %36, align 8, !tbaa !31
  %275 = load ptr, ptr %26, align 8, !tbaa !9
  %276 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %275, i32 0, i32 17
  store i64 %274, ptr %276, align 8, !tbaa !35
  %277 = load i64, ptr %37, align 8, !tbaa !31
  %278 = load ptr, ptr %26, align 8, !tbaa !9
  %279 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %278, i32 0, i32 18
  store i64 %277, ptr %279, align 8, !tbaa !36
  %280 = load i64, ptr %43, align 8, !tbaa !31
  %281 = load ptr, ptr %26, align 8, !tbaa !9
  %282 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %281, i32 0, i32 19
  store i64 %280, ptr %282, align 8, !tbaa !37
  %283 = load i64, ptr %44, align 8, !tbaa !31
  %284 = load ptr, ptr %26, align 8, !tbaa !9
  %285 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %284, i32 0, i32 20
  store i64 %283, ptr %285, align 8, !tbaa !38
  %286 = load i64, ptr %39, align 8, !tbaa !31
  %287 = load ptr, ptr %26, align 8, !tbaa !9
  %288 = getelementptr inbounds %struct.Geometry_STRUCT, ptr %287, i32 0, i32 21
  store i64 %286, ptr %288, align 8, !tbaa !39
  store i32 1, ptr %41, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  ret void
}

declare void @_Z22ComputeOptimalShapeXYZiRiS_S_(i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

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

attributes #0 = { mustprogress 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin 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 }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { noreturn nounwind }

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

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


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

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT = external hidden unnamed_addr constant [134 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i32 noundef %8, i32 noundef %9, i32 noundef %10, i32 noundef %11, ptr nocapture noundef writeonly %12) local_unnamed_addr #0 {
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 %9, ptr %14, align 4, !tbaa !5
  store i32 %10, ptr %15, align 4, !tbaa !5
  store i32 %11, ptr %16, align 4, !tbaa !5
  %17 = mul nsw i32 %10, %9
  %18 = mul nsw i32 %17, %11
  %19 = icmp slt i32 %18, 1
  %20 = icmp sgt i32 %18, %0
  %or.cond = or i1 %19, %20
  br i1 %or.cond, label %21, label %22

21:                                               ; preds = %13
  call void @_Z22ComputeOptimalShapeXYZiRiS_S_(i32 noundef %0, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %22

22:                                               ; preds = %13, %21
  %23 = icmp eq i32 %3, 0
  br i1 %23, label %24, label %28

24:                                               ; preds = %22
  %25 = call noalias noundef nonnull dereferenceable(4) ptr @_Znam(i64 noundef 4) #5
  %26 = call noalias noundef nonnull dereferenceable(4) ptr @_Znam(i64 noundef 4) #5
  %27 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %27, ptr %25, align 4, !tbaa !5
  store i32 %8, ptr %26, align 4, !tbaa !5
  br label %66

28:                                               ; preds = %22
  %29 = call noalias noundef nonnull dereferenceable(8) ptr @_Znam(i64 noundef 8) #5
  store i32 %3, ptr %29, align 4, !tbaa !5
  %30 = load i32, ptr %16, align 4, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %29, i64 4
  store i32 %30, ptr %31, align 4, !tbaa !5
  %32 = call noalias noundef nonnull dereferenceable(8) ptr @_Znam(i64 noundef 8) #5
  store i32 %4, ptr %32, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 4
  store i32 %5, ptr %33, align 4, !tbaa !5
  br label %66

34:                                               ; preds = %66
  br i1 %23, label %39, label %35, !llvm.loop !9

35:                                               ; preds = %34
  %36 = getelementptr inbounds i8, ptr %.0, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = icmp slt i32 %68, %37
  br i1 %38, label %39, label %70

39:                                               ; preds = %35, %34
  %40 = load i32, ptr %14, align 4, !tbaa !5
  %41 = load i32, ptr %15, align 4, !tbaa !5
  %42 = mul i32 %41, %40
  %43 = sdiv i32 %1, %42
  %44 = mul i32 %42, %43
  %.recomposed = srem i32 %1, %42
  %45 = sdiv i32 %.recomposed, %40
  %46 = srem i32 %1, %40
  store i32 %0, ptr %12, align 8, !tbaa !11
  %47 = getelementptr inbounds i8, ptr %12, i64 4
  store i32 %1, ptr %47, align 4, !tbaa !15
  %48 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 %2, ptr %48, align 8, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %12, i64 12
  store i32 %6, ptr %49, align 4, !tbaa !17
  %50 = getelementptr inbounds i8, ptr %12, i64 16
  store i32 %7, ptr %50, align 8, !tbaa !18
  %51 = getelementptr inbounds i8, ptr %12, i64 20
  store i32 %8, ptr %51, align 4, !tbaa !19
  %52 = getelementptr inbounds i8, ptr %12, i64 24
  store i32 %40, ptr %52, align 8, !tbaa !20
  %53 = getelementptr inbounds i8, ptr %12, i64 28
  store i32 %41, ptr %53, align 4, !tbaa !21
  %54 = getelementptr inbounds i8, ptr %12, i64 32
  store i32 %67, ptr %54, align 8, !tbaa !22
  %55 = getelementptr inbounds i8, ptr %12, i64 36
  store i32 %3, ptr %55, align 4, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %12, i64 40
  store i32 %.0100, ptr %56, align 8, !tbaa !24
  %57 = getelementptr inbounds i8, ptr %12, i64 48
  store ptr %.0, ptr %57, align 8, !tbaa !25
  %58 = getelementptr inbounds i8, ptr %12, i64 56
  store ptr %.099, ptr %58, align 8, !tbaa !26
  %59 = getelementptr inbounds i8, ptr %12, i64 64
  store i32 %46, ptr %59, align 8, !tbaa !27
  %60 = getelementptr inbounds i8, ptr %12, i64 68
  store i32 %45, ptr %60, align 4, !tbaa !28
  %61 = getelementptr inbounds i8, ptr %12, i64 72
  store i32 %43, ptr %61, align 8, !tbaa !29
  %62 = load i32, ptr %.0, align 4, !tbaa !5
  %63 = load i32, ptr %.099, align 4, !tbaa !5
  %64 = mul nsw i32 %63, %62
  %65 = sext i32 %64 to i64
  br i1 %23, label %.preheader, label %71, !llvm.loop !30

66:                                               ; preds = %24, %28
  %67 = phi i32 [ %27, %24 ], [ %30, %28 ]
  %.0100 = phi i32 [ 1, %24 ], [ 2, %28 ]
  %.099 = phi ptr [ %26, %24 ], [ %32, %28 ]
  %.0 = phi ptr [ %25, %24 ], [ %29, %28 ]
  %68 = load i32, ptr %.0, align 4, !tbaa !5
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %34, label %70

70:                                               ; preds = %35, %66
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 81, ptr noundef nonnull @__PRETTY_FUNCTION__._Z16GenerateGeometryiiiiiiiiiiiiP15Geometry_STRUCT) #6
  unreachable

71:                                               ; preds = %39
  %72 = getelementptr inbounds i8, ptr %.0, i64 4
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sub nsw i32 %73, %62
  %75 = getelementptr inbounds i8, ptr %.099, i64 4
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = mul nsw i32 %76, %74
  %78 = sext i32 %77 to i64
  %79 = add nsw i64 %65, %78
  br label %.preheader

.preheader:                                       ; preds = %39, %71
  %.lcssa = phi i64 [ %65, %39 ], [ %79, %71 ]
  %80 = load i32, ptr %.099, align 4, !tbaa !5
  %81 = load i32, ptr %.0, align 4, !tbaa !5
  %.not = icmp slt i32 %43, %81
  %.pn115 = call i32 @llvm.smin.i32(i32 %43, i32 %81)
  %.pn.in = mul nsw i32 %.pn115, %80
  %.pn = sext i32 %.pn.in to i64
  %or.cond135 = or i1 %.not, %23
  br i1 %or.cond135, label %87, label %.preheader.1, !llvm.loop !31

.preheader.1:                                     ; preds = %.preheader
  %82 = getelementptr inbounds i8, ptr %.099, i64 4
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %.0, i64 4
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %.not.1 = icmp slt i32 %43, %85
  %86 = sub nsw i32 %43, %81
  %.pn115.1 = select i1 %.not.1, i32 %86, i32 %85
  %.pn.in.1 = mul nsw i32 %.pn115.1, %83
  %.pn.1 = sext i32 %.pn.in.1 to i64
  %.1.1 = add nsw i64 %.pn, %.pn.1
  br label %87

87:                                               ; preds = %.preheader.1, %.preheader
  %.1.lcssa = phi i64 [ %.pn, %.preheader ], [ %.1.1, %.preheader.1 ]
  %88 = mul nsw i32 %41, %7
  %89 = sext i32 %88 to i64
  %90 = mul nsw i32 %40, %6
  %91 = sext i32 %90 to i64
  %92 = mul nsw i32 %46, %6
  %93 = sext i32 %92 to i64
  %94 = mul nsw i32 %45, %7
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %12, i64 80
  store i64 %91, ptr %96, align 8, !tbaa !32
  %97 = getelementptr inbounds i8, ptr %12, i64 88
  store i64 %89, ptr %97, align 8, !tbaa !33
  %98 = getelementptr inbounds i8, ptr %12, i64 96
  store i64 %.lcssa, ptr %98, align 8, !tbaa !34
  %99 = getelementptr inbounds i8, ptr %12, i64 104
  store i64 %93, ptr %99, align 8, !tbaa !35
  %100 = getelementptr inbounds i8, ptr %12, i64 112
  store i64 %95, ptr %100, align 8, !tbaa !36
  %101 = getelementptr inbounds i8, ptr %12, i64 120
  store i64 %.1.lcssa, ptr %101, align 8, !tbaa !37
  ret void
}

declare void @_Z22ComputeOptimalShapeXYZiRiS_S_(i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress 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 = { "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 = { nobuiltin 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { builtin allocsize(0) }
attributes #6 = { noreturn nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass