; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Character (CharacterVirtual)

; 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.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CharacterBase" = type { ptr, %"class.JPH::RefTarget", ptr, %"class.JPH::RefConst", %"class.JPH::Vec3", %"class.JPH::Plane", float, i32, %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::RefConst.1", i64 }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::CharacterVirtual" = type <{ %"class.JPH::CharacterBase", %"class.JPH::CharacterID", [4 x i8], ptr, ptr, i8, [3 x i8], float, i32, i32, float, float, float, i32, float, float, i8, [3 x i8], float, float, [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Array.2", i32, [4 x i8], %"class.JPH::UnorderedMap", float, i8, [3 x i8], i64, %"class.JPH::BodyID", [12 x i8] }>
%"class.JPH::CharacterID" = type { i32 }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"class.JPH::UnorderedMap" = type { %"class.JPH::HashTable.base", [4 x i8] }
%"class.JPH::HashTable.base" = type <{ ptr, ptr, i32, i32, i32 }>
%"struct.JPH::CharacterVirtual::Contact" = type <{ %"class.JPH::CharacterVirtual::ContactKey", [4 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, i8, i8, [6 x i8], ptr, i64, ptr, i8, i8, i8, [5 x i8] }>
%"class.JPH::CharacterVirtual::ContactKey" = type { %"class.JPH::BodyID", %"class.JPH::CharacterID", %"class.JPH::SubShapeID" }

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144), double, double) #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3JPH16CharacterVirtual13CanWalkStairsENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2) #6 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca ptr, align 8
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 0
  store double %1, ptr %19, align 16
  %20 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 1
  store double %2, ptr %20, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8
  %22 = call noundef zeroext i1 @_ZNK3JPH13CharacterBase11IsSupportedEv(ptr noundef nonnull align 16 dereferenceable(144) %21)
  br i1 %22, label %24, label %23

23:                                               ; preds = %3
  store i1 false, ptr %4, align 1
  br label %120

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  %25 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %21, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 %25, i64 16, i1 false), !tbaa.struct !9
  %26 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %27 = load double, ptr %26, align 16
  %28 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %29 = load double, ptr %28, align 8
  %30 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %27, double %29)
  %31 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %21, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !9
  %32 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %33 = load double, ptr %32, align 16
  %34 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %35 = load double, ptr %34, align 8
  %36 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %30, double %33, double %35)
  %37 = getelementptr inbounds %"class.JPH::Vec3", ptr %8, i32 0, i32 0
  %38 = getelementptr inbounds %union.anon, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %40 = extractvalue { double, double } %36, 0
  store double %40, ptr %39, align 16
  %41 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %42 = extractvalue { double, double } %36, 1
  store double %42, ptr %41, align 8
  %43 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %44 = load double, ptr %43, align 16
  %45 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %46 = load double, ptr %45, align 8
  %47 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %44, double %46)
  %48 = getelementptr inbounds %"class.JPH::Vec3", ptr %7, i32 0, i32 0
  %49 = getelementptr inbounds %union.anon, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %51 = extractvalue { double, double } %47, 0
  store double %51, ptr %50, align 16
  %52 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %53 = extractvalue { double, double } %47, 1
  store double %53, ptr %52, align 8
  %54 = call noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef 0x3EB0C6F7A0000000)
  br i1 %54, label %55, label %56

55:                                               ; preds = %24
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %119

56:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %57 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %21, i32 0, i32 25
  store ptr %57, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %58)
  store ptr %59, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
  store ptr %61, ptr %14, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %113, %56
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = icmp ne ptr %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 2, ptr %11, align 4
  br label %116

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %68, ptr %15, align 8, !tbaa !5
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %69, i32 0, i32 14
  %71 = load i8, ptr %70, align 8, !tbaa !11, !range !23, !noundef !24
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %109

73:                                               ; preds = %67
  %74 = load ptr, ptr %15, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %74, i32 0, i32 15
  %76 = load i8, ptr %75, align 1, !tbaa !25, !range !23, !noundef !24
  %77 = trunc i8 %76 to i1
  br i1 %77, label %109, label %78

78:                                               ; preds = %73
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %79, i32 0, i32 5
  %81 = load ptr, ptr %15, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %81, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %82, i64 16, i1 false), !tbaa.struct !9
  %83 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %84, double %86)
  %88 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %91 = extractvalue { double, double } %87, 0
  store double %91, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %93 = extractvalue { double, double } %87, 1
  store double %93, ptr %92, align 8
  %94 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %95 = load double, ptr %94, align 16
  %96 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %97 = load double, ptr %96, align 8
  %98 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %80, double %95, double %97)
  %99 = fcmp olt float %98, 0.000000e+00
  br i1 %99, label %100, label %109

100:                                              ; preds = %78
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %101, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %102, i64 16, i1 false), !tbaa.struct !9
  %103 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %104 = load double, ptr %103, align 16
  %105 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %106 = load double, ptr %105, align 8
  %107 = call noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144) %21, double %104, double %106)
  br i1 %107, label %108, label %109

108:                                              ; preds = %100
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %110

109:                                              ; preds = %100, %78, %73, %67
  store i32 0, ptr %11, align 4
  br label %110

110:                                              ; preds = %109, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  %111 = load i32, ptr %11, align 4
  switch i32 %111, label %116 [
    i32 0, label %112
  ]

112:                                              ; preds = %110
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %114, i32 1
  store ptr %115, ptr %13, align 8, !tbaa !5
  br label %62

116:                                              ; preds = %110, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %117 = load i32, ptr %11, align 4
  switch i32 %117, label %119 [
    i32 2, label %118
  ]

118:                                              ; preds = %116
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %119

119:                                              ; preds = %118, %116, %55
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  br label %120

120:                                              ; preds = %119, %23
  %121 = load i1, ptr %4, align 1
  ret i1 %121
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CharacterBase11IsSupportedEv(ptr noundef nonnull align 16 dereferenceable(144)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline 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 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 #5 = { 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 #6 = { 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 #7 = { 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 = !{i64 0, i64 16, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !21, i64 120}
!12 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !13, i64 0, !18, i64 16, !18, i64 32, !18, i64 48, !18, i64 64, !19, i64 80, !19, i64 84, !20, i64 88, !21, i64 89, !6, i64 96, !22, i64 104, !6, i64 112, !21, i64 120, !21, i64 121, !21, i64 122}
!13 = !{!"_ZTSN3JPH16CharacterVirtual10ContactKeyE", !14, i64 0, !16, i64 4, !17, i64 8}
!14 = !{!"_ZTSN3JPH6BodyIDE", !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN3JPH11CharacterIDE", !15, i64 0}
!17 = !{!"_ZTSN3JPH10SubShapeIDE", !15, i64 0}
!18 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!12, !21, i64 121}


; 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.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144), double, double) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3JPH16CharacterVirtual13CanWalkStairsENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(372) %0, double %1, double %2) local_unnamed_addr #5 align 2 {
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  store double %1, ptr %4, align 16
  %6 = getelementptr inbounds i8, ptr %4, i64 8
  store double %2, ptr %6, align 8
  %7 = tail call noundef zeroext i1 @_ZNK3JPH13CharacterBase11IsSupportedEv(ptr noundef nonnull align 16 dereferenceable(144) %0)
  br i1 %7, label %8, label %41

8:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.019.0.copyload = load double, ptr %9, align 16
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.220.0.copyload = load double, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !5
  %10 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %.sroa.019.0.copyload, double %.sroa.220.0.copyload)
  %.sroa.017.0.copyload = load double, ptr %9, align 16
  %.sroa.218.0.copyload = load double, ptr %.sroa.220.0..sroa_idx, align 8, !tbaa !5
  %11 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %10, double %.sroa.017.0.copyload, double %.sroa.218.0.copyload)
  %12 = extractvalue { double, double } %11, 0
  %13 = extractvalue { double, double } %11, 1
  %14 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %12, double %13)
  %15 = extractvalue { double, double } %14, 0
  store double %15, ptr %5, align 16
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %17 = extractvalue { double, double } %14, 1
  store double %17, ptr %16, align 8
  %18 = call noundef zeroext i1 @_ZNK3JPH4Vec310IsNearZeroEf(ptr noundef nonnull align 16 dereferenceable(16) %5, float noundef 0x3EB0C6F7A0000000)
  br i1 %18, label %.loopexit, label %19

