; LLVM IR from ETH3D/dataset-pipeline :: thirdparty/cork/cork/isct (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, double, double, double, double, [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8] }
%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, double, double, double, double, double, 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.1064 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.1065 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @highorder(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.osub, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %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 8, 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 4, 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 28
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %20, label %18

18:                                               ; preds = %2
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str.1064)
  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 2
  %23 = getelementptr inbounds %struct.memorypool, ptr %22, i32 0, i32 3
  store ptr null, ptr %23, align 8, !tbaa !13
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mesh, ptr %24, i32 0, i32 0
  call void @traversalinit(ptr noundef %25)
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = call ptr @triangletraverse(ptr noundef %26)
  %28 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  store ptr %27, ptr %28, align 8, !tbaa !18
  br label %29

29:                                               ; preds = %251, %20
  %30 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %255

33:                                               ; preds = %29
  %34 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  store i32 0, ptr %34, align 8, !tbaa !19
  br label %35

35:                                               ; preds = %247, %33
  %36 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !19
  %38 = icmp slt i32 %37, 3
  br i1 %38, label %39, label %251

39:                                               ; preds = %35
  %40 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %43 = load i32, ptr %42, align 8, !tbaa !19
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %41, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  store ptr %46, ptr %12, align 8, !tbaa !5
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = ptrtoint ptr %47 to i64
  %49 = and i64 %48, 3
  %50 = trunc i64 %49 to i32
  %51 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  store i32 %50, ptr %51, align 8, !tbaa !19
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = ptrtoint ptr %52 to i64
  %54 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %55 = load i32, ptr %54, align 8, !tbaa !19
  %56 = sext i32 %55 to i64
  %57 = xor i64 %53, %56
  %58 = inttoptr i64 %57 to ptr
  %59 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  store ptr %58, ptr %59, align 8, !tbaa !18
  %60 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = icmp ult ptr %61, %63
  br i1 %64, label %72, label %65

65:                                               ; preds = %39
  %66 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.mesh, ptr %68, i32 0, i32 48
  %70 = load ptr, ptr %69, align 8, !tbaa !20
  %71 = icmp eq ptr %67, %70
  br i1 %71, label %72, label %246

72:                                               ; preds = %65, %39
  %73 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !19
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !21
  %80 = add nsw i32 %79, 3
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds ptr, ptr %74, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  store ptr %83, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  %86 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %87 = load i32, ptr %86, align 8, !tbaa !19
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !21
  %91 = add nsw i32 %90, 3
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %85, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  store ptr %94, ptr %10, align 8, !tbaa !5
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.mesh, ptr %95, i32 0, i32 2
  %97 = call ptr @poolalloc(ptr noundef %96)
  store ptr %97, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !21
  br label %98

98:                                               ; preds = %122, %72
  %99 = load i32, ptr %11, align 4, !tbaa !21
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mesh, ptr %100, i32 0, i32 26
  %102 = load i32, ptr %101, align 4, !tbaa !22
  %103 = add nsw i32 2, %102
  %104 = icmp slt i32 %99, %103
  br i1 %104, label %105, label %125

105:                                              ; preds = %98
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load i32, ptr %11, align 4, !tbaa !21
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds double, ptr %106, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !23
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load i32, ptr %11, align 4, !tbaa !21
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !23
  %116 = fadd double %110, %115
  %117 = fmul double 5.000000e-01, %116
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i32, ptr %11, align 4, !tbaa !21
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %118, i64 %120
  store double %117, ptr %121, align 8, !tbaa !23
  br label %122

122:                                              ; preds = %105
  %123 = load i32, ptr %11, align 4, !tbaa !21
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %11, align 4, !tbaa !21
  br label %98, !llvm.loop !24

125:                                              ; preds = %98
  %126 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !18
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.mesh, ptr %128, i32 0, i32 48
  %130 = load ptr, ptr %129, align 8, !tbaa !20
  %131 = icmp eq ptr %127, %130
  %132 = zext i1 %131 to i32
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.mesh, ptr %134, i32 0, i32 30
  %136 = load i32, ptr %135, align 4, !tbaa !26
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %133, i64 %137
  store i32 %132, ptr %138, align 4, !tbaa !21
  %139 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !18
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.mesh, ptr %141, i32 0, i32 48
  %143 = load ptr, ptr %142, align 8, !tbaa !20
  %144 = icmp eq ptr %140, %143
  %145 = zext i1 %144 to i64
  %146 = select i1 %144, i32 2, i32 1
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.mesh, ptr %148, i32 0, i32 30
  %150 = load i32, ptr %149, align 4, !tbaa !26
  %151 = add nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %147, i64 %152
  store i32 %146, ptr %153, align 4, !tbaa !21
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.behavior, ptr %154, i32 0, i32 30
  %156 = load i32, ptr %155, align 8, !tbaa !27
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %202

158:                                              ; preds = %125
  %159 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !18
  %161 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %162 = load i32, ptr %161, align 8, !tbaa !19
  %163 = add nsw i32 6, %162
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds ptr, ptr %160, i64 %164
  %166 = load ptr, ptr %165, align 8, !tbaa !5
  store ptr %166, ptr %13, align 8, !tbaa !5
  %167 = load ptr, ptr %13, align 8, !tbaa !5
  %168 = ptrtoint ptr %167 to i64
  %169 = and i64 %168, 1
  %170 = trunc i64 %169 to i32
  %171 = getelementptr inbounds %struct.osub, ptr %7, i32 0, i32 1
  store i32 %170, ptr %171, align 8, !tbaa !28
  %172 = load ptr, ptr %13, align 8, !tbaa !5
  %173 = ptrtoint ptr %172 to i64
  %174 = and i64 %173, -4
  %175 = inttoptr i64 %174 to ptr
  %176 = getelementptr inbounds %struct.osub, ptr %7, i32 0, i32 0
  store ptr %175, ptr %176, align 8, !tbaa !30
  %177 = getelementptr inbounds %struct.osub, ptr %7, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !30
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.mesh, ptr %179, i32 0, i32 50
  %181 = load ptr, ptr %180, align 8, !tbaa !31
  %182 = icmp ne ptr %178, %181
  br i1 %182, label %183, label %201

183:                                              ; preds = %158
  %184 = getelementptr inbounds %struct.osub, ptr %7, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !30
  %186 = getelementptr inbounds ptr, ptr %185, i64 8
  %187 = load i32, ptr %186, align 4, !tbaa !21
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.mesh, ptr %189, i32 0, i32 30
  %191 = load i32, ptr %190, align 4, !tbaa !26
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %188, i64 %192
  store i32 %187, ptr %193, align 4, !tbaa !21
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.mesh, ptr %195, i32 0, i32 30
  %197 = load i32, ptr %196, align 4, !tbaa !26
  %198 = add nsw i32 %197, 1
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i32, ptr %194, i64 %199
  store i32 1, ptr %200, align 4, !tbaa !21
  br label %201

201:                                              ; preds = %183, %158
  br label %202

202:                                              ; preds = %201, %125
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.behavior, ptr %203, i32 0, i32 29
  %205 = load i32, ptr %204, align 4, !tbaa !32
  %206 = icmp sgt i32 %205, 1
  br i1 %206, label %207, label %215

207:                                              ; preds = %202
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = getelementptr inbounds double, ptr %208, i64 0
  %210 = load double, ptr %209, align 8, !tbaa !23
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = getelementptr inbounds double, ptr %211, i64 1
  %213 = load double, ptr %212, align 8, !tbaa !23
  %214 = call i32 (ptr, ...) @printf(ptr noundef @.str.1065, double noundef %210, double noundef %213)
  br label %215

215:                                              ; preds = %207, %202
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8, !tbaa !18
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.mesh, ptr %219, i32 0, i32 32
  %221 = load i32, ptr %220, align 4, !tbaa !33
  %222 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %223 = load i32, ptr %222, align 8, !tbaa !19
  %224 = add nsw i32 %221, %223
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds ptr, ptr %218, i64 %225
  store ptr %216, ptr %226, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !18
  %229 = load ptr, ptr %3, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.mesh, ptr %229, i32 0, i32 48
  %231 = load ptr, ptr %230, align 8, !tbaa !20
  %232 = icmp ne ptr %228, %231
  br i1 %232, label %233, label %245

233:                                              ; preds = %215
  %234 = load ptr, ptr %8, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !18
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.mesh, ptr %237, i32 0, i32 32
  %239 = load i32, ptr %238, align 4, !tbaa !33
  %240 = getelementptr inbounds %struct.otri, ptr %6, i32 0, i32 1
  %241 = load i32, ptr %240, align 8, !tbaa !19
  %242 = add nsw i32 %239, %241
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds ptr, ptr %236, i64 %243
  store ptr %234, ptr %244, align 8, !tbaa !5
  br label %245

245:                                              ; preds = %233, %215
  br label %246

246:                                              ; preds = %245, %65
  br label %247

247:                                              ; preds = %246
  %248 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 1
  %249 = load i32, ptr %248, align 8, !tbaa !19
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %248, align 8, !tbaa !19
  br label %35, !llvm.loop !34

251:                                              ; preds = %35
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = call ptr @triangletraverse(ptr noundef %252)
  %254 = getelementptr inbounds %struct.otri, ptr %5, i32 0, i32 0
  store ptr %253, ptr %254, align 8, !tbaa !18
  br label %29, !llvm.loop !35

255:                                              ; preds = %29
  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 4, 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 8, 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 112}
!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 144, !12, i64 152, !12, i64 160, !7, i64 168, !7, i64 2216, !7, i64 4264, !7, i64 6312, !7, i64 8360, !7, i64 10408, !7, i64 12456, !7, i64 14504, !7, i64 16552, !7, i64 18600, !7, i64 20648, !7, i64 22696}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 200}
!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 82648, !12, i64 82656, !12, i64 82664, !12, i64 82672, !11, i64 82680, !11, i64 82684, !11, i64 82688, !11, i64 82692, !11, i64 82696, !11, i64 82700, !16, i64 82704, !11, i64 82712, !11, i64 82716, !11, i64 82720, !16, i64 82728, !11, i64 82736, !11, i64 82740, !11, i64 82744, !11, i64 82748, !11, i64 82752, !11, i64 82756, !11, i64 82760, !11, i64 82764, !11, i64 82768, !16, i64 82776, !16, i64 82784, !16, i64 82792, !16, i64 82800, !16, i64 82808, !16, i64 82816, !16, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !6, i64 82872, !6, i64 82880, !17, i64 82888}
!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 = !{!14, !6, i64 82856}
!21 = !{!11, !11, i64 0}
!22 = !{!14, !11, i64 82716}
!23 = !{!12, !12, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!14, !11, i64 82740}
!27 = !{!10, !11, i64 120}
!28 = !{!29, !11, i64 8}
!29 = !{!"osub", !6, i64 0, !11, i64 8}
!30 = !{!29, !6, i64 0}
!31 = !{!14, !6, i64 82872}
!32 = !{!10, !11, i64 116}
!33 = !{!14, !11, i64 82748}
!34 = distinct !{!34, !25}
!35 = distinct !{!35, !25}


; 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.1064 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.1065 = external hidden unnamed_addr constant [28 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
declare dso_local void @traversalinit(ptr noundef) local_unnamed_addr #1

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

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

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

7:                                                ; preds = %5, %2
  %8 = getelementptr inbounds i8, ptr %0, i64 176
  %9 = getelementptr inbounds i8, ptr %0, i64 200
  store ptr null, ptr %9, align 8, !tbaa !11
  tail call void @traversalinit(ptr noundef %0)
  %10 = tail call ptr @triangletraverse(ptr noundef %0)
  %.not6268 = icmp eq ptr %10, null
  br i1 %.not6268, label %._crit_edge70, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 82856
  %12 = getelementptr inbounds i8, ptr %0, i64 82716
  %13 = getelementptr inbounds i8, ptr %0, i64 82740
  %14 = getelementptr inbounds i8, ptr %1, i64 120
  %15 = getelementptr inbounds i8, ptr %0, i64 82872
  %16 = getelementptr inbounds i8, ptr %1, i64 116
  %17 = getelementptr inbounds i8, ptr %0, i64 82748
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %354
  %.sroa.027.069 = phi ptr [ %10, %.preheader.lr.ph ], [ %355, %354 ]
  %18 = load ptr, ptr %.sroa.027.069, align 8, !tbaa !17
  %19 = ptrtoint ptr %18 to i64
  %20 = trunc i64 %19 to i32
  %21 = and i32 %20, 3
  %22 = and i64 %19, -4
  %23 = inttoptr i64 %22 to ptr
  %24 = icmp ult ptr %.sroa.027.069, %23
  br i1 %24, label %28, label %25

25:                                               ; preds = %.preheader
  %26 = load ptr, ptr %11, align 8, !tbaa !18
  %27 = icmp eq ptr %26, %23
  br i1 %27, label %28, label %128

28:                                               ; preds = %25, %.preheader
  %29 = load i32, ptr @plus1mod3, align 4, !tbaa !19
  %30 = add nsw i32 %29, 3
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = ptrtoint ptr %33 to i64
  %35 = load i32, ptr @minus1mod3, align 4, !tbaa !19
  %36 = add nsw i32 %35, 3
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = ptrtoint ptr %39 to i64
  %41 = tail call ptr @poolalloc(ptr noundef nonnull %8)
  %42 = ptrtoint ptr %41 to i64
  %43 = load i32, ptr %12, align 4, !tbaa !20
  %44 = icmp sgt i32 %43, -2
  br i1 %44, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %28
  %45 = add i32 %43, 2
  %wide.trip.count = zext i32 %45 to i64
  %min.iters.check106 = icmp ult i32 %45, 4
  br i1 %min.iters.check106, label %.lr.ph.preheader119, label %vector.memcheck100

vector.memcheck100:                               ; preds = %.lr.ph.preheader
  %46 = sub i64 %42, %34
  %diff.check101 = icmp ult i64 %46, 32
  %47 = sub i64 %42, %40
  %diff.check102 = icmp ult i64 %47, 32
  %conflict.rdx103 = or i1 %diff.check101, %diff.check102
  br i1 %conflict.rdx103, label %.lr.ph.preheader119, label %vector.ph107

vector.ph107:                                     ; preds = %vector.memcheck100
  %n.vec109 = and i64 %wide.trip.count, 4294967292
  br label %vector.body111

vector.body111:                                   ; preds = %vector.body111, %vector.ph107
  %index112 = phi i64 [ 0, %vector.ph107 ], [ %index.next117, %vector.body111 ]
  %48 = getelementptr inbounds double, ptr %33, i64 %index112
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %wide.load113 = load <2 x double>, ptr %48, align 8, !tbaa !21
  %wide.load114 = load <2 x double>, ptr %49, align 8, !tbaa !21
  %50 = getelementptr inbounds double, ptr %39, i64 %index112
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %wide.load115 = load <2 x double>, ptr %50, align 8, !tbaa !21
  %wide.load116 = load <2 x double>, ptr %51, align 8, !tbaa !21
  %52 = fadd <2 x double> %wide.load113, %wide.load115
  %53 = fadd <2 x double> %wide.load114, %wide.load116
  %54 = fmul <2 x double> %52, <double 5.000000e-01, double 5.000000e-01>
  %55 = fmul <2 x double> %53, <double 5.000000e-01, double 5.000000e-01>
  %56 = getelementptr inbounds double, ptr %41, i64 %index112
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  store <2 x double> %54, ptr %56, align 8, !tbaa !21
  store <2 x double> %55, ptr %57, align 8, !tbaa !21
  %index.next117 = add nuw i64 %index112, 4
  %58 = icmp eq i64 %index.next117, %n.vec109
  br i1 %58, label %middle.block104, label %vector.body111, !llvm.loop !22

middle.block104:                                  ; preds = %vector.body111
  %cmp.n118 = icmp eq i64 %n.vec109, %wide.trip.count
  br i1 %cmp.n118, label %._crit_edge, label %.lr.ph.preheader119

.lr.ph.preheader119:                              ; preds = %middle.block104, %vector.memcheck100, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck100 ], [ 0, %.lr.ph.preheader ], [ %n.vec109, %middle.block104 ]
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader119
  %59 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.ph
  %60 = load double, ptr %59, align 8, !tbaa !21
  %61 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.ph
  %62 = load double, ptr %61, align 8, !tbaa !21
  %63 = fadd double %60, %62
  %64 = fmul double %63, 5.000000e-01
  %65 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.ph
  store double %64, ptr %65, align 8, !tbaa !21
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader119
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader119 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %66 = add nsw i64 %wide.trip.count, -1
  %67 = icmp eq i64 %indvars.iv.ph, %66
  br i1 %67, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1121, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %68 = getelementptr inbounds double, ptr %33, i64 %indvars.iv
  %69 = load double, ptr %68, align 8, !tbaa !21
  %70 = getelementptr inbounds double, ptr %39, i64 %indvars.iv
  %71 = load double, ptr %70, align 8, !tbaa !21
  %72 = fadd double %69, %71
  %73 = fmul double %72, 5.000000e-01
  %74 = getelementptr inbounds double, ptr %41, i64 %indvars.iv
  store double %73, ptr %74, align 8, !tbaa !21
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %75 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next
  %76 = load double, ptr %75, align 8, !tbaa !21
  %77 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next
  %78 = load double, ptr %77, align 8, !tbaa !21
  %79 = fadd double %76, %78
  %80 = fmul double %79, 5.000000e-01
  %81 = getelementptr inbounds double, ptr %41, i64 %indvars.iv.next
  store double %80, ptr %81, align 8, !tbaa !21
  %indvars.iv.next.1121 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.1122 = icmp eq i64 %indvars.iv.next.1121, %wide.trip.count
  br i1 %exitcond.1122, label %._crit_edge, label %.lr.ph, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block104, %28
  %82 = load ptr, ptr %11, align 8, !tbaa !18
  %83 = icmp eq ptr %82, %23
  %84 = zext i1 %83 to i32
  %85 = load i32, ptr %13, align 4, !tbaa !27
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %41, i64 %86
  store i32 %84, ptr %87, align 4, !tbaa !19
  %88 = select i1 %83, i32 2, i32 1
  %89 = load i32, ptr %13, align 4, !tbaa !27
  %90 = sext i32 %89 to i64
  %91 = getelementptr i32, ptr %41, i64 %90
  %92 = getelementptr i8, ptr %91, i64 4
  store i32 %88, ptr %92, align 4, !tbaa !19
  %93 = load i32, ptr %14, align 8, !tbaa !28
  %.not63 = icmp eq i32 %93, 0
  br i1 %.not63, label %111, label %94

94:                                               ; preds = %._crit_edge
  %95 = getelementptr inbounds i8, ptr %.sroa.027.069, i64 48
  %96 = load ptr, ptr %95, align 8, !tbaa !17
  %97 = ptrtoint ptr %96 to i64
  %98 = and i64 %97, -4
  %99 = inttoptr i64 %98 to ptr
  %100 = load ptr, ptr %15, align 8, !tbaa !29
  %.not64 = icmp eq ptr %100, %99
  br i1 %.not64, label %111, label %101

101:                                              ; preds = %94
  %102 = getelementptr inbounds i8, ptr %99, i64 64
  %103 = load i32, ptr %102, align 4, !tbaa !19
  %104 = load i32, ptr %13, align 4, !tbaa !27
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %41, i64 %105
  store i32 %103, ptr %106, align 4, !tbaa !19
  %107 = load i32, ptr %13, align 4, !tbaa !27
  %108 = sext i32 %107 to i64
  %109 = getelementptr i32, ptr %41, i64 %108
  %110 = getelementptr i8, ptr %109, i64 4
  store i32 1, ptr %110, align 4, !tbaa !19
  br label %111

111:                                              ; preds = %94, %101, %._crit_edge
  %112 = load i32, ptr %16, align 4, !tbaa !30
  %113 = icmp sgt i32 %112, 1
  br i1 %113, label %114, label %119

114:                                              ; preds = %111
  %115 = load double, ptr %41, align 8, !tbaa !21
  %116 = getelementptr inbounds i8, ptr %41, i64 8
  %117 = load double, ptr %116, align 8, !tbaa !21
  %118 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1065, double noundef %115, double noundef %117)
  br label %119

119:                                              ; preds = %114, %111
  %120 = load i32, ptr %17, align 4, !tbaa !31
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %121
  store ptr %41, ptr %122, align 8, !tbaa !17
  %123 = load ptr, ptr %11, align 8, !tbaa !18
  %.not65 = icmp eq ptr %123, %23
  br i1 %.not65, label %128, label %124

124:                                              ; preds = %119
  %125 = add nsw i32 %120, %21
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %23, i64 %126
  store ptr %41, ptr %127, align 8, !tbaa !17
  br label %128

128:                                              ; preds = %25, %124, %119
  %129 = getelementptr inbounds i8, ptr %.sroa.027.069, i64 8
  %130 = load ptr, ptr %129, align 8, !tbaa !17
  %131 = ptrtoint ptr %130 to i64
  %132 = trunc i64 %131 to i32
  %133 = and i32 %132, 3
  %134 = and i64 %131, -4
  %135 = inttoptr i64 %134 to ptr
  %136 = icmp ult ptr %.sroa.027.069, %135
  br i1 %136, label %140, label %137

137:                                              ; preds = %128
  %138 = load ptr, ptr %11, align 8, !tbaa !18
  %139 = icmp eq ptr %138, %135
  br i1 %139, label %140, label %241

140:                                              ; preds = %137, %128
  %141 = load i32, ptr getelementptr inbounds (i8, ptr @plus1mod3, i64 4), align 4, !tbaa !19
  %142 = add nsw i32 %141, 3
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !17
  %146 = ptrtoint ptr %145 to i64
  %147 = load i32, ptr getelementptr inbounds (i8, ptr @minus1mod3, i64 4), align 4, !tbaa !19
  %148 = add nsw i32 %147, 3
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %149
  %151 = load ptr, ptr %150, align 8, !tbaa !17
  %152 = ptrtoint ptr %151 to i64
  %153 = tail call ptr @poolalloc(ptr noundef nonnull %8)
  %154 = ptrtoint ptr %153 to i64
  %155 = load i32, ptr %12, align 4, !tbaa !20
  %156 = icmp sgt i32 %155, -2
  br i1 %156, label %.lr.ph.preheader.1, label %._crit_edge.1

.lr.ph.preheader.1:                               ; preds = %140
  %157 = add i32 %155, 2
  %wide.trip.count.1 = zext i32 %157 to i64
  %min.iters.check87 = icmp ult i32 %157, 4
  br i1 %min.iters.check87, label %.lr.ph.1.preheader, label %vector.memcheck81

vector.memcheck81:                                ; preds = %.lr.ph.preheader.1
  %158 = sub i64 %154, %146
  %diff.check82 = icmp ult i64 %158, 32
  %159 = sub i64 %154, %152
  %diff.check83 = icmp ult i64 %159, 32
  %conflict.rdx84 = or i1 %diff.check82, %diff.check83
  br i1 %conflict.rdx84, label %.lr.ph.1.preheader, label %vector.ph88

vector.ph88:                                      ; preds = %vector.memcheck81
  %n.vec90 = and i64 %wide.trip.count.1, 4294967292
  br label %vector.body92

vector.body92:                                    ; preds = %vector.body92, %vector.ph88
  %index93 = phi i64 [ 0, %vector.ph88 ], [ %index.next98, %vector.body92 ]
  %160 = getelementptr inbounds double, ptr %145, i64 %index93
  %161 = getelementptr inbounds i8, ptr %160, i64 16
  %wide.load94 = load <2 x double>, ptr %160, align 8, !tbaa !21
  %wide.load95 = load <2 x double>, ptr %161, align 8, !tbaa !21
  %162 = getelementptr inbounds double, ptr %151, i64 %index93
  %163 = getelementptr inbounds i8, ptr %162, i64 16
  %wide.load96 = load <2 x double>, ptr %162, align 8, !tbaa !21
  %wide.load97 = load <2 x double>, ptr %163, align 8, !tbaa !21
  %164 = fadd <2 x double> %wide.load94, %wide.load96
  %165 = fadd <2 x double> %wide.load95, %wide.load97
  %166 = fmul <2 x double> %164, <double 5.000000e-01, double 5.000000e-01>
  %167 = fmul <2 x double> %165, <double 5.000000e-01, double 5.000000e-01>
  %168 = getelementptr inbounds double, ptr %153, i64 %index93
  %169 = getelementptr inbounds i8, ptr %168, i64 16
  store <2 x double> %166, ptr %168, align 8, !tbaa !21
  store <2 x double> %167, ptr %169, align 8, !tbaa !21
  %index.next98 = add nuw i64 %index93, 4
  %170 = icmp eq i64 %index.next98, %n.vec90
  br i1 %170, label %middle.block85, label %vector.body92, !llvm.loop !32

middle.block85:                                   ; preds = %vector.body92
  %cmp.n99 = icmp eq i64 %n.vec90, %wide.trip.count.1
  br i1 %cmp.n99, label %._crit_edge.1, label %.lr.ph.1.preheader

.lr.ph.1.preheader:                               ; preds = %middle.block85, %vector.memcheck81, %.lr.ph.preheader.1
  %indvars.iv.1.ph = phi i64 [ 0, %vector.memcheck81 ], [ 0, %.lr.ph.preheader.1 ], [ %n.vec90, %middle.block85 ]
  %xtraiter124 = and i64 %wide.trip.count.1, 1
  %lcmp.mod125.not = icmp eq i64 %xtraiter124, 0
  br i1 %lcmp.mod125.not, label %.lr.ph.1.prol.loopexit, label %.lr.ph.1.prol

.lr.ph.1.prol:                                    ; preds = %.lr.ph.1.preheader
  %171 = getelementptr inbounds double, ptr %145, i64 %indvars.iv.1.ph
  %172 = load double, ptr %171, align 8, !tbaa !21
  %173 = getelementptr inbounds double, ptr %151, i64 %indvars.iv.1.ph
  %174 = load double, ptr %173, align 8, !tbaa !21
  %175 = fadd double %172, %174
  %176 = fmul double %175, 5.000000e-01
  %177 = getelementptr inbounds double, ptr %153, i64 %indvars.iv.1.ph
  store double %176, ptr %177, align 8, !tbaa !21
  %indvars.iv.next.1.prol = or disjoint i64 %indvars.iv.1.ph, 1
  br label %.lr.ph.1.prol.loopexit

.lr.ph.1.prol.loopexit:                           ; preds = %.lr.ph.1.prol, %.lr.ph.1.preheader
  %indvars.iv.1.unr = phi i64 [ %indvars.iv.1.ph, %.lr.ph.1.preheader ], [ %indvars.iv.next.1.prol, %.lr.ph.1.prol ]
  %178 = add nsw i64 %wide.trip.count.1, -1
  %179 = icmp eq i64 %indvars.iv.1.ph, %178
  br i1 %179, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph.1.prol.loopexit, %.lr.ph.1
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1.1, %.lr.ph.1 ], [ %indvars.iv.1.unr, %.lr.ph.1.prol.loopexit ]
  %180 = getelementptr inbounds double, ptr %145, i64 %indvars.iv.1
  %181 = load double, ptr %180, align 8, !tbaa !21
  %182 = getelementptr inbounds double, ptr %151, i64 %indvars.iv.1
  %183 = load double, ptr %182, align 8, !tbaa !21
  %184 = fadd double %181, %183
  %185 = fmul double %184, 5.000000e-01
  %186 = getelementptr inbounds double, ptr %153, i64 %indvars.iv.1
  store double %185, ptr %186, align 8, !tbaa !21
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %187 = getelementptr inbounds double, ptr %145, i64 %indvars.iv.next.1
  %188 = load double, ptr %187, align 8, !tbaa !21
  %189 = getelementptr inbounds double, ptr %151, i64 %indvars.iv.next.1
  %190 = load double, ptr %189, align 8, !tbaa !21
  %191 = fadd double %188, %190
  %192 = fmul double %191, 5.000000e-01
  %193 = getelementptr inbounds double, ptr %153, i64 %indvars.iv.next.1
  store double %192, ptr %193, align 8, !tbaa !21
  %indvars.iv.next.1.1 = add nuw nsw i64 %indvars.iv.1, 2
  %exitcond.1.1 = icmp eq i64 %indvars.iv.next.1.1, %wide.trip.count.1
  br i1 %exitcond.1.1, label %._crit_edge.1, label %.lr.ph.1, !llvm.loop !33

._crit_edge.1:                                    ; preds = %.lr.ph.1.prol.loopexit, %.lr.ph.1, %middle.block85, %140
  %194 = load ptr, ptr %11, align 8, !tbaa !18
  %195 = icmp eq ptr %194, %135
  %196 = zext i1 %195 to i32
  %197 = load i32, ptr %13, align 4, !tbaa !27
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i32, ptr %153, i64 %198
  store i32 %196, ptr %199, align 4, !tbaa !19
  %200 = select i1 %195, i32 2, i32 1
  %201 = load i32, ptr %13, align 4, !tbaa !27
  %202 = sext i32 %201 to i64
  %203 = getelementptr i32, ptr %153, i64 %202
  %204 = getelementptr i8, ptr %203, i64 4
  store i32 %200, ptr %204, align 4, !tbaa !19
  %205 = load i32, ptr %14, align 8, !tbaa !28
  %.not63.1 = icmp eq i32 %205, 0
  br i1 %.not63.1, label %223, label %206

206:                                              ; preds = %._crit_edge.1
  %207 = getelementptr inbounds i8, ptr %.sroa.027.069, i64 56
  %208 = load ptr, ptr %207, align 8, !tbaa !17
  %209 = ptrtoint ptr %208 to i64
  %210 = and i64 %209, -4
  %211 = inttoptr i64 %210 to ptr
  %212 = load ptr, ptr %15, align 8, !tbaa !29
  %.not64.1 = icmp eq ptr %212, %211
  br i1 %.not64.1, label %223, label %213

213:                                              ; preds = %206
  %214 = getelementptr inbounds i8, ptr %211, i64 64
  %215 = load i32, ptr %214, align 4, !tbaa !19
  %216 = load i32, ptr %13, align 4, !tbaa !27
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i32, ptr %153, i64 %217
  store i32 %215, ptr %218, align 4, !tbaa !19
  %219 = load i32, ptr %13, align 4, !tbaa !27
  %220 = sext i32 %219 to i64
  %221 = getelementptr i32, ptr %153, i64 %220
  %222 = getelementptr i8, ptr %221, i64 4
  store i32 1, ptr %222, align 4, !tbaa !19
  br label %223

223:                                              ; preds = %213, %206, %._crit_edge.1
  %224 = load i32, ptr %16, align 4, !tbaa !30
  %225 = icmp sgt i32 %224, 1
  br i1 %225, label %226, label %231

226:                                              ; preds = %223
  %227 = load double, ptr %153, align 8, !tbaa !21
  %228 = getelementptr inbounds i8, ptr %153, i64 8
  %229 = load double, ptr %228, align 8, !tbaa !21
  %230 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1065, double noundef %227, double noundef %229)
  br label %231

231:                                              ; preds = %226, %223
  %232 = load i32, ptr %17, align 4, !tbaa !31
  %233 = add nsw i32 %232, 1
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %234
  store ptr %153, ptr %235, align 8, !tbaa !17
  %236 = load ptr, ptr %11, align 8, !tbaa !18
  %.not65.1 = icmp eq ptr %236, %135
  br i1 %.not65.1, label %241, label %237

237:                                              ; preds = %231
  %238 = add nsw i32 %232, %133
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds ptr, ptr %135, i64 %239
  store ptr %153, ptr %240, align 8, !tbaa !17
  br label %241

241:                                              ; preds = %237, %231, %137
  %242 = getelementptr inbounds i8, ptr %.sroa.027.069, i64 16
  %243 = load ptr, ptr %242, align 8, !tbaa !17
  %244 = ptrtoint ptr %243 to i64
  %245 = trunc i64 %244 to i32
  %246 = and i32 %245, 3
  %247 = and i64 %244, -4
  %248 = inttoptr i64 %247 to ptr
  %249 = icmp ult ptr %.sroa.027.069, %248
  br i1 %249, label %253, label %250

250:                                              ; preds = %241
  %251 = load ptr, ptr %11, align 8, !tbaa !18
  %252 = icmp eq ptr %251, %248
  br i1 %252, label %253, label %354

253:                                              ; preds = %250, %241
  %254 = load i32, ptr getelementptr inbounds (i8, ptr @plus1mod3, i64 8), align 4, !tbaa !19
  %255 = add nsw i32 %254, 3
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %256
  %258 = load ptr, ptr %257, align 8, !tbaa !17
  %259 = ptrtoint ptr %258 to i64
  %260 = load i32, ptr getelementptr inbounds (i8, ptr @minus1mod3, i64 8), align 4, !tbaa !19
  %261 = add nsw i32 %260, 3
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %262
  %264 = load ptr, ptr %263, align 8, !tbaa !17
  %265 = ptrtoint ptr %264 to i64
  %266 = tail call ptr @poolalloc(ptr noundef nonnull %8)
  %267 = ptrtoint ptr %266 to i64
  %268 = load i32, ptr %12, align 4, !tbaa !20
  %269 = icmp sgt i32 %268, -2
  br i1 %269, label %.lr.ph.preheader.2, label %._crit_edge.2

.lr.ph.preheader.2:                               ; preds = %253
  %270 = add i32 %268, 2
  %wide.trip.count.2 = zext i32 %270 to i64
  %min.iters.check = icmp ult i32 %270, 4
  br i1 %min.iters.check, label %.lr.ph.2.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph.preheader.2
  %271 = sub i64 %267, %259
  %diff.check = icmp ult i64 %271, 32
  %272 = sub i64 %267, %265
  %diff.check77 = icmp ult i64 %272, 32
  %conflict.rdx = or i1 %diff.check, %diff.check77
  br i1 %conflict.rdx, label %.lr.ph.2.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count.2, 4294967292
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %273 = getelementptr inbounds double, ptr %258, i64 %index
  %274 = getelementptr inbounds i8, ptr %273, i64 16
  %wide.load = load <2 x double>, ptr %273, align 8, !tbaa !21
  %wide.load78 = load <2 x double>, ptr %274, align 8, !tbaa !21
  %275 = getelementptr inbounds double, ptr %264, i64 %index
  %276 = getelementptr inbounds i8, ptr %275, i64 16
  %wide.load79 = load <2 x double>, ptr %275, align 8, !tbaa !21
  %wide.load80 = load <2 x double>, ptr %276, align 8, !tbaa !21
  %277 = fadd <2 x double> %wide.load, %wide.load79
  %278 = fadd <2 x double> %wide.load78, %wide.load80
  %279 = fmul <2 x double> %277, <double 5.000000e-01, double 5.000000e-01>
  %280 = fmul <2 x double> %278, <double 5.000000e-01, double 5.000000e-01>
  %281 = getelementptr inbounds double, ptr %266, i64 %index
  %282 = getelementptr inbounds i8, ptr %281, i64 16
  store <2 x double> %279, ptr %281, align 8, !tbaa !21
  store <2 x double> %280, ptr %282, align 8, !tbaa !21
  %index.next = add nuw i64 %index, 4
  %283 = icmp eq i64 %index.next, %n.vec
  br i1 %283, label %middle.block, label %vector.body, !llvm.loop !34

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count.2
  br i1 %cmp.n, label %._crit_edge.2, label %.lr.ph.2.preheader

.lr.ph.2.preheader:                               ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader.2
  %indvars.iv.2.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader.2 ], [ %n.vec, %middle.block ]
  %xtraiter126 = and i64 %wide.trip.count.2, 1
  %lcmp.mod127.not = icmp eq i64 %xtraiter126, 0
  br i1 %lcmp.mod127.not, label %.lr.ph.2.prol.loopexit, label %.lr.ph.2.prol

.lr.ph.2.prol:                                    ; preds = %.lr.ph.2.preheader
  %284 = getelementptr inbounds double, ptr %258, i64 %indvars.iv.2.ph
  %285 = load double, ptr %284, align 8, !tbaa !21
  %286 = getelementptr inbounds double, ptr %264, i64 %indvars.iv.2.ph
  %287 = load double, ptr %286, align 8, !tbaa !21
  %288 = fadd double %285, %287
  %289 = fmul double %288, 5.000000e-01
  %290 = getelementptr inbounds double, ptr %266, i64 %indvars.iv.2.ph
  store double %289, ptr %290, align 8, !tbaa !21
  %indvars.iv.next.2.prol = or disjoint i64 %indvars.iv.2.ph, 1
  br label %.lr.ph.2.prol.loopexit

.lr.ph.2.prol.loopexit:                           ; preds = %.lr.ph.2.prol, %.lr.ph.2.preheader
  %indvars.iv.2.unr = phi i64 [ %indvars.iv.2.ph, %.lr.ph.2.preheader ], [ %indvars.iv.next.2.prol, %.lr.ph.2.prol ]
  %291 = add nsw i64 %wide.trip.count.2, -1
  %292 = icmp eq i64 %indvars.iv.2.ph, %291
  br i1 %292, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.lr.ph.2.prol.loopexit, %.lr.ph.2
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2.1, %.lr.ph.2 ], [ %indvars.iv.2.unr, %.lr.ph.2.prol.loopexit ]
  %293 = getelementptr inbounds double, ptr %258, i64 %indvars.iv.2
  %294 = load double, ptr %293, align 8, !tbaa !21
  %295 = getelementptr inbounds double, ptr %264, i64 %indvars.iv.2
  %296 = load double, ptr %295, align 8, !tbaa !21
  %297 = fadd double %294, %296
  %298 = fmul double %297, 5.000000e-01
  %299 = getelementptr inbounds double, ptr %266, i64 %indvars.iv.2
  store double %298, ptr %299, align 8, !tbaa !21
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %300 = getelementptr inbounds double, ptr %258, i64 %indvars.iv.next.2
  %301 = load double, ptr %300, align 8, !tbaa !21
  %302 = getelementptr inbounds double, ptr %264, i64 %indvars.iv.next.2
  %303 = load double, ptr %302, align 8, !tbaa !21
  %304 = fadd double %301, %303
  %305 = fmul double %304, 5.000000e-01
  %306 = getelementptr inbounds double, ptr %266, i64 %indvars.iv.next.2
  store double %305, ptr %306, align 8, !tbaa !21
  %indvars.iv.next.2.1 = add nuw nsw i64 %indvars.iv.2, 2
  %exitcond.2.1 = icmp eq i64 %indvars.iv.next.2.1, %wide.trip.count.2
  br i1 %exitcond.2.1, label %._crit_edge.2, label %.lr.ph.2, !llvm.loop !35

._crit_edge.2:                                    ; preds = %.lr.ph.2.prol.loopexit, %.lr.ph.2, %middle.block, %253
  %307 = load ptr, ptr %11, align 8, !tbaa !18
  %308 = icmp eq ptr %307, %248
  %309 = zext i1 %308 to i32
  %310 = load i32, ptr %13, align 4, !tbaa !27
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds i32, ptr %266, i64 %311
  store i32 %309, ptr %312, align 4, !tbaa !19
  %313 = select i1 %308, i32 2, i32 1
  %314 = load i32, ptr %13, align 4, !tbaa !27
  %315 = sext i32 %314 to i64
  %316 = getelementptr i32, ptr %266, i64 %315
  %317 = getelementptr i8, ptr %316, i64 4
  store i32 %313, ptr %317, align 4, !tbaa !19
  %318 = load i32, ptr %14, align 8, !tbaa !28
  %.not63.2 = icmp eq i32 %318, 0
  br i1 %.not63.2, label %336, label %319

319:                                              ; preds = %._crit_edge.2
  %320 = getelementptr inbounds i8, ptr %.sroa.027.069, i64 64
  %321 = load ptr, ptr %320, align 8, !tbaa !17
  %322 = ptrtoint ptr %321 to i64
  %323 = and i64 %322, -4
  %324 = inttoptr i64 %323 to ptr
  %325 = load ptr, ptr %15, align 8, !tbaa !29
  %.not64.2 = icmp eq ptr %325, %324
  br i1 %.not64.2, label %336, label %326

326:                                              ; preds = %319
  %327 = getelementptr inbounds i8, ptr %324, i64 64
  %328 = load i32, ptr %327, align 4, !tbaa !19
  %329 = load i32, ptr %13, align 4, !tbaa !27
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds i32, ptr %266, i64 %330
  store i32 %328, ptr %331, align 4, !tbaa !19
  %332 = load i32, ptr %13, align 4, !tbaa !27
  %333 = sext i32 %332 to i64
  %334 = getelementptr i32, ptr %266, i64 %333
  %335 = getelementptr i8, ptr %334, i64 4
  store i32 1, ptr %335, align 4, !tbaa !19
  br label %336

336:                                              ; preds = %326, %319, %._crit_edge.2
  %337 = load i32, ptr %16, align 4, !tbaa !30
  %338 = icmp sgt i32 %337, 1
  br i1 %338, label %339, label %344

339:                                              ; preds = %336
  %340 = load double, ptr %266, align 8, !tbaa !21
  %341 = getelementptr inbounds i8, ptr %266, i64 8
  %342 = load double, ptr %341, align 8, !tbaa !21
  %343 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1065, double noundef %340, double noundef %342)
  br label %344

344:                                              ; preds = %339, %336
  %345 = load i32, ptr %17, align 4, !tbaa !31
  %346 = add nsw i32 %345, 2
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds ptr, ptr %.sroa.027.069, i64 %347
  store ptr %266, ptr %348, align 8, !tbaa !17
  %349 = load ptr, ptr %11, align 8, !tbaa !18
  %.not65.2 = icmp eq ptr %349, %248
  br i1 %.not65.2, label %354, label %350

350:                                              ; preds = %344
  %351 = add nsw i32 %345, %246
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds ptr, ptr %248, i64 %352
  store ptr %266, ptr %353, align 8, !tbaa !17
  br label %354

354:                                              ; preds = %350, %344, %250
  %355 = tail call ptr @triangletraverse(ptr noundef nonnull %0)
  %.not62 = icmp eq ptr %355, null
  br i1 %.not62, label %._crit_edge70, label %.preheader, !llvm.loop !36

._crit_edge70:                                    ; preds = %354, %7
  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 112}
!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 144, !10, i64 152, !10, i64 160, !8, i64 168, !8, i64 2216, !8, i64 4264, !8, i64 6312, !8, i64 8360, !8, i64 10408, !8, i64 12456, !8, i64 14504, !8, i64 16552, !8, i64 18600, !8, i64 20648, !8, i64 22696}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!12, !14, i64 200}
!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 82648, !10, i64 82656, !10, i64 82664, !10, i64 82672, !7, i64 82680, !7, i64 82684, !7, i64 82688, !7, i64 82692, !7, i64 82696, !7, i64 82700, !15, i64 82704, !7, i64 82712, !7, i64 82716, !7, i64 82720, !15, i64 82728, !7, i64 82736, !7, i64 82740, !7, i64 82744, !7, i64 82748, !7, i64 82752, !7, i64 82756, !7, i64 82760, !7, i64 82764, !7, i64 82768, !15, i64 82776, !15, i64 82784, !15, i64 82792, !15, i64 82800, !15, i64 82808, !15, i64 82816, !15, i64 82824, !14, i64 82832, !14, i64 82840, !14, i64 82848, !14, i64 82856, !14, i64 82864, !14, i64 82872, !14, i64 82880, !16, i64 82888}
!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 82716}
!21 = !{!10, !10, i64 0}
!22 = distinct !{!22, !23, !24, !25}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !23, !24}
!27 = !{!12, !7, i64 82740}
!28 = !{!6, !7, i64 120}
!29 = !{!12, !14, i64 82872}
!30 = !{!6, !7, i64 116}
!31 = !{!12, !7, i64 82748}
!32 = distinct !{!32, !23, !24, !25}
!33 = distinct !{!33, !23, !24}
!34 = distinct !{!34, !23, !24, !25}
!35 = distinct !{!35, !23, !24}
!36 = distinct !{!36, !23}


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