; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Mesh.ll (ZNK6R3Mesh7IsValidEP10R3MeshFace)

; 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.R3MeshFace = type { ptr, [3 x ptr], [3 x ptr], %class.R3Plane, %class.R3Box, double, i32, i32, i32, i32, %class.RNFlags, double, i32, ptr }
%class.R3Plane = type { %class.R3Vector, double }
%class.R3Vector = type { [3 x double] }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3Point = type { [3 x double] }
%class.RNFlags = type { i64 }
%class.R3MeshEdge = type { ptr, [2 x ptr], [2 x ptr], double, i32, %class.RNFlags, double, i32, ptr }

@.str = external hidden unnamed_addr constant [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [30 x i8], align 1

declare void @_Z7RNAbortPKcz(ptr noundef, ...) #0

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK6R3Mesh7IsValidEP10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) unnamed_addr #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = call noundef i32 @_ZNK6R3Mesh12IsFaceOnMeshEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %9)
  %11 = icmp ne i32 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %2
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.196, i32 noundef 6280, ptr noundef @.str.2)
  br label %13

13:                                               ; preds = %12, %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %class.R3MeshFace, ptr %14, i32 0, i32 1
  %16 = getelementptr inbounds [3 x ptr], ptr %15, i64 0, i64 0
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %20, label %19

19:                                               ; preds = %13
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.197, i32 noundef 6283, ptr noundef @.str.2)
  br label %20

20:                                               ; preds = %19, %13
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.R3MeshFace, ptr %21, i32 0, i32 1
  %23 = getelementptr inbounds [3 x ptr], ptr %22, i64 0, i64 1
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.198, i32 noundef 6284, ptr noundef @.str.2)
  br label %27

27:                                               ; preds = %26, %20
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %class.R3MeshFace, ptr %28, i32 0, i32 1
  %30 = getelementptr inbounds [3 x ptr], ptr %29, i64 0, i64 1
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %34, label %33

33:                                               ; preds = %27
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.198, i32 noundef 6285, ptr noundef @.str.2)
  br label %34

34:                                               ; preds = %33, %27
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %class.R3MeshFace, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds [3 x ptr], ptr %36, i64 0, i64 0
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.R3MeshFace, ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds [3 x ptr], ptr %40, i64 0, i64 1
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = icmp ne ptr %38, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %34
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.199, i32 noundef 6286, ptr noundef @.str.2)
  br label %45

45:                                               ; preds = %44, %34
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.R3MeshFace, ptr %46, i32 0, i32 1
  %48 = getelementptr inbounds [3 x ptr], ptr %47, i64 0, i64 1
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %class.R3MeshFace, ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds [3 x ptr], ptr %51, i64 0, i64 2
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = icmp ne ptr %49, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %45
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.200, i32 noundef 6287, ptr noundef @.str.2)
  br label %56

56:                                               ; preds = %55, %45
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.R3MeshFace, ptr %57, i32 0, i32 1
  %59 = getelementptr inbounds [3 x ptr], ptr %58, i64 0, i64 0
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %class.R3MeshFace, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds [3 x ptr], ptr %62, i64 0, i64 2
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = icmp ne ptr %60, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %56
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.201, i32 noundef 6288, ptr noundef @.str.2)
  br label %67

67:                                               ; preds = %66, %56
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.R3MeshFace, ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds [3 x ptr], ptr %69, i64 0, i64 0
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %74, label %73

73:                                               ; preds = %67
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.202, i32 noundef 6291, ptr noundef @.str.2)
  br label %74

74:                                               ; preds = %73, %67
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %class.R3MeshFace, ptr %75, i32 0, i32 2
  %77 = getelementptr inbounds [3 x ptr], ptr %76, i64 0, i64 1
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %81, label %80

80:                                               ; preds = %74
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.203, i32 noundef 6292, ptr noundef @.str.2)
  br label %81

81:                                               ; preds = %80, %74
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %class.R3MeshFace, ptr %82, i32 0, i32 2
  %84 = getelementptr inbounds [3 x ptr], ptr %83, i64 0, i64 1
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %88, label %87

87:                                               ; preds = %81
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.203, i32 noundef 6293, ptr noundef @.str.2)
  br label %88

88:                                               ; preds = %87, %81
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %class.R3MeshFace, ptr %89, i32 0, i32 2
  %91 = getelementptr inbounds [3 x ptr], ptr %90, i64 0, i64 0
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %class.R3MeshFace, ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds [3 x ptr], ptr %94, i64 0, i64 1
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = icmp ne ptr %92, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %88
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.204, i32 noundef 6294, ptr noundef @.str.2)
  br label %99

99:                                               ; preds = %98, %88
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %class.R3MeshFace, ptr %100, i32 0, i32 2
  %102 = getelementptr inbounds [3 x ptr], ptr %101, i64 0, i64 1
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %class.R3MeshFace, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds [3 x ptr], ptr %105, i64 0, i64 2
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = icmp ne ptr %103, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %99
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.205, i32 noundef 6295, ptr noundef @.str.2)
  br label %110

110:                                              ; preds = %109, %99
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %class.R3MeshFace, ptr %111, i32 0, i32 2
  %113 = getelementptr inbounds [3 x ptr], ptr %112, i64 0, i64 0
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.R3MeshFace, ptr %115, i32 0, i32 2
  %117 = getelementptr inbounds [3 x ptr], ptr %116, i64 0, i64 2
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = icmp ne ptr %114, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %110
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.206, i32 noundef 6296, ptr noundef @.str.2)
  br label %121

121:                                              ; preds = %120, %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %189, %121
  %123 = load i32, ptr %5, align 4, !tbaa !9
  %124 = icmp slt i32 %123, 3
  br i1 %124, label %126, label %125

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

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %class.R3MeshFace, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %5, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [3 x ptr], ptr %128, i64 0, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  store ptr %132, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %class.R3MeshFace, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %5, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [3 x ptr], ptr %134, i64 0, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  store ptr %138, ptr %7, align 8, !tbaa !5
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %155

141:                                              ; preds = %126
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %class.R3MeshEdge, ptr %142, i32 0, i32 1
  %144 = getelementptr inbounds [2 x ptr], ptr %143, i64 0, i64 0
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = icmp eq ptr %145, %146
  br i1 %147, label %156, label %148

148:                                              ; preds = %141
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %class.R3MeshEdge, ptr %149, i32 0, i32 1
  %151 = getelementptr inbounds [2 x ptr], ptr %150, i64 0, i64 1
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  %154 = icmp eq ptr %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %148, %126
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.207, i32 noundef 6302, ptr noundef @.str.2)
  br label %156

156:                                              ; preds = %155, %148, %141
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %173

159:                                              ; preds = %156
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds %class.R3MeshEdge, ptr %160, i32 0, i32 2
  %162 = getelementptr inbounds [2 x ptr], ptr %161, i64 0, i64 0
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = icmp eq ptr %163, %164
  br i1 %165, label %174, label %166

166:                                              ; preds = %159
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = getelementptr inbounds %class.R3MeshEdge, ptr %167, i32 0, i32 2
  %169 = getelementptr inbounds [2 x ptr], ptr %168, i64 0, i64 1
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = icmp eq ptr %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %166, %156
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.208, i32 noundef 6303, ptr noundef @.str.2)
  br label %174

174:                                              ; preds = %173, %166, %159
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacePK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %176, ptr noundef %177, i32 noundef 1)
  %179 = icmp eq ptr %175, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %174
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.209, i32 noundef 6304, ptr noundef @.str.2)
  br label %181

181:                                              ; preds = %180, %174
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = call noundef ptr @_ZNK6R3Mesh10EdgeOnFaceEPK10R3MeshFacePK12R3MeshVertexi(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef %183, ptr noundef %184, i32 noundef 0)
  %186 = icmp eq ptr %182, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %181
  call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef @.str, ptr noundef @.str.210, i32 noundef 6305, ptr noundef @.str.2)
  br label %188

188:                                              ; preds = %187, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %5, align 4, !tbaa !9
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %5, align 4, !tbaa !9
  br label %122, !llvm.loop !11

192:                                              ; preds = %125
  ret i32 1
}

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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 [41 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.196 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.197 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.198 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.199 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.200 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.201 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.202 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.204 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [30 x i8], align 1

declare void @_Z7RNAbortPKcz(ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacePK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK6R3Mesh7IsValidEP10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1) unnamed_addr #3 align 2 {
  %3 = tail call noundef i32 @_ZNK6R3Mesh12IsFaceOnMeshEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef %1)
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %4, label %5

4:                                                ; preds = %2
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.196, i32 noundef 6280, ptr noundef nonnull @.str.2)
  br label %5

5:                                                ; preds = %4, %2
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %.not44 = icmp eq ptr %7, null
  br i1 %.not44, label %8, label %9

8:                                                ; preds = %5
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.197, i32 noundef 6283, ptr noundef nonnull @.str.2)
  br label %9

9:                                                ; preds = %8, %5
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %.not45 = icmp eq ptr %11, null
  br i1 %.not45, label %12, label %.thread

12:                                               ; preds = %9
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.198, i32 noundef 6284, ptr noundef nonnull @.str.2)
  %.pr = load ptr, ptr %10, align 8, !tbaa !5
  %.not46 = icmp eq ptr %.pr, null
  br i1 %.not46, label %13, label %.thread

13:                                               ; preds = %12
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.198, i32 noundef 6285, ptr noundef nonnull @.str.2)
  %.pre = load ptr, ptr %10, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %9, %13, %12
  %14 = phi ptr [ %11, %9 ], [ %.pre, %13 ], [ %.pr, %12 ]
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %.not47 = icmp eq ptr %15, %14
  br i1 %.not47, label %16, label %17

16:                                               ; preds = %.thread
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.199, i32 noundef 6286, ptr noundef nonnull @.str.2)
  %.pre68 = load ptr, ptr %10, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %16, %.thread
  %18 = phi ptr [ %.pre68, %16 ], [ %14, %.thread ]
  %19 = getelementptr inbounds i8, ptr %1, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %.not48 = icmp eq ptr %18, %20
  br i1 %.not48, label %21, label %22

21:                                               ; preds = %17
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.200, i32 noundef 6287, ptr noundef nonnull @.str.2)
  %.pre69 = load ptr, ptr %19, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %21, %17
  %23 = phi ptr [ %.pre69, %21 ], [ %20, %17 ]
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %.not49 = icmp eq ptr %24, %23
  br i1 %.not49, label %25, label %26

25:                                               ; preds = %22
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.201, i32 noundef 6288, ptr noundef nonnull @.str.2)
  br label %26

26:                                               ; preds = %25, %22
  %27 = getelementptr inbounds i8, ptr %1, i64 32
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %.not50 = icmp eq ptr %28, null
  br i1 %.not50, label %29, label %30

29:                                               ; preds = %26
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.202, i32 noundef 6291, ptr noundef nonnull @.str.2)
  br label %30

30:                                               ; preds = %29, %26
  %31 = getelementptr inbounds i8, ptr %1, i64 40
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %.not51 = icmp eq ptr %32, null
  br i1 %.not51, label %33, label %.thread60

33:                                               ; preds = %30
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.203, i32 noundef 6292, ptr noundef nonnull @.str.2)
  %.pr59 = load ptr, ptr %31, align 8, !tbaa !5
  %.not52 = icmp eq ptr %.pr59, null
  br i1 %.not52, label %34, label %.thread60

34:                                               ; preds = %33
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.203, i32 noundef 6293, ptr noundef nonnull @.str.2)
  %.pre70 = load ptr, ptr %31, align 8, !tbaa !5
  br label %.thread60

.thread60:                                        ; preds = %30, %34, %33
  %35 = phi ptr [ %32, %30 ], [ %.pre70, %34 ], [ %.pr59, %33 ]
  %36 = load ptr, ptr %27, align 8, !tbaa !5
  %.not53 = icmp eq ptr %36, %35
  br i1 %.not53, label %37, label %38

37:                                               ; preds = %.thread60
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.204, i32 noundef 6294, ptr noundef nonnull @.str.2)
  %.pre71 = load ptr, ptr %31, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %37, %.thread60
  %39 = phi ptr [ %.pre71, %37 ], [ %35, %.thread60 ]
  %40 = getelementptr inbounds i8, ptr %1, i64 48
  %41 = load ptr, ptr %40, align 8, !tbaa !5
  %.not54 = icmp eq ptr %39, %41
  br i1 %.not54, label %42, label %43

42:                                               ; preds = %38
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.205, i32 noundef 6295, ptr noundef nonnull @.str.2)
  %.pre72 = load ptr, ptr %40, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %42, %38
  %44 = phi ptr [ %.pre72, %42 ], [ %41, %38 ]
  %45 = load ptr, ptr %27, align 8, !tbaa !5
  %.not55 = icmp eq ptr %45, %44
  br i1 %.not55, label %46, label %47

46:                                               ; preds = %43
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.206, i32 noundef 6296, ptr noundef nonnull @.str.2)
  %.pre73 = load ptr, ptr %27, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %46, %43
  %48 = phi ptr [ %.pre73, %46 ], [ %45, %43 ]
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %.not56 = icmp eq ptr %49, null
  br i1 %.not56, label %58, label %50

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %48, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = icmp eq ptr %52, %49
  br i1 %53, label %.thread62, label %54

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %48, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = icmp eq ptr %56, %49
  br i1 %57, label %.thread62, label %.thread64

.thread64:                                        ; preds = %54
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.207, i32 noundef 6302, ptr noundef nonnull @.str.2)
  br label %.thread62

58:                                               ; preds = %47
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.207, i32 noundef 6302, ptr noundef nonnull @.str.2)
  %.not57 = icmp eq ptr %48, null
  br i1 %.not57, label %66, label %.thread62

.thread62:                                        ; preds = %50, %54, %.thread64, %58
  %59 = getelementptr inbounds i8, ptr %48, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = icmp eq ptr %60, %1
  br i1 %61, label %67, label %62

62:                                               ; preds = %.thread62
  %63 = getelementptr inbounds i8, ptr %48, i64 32
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = icmp eq ptr %64, %1
  br i1 %65, label %67, label %66

66:                                               ; preds = %62, %58
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.208, i32 noundef 6303, ptr noundef nonnull @.str.2)
  br label %67

67:                                               ; preds = %66, %62, %.thread62
  %68 = tail call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacePK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %1, ptr noundef %48, i32 noundef 1)
  %69 = icmp eq ptr %49, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.209, i32 noundef 6304, ptr noundef nonnull @.str.2)
  br label %71

71:                                               ; preds = %70, %67
  %72 = tail call noundef ptr @_ZNK6R3Mesh10EdgeOnFaceEPK10R3MeshFacePK12R3MeshVertexi(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %1, ptr noundef %49, i32 noundef 0)
  %73 = icmp eq ptr %48, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %71
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.210, i32 noundef 6305, ptr noundef nonnull @.str.2)
  br label %75

75:                                               ; preds = %74, %71
  %76 = getelementptr inbounds i8, ptr %1, i64 16
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %1, i64 40
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %.not56.1 = icmp eq ptr %77, null
  br i1 %.not56.1, label %88, label %80

80:                                               ; preds = %75
  %81 = getelementptr inbounds i8, ptr %79, i64 8
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = icmp eq ptr %82, %77
  br i1 %83, label %.thread62.1, label %84

84:                                               ; preds = %80
  %85 = getelementptr inbounds i8, ptr %79, i64 16
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = icmp eq ptr %86, %77
  br i1 %87, label %.thread62.1, label %.thread64.1

.thread64.1:                                      ; preds = %84
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.207, i32 noundef 6302, ptr noundef nonnull @.str.2)
  br label %.thread62.1

88:                                               ; preds = %75
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.207, i32 noundef 6302, ptr noundef nonnull @.str.2)
  %.not57.1 = icmp eq ptr %79, null
  br i1 %.not57.1, label %96, label %.thread62.1

.thread62.1:                                      ; preds = %88, %.thread64.1, %84, %80
  %89 = getelementptr inbounds i8, ptr %79, i64 24
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = icmp eq ptr %90, %1
  br i1 %91, label %97, label %92

92:                                               ; preds = %.thread62.1
  %93 = getelementptr inbounds i8, ptr %79, i64 32
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = icmp eq ptr %94, %1
  br i1 %95, label %97, label %96

96:                                               ; preds = %92, %88
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.208, i32 noundef 6303, ptr noundef nonnull @.str.2)
  br label %97

97:                                               ; preds = %96, %92, %.thread62.1
  %98 = tail call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacePK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %1, ptr noundef %79, i32 noundef 1)
  %99 = icmp eq ptr %77, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.209, i32 noundef 6304, ptr noundef nonnull @.str.2)
  br label %101

101:                                              ; preds = %100, %97
  %102 = tail call noundef ptr @_ZNK6R3Mesh10EdgeOnFaceEPK10R3MeshFacePK12R3MeshVertexi(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %1, ptr noundef %77, i32 noundef 0)
  %103 = icmp eq ptr %79, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %101
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.210, i32 noundef 6305, ptr noundef nonnull @.str.2)
  br label %105

105:                                              ; preds = %104, %101
  %106 = getelementptr inbounds i8, ptr %1, i64 24
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %1, i64 48
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %.not56.2 = icmp eq ptr %107, null
  br i1 %.not56.2, label %118, label %110

110:                                              ; preds = %105
  %111 = getelementptr inbounds i8, ptr %109, i64 8
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = icmp eq ptr %112, %107
  br i1 %113, label %.thread62.2, label %114

114:                                              ; preds = %110
  %115 = getelementptr inbounds i8, ptr %109, i64 16
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = icmp eq ptr %116, %107
  br i1 %117, label %.thread62.2, label %.thread64.2

.thread64.2:                                      ; preds = %114
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.207, i32 noundef 6302, ptr noundef nonnull @.str.2)
  br label %.thread62.2

118:                                              ; preds = %105
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.207, i32 noundef 6302, ptr noundef nonnull @.str.2)
  %.not57.2 = icmp eq ptr %109, null
  br i1 %.not57.2, label %126, label %.thread62.2

.thread62.2:                                      ; preds = %118, %.thread64.2, %114, %110
  %119 = getelementptr inbounds i8, ptr %109, i64 24
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = icmp eq ptr %120, %1
  br i1 %121, label %127, label %122

122:                                              ; preds = %.thread62.2
  %123 = getelementptr inbounds i8, ptr %109, i64 32
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = icmp eq ptr %124, %1
  br i1 %125, label %127, label %126

126:                                              ; preds = %122, %118
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.208, i32 noundef 6303, ptr noundef nonnull @.str.2)
  br label %127

127:                                              ; preds = %126, %122, %.thread62.2
  %128 = tail call noundef ptr @_ZNK6R3Mesh12VertexOnFaceEPK10R3MeshFacePK10R3MeshEdgei(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %1, ptr noundef %109, i32 noundef 1)
  %129 = icmp eq ptr %107, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %127
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.209, i32 noundef 6304, ptr noundef nonnull @.str.2)
  br label %131

131:                                              ; preds = %130, %127
  %132 = tail call noundef ptr @_ZNK6R3Mesh10EdgeOnFaceEPK10R3MeshFacePK12R3MeshVertexi(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull %1, ptr noundef %107, i32 noundef 0)
  %133 = icmp eq ptr %109, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  tail call void (ptr, ...) @_Z7RNAbortPKcz(ptr noundef nonnull @.str, ptr noundef nonnull @.str.210, i32 noundef 6305, ptr noundef nonnull @.str.2)
  br label %135

135:                                              ; preds = %134, %131
  ret i32 1
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK6R3Mesh12IsFaceOnMeshEPK10R3MeshFace(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef) local_unnamed_addr #1 align 2

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

!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"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass