; LLVM IR from jrouwe/JoltPhysics :: Jolt/Geometry/ConvexHullBuilder.ll (ZNK3JPH17ConvexHullBuilder12ValidateFaceEPKNS0_4FaceE)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::ConvexHullBuilder::Face" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Array", ptr, float, i8, [11 x i8] }>
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::ConvexHullBuilder::Edge" = type <{ ptr, ptr, ptr, i32, [4 x i8] }>
%"class.JPH::ConvexHullBuilder" = type { ptr, %"class.JPH::Array.2", %"class.JPH::Array.5" }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::Array.5" = type { i64, i64, ptr }

@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [16 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH17ConvexHullBuilder12ValidateFaceEPKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.JPH::AssertLastParam", align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.JPH::AssertLastParam", align 1
  %11 = alloca %"struct.JPH::AssertLastParam", align 1
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.JPH::AssertLastParam", align 1
  %14 = alloca %"struct.JPH::AssertLastParam", align 1
  %15 = alloca %"struct.JPH::AssertLastParam", align 1
  %16 = alloca %"struct.JPH::AssertLastParam", align 1
  %17 = alloca %"struct.JPH::AssertLastParam", align 1
  %18 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %20, i32 0, i32 5
  %22 = load i8, ptr %21, align 4, !tbaa !9, !range !16, !noundef !17
  %23 = trunc i8 %22 to i1
  br i1 %23, label %24, label %54

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %25, i32 0, i32 3
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  store ptr %27, ptr %5, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %53

30:                                               ; preds = %24
  br label %31

31:                                               ; preds = %46, %30
  br label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !19
  %36 = icmp eq ptr %35, null
  br i1 %36, label %40, label %37

37:                                               ; preds = %32
  %38 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 1203)
  br i1 %38, label %39, label %40

39:                                               ; preds = %37
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !22
  br label %40

40:                                               ; preds = %39, %37, %32
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %43, i32 0, i32 1
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  store ptr %45, ptr %5, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %42
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %48, i32 0, i32 3
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = icmp ne ptr %47, %50
  br i1 %51, label %31, label %52, !llvm.loop !24

52:                                               ; preds = %46
  br label %53

53:                                               ; preds = %52, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %203

54:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %55, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  store ptr %57, ptr %8, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %187, %54
  %59 = load i32, ptr %7, align 4, !tbaa !26
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %7, align 4, !tbaa !26
  %61 = getelementptr inbounds %"class.JPH::ConvexHullBuilder", ptr %19, i32 0, i32 1
  %62 = call noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61)
  %63 = icmp ugt i64 %62, 2
  br i1 %63, label %64, label %99

64:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !23
  store ptr %67, ptr %9, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %94, %64
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !18
  %73 = icmp ne ptr %69, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %98

75:                                               ; preds = %68
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !19
  %80 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !27
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !19
  %85 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !27
  %87 = icmp ne ptr %81, %86
  br i1 %87, label %91, label %88

88:                                               ; preds = %76
  %89 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.28, ptr noundef @.str.1, i32 noundef 1220)
  br i1 %89, label %90, label %91

90:                                               ; preds = %88
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !28
  br label %91

91:                                               ; preds = %90, %88, %76
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !23
  store ptr %97, ptr %9, align 8, !tbaa !5
  br label %68, !llvm.loop !29

98:                                               ; preds = %74
  br label %99

99:                                               ; preds = %98, %58
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !27
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = icmp eq ptr %103, %104
  br i1 %105, label %109, label %106

106:                                              ; preds = %100
  %107 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.29, ptr noundef @.str.1, i32 noundef 1223)
  br i1 %107, label %108, label %109

108:                                              ; preds = %106
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !30
  br label %109

109:                                              ; preds = %108, %106, %100
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %112, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !19
  store ptr %114, ptr %12, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %111
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %121, label %118

118:                                              ; preds = %115
  %119 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.30, ptr noundef @.str.1, i32 noundef 1227)
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !31
  br label %121

121:                                              ; preds = %120, %118, %115
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %183

126:                                              ; preds = %123
  br label %127

127:                                              ; preds = %126
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !19
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = icmp eq ptr %130, %131
  br i1 %132, label %136, label %133

133:                                              ; preds = %127
  %134 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.31, ptr noundef @.str.1, i32 noundef 1231)
  br i1 %134, label %135, label %136

135:                                              ; preds = %133
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !32
  br label %136

136:                                              ; preds = %135, %133, %127
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !27
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = icmp ne ptr %142, %143
  br i1 %144, label %148, label %145

145:                                              ; preds = %139
  %146 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.32, ptr noundef @.str.1, i32 noundef 1234)
  br i1 %146, label %147, label %148

147:                                              ; preds = %145
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !33
  br label %148

148:                                              ; preds = %147, %145, %139
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %152, i32 0, i32 1
  %154 = load ptr, ptr %153, align 8, !tbaa !23
  %155 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %154, i32 0, i32 3
  %156 = load i32, ptr %155, align 8, !tbaa !34
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %157, i32 0, i32 3
  %159 = load i32, ptr %158, align 8, !tbaa !34
  %160 = icmp eq i32 %156, %159
  br i1 %160, label %164, label %161

161:                                              ; preds = %151
  %162 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.33, ptr noundef @.str.1, i32 noundef 1237)
  br i1 %162, label %163, label %164

163:                                              ; preds = %161
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !35
  br label %164

164:                                              ; preds = %163, %161, %151
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %168, i32 0, i32 1
  %170 = load ptr, ptr %169, align 8, !tbaa !23
  %171 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %170, i32 0, i32 3
  %172 = load i32, ptr %171, align 8, !tbaa !34
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %173, i32 0, i32 3
  %175 = load i32, ptr %174, align 8, !tbaa !34
  %176 = icmp eq i32 %172, %175
  br i1 %176, label %180, label %177

177:                                              ; preds = %167
  %178 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.34, ptr noundef @.str.1, i32 noundef 1240)
  br i1 %178, label %179, label %180

179:                                              ; preds = %177
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !36
  br label %180

180:                                              ; preds = %179, %177, %167
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182, %123
  %184 = load ptr, ptr %8, align 8, !tbaa !5
  %185 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Edge", ptr %184, i32 0, i32 1
  %186 = load ptr, ptr %185, align 8, !tbaa !23
  store ptr %186, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %187

187:                                              ; preds = %183
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %"class.JPH::ConvexHullBuilder::Face", ptr %189, i32 0, i32 3
  %191 = load ptr, ptr %190, align 8, !tbaa !18
  %192 = icmp ne ptr %188, %191
  br i1 %192, label %58, label %193, !llvm.loop !37

193:                                              ; preds = %187
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %7, align 4, !tbaa !26
  %196 = icmp sge i32 %195, 3
  br i1 %196, label %200, label %197

197:                                              ; preds = %194
  %198 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.35, ptr noundef @.str.1, i32 noundef 1246)
  br i1 %198, label %199, label %200

199:                                              ; preds = %197
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #4, !srcloc !38
  br label %200

200:                                              ; preds = %199, %197, %194
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %203

203:                                              ; preds = %202, %53
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #4 = { 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, !15, i64 68}
!10 = !{!"_ZTSN3JPH17ConvexHullBuilder4FaceE", !11, i64 0, !11, i64 16, !12, i64 32, !6, i64 56, !14, i64 64, !15, i64 68}
!11 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!12 = !{!"_ZTSN3JPH5ArrayIiNS_12STLAllocatorIiEEEE", !13, i64 0, !13, i64 8, !6, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !6, i64 56}
!19 = !{!20, !6, i64 16}
!20 = !{!"_ZTSN3JPH17ConvexHullBuilder4EdgeE", !6, i64 0, !6, i64 8, !6, i64 16, !21, i64 24}
!21 = !{!"int", !7, i64 0}
!22 = !{i64 2157051105}
!23 = !{!20, !6, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!21, !21, i64 0}
!27 = !{!20, !6, i64 0}
!28 = !{i64 2157051524}
!29 = distinct !{!29, !25}
!30 = !{i64 2157055918}
!31 = !{i64 2157056251}
!32 = !{i64 2157056604}
!33 = !{i64 2157056949}
!34 = !{!20, !21, i64 24}
!35 = !{i64 2157057336}
!36 = !{i64 2157057723}
!37 = distinct !{!37, !25}
!38 = !{i64 2157058050}


; 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.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH17ConvexHullBuilder12ValidateFaceEPKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef readonly %1) local_unnamed_addr #2 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 68
  %4 = load i8, ptr %3, align 4, !tbaa !5, !range !15, !noundef !16
  %5 = trunc nuw i8 %4 to i1
  %6 = getelementptr inbounds i8, ptr %1, i64 56
  %7 = load ptr, ptr %6, align 8, !tbaa !17
  br i1 %5, label %8, label %19

8:                                                ; preds = %2
  %.not43 = icmp eq ptr %7, null
  br i1 %.not43, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %8, %15
  %.0 = phi ptr [ %17, %15 ], [ %7, %8 ]
  %9 = getelementptr inbounds i8, ptr %.0, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !18
  %11 = icmp eq ptr %10, null
  br i1 %11, label %15, label %12

12:                                               ; preds = %.preheader
  %13 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 1203)
  br i1 %13, label %14, label %15

14:                                               ; preds = %12
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !21
  br label %15

15:                                               ; preds = %14, %12, %.preheader
  %16 = getelementptr inbounds i8, ptr %.0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !22
  %18 = load ptr, ptr %6, align 8, !tbaa !17
  %.not44 = icmp eq ptr %17, %18
  br i1 %.not44, label %.loopexit, label %.preheader, !llvm.loop !23

19:                                               ; preds = %2
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  br label %21

21:                                               ; preds = %82, %19
  %.034 = phi i32 [ 0, %19 ], [ %22, %82 ]
  %.033 = phi ptr [ %7, %19 ], [ %84, %82 ]
  %22 = add nuw nsw i32 %.034, 1
  %23 = tail call noundef i64 @_ZNK3JPH5ArrayIPNS_17ConvexHullBuilder4FaceENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %24 = icmp ugt i64 %23, 2
  br i1 %24, label %.preheader45, label %.loopexit46

.preheader45:                                     ; preds = %21
  %.032.in47 = getelementptr inbounds i8, ptr %.033, i64 8
  %.03248 = load ptr, ptr %.032.in47, align 8, !tbaa !22
  %25 = load ptr, ptr %6, align 8, !tbaa !17
  %.not49 = icmp eq ptr %.03248, %25
  br i1 %.not49, label %.loopexit46, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader45
  %26 = getelementptr inbounds i8, ptr %.033, i64 16
  br label %27

27:                                               ; preds = %.lr.ph, %36
  %.03250 = phi ptr [ %.03248, %.lr.ph ], [ %.032, %36 ]
  %28 = load ptr, ptr %26, align 8, !tbaa !18
  %29 = load ptr, ptr %28, align 8, !tbaa !25
  %30 = getelementptr inbounds i8, ptr %.03250, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %32 = load ptr, ptr %31, align 8, !tbaa !25
  %.not42 = icmp eq ptr %29, %32
  br i1 %.not42, label %33, label %36

33:                                               ; preds = %27
  %34 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.1, i32 noundef 1220)
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !26
  br label %36

36:                                               ; preds = %27, %33, %35
  %.032.in = getelementptr inbounds i8, ptr %.03250, i64 8
  %.032 = load ptr, ptr %.032.in, align 8, !tbaa !22
  %37 = load ptr, ptr %6, align 8, !tbaa !17
  %.not = icmp eq ptr %.032, %37
  br i1 %.not, label %.loopexit46, label %27, !llvm.loop !27

.loopexit46:                                      ; preds = %36, %.preheader45, %21
  %38 = load ptr, ptr %.033, align 8, !tbaa !25
  %39 = icmp eq ptr %38, %1
  br i1 %39, label %43, label %40

40:                                               ; preds = %.loopexit46
  %41 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.29, ptr noundef nonnull @.str.1, i32 noundef 1223)
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !28
  br label %43

43:                                               ; preds = %42, %40, %.loopexit46
  %44 = getelementptr inbounds i8, ptr %.033, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %.not39 = icmp eq ptr %45, null
  br i1 %.not39, label %46, label %.critedge

46:                                               ; preds = %43
  %47 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.1, i32 noundef 1227)
  br i1 %47, label %48, label %82

48:                                               ; preds = %46
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !29
  br label %82

.critedge:                                        ; preds = %43
  %49 = getelementptr inbounds i8, ptr %45, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = icmp eq ptr %50, %.033
  br i1 %51, label %55, label %52

52:                                               ; preds = %.critedge
  %53 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.1, i32 noundef 1231)
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !30
  br label %55

55:                                               ; preds = %.critedge, %52, %54
  %56 = load ptr, ptr %45, align 8, !tbaa !25
  %.not40 = icmp eq ptr %56, %1
  br i1 %.not40, label %57, label %60

57:                                               ; preds = %55
  %58 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.1, i32 noundef 1234)
  br i1 %58, label %59, label %60

59:                                               ; preds = %57
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !31
  br label %60

60:                                               ; preds = %55, %57, %59
  %61 = getelementptr inbounds i8, ptr %45, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %62, i64 24
  %64 = load i32, ptr %63, align 8, !tbaa !32
  %65 = getelementptr inbounds i8, ptr %.033, i64 24
  %66 = load i32, ptr %65, align 8, !tbaa !32
  %67 = icmp eq i32 %64, %66
  br i1 %67, label %71, label %68

68:                                               ; preds = %60
  %69 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.1, i32 noundef 1237)
  br i1 %69, label %70, label %71

70:                                               ; preds = %68
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !33
  br label %71

71:                                               ; preds = %60, %68, %70
  %72 = getelementptr inbounds i8, ptr %.033, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %73, i64 24
  %75 = load i32, ptr %74, align 8, !tbaa !32
  %76 = getelementptr inbounds i8, ptr %45, i64 24
  %77 = load i32, ptr %76, align 8, !tbaa !32
  %78 = icmp eq i32 %75, %77
  br i1 %78, label %82, label %79

79:                                               ; preds = %71
  %80 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.1, i32 noundef 1240)
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !34
  br label %82

82:                                               ; preds = %46, %48, %71, %79, %81
  %83 = getelementptr inbounds i8, ptr %.033, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !22
  %85 = load ptr, ptr %6, align 8, !tbaa !17
  %.not41 = icmp eq ptr %84, %85
  br i1 %.not41, label %86, label %21, !llvm.loop !35

86:                                               ; preds = %82
  %87 = icmp ugt i32 %.034, 1
  br i1 %87, label %.loopexit, label %88

88:                                               ; preds = %86
  %89 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.35, ptr noundef nonnull @.str.1, i32 noundef 1246)
  br i1 %89, label %90, label %.loopexit

90:                                               ; preds = %88
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !36
  br label %.loopexit

.loopexit:                                        ; preds = %15, %86, %88, %90, %8
  ret void
}

attributes #0 = { 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 #1 = { 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 #2 = { 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 = { 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, !14, i64 68}
!6 = !{!"_ZTSN3JPH17ConvexHullBuilder4FaceE", !7, i64 0, !7, i64 16, !10, i64 32, !12, i64 56, !13, i64 64, !14, i64 68}
!7 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5ArrayIiNS_12STLAllocatorIiEEEE", !11, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!6, !12, i64 56}
!18 = !{!19, !12, i64 16}
!19 = !{!"_ZTSN3JPH17ConvexHullBuilder4EdgeE", !12, i64 0, !12, i64 8, !12, i64 16, !20, i64 24}
!20 = !{!"int", !8, i64 0}
!21 = !{i64 2157051105}
!22 = !{!19, !12, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!19, !12, i64 0}
!26 = !{i64 2157051524}
!27 = distinct !{!27, !24}
!28 = !{i64 2157055918}
!29 = !{i64 2157056251}
!30 = !{i64 2157056604}
!31 = !{i64 2157056949}
!32 = !{!19, !20, i64 24}
!33 = !{i64 2157057336}
!34 = !{i64 2157057723}
!35 = distinct !{!35, !24}
!36 = !{i64 2157058050}


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