19:                                               ; preds = %8
  %20 = getelementptr inbounds i8, ptr %0, i64 288
  %21 = call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %22 = call noundef ptr @_ZNK3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %.not28.not = icmp eq ptr %21, %22
  br i1 %.not28.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %19, %.critedge
  %.02729 = phi ptr [ %40, %.critedge ], [ %21, %19 ]
  %23 = getelementptr inbounds i8, ptr %.02729, i64 120
  %24 = load i8, ptr %23, align 8, !tbaa !8, !range !21, !noundef !22
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %.critedge

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %.02729, i64 121
  %28 = load i8, ptr %27, align 1, !tbaa !23, !range !21, !noundef !22
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %.critedge, label %30

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %.02729, i64 64
  %32 = getelementptr inbounds i8, ptr %.02729, i64 32
  %.sroa.02.0.copyload = load double, ptr %32, align 16
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %.02729, i64 40
  %.sroa.23.0.copyload = load double, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !5
  %33 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %.sroa.02.0.copyload, double %.sroa.23.0.copyload)
  %34 = extractvalue { double, double } %33, 0
  %35 = extractvalue { double, double } %33, 1
  %36 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %31, double %34, double %35)
  %37 = fcmp olt float %36, 0.000000e+00
  br i1 %37, label %38, label %.critedge

38:                                               ; preds = %30
  %.sroa.0.0.copyload = load double, ptr %31, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.02729, i64 72
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  %39 = call noundef zeroext i1 @_ZNK3JPH13CharacterBase15IsSlopeTooSteepENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(144) %0, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  br i1 %39, label %.loopexit, label %.critedge

.critedge:                                        ; preds = %38, %30, %26, %.lr.ph
  %40 = getelementptr inbounds i8, ptr %.02729, i64 128
  %.not.not = icmp eq ptr %40, %22
  br i1 %.not.not, label %.loopexit, label %.lr.ph

.loopexit:                                        ; preds = %38, %.critedge, %19, %8
  %.3 = phi i1 [ false, %8 ], [ false, %19 ], [ true, %38 ], [ false, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %41

41:                                               ; preds = %3, %.loopexit
  %.4 = phi i1 [ %.3, %.loopexit ], [ false, %3 ]
  ret i1 %.4
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH13CharacterBase11IsSupportedEv(ptr noundef nonnull align 16 dereferenceable(144)) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline 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 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 = { 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 #5 = { 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 #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !18, i64 120}
!9 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !10, i64 0, !15, i64 16, !15, i64 32, !15, i64 48, !15, i64 64, !16, i64 80, !16, i64 84, !17, i64 88, !18, i64 89, !19, i64 96, !20, i64 104, !19, i64 112, !18, i64 120, !18, i64 121, !18, i64 122}
!10 = !{!"_ZTSN3JPH16CharacterVirtual10ContactKeyE", !11, i64 0, !13, i64 4, !14, i64 8}
!11 = !{!"_ZTSN3JPH6BodyIDE", !12, i64 0}
!12 = !{!"int", !6, i64 0}
!13 = !{!"_ZTSN3JPH11CharacterIDE", !12, i64 0}
!14 = !{!"_ZTSN3JPH10SubShapeIDE", !12, i64 0}
!15 = !{!"_ZTSN3JPH4Vec3E", !6, i64 0}
!16 = !{!"float", !6, i64 0}
!17 = !{!"_ZTSN3JPH11EMotionTypeE", !6, i64 0}
!18 = !{!"bool", !6, i64 0}
!19 = !{!"any pointer", !6, i64 0}
!20 = !{!"long", !6, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!9, !18, i64 121}


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