; LLVM IR from MIT-SPARK/Kimera-VIO :: third_party/triangle/src (triangle)

; 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.otri = type { ptr, i32 }
%struct.osub = type { ptr, i32 }
%struct.behavior = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float }
%struct.mesh = type { %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, [4096 x ptr], [4096 x ptr], [4096 x i32], i32, ptr, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.otri }
%struct.memorypool = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i64, i64, i32, i32 }

@plus1mod3 = external dso_local global [3 x i32], align 4
@minus1mod3 = external dso_local global [3 x i32], align 4
@.str.89 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @poolalloc(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @infecthull(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.otri, align 8
  %6 = alloca %struct.otri, align 8
  %7 = alloca %struct.otri, align 8
  %8 = alloca %struct.osub, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.behavior, ptr %14, i32 0, i32 29
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %20

18:                                               ; preds = %2
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str.89)
  br label %20

20:                                               ; preds = %18, %2
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.mesh, ptr %21, i32 0, i32 48
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  store ptr %23, ptr %24, align 8, !tbaa !18
  %25 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  store i32 0, ptr %25, align 8, !tbaa !19
  %26 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  %28 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %29 = load i32, ptr %28, align 8, !tbaa !19
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds ptr, ptr %27, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %32, ptr %12, align 8, !tbaa !5
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = ptrtoint ptr %33 to i64
  %35 = and i64 %34, 3
  %36 = trunc i64 %35 to i32
  %37 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  store i32 %36, ptr %37, align 8, !tbaa !19
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = ptrtoint ptr %38 to i64
  %40 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !19
  %42 = sext i32 %41 to i64
  %43 = xor i64 %39, %42
  %44 = inttoptr i64 %43 to ptr
  %45 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  store ptr %44, ptr %45, align 8, !tbaa !18
  %46 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !18
  %48 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  store ptr %47, ptr %48, align 8, !tbaa !18
  %49 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %50 = load i32, ptr %49, align 8, !tbaa !19
  %51 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  store i32 %50, ptr %51, align 8, !tbaa !19
  br label %52

52:                                               ; preds = %263, %20
  %53 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = getelementptr inbounds ptr, ptr %54, i64 6
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = ptrtoint ptr %56 to i64
  %58 = and i64 %57, 2
  %59 = icmp ne i64 %58, 0
  br i1 %59, label %177, label %60

60:                                               ; preds = %52
  %61 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %64 = load i32, ptr %63, align 8, !tbaa !19
  %65 = add nsw i32 6, %64
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds ptr, ptr %62, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  store ptr %68, ptr %13, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = ptrtoint ptr %69 to i64
  %71 = and i64 %70, 1
  %72 = trunc i64 %71 to i32
  %73 = getelementptr inbounds %struct.osub, ptr %8, i32 0, i32 1
  store i32 %72, ptr %73, align 8, !tbaa !20
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = ptrtoint ptr %74 to i64
  %76 = and i64 %75, -4
  %77 = inttoptr i64 %76 to ptr
  %78 = getelementptr inbounds %struct.osub, ptr %8, i32 0, i32 0
  store ptr %77, ptr %78, align 8, !tbaa !22
  %79 = getelementptr inbounds %struct.osub, ptr %8, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !22
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.mesh, ptr %81, i32 0, i32 50
  %83 = load ptr, ptr %82, align 8, !tbaa !23
  %84 = icmp eq ptr %80, %83
  br i1 %84, label %85, label %111

85:                                               ; preds = %60
  %86 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  %88 = getelementptr inbounds ptr, ptr %87, i64 6
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = ptrtoint ptr %89 to i64
  %91 = and i64 %90, 2
  %92 = icmp ne i64 %91, 0
  br i1 %92, label %110, label %93

93:                                               ; preds = %85
  %94 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = getelementptr inbounds ptr, ptr %95, i64 6
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = ptrtoint ptr %97 to i64
  %99 = or i64 %98, 2
  %100 = inttoptr i64 %99 to ptr
  %101 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !18
  %103 = getelementptr inbounds ptr, ptr %102, i64 6
  store ptr %100, ptr %103, align 8, !tbaa !5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.mesh, ptr %104, i32 0, i32 3
  %106 = call ptr @poolalloc(ptr noundef %105)
  store ptr %106, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %108, ptr %109, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %93, %85
  br label %176

111:                                              ; preds = %60
  %112 = getelementptr inbounds %struct.osub, ptr %8, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !22
  %114 = getelementptr inbounds ptr, ptr %113, i64 8
  %115 = load i32, ptr %114, align 4, !tbaa !24
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %175

117:                                              ; preds = %111
  %118 = getelementptr inbounds %struct.osub, ptr %8, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !22
  %120 = getelementptr inbounds ptr, ptr %119, i64 8
  store i32 1, ptr %120, align 4, !tbaa !24
  %121 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !18
  %123 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %124 = load i32, ptr %123, align 8, !tbaa !19
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !24
  %128 = add nsw i32 %127, 3
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds ptr, ptr %122, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  store ptr %131, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !18
  %134 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %135 = load i32, ptr %134, align 8, !tbaa !19
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !24
  %139 = add nsw i32 %138, 3
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %133, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  store ptr %142, ptr %11, align 8, !tbaa !5
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.mesh, ptr %144, i32 0, i32 30
  %146 = load i32, ptr %145, align 4, !tbaa !25
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %143, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !24
  %150 = icmp eq i32 %149, 0
  br i1 %150, label %151, label %158

151:                                              ; preds = %117
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.mesh, ptr %153, i32 0, i32 30
  %155 = load i32, ptr %154, align 4, !tbaa !25
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %152, i64 %156
  store i32 1, ptr %157, align 4, !tbaa !24
  br label %158

158:                                              ; preds = %151, %117
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.mesh, ptr %160, i32 0, i32 30
  %162 = load i32, ptr %161, align 4, !tbaa !25
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds i32, ptr %159, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !24
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %167, label %174

167:                                              ; preds = %158
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.mesh, ptr %169, i32 0, i32 30
  %171 = load i32, ptr %170, align 4, !tbaa !25
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %168, i64 %172
  store i32 1, ptr %173, align 4, !tbaa !24
  br label %174

174:                                              ; preds = %167, %158
  br label %175

175:                                              ; preds = %174, %111
  br label %176

176:                                              ; preds = %175, %110
  br label %177

177:                                              ; preds = %176, %52
  %178 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %179 = load i32, ptr %178, align 8, !tbaa !19
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !24
  %183 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  store i32 %182, ptr %183, align 8, !tbaa !19
  %184 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !18
  %186 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %187 = load i32, ptr %186, align 8, !tbaa !19
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds ptr, ptr %185, i64 %188
  %190 = load ptr, ptr %189, align 8, !tbaa !5
  store ptr %190, ptr %12, align 8, !tbaa !5
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = ptrtoint ptr %191 to i64
  %193 = and i64 %192, 3
  %194 = trunc i64 %193 to i32
  %195 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  store i32 %194, ptr %195, align 8, !tbaa !19
  %196 = load ptr, ptr %12, align 8, !tbaa !5
  %197 = ptrtoint ptr %196 to i64
  %198 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %199 = load i32, ptr %198, align 8, !tbaa !19
  %200 = sext i32 %199 to i64
  %201 = xor i64 %197, %200
  %202 = inttoptr i64 %201 to ptr
  %203 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  store ptr %202, ptr %203, align 8, !tbaa !18
  %204 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %205 = load i32, ptr %204, align 8, !tbaa !19
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !24
  %209 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  store i32 %208, ptr %209, align 8, !tbaa !19
  br label %210

210:                                              ; preds = %217, %177
  %211 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8, !tbaa !18
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.mesh, ptr %213, i32 0, i32 48
  %215 = load ptr, ptr %214, align 8, !tbaa !13
  %216 = icmp ne ptr %212, %215
  br i1 %216, label %217, label %250

217:                                              ; preds = %210
  %218 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %219 = load ptr, ptr %218, align 8, !tbaa !18
  %220 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  store ptr %219, ptr %220, align 8, !tbaa !18
  %221 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %222 = load i32, ptr %221, align 8, !tbaa !19
  %223 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  store i32 %222, ptr %223, align 8, !tbaa !19
  %224 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !18
  %226 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %227 = load i32, ptr %226, align 8, !tbaa !19
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds ptr, ptr %225, i64 %228
  %230 = load ptr, ptr %229, align 8, !tbaa !5
  store ptr %230, ptr %12, align 8, !tbaa !5
  %231 = load ptr, ptr %12, align 8, !tbaa !5
  %232 = ptrtoint ptr %231 to i64
  %233 = and i64 %232, 3
  %234 = trunc i64 %233 to i32
  %235 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  store i32 %234, ptr %235, align 8, !tbaa !19
  %236 = load ptr, ptr %12, align 8, !tbaa !5
  %237 = ptrtoint ptr %236 to i64
  %238 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %239 = load i32, ptr %238, align 8, !tbaa !19
  %240 = sext i32 %239 to i64
  %241 = xor i64 %237, %240
  %242 = inttoptr i64 %241 to ptr
  %243 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  store ptr %242, ptr %243, align 8, !tbaa !18
  %244 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %245 = load i32, ptr %244, align 8, !tbaa !19
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !24
  %249 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  store i32 %248, ptr %249, align 8, !tbaa !19
  br label %210, !llvm.loop !26

250:                                              ; preds = %210
  br label %251

251:                                              ; preds = %250
  %252 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8, !tbaa !18
  %254 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !18
  %256 = icmp eq ptr %253, %255
  br i1 %256, label %257, label %263

257:                                              ; preds = %251
  %258 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %259 = load i32, ptr %258, align 8, !tbaa !19
  %260 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  %261 = load i32, ptr %260, align 8, !tbaa !19
  %262 = icmp eq i32 %259, %261
  br label %263

263:                                              ; preds = %257, %251
  %264 = phi i1 [ false, %251 ], [ %262, %257 ]
  %265 = xor i1 %264, true
  br i1 %265, label %52, label %266, !llvm.loop !28

266:                                              ; preds = %263
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #3
  ret void
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 116}
!10 = !{!"behavior", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 82840}
!14 = !{!"mesh", !15, i64 0, !15, i64 88, !15, i64 176, !15, i64 264, !15, i64 352, !15, i64 440, !15, i64 528, !15, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !11, i64 82624, !6, i64 82632, !12, i64 82640, !12, i64 82644, !12, i64 82648, !12, i64 82652, !12, i64 82656, !11, i64 82660, !11, i64 82664, !11, i64 82668, !11, i64 82672, !11, i64 82676, !11, i64 82680, !16, i64 82688, !11, i64 82696, !11, i64 82700, !11, i64 82704, !16, i64 82712, !11, i64 82720, !11, i64 82724, !11, i64 82728, !11, i64 82732, !11, i64 82736, !11, i64 82740, !11, i64 82744, !11, i64 82748, !11, i64 82752, !16, i64 82760, !16, i64 82768, !16, i64 82776, !16, i64 82784, !16, i64 82792, !16, i64 82800, !16, i64 82808, !6, i64 82816, !6, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !17, i64 82872}
!15 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !16, i64 64, !16, i64 72, !11, i64 80, !11, i64 84}
!16 = !{!"long", !7, i64 0}
!17 = !{!"otri", !6, i64 0, !11, i64 8}
!18 = !{!17, !6, i64 0}
!19 = !{!17, !11, i64 8}
!20 = !{!21, !11, i64 8}
!21 = !{!"osub", !6, i64 0, !11, i64 8}
!22 = !{!21, !6, i64 0}
!23 = !{!14, !6, i64 82856}
!24 = !{!11, !11, i64 0}
!25 = !{!14, !11, i64 82724}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


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

@plus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@minus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@.str.89 = external hidden unnamed_addr constant [61 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @infecthull(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %1, i64 116
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %7, label %5

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

7:                                                ; preds = %5, %2
  %8 = getelementptr inbounds i8, ptr %0, i64 82840
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = load ptr, ptr %9, align 8, !tbaa !17
  %11 = ptrtoint ptr %10 to i64
  %12 = trunc i64 %11 to i32
  %13 = and i32 %12, 3
  %14 = and i64 %11, -4
  %15 = inttoptr i64 %14 to ptr
  %16 = getelementptr inbounds i8, ptr %0, i64 82856
  %17 = getelementptr inbounds i8, ptr %0, i64 82724
  %18 = getelementptr inbounds i8, ptr %0, i64 264
  br label %19

19:                                               ; preds = %._crit_edge, %7
  %20 = phi ptr [ %9, %7 ], [ %69, %._crit_edge ]
  %.sroa.024.0 = phi ptr [ %15, %7 ], [ %.sroa.024.1.lcssa, %._crit_edge ]
  %.sroa.18.0 = phi i32 [ %13, %7 ], [ %.sroa.18.1.lcssa, %._crit_edge ]
  %21 = getelementptr inbounds i8, ptr %.sroa.024.0, i64 48
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = ptrtoint ptr %22 to i64
  %24 = and i64 %23, 2
  %.not55 = icmp eq i64 %24, 0
  br i1 %.not55, label %25, label %68

25:                                               ; preds = %19
  %26 = add nsw i32 %.sroa.18.0, 6
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds ptr, ptr %.sroa.024.0, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = ptrtoint ptr %29 to i64
  %31 = and i64 %30, -4
  %32 = inttoptr i64 %31 to ptr
  %33 = load ptr, ptr %16, align 8, !tbaa !18
  %34 = icmp eq ptr %33, %32
  br i1 %34, label %35, label %39

35:                                               ; preds = %25
  %36 = or disjoint i64 %23, 2
  %37 = inttoptr i64 %36 to ptr
  store ptr %37, ptr %21, align 8, !tbaa !17
  %38 = tail call ptr @poolalloc(ptr noundef nonnull %18)
  store ptr %.sroa.024.0, ptr %38, align 8, !tbaa !17
  %.pre68 = load ptr, ptr %8, align 8, !tbaa !11
  br label %68

39:                                               ; preds = %25
  %40 = getelementptr inbounds i8, ptr %32, i64 64
  %41 = load i32, ptr %40, align 4, !tbaa !19
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %68

43:                                               ; preds = %39
  store i32 1, ptr %40, align 4, !tbaa !19
  %44 = sext i32 %.sroa.18.0 to i64
  %45 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !19
  %47 = add nsw i32 %46, 3
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds ptr, ptr %.sroa.024.0, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  %51 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %44
  %52 = load i32, ptr %51, align 4, !tbaa !19
  %53 = add nsw i32 %52, 3
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %.sroa.024.0, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = load i32, ptr %17, align 4, !tbaa !20
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %50, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !19
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %43
  store i32 1, ptr %59, align 4, !tbaa !19
  %.pre = load i32, ptr %17, align 4, !tbaa !20
  %.pre69 = sext i32 %.pre to i64
  br label %63

63:                                               ; preds = %62, %43
  %.pre-phi = phi i64 [ %.pre69, %62 ], [ %58, %43 ]
  %64 = getelementptr inbounds i32, ptr %56, i64 %.pre-phi
  %65 = load i32, ptr %64, align 4, !tbaa !19
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %63
  store i32 1, ptr %64, align 4, !tbaa !19
  br label %68

68:                                               ; preds = %35, %63, %67, %39, %19
  %69 = phi ptr [ %.pre68, %35 ], [ %20, %63 ], [ %20, %67 ], [ %20, %39 ], [ %20, %19 ]
  %70 = sext i32 %.sroa.18.0 to i64
  %71 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !19
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %.sroa.024.0, i64 %73
  %.pn.in.in60 = load ptr, ptr %74, align 8, !tbaa !17
  %.pn.in61 = ptrtoint ptr %.pn.in.in60 to i64
  %.sroa.017.0.in62 = and i64 %.pn.in61, -4
  %.sroa.017.063 = inttoptr i64 %.sroa.017.0.in62 to ptr
  %.not5664 = icmp eq ptr %69, %.sroa.017.063
  br i1 %.not5664, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %68, %.lr.ph
  %.sroa.017.066 = phi ptr [ %.sroa.017.0, %.lr.ph ], [ %.sroa.017.063, %68 ]
  %.pn.in65 = phi i64 [ %.pn.in, %.lr.ph ], [ %.pn.in61, %68 ]
  %.pn = and i64 %.pn.in65, 3
  %.sroa.619.0.in = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %.pn
  %.sroa.619.0 = load i32, ptr %.sroa.619.0.in, align 4, !tbaa !19
  %75 = sext i32 %.sroa.619.0 to i64
  %76 = getelementptr inbounds ptr, ptr %.sroa.017.066, i64 %75
  %.pn.in.in = load ptr, ptr %76, align 8, !tbaa !17
  %.pn.in = ptrtoint ptr %.pn.in.in to i64
  %.sroa.017.0.in = and i64 %.pn.in, -4
  %.sroa.017.0 = inttoptr i64 %.sroa.017.0.in to ptr
  %.not56 = icmp eq ptr %69, %.sroa.017.0
  br i1 %.not56, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %68
  %.sroa.024.1.lcssa = phi ptr [ %.sroa.024.0, %68 ], [ %.sroa.017.066, %.lr.ph ]
  %.sroa.18.1.lcssa = phi i32 [ %72, %68 ], [ %.sroa.619.0, %.lr.ph ]
  %77 = icmp ne ptr %.sroa.024.1.lcssa, %15
  %78 = icmp ne i32 %.sroa.18.1.lcssa, %13
  %.not59 = select i1 %77, i1 true, i1 %78
  br i1 %.not59, label %19, label %79, !llvm.loop !23

79:                                               ; preds = %._crit_edge
  ret void
}

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 116}
!6 = !{!"behavior", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!12, !14, i64 82840}
!12 = !{!"mesh", !13, i64 0, !13, i64 88, !13, i64 176, !13, i64 264, !13, i64 352, !13, i64 440, !13, i64 528, !13, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !7, i64 82624, !14, i64 82632, !10, i64 82640, !10, i64 82644, !10, i64 82648, !10, i64 82652, !10, i64 82656, !7, i64 82660, !7, i64 82664, !7, i64 82668, !7, i64 82672, !7, i64 82676, !7, i64 82680, !15, i64 82688, !7, i64 82696, !7, i64 82700, !7, i64 82704, !15, i64 82712, !7, i64 82720, !7, i64 82724, !7, i64 82728, !7, i64 82732, !7, i64 82736, !7, i64 82740, !7, i64 82744, !7, i64 82748, !7, i64 82752, !15, i64 82760, !15, i64 82768, !15, i64 82776, !15, i64 82784, !15, i64 82792, !15, i64 82800, !15, i64 82808, !14, i64 82816, !14, i64 82824, !14, i64 82832, !14, i64 82840, !14, i64 82848, !14, i64 82856, !14, i64 82864, !16, i64 82872}
!13 = !{!"memorypool", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !15, i64 64, !15, i64 72, !7, i64 80, !7, i64 84}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"otri", !14, i64 0, !7, i64 8}
!17 = !{!14, !14, i64 0}
!18 = !{!12, !14, i64 82856}
!19 = !{!7, !7, i64 0}
!20 = !{!12, !7, i64 82724}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass