; LLVM IR from bohanwang/libpgo :: src/core/mesh/predicates.ll (ZN3pgo4Mesh16intersectSegAABBEPKdS2_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"

%class.anon = type { i8 }

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [63 x i8], align 1
@__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ = external hidden unnamed_addr constant [97 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
declare dso_local noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %class.anon, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca [8 x [3 x double]], align 16
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = getelementptr inbounds double, ptr %15, i64 0
  %17 = load double, ptr %16, align 8, !tbaa !9
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 0
  %20 = load double, ptr %19, align 8, !tbaa !9
  %21 = fcmp ole double %17, %20
  br i1 %21, label %22, label %38

22:                                               ; preds = %4
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds double, ptr %23, i64 1
  %25 = load double, ptr %24, align 8, !tbaa !9
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds double, ptr %26, i64 1
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = fcmp ole double %25, %28
  br i1 %29, label %30, label %38

30:                                               ; preds = %22
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %31, i64 2
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %34, i64 2
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = fcmp ole double %33, %36
  br label %38

38:                                               ; preds = %30, %22, %4
  %39 = phi i1 [ false, %22 ], [ false, %4 ], [ %37, %30 ]
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  br label %43

41:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 854, ptr noundef @__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_) #4
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = call noundef signext i8 @"_ZZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ENK3$_0clES2_S2_S2_"(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef %44, ptr noundef %45, ptr noundef %46)
  store i8 %47, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = call noundef signext i8 @"_ZZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ENK3$_0clES2_S2_S2_"(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef %48, ptr noundef %49, ptr noundef %50)
  store i8 %51, ptr %12, align 1, !tbaa !11
  %52 = load i8, ptr %11, align 1, !tbaa !11
  %53 = sext i8 %52 to i32
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %59, label %55

55:                                               ; preds = %43
  %56 = load i8, ptr %12, align 1, !tbaa !11
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %60

59:                                               ; preds = %55, %43
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %243

60:                                               ; preds = %55
  %61 = load i8, ptr %11, align 1, !tbaa !11
  %62 = sext i8 %61 to i32
  %63 = load i8, ptr %12, align 1, !tbaa !11
  %64 = sext i8 %63 to i32
  %65 = and i32 %62, %64
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %60
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %243

68:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 192, ptr %14) #5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds double, ptr %69, i64 0
  %71 = load double, ptr %70, align 8, !tbaa !9
  store double %71, ptr %14, align 8, !tbaa !9
  %72 = getelementptr inbounds double, ptr %14, i64 1
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 1
  %75 = load double, ptr %74, align 8, !tbaa !9
  store double %75, ptr %72, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %14, i64 2
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 2
  %79 = load double, ptr %78, align 8, !tbaa !9
  store double %79, ptr %76, align 8, !tbaa !9
  %80 = getelementptr inbounds [3 x double], ptr %14, i64 1
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %81, i64 0
  %83 = load double, ptr %82, align 8, !tbaa !9
  store double %83, ptr %80, align 8, !tbaa !9
  %84 = getelementptr inbounds double, ptr %80, i64 1
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds double, ptr %85, i64 1
  %87 = load double, ptr %86, align 8, !tbaa !9
  store double %87, ptr %84, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %80, i64 2
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds double, ptr %89, i64 2
  %91 = load double, ptr %90, align 8, !tbaa !9
  store double %91, ptr %88, align 8, !tbaa !9
  %92 = getelementptr inbounds [3 x double], ptr %14, i64 2
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds double, ptr %93, i64 0
  %95 = load double, ptr %94, align 8, !tbaa !9
  store double %95, ptr %92, align 8, !tbaa !9
  %96 = getelementptr inbounds double, ptr %92, i64 1
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds double, ptr %97, i64 1
  %99 = load double, ptr %98, align 8, !tbaa !9
  store double %99, ptr %96, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %92, i64 2
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds double, ptr %101, i64 2
  %103 = load double, ptr %102, align 8, !tbaa !9
  store double %103, ptr %100, align 8, !tbaa !9
  %104 = getelementptr inbounds [3 x double], ptr %14, i64 3
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds double, ptr %105, i64 0
  %107 = load double, ptr %106, align 8, !tbaa !9
  store double %107, ptr %104, align 8, !tbaa !9
  %108 = getelementptr inbounds double, ptr %104, i64 1
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds double, ptr %109, i64 1
  %111 = load double, ptr %110, align 8, !tbaa !9
  store double %111, ptr %108, align 8, !tbaa !9
  %112 = getelementptr inbounds double, ptr %104, i64 2
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds double, ptr %113, i64 2
  %115 = load double, ptr %114, align 8, !tbaa !9
  store double %115, ptr %112, align 8, !tbaa !9
  %116 = getelementptr inbounds [3 x double], ptr %14, i64 4
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds double, ptr %117, i64 0
  %119 = load double, ptr %118, align 8, !tbaa !9
  store double %119, ptr %116, align 8, !tbaa !9
  %120 = getelementptr inbounds double, ptr %116, i64 1
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds double, ptr %121, i64 1
  %123 = load double, ptr %122, align 8, !tbaa !9
  store double %123, ptr %120, align 8, !tbaa !9
  %124 = getelementptr inbounds double, ptr %116, i64 2
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds double, ptr %125, i64 2
  %127 = load double, ptr %126, align 8, !tbaa !9
  store double %127, ptr %124, align 8, !tbaa !9
  %128 = getelementptr inbounds [3 x double], ptr %14, i64 5
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds double, ptr %129, i64 0
  %131 = load double, ptr %130, align 8, !tbaa !9
  store double %131, ptr %128, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %128, i64 1
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds double, ptr %133, i64 1
  %135 = load double, ptr %134, align 8, !tbaa !9
  store double %135, ptr %132, align 8, !tbaa !9
  %136 = getelementptr inbounds double, ptr %128, i64 2
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = getelementptr inbounds double, ptr %137, i64 2
  %139 = load double, ptr %138, align 8, !tbaa !9
  store double %139, ptr %136, align 8, !tbaa !9
  %140 = getelementptr inbounds [3 x double], ptr %14, i64 6
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds double, ptr %141, i64 0
  %143 = load double, ptr %142, align 8, !tbaa !9
  store double %143, ptr %140, align 8, !tbaa !9
  %144 = getelementptr inbounds double, ptr %140, i64 1
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds double, ptr %145, i64 1
  %147 = load double, ptr %146, align 8, !tbaa !9
  store double %147, ptr %144, align 8, !tbaa !9
  %148 = getelementptr inbounds double, ptr %140, i64 2
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds double, ptr %149, i64 2
  %151 = load double, ptr %150, align 8, !tbaa !9
  store double %151, ptr %148, align 8, !tbaa !9
  %152 = getelementptr inbounds [3 x double], ptr %14, i64 7
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = getelementptr inbounds double, ptr %153, i64 0
  %155 = load double, ptr %154, align 8, !tbaa !9
  store double %155, ptr %152, align 8, !tbaa !9
  %156 = getelementptr inbounds double, ptr %152, i64 1
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds double, ptr %157, i64 1
  %159 = load double, ptr %158, align 8, !tbaa !9
  store double %159, ptr %156, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %152, i64 2
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds double, ptr %161, i64 2
  %163 = load double, ptr %162, align 8, !tbaa !9
  store double %163, ptr %160, align 8, !tbaa !9
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 0
  %167 = getelementptr inbounds [3 x double], ptr %166, i64 0, i64 0
  %168 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 4
  %169 = getelementptr inbounds [3 x double], ptr %168, i64 0, i64 0
  %170 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 7
  %171 = getelementptr inbounds [3 x double], ptr %170, i64 0, i64 0
  %172 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 3
  %173 = getelementptr inbounds [3 x double], ptr %172, i64 0, i64 0
  %174 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 0, ptr noundef %164, ptr noundef %165, ptr noundef %167, ptr noundef %169, ptr noundef %171, ptr noundef %173)
  br i1 %174, label %175, label %176

