; LLVM IR from bohanwang/libpgo :: src/core/mesh/predicates.ll (ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_)

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

@.str = external hidden unnamed_addr constant [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_ = external hidden unnamed_addr constant [113 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca [8 x [3 x double]], align 16
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZN12_GLOBAL__N_118isValidBoundingBoxEPKdS1_(ptr noundef %20, ptr noundef %21)
  br i1 %22, label %23, label %24

23:                                               ; preds = %5
  br label %26

24:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 731, ptr noundef @__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_) #5
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef %27, ptr noundef %28, ptr noundef %29)
  br i1 %30, label %31, label %32

31:                                               ; preds = %26
  store i1 true, ptr %6, align 1
  br label %256

32:                                               ; preds = %26
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = call noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef %33, ptr noundef %34, ptr noundef %35)
  br i1 %36, label %37, label %38

37:                                               ; preds = %32
  store i1 true, ptr %6, align 1
  br label %256

38:                                               ; preds = %32
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef %39, ptr noundef %40, ptr noundef %41)
  br i1 %42, label %43, label %44

43:                                               ; preds = %38
  store i1 true, ptr %6, align 1
  br label %256

44:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %45, i64 0
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds double, ptr %47, i64 0
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %48)
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %50, i64 0
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(8) %51)
  %53 = load double, ptr %52, align 8, !tbaa !9
  store double %53, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 1
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %56, i64 1
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(8) %57)
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %59, i64 1
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %60)
  %62 = load double, ptr %61, align 8, !tbaa !9
  store double %62, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds double, ptr %63, i64 2
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %65, i64 2
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %66)
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds double, ptr %68, i64 2
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %69)
  %71 = load double, ptr %70, align 8, !tbaa !9
  store double %71, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %72, i64 0
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 0
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %75)
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 0
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef nonnull align 8 dereferenceable(8) %78)
  %80 = load double, ptr %79, align 8, !tbaa !9
  store double %80, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %81, i64 1
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds double, ptr %83, i64 1
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef nonnull align 8 dereferenceable(8) %84)
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 1
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull align 8 dereferenceable(8) %87)
  %89 = load double, ptr %88, align 8, !tbaa !9
  store double %89, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds double, ptr %90, i64 2
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds double, ptr %92, i64 2
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef nonnull align 8 dereferenceable(8) %93)
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds double, ptr %95, i64 2
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull align 8 dereferenceable(8) %96)
  %98 = load double, ptr %97, align 8, !tbaa !9
  store double %98, ptr %17, align 8, !tbaa !9
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds double, ptr %99, i64 0
  %101 = load double, ptr %100, align 8, !tbaa !9
  %102 = load double, ptr %12, align 8, !tbaa !9
  %103 = fcmp olt double %101, %102
  br i1 %103, label %134, label %104

104:                                              ; preds = %44
  %105 = load double, ptr %15, align 8, !tbaa !9
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = getelementptr inbounds double, ptr %106, i64 0
  %108 = load double, ptr %107, align 8, !tbaa !9
  %109 = fcmp olt double %105, %108
  br i1 %109, label %134, label %110

110:                                              ; preds = %104
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds double, ptr %111, i64 1
  %113 = load double, ptr %112, align 8, !tbaa !9
  %114 = load double, ptr %13, align 8, !tbaa !9
  %115 = fcmp olt double %113, %114
  br i1 %115, label %134, label %116

116:                                              ; preds = %110
  %117 = load double, ptr %16, align 8, !tbaa !9
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds double, ptr %118, i64 1
  %120 = load double, ptr %119, align 8, !tbaa !9
  %121 = fcmp olt double %117, %120
  br i1 %121, label %134, label %122

122:                                              ; preds = %116
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds double, ptr %123, i64 2
  %125 = load double, ptr %124, align 8, !tbaa !9
  %126 = load double, ptr %14, align 8, !tbaa !9
  %127 = fcmp olt double %125, %126
  br i1 %127, label %134, label %128

128:                                              ; preds = %122
  %129 = load double, ptr %17, align 8, !tbaa !9
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = getelementptr inbounds double, ptr %130, i64 2
  %132 = load double, ptr %131, align 8, !tbaa !9
  %133 = fcmp olt double %129, %132
  br i1 %133, label %134, label %135

134:                                              ; preds = %128, %122, %116, %110, %104, %44
  store i1 false, ptr %6, align 1
  store i32 1, ptr %18, align 4
  br label %255

135:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 192, ptr %19) #6
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds double, ptr %136, i64 0
  %138 = load double, ptr %137, align 8, !tbaa !9
  store double %138, ptr %19, align 8, !tbaa !9
  %139 = getelementptr inbounds double, ptr %19, i64 1
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds double, ptr %140, i64 1
  %142 = load double, ptr %141, align 8, !tbaa !9
  store double %142, ptr %139, align 8, !tbaa !9
  %143 = getelementptr inbounds double, ptr %19, i64 2
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 2
  %146 = load double, ptr %145, align 8, !tbaa !9
  store double %146, ptr %143, align 8, !tbaa !9
  %147 = getelementptr inbounds [3 x double], ptr %19, i64 1
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds double, ptr %148, i64 0
  %150 = load double, ptr %149, align 8, !tbaa !9
  store double %150, ptr %147, align 8, !tbaa !9
  %151 = getelementptr inbounds double, ptr %147, i64 1
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = getelementptr inbounds double, ptr %152, i64 1
  %154 = load double, ptr %153, align 8, !tbaa !9
  store double %154, ptr %151, align 8, !tbaa !9
  %155 = getelementptr inbounds double, ptr %147, i64 2
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %156, i64 2
  %158 = load double, ptr %157, align 8, !tbaa !9
  store double %158, ptr %155, align 8, !tbaa !9
  %159 = getelementptr inbounds [3 x double], ptr %19, i64 2
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  %161 = getelementptr inbounds double, ptr %160, i64 0
  %162 = load double, ptr %161, align 8, !tbaa !9
  store double %162, ptr %159, align 8, !tbaa !9
  %163 = getelementptr inbounds double, ptr %159, i64 1
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = getelementptr inbounds double, ptr %164, i64 1
  %166 = load double, ptr %165, align 8, !tbaa !9
  store double %166, ptr %163, align 8, !tbaa !9
  %167 = getelementptr inbounds double, ptr %159, i64 2
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  %169 = getelementptr inbounds double, ptr %168, i64 2
  %170 = load double, ptr %169, align 8, !tbaa !9
  store double %170, ptr %167, align 8, !tbaa !9
  %171 = getelementptr inbounds [3 x double], ptr %19, i64 3
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds double, ptr %172, i64 0
  %174 = load double, ptr %173, align 8, !tbaa !9
  store double %174, ptr %171, align 8, !tbaa !9
  %175 = getelementptr inbounds double, ptr %171, i64 1
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  %177 = getelementptr inbounds double, ptr %176, i64 1
  %178 = load double, ptr %177, align 8, !tbaa !9
  store double %178, ptr %175, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %171, i64 2
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = getelementptr inbounds double, ptr %180, i64 2
  %182 = load double, ptr %181, align 8, !tbaa !9
  store double %182, ptr %179, align 8, !tbaa !9
  %183 = getelementptr inbounds [3 x double], ptr %19, i64 4
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = getelementptr inbounds double, ptr %184, i64 0
  %186 = load double, ptr %185, align 8, !tbaa !9
  store double %186, ptr %183, align 8, !tbaa !9
  %187 = getelementptr inbounds double, ptr %183, i64 1
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  %189 = getelementptr inbounds double, ptr %188, i64 1
  %190 = load double, ptr %189, align 8, !tbaa !9
  store double %190, ptr %187, align 8, !tbaa !9
  %191 = getelementptr inbounds double, ptr %183, i64 2
  %192 = load ptr, ptr %11, align 8, !tbaa !5
  %193 = getelementptr inbounds double, ptr %192, i64 2
  %194 = load double, ptr %193, align 8, !tbaa !9
  store double %194, ptr %191, align 8, !tbaa !9
  %195 = getelementptr inbounds [3 x double], ptr %19, i64 5
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = getelementptr inbounds double, ptr %196, i64 0
  %198 = load double, ptr %197, align 8, !tbaa !9
  store double %198, ptr %195, align 8, !tbaa !9
  %199 = getelementptr inbounds double, ptr %195, i64 1
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = getelementptr inbounds double, ptr %200, i64 1
  %202 = load double, ptr %201, align 8, !tbaa !9
  store double %202, ptr %199, align 8, !tbaa !9
  %203 = getelementptr inbounds double, ptr %195, i64 2
  %204 = load ptr, ptr %11, align 8, !tbaa !5
  %205 = getelementptr inbounds double, ptr %204, i64 2
  %206 = load double, ptr %205, align 8, !tbaa !9
  store double %206, ptr %203, align 8, !tbaa !9
  %207 = getelementptr inbounds [3 x double], ptr %19, i64 6
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  %209 = getelementptr inbounds double, ptr %208, i64 0
  %210 = load double, ptr %209, align 8, !tbaa !9
  store double %210, ptr %207, align 8, !tbaa !9
  %211 = getelementptr inbounds double, ptr %207, i64 1
  %212 = load ptr, ptr %11, align 8, !tbaa !5
  %213 = getelementptr inbounds double, ptr %212, i64 1
  %214 = load double, ptr %213, align 8, !tbaa !9
  store double %214, ptr %211, align 8, !tbaa !9
  %215 = getelementptr inbounds double, ptr %207, i64 2
  %216 = load ptr, ptr %11, align 8, !tbaa !5
  %217 = getelementptr inbounds double, ptr %216, i64 2
  %218 = load double, ptr %217, align 8, !tbaa !9
  store double %218, ptr %215, align 8, !tbaa !9
  %219 = getelementptr inbounds [3 x double], ptr %19, i64 7
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = getelementptr inbounds double, ptr %220, i64 0
  %222 = load double, ptr %221, align 8, !tbaa !9
  store double %222, ptr %219, align 8, !tbaa !9
  %223 = getelementptr inbounds double, ptr %219, i64 1
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = getelementptr inbounds double, ptr %224, i64 1
  %226 = load double, ptr %225, align 8, !tbaa !9
  store double %226, ptr %223, align 8, !tbaa !9
  %227 = getelementptr inbounds double, ptr %219, i64 2
  %228 = load ptr, ptr %11, align 8, !tbaa !5
  %229 = getelementptr inbounds double, ptr %228, i64 2
  %230 = load double, ptr %229, align 8, !tbaa !9
  store double %230, ptr %227, align 8, !tbaa !9
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = getelementptr inbounds [8 x [3 x double]], ptr %19, i64 0, i64 0
  %234 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef %231, ptr noundef %232, ptr noundef %233)
  br i1 %234, label %245, label %235

235:                                              ; preds = %135
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = getelementptr inbounds [8 x [3 x double]], ptr %19, i64 0, i64 0
  %239 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef %236, ptr noundef %237, ptr noundef %238)
  br i1 %239, label %245, label %240

240:                                              ; preds = %235
  %241 = load ptr, ptr %8, align 8, !tbaa !5
  %242 = load ptr, ptr %9, align 8, !tbaa !5
  %243 = getelementptr inbounds [8 x [3 x double]], ptr %19, i64 0, i64 0
  %244 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef %241, ptr noundef %242, ptr noundef %243)
  br i1 %244, label %245, label %246

245:                                              ; preds = %240, %235, %135
  store i1 true, ptr %6, align 1
  store i32 1, ptr %18, align 4
  br label %254

246:                                              ; preds = %240
  %247 = load ptr, ptr %7, align 8, !tbaa !5
  %248 = load ptr, ptr %8, align 8, !tbaa !5
  %249 = load ptr, ptr %9, align 8, !tbaa !5
  %250 = getelementptr inbounds [8 x [3 x double]], ptr %19, i64 0, i64 0
  %251 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectTriAABBAllEdgesEPKdS3_S3_PA3_S2_(ptr noundef %247, ptr noundef %248, ptr noundef %249, ptr noundef %250)
  br i1 %251, label %252, label %253

252:                                              ; preds = %246
  store i1 true, ptr %6, align 1
  store i32 1, ptr %18, align 4
  br label %254

253:                                              ; preds = %246
  store i1 false, ptr %6, align 1
  store i32 1, ptr %18, align 4
  br label %254

254:                                              ; preds = %253, %252, %245
  call void @llvm.lifetime.end.p0(i64 192, ptr %19) #6
  br label %255

255:                                              ; preds = %254, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %256

256:                                              ; preds = %255, %43, %37, %31
  %257 = load i1, ptr %6, align 1
  ret i1 %257
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_118isValidBoundingBoxEPKdS1_(ptr noundef, ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectTriAABBAllEdgesEPKdS3_S3_PA3_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress 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 = { 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 = { inlinehint 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 #5 = { noreturn nounwind }
attributes #6 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


; 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 [31 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_ = external hidden unnamed_addr constant [113 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca [8 x [3 x double]], align 16
  %7 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_118isValidBoundingBoxEPKdS1_(ptr noundef %3, ptr noundef %4)
  br i1 %7, label %9, label %8

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 731, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectTriAABBEPKdS2_S2_S2_S2_) #5
  unreachable

9:                                                ; preds = %5
  %10 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef %0, ptr noundef %3, ptr noundef %4)
  br i1 %10, label %93, label %11

11:                                               ; preds = %9
  %12 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef %1, ptr noundef %3, ptr noundef %4)
  br i1 %12, label %93, label %13

13:                                               ; preds = %11
  %14 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef %2, ptr noundef %3, ptr noundef %4)
  br i1 %14, label %93, label %15

15:                                               ; preds = %13
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %18 = load double, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %22 = getelementptr inbounds i8, ptr %2, i64 8
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = getelementptr inbounds i8, ptr %1, i64 16
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = getelementptr inbounds i8, ptr %2, i64 16
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = load double, ptr %4, align 8, !tbaa !5
  %41 = fcmp olt double %40, %18
  br i1 %41, label %93, label %42

42:                                               ; preds = %15
  %43 = load double, ptr %3, align 8, !tbaa !5
  %44 = fcmp olt double %33, %43
  br i1 %44, label %93, label %45

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %4, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = fcmp olt double %47, %24
  br i1 %48, label %93, label %49

49:                                               ; preds = %45
  %50 = getelementptr inbounds i8, ptr %3, i64 8
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = fcmp olt double %36, %51
  br i1 %52, label %93, label %53

53:                                               ; preds = %49
  %54 = getelementptr inbounds i8, ptr %4, i64 16
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = fcmp olt double %55, %30
  br i1 %56, label %93, label %57

57:                                               ; preds = %53
  %58 = getelementptr inbounds i8, ptr %3, i64 16
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = fcmp olt double %39, %59
  br i1 %60, label %93, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %6) #6
  store double %43, ptr %6, align 16, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %6, i64 8
  store double %51, ptr %62, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %6, i64 16
  store double %59, ptr %63, align 16, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %6, i64 24
  store double %40, ptr %64, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %6, i64 32
  store double %51, ptr %65, align 16, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %6, i64 40
  store double %59, ptr %66, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %6, i64 48
  store double %40, ptr %67, align 16, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %6, i64 56
  store double %47, ptr %68, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %6, i64 64
  store double %59, ptr %69, align 16, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %6, i64 72
  store double %43, ptr %70, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %6, i64 80
  store double %47, ptr %71, align 16, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %6, i64 88
  store double %59, ptr %72, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %6, i64 96
  store double %43, ptr %73, align 16, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %6, i64 104
  store double %51, ptr %74, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %6, i64 112
  store double %55, ptr %75, align 16, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %6, i64 120
  store double %40, ptr %76, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %6, i64 128
  store double %51, ptr %77, align 16, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %6, i64 136
  store double %55, ptr %78, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %6, i64 144
  store double %40, ptr %79, align 16, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %6, i64 152
  store double %47, ptr %80, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %6, i64 160
  store double %55, ptr %81, align 16, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %6, i64 168
  store double %43, ptr %82, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %6, i64 176
  store double %47, ptr %83, align 16, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %6, i64 184
  store double %55, ptr %84, align 8, !tbaa !5
  %85 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %6)
  br i1 %85, label %92, label %86

86:                                               ; preds = %61
  %87 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %6)
  br i1 %87, label %92, label %88

88:                                               ; preds = %86
  %89 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %6)
  br i1 %89, label %92, label %90

90:                                               ; preds = %88
  %91 = call noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectTriAABBAllEdgesEPKdS3_S3_PA3_S2_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %6)
  br label %92

92:                                               ; preds = %90, %61, %86, %88
  %.0 = phi i1 [ true, %88 ], [ true, %86 ], [ true, %61 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %6) #6
  br label %93

93:                                               ; preds = %92, %57, %53, %49, %45, %42, %15, %13, %11, %9
  %.2 = phi i1 [ true, %9 ], [ true, %11 ], [ true, %13 ], [ %.0, %92 ], [ false, %57 ], [ false, %53 ], [ false, %49 ], [ false, %45 ], [ false, %42 ], [ false, %15 ]
  ret i1 %.2
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_118isValidBoundingBoxEPKdS1_(ptr noundef, ptr 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: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_113inBoundingBoxEPKdS1_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectSegAABBAllFacesEPKdS3_PA3_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3pgo4Mesh12_GLOBAL__N_124intersectTriAABBAllEdgesEPKdS3_S3_PA3_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress 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 = { 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 = { inlinehint 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 #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass