; LLVM IR from zig-gamedev/zphysics :: libs/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", ptr, ptr, i8, [3 x i8], float, i32, i32, float, float, float, i32, float, float, i8, [3 x i8], float, float, [12 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Array.2", float, i8, [3 x i8], i64, %"class.JPH::BodyID", [4 x i8] }>
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Array.2" = type { i64, i64, ptr }
%"struct.JPH::CharacterVirtual::Contact" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"class.JPH::BodyID", [4 x i8], ptr, %"class.JPH::SubShapeID", i8, i8, [2 x i8], i64, ptr, i8, i8, i8, [13 x i8] }>

; 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(332) %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 %115

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 %114

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 23
  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 = %108, %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 %111

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 15
  %71 = load i8, ptr %70, align 16, !tbaa !11, !range !21, !noundef !22
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %104

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

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

103:                                              ; preds = %95
  store i1 true, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %105

104:                                              ; preds = %95, %73, %67
  store i32 0, ptr %11, align 4
  br label %105

105:                                              ; preds = %104, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  %106 = load i32, ptr %11, align 4
  switch i32 %106, label %111 [
    i32 0, label %107
  ]

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.JPH::CharacterVirtual::Contact", ptr %109, i32 1
  store ptr %110, ptr %13, align 8, !tbaa !5
  br label %62

111:                                              ; preds = %105, %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
  %112 = load i32, ptr %11, align 4
  switch i32 %112, label %114 [
    i32 2, label %113
  ]

113:                                              ; preds = %111
  store i1 false, ptr %4, align 1
  store i32 1, ptr %11, align 4
  br label %114

114:                                              ; preds = %113, %111, %55
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  br label %115

115:                                              ; preds = %114, %23
  %116 = load i1, ptr %4, align 1
  ret i1 %116
}

; 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, !19, i64 112}
!12 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !13, i64 0, !13, i64 16, !13, i64 32, !13, i64 48, !14, i64 64, !14, i64 68, !15, i64 72, !6, i64 80, !17, i64 88, !18, i64 92, !19, i64 93, !20, i64 96, !6, i64 104, !19, i64 112, !19, i64 113, !19, i64 114}
!13 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTSN3JPH6BodyIDE", !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN3JPH10SubShapeIDE", !16, i64 0}
!18 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}


; 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(332) %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 %37

8:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %.sroa.018.0.copyload = load double, ptr %9, align 16
  %.sroa.219.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 40
  %.sroa.219.0.copyload = load double, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !5
  %10 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %.sroa.018.0.copyload, double %.sroa.219.0.copyload)
  %.sroa.016.0.copyload = load double, ptr %9, align 16
  %.sroa.217.0.copyload = load double, ptr %.sroa.219.0..sroa_idx, align 8, !tbaa !5
  %11 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %10, double %.sroa.016.0.copyload, double %.sroa.217.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)
  %.not27.not = icmp eq ptr %21, %22
  br i1 %.not27.not, label %.loopexit, label %.lr.ph

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

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %.02628, i64 48
  %28 = getelementptr inbounds i8, ptr %.02628, i64 16
  %.sroa.02.0.copyload = load double, ptr %28, align 16
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %.02628, i64 24
  %.sroa.23.0.copyload = load double, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !5
  %29 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %.sroa.02.0.copyload, double %.sroa.23.0.copyload)
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  %32 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %27, double %30, double %31)
  %33 = fcmp olt float %32, 0.000000e+00
  br i1 %33, label %34, label %.critedge

34:                                               ; preds = %26
  %.sroa.0.0.copyload = load double, ptr %27, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.02628, i64 56
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  %35 = 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 %35, label %.loopexit, label %.critedge

.critedge:                                        ; preds = %34, %26, %.lr.ph
  %36 = getelementptr inbounds i8, ptr %.02628, i64 128
  %.not.not = icmp eq ptr %36, %22
  br i1 %.not.not, label %.loopexit, label %.lr.ph

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

37:                                               ; 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, !17, i64 112}
!9 = !{!"_ZTSN3JPH16CharacterVirtual7ContactE", !10, i64 0, !10, i64 16, !10, i64 32, !10, i64 48, !11, i64 64, !11, i64 68, !12, i64 72, !14, i64 80, !15, i64 88, !16, i64 92, !17, i64 93, !18, i64 96, !14, i64 104, !17, i64 112, !17, i64 113, !17, i64 114}
!10 = !{!"_ZTSN3JPH4Vec3E", !6, i64 0}
!11 = !{!"float", !6, i64 0}
!12 = !{!"_ZTSN3JPH6BodyIDE", !13, i64 0}
!13 = !{!"int", !6, i64 0}
!14 = !{!"any pointer", !6, i64 0}
!15 = !{!"_ZTSN3JPH10SubShapeIDE", !13, i64 0}
!16 = !{!"_ZTSN3JPH11EMotionTypeE", !6, i64 0}
!17 = !{!"bool", !6, i64 0}
!18 = !{!"long", !6, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}


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