175:                                              ; preds = %68
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

176:                                              ; preds = %68
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 1
  %180 = getelementptr inbounds [3 x double], ptr %179, i64 0, i64 0
  %181 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 2
  %182 = getelementptr inbounds [3 x double], ptr %181, i64 0, i64 0
  %183 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 6
  %184 = getelementptr inbounds [3 x double], ptr %183, i64 0, i64 0
  %185 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 5
  %186 = getelementptr inbounds [3 x double], ptr %185, i64 0, i64 0
  %187 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 0, ptr noundef %177, ptr noundef %178, ptr noundef %180, ptr noundef %182, ptr noundef %184, ptr noundef %186)
  br i1 %187, label %188, label %189

188:                                              ; preds = %176
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

189:                                              ; preds = %176
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 0
  %193 = getelementptr inbounds [3 x double], ptr %192, i64 0, i64 0
  %194 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 1
  %195 = getelementptr inbounds [3 x double], ptr %194, i64 0, i64 0
  %196 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 5
  %197 = getelementptr inbounds [3 x double], ptr %196, i64 0, i64 0
  %198 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 4
  %199 = getelementptr inbounds [3 x double], ptr %198, i64 0, i64 0
  %200 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 1, ptr noundef %190, ptr noundef %191, ptr noundef %193, ptr noundef %195, ptr noundef %197, ptr noundef %199)
  br i1 %200, label %201, label %202

201:                                              ; preds = %189
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

202:                                              ; preds = %189
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 2
  %206 = getelementptr inbounds [3 x double], ptr %205, i64 0, i64 0
  %207 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 3
  %208 = getelementptr inbounds [3 x double], ptr %207, i64 0, i64 0
  %209 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 7
  %210 = getelementptr inbounds [3 x double], ptr %209, i64 0, i64 0
  %211 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 6
  %212 = getelementptr inbounds [3 x double], ptr %211, i64 0, i64 0
  %213 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 1, ptr noundef %203, ptr noundef %204, ptr noundef %206, ptr noundef %208, ptr noundef %210, ptr noundef %212)
  br i1 %213, label %214, label %215

214:                                              ; preds = %202
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

215:                                              ; preds = %202
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  %218 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 0
  %219 = getelementptr inbounds [3 x double], ptr %218, i64 0, i64 0
  %220 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 3
  %221 = getelementptr inbounds [3 x double], ptr %220, i64 0, i64 0
  %222 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 2
  %223 = getelementptr inbounds [3 x double], ptr %222, i64 0, i64 0
  %224 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 1
  %225 = getelementptr inbounds [3 x double], ptr %224, i64 0, i64 0
  %226 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 2, ptr noundef %216, ptr noundef %217, ptr noundef %219, ptr noundef %221, ptr noundef %223, ptr noundef %225)
  br i1 %226, label %227, label %228

227:                                              ; preds = %215
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

228:                                              ; preds = %215
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 4
  %232 = getelementptr inbounds [3 x double], ptr %231, i64 0, i64 0
  %233 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 5
  %234 = getelementptr inbounds [3 x double], ptr %233, i64 0, i64 0
  %235 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 6
  %236 = getelementptr inbounds [3 x double], ptr %235, i64 0, i64 0
  %237 = getelementptr inbounds [8 x [3 x double]], ptr %14, i64 0, i64 7
  %238 = getelementptr inbounds [3 x double], ptr %237, i64 0, i64 0
  %239 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 2, ptr noundef %229, ptr noundef %230, ptr noundef %232, ptr noundef %234, ptr noundef %236, ptr noundef %238)
  br i1 %239, label %240, label %241

240:                                              ; preds = %228
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

241:                                              ; preds = %228
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %242

242:                                              ; preds = %241, %240, %227, %214, %201, %188, %175
  call void @llvm.lifetime.end.p0(i64 192, ptr %14) #5
  br label %243

243:                                              ; preds = %242, %67, %59
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  %244 = load i1, ptr %5, align 1
  ret i1 %244
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef signext i8 @"_ZZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ENK3$_0clES2_S2_S2_"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef) #3 align 2

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 = { 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 #3 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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}
!11 = !{!7, !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"

%class.anon = type { i8 }

@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [63 x i8], align 1
@__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ = external hidden unnamed_addr constant [97 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
declare dso_local noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = alloca %class.anon, align 1
  %6 = alloca [8 x [3 x double]], align 16
  %7 = load double, ptr %2, align 8, !tbaa !5
  %8 = load double, ptr %3, align 8, !tbaa !5
  %9 = fcmp ugt double %7, %8
  br i1 %9, label %.critedge, label %10

10:                                               ; preds = %4
  %11 = getelementptr inbounds i8, ptr %2, i64 8
  %12 = load double, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %3, i64 8
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = fcmp ugt double %12, %14
  br i1 %15, label %.critedge, label %16

16:                                               ; preds = %10
  %17 = getelementptr inbounds i8, ptr %2, i64 16
  %18 = load double, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %3, i64 16
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = fcmp ugt double %18, %20
  br i1 %21, label %.critedge, label %22

.critedge:                                        ; preds = %10, %4, %16
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 854, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_) #4
  unreachable

22:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  %23 = call noundef signext i8 @"_ZZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ENK3$_0clES2_S2_S2_"(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %24 = call noundef signext i8 @"_ZZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ENK3$_0clES2_S2_S2_"(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %25 = icmp eq i8 %23, 0
  %26 = icmp eq i8 %24, 0
  %or.cond = or i1 %25, %26
  br i1 %or.cond, label %69, label %27

27:                                               ; preds = %22
  %28 = and i8 %24, %23
  %.not = icmp eq i8 %28, 0
  br i1 %.not, label %29, label %69

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %6) #5
  %30 = load <2 x double>, ptr %2, align 8, !tbaa !5
  store <2 x double> %30, ptr %6, align 16, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %6, i64 16
  %32 = load double, ptr %17, align 8, !tbaa !5
  store double %32, ptr %31, align 16, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %6, i64 24
  %34 = getelementptr inbounds i8, ptr %6, i64 32
  %35 = extractelement <2 x double> %30, i64 1
  store double %35, ptr %34, align 16, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %6, i64 40
  store double %32, ptr %36, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %6, i64 48
  %38 = load <2 x double>, ptr %3, align 8, !tbaa !5
  %39 = extractelement <2 x double> %38, i64 0
  store double %39, ptr %33, align 8, !tbaa !5
  store <2 x double> %38, ptr %37, align 16, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %6, i64 64
  store double %32, ptr %40, align 16, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %6, i64 72
  %42 = extractelement <2 x double> %30, i64 0
  store double %42, ptr %41, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %6, i64 80
  %44 = extractelement <2 x double> %38, i64 1
  store double %44, ptr %43, align 16, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %6, i64 88
  store double %32, ptr %45, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %6, i64 96
  store <2 x double> %30, ptr %46, align 16, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %6, i64 112
  %48 = load double, ptr %19, align 8, !tbaa !5
  store double %48, ptr %47, align 16, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %6, i64 120
  store double %39, ptr %49, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %6, i64 128
  store double %35, ptr %50, align 16, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %6, i64 136
  store double %48, ptr %51, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %6, i64 144
  store <2 x double> %38, ptr %52, align 16, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %6, i64 160
  store double %48, ptr %53, align 16, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %6, i64 168
  store double %42, ptr %54, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %6, i64 176
  store double %44, ptr %55, align 16, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %6, i64 184
  store double %48, ptr %56, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 0, ptr noundef %0, ptr noundef %1, ptr noundef nonnull %6, ptr noundef nonnull %46, ptr noundef nonnull %54, ptr noundef nonnull %41)
  br i1 %57, label %68, label %58

58:                                               ; preds = %29
  %59 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 0, ptr noundef %0, ptr noundef %1, ptr noundef nonnull %33, ptr noundef nonnull %37, ptr noundef nonnull %52, ptr noundef nonnull %49)
  br i1 %59, label %68, label %60

60:                                               ; preds = %58
  %61 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 1, ptr noundef %0, ptr noundef %1, ptr noundef nonnull %6, ptr noundef nonnull %33, ptr noundef nonnull %49, ptr noundef nonnull %46)
  br i1 %61, label %68, label %62

62:                                               ; preds = %60
  %63 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 1, ptr noundef %0, ptr noundef %1, ptr noundef nonnull %37, ptr noundef nonnull %41, ptr noundef nonnull %54, ptr noundef nonnull %52)
  br i1 %63, label %68, label %64

64:                                               ; preds = %62
  %65 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 2, ptr noundef %0, ptr noundef %1, ptr noundef nonnull %6, ptr noundef nonnull %41, ptr noundef nonnull %37, ptr noundef nonnull %33)
  br i1 %65, label %68, label %66

66:                                               ; preds = %64
  %67 = call noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef 2, ptr noundef %0, ptr noundef %1, ptr noundef nonnull %46, ptr noundef nonnull %49, ptr noundef nonnull %52, ptr noundef nonnull %54)
  br label %68

68:                                               ; preds = %66, %64, %62, %60, %58, %29
  %.0 = phi i1 [ true, %29 ], [ true, %58 ], [ true, %60 ], [ true, %62 ], [ true, %64 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %6) #5
  br label %69

69:                                               ; preds = %27, %22, %68
  %.1 = phi i1 [ %.0, %68 ], [ true, %22 ], [ false, %27 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  ret i1 %.1
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef signext i8 @"_ZZN3pgo4Mesh16intersectSegAABBEPKdS2_S2_S2_ENK3$_0clES2_S2_S2_"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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 = { 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 #3 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass