; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/Shape (HeightFieldShape)

; 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.3 }
%union.anon.3 = type { <4 x float> }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::HeightFieldShapeSettings" = type <{ %"class.JPH::ShapeSettings", %"class.JPH::Vec3", %"class.JPH::Vec3", i32, float, float, i32, i32, i32, %"class.JPH::Array", %"class.JPH::Array.6", %"class.JPH::Array.9", float, [12 x i8] }>
%"class.JPH::ShapeSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget", i64, %"class.JPH::Result" }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Result" = type <{ %union.anon, i8, [7 x i8] }>
%union.anon = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.2 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.2 = type { i64, [8 x i8] }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.6" = type { i64, i64, ptr }
%"class.JPH::Array.9" = type { i64, i64, ptr }

@_ZTVN3JPH24HeightFieldShapeSettingsE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24HeightFieldShapeSettingsC2EPKfNS_4Vec3ES3_jPKhRKNS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS9_EEEE(ptr noundef nonnull align 16 dereferenceable(208) %0, ptr noundef %1, double %2, double %3, double %4, double %5, i32 noundef %6, ptr noundef %7, ptr noundef nonnull align 8 dereferenceable(24) %8) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.JPH::AssertLastParam", align 1
  %20 = alloca %"struct.JPH::AssertLastParam", align 1
  %21 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %2, ptr %21, align 16
  %22 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %3, ptr %22, align 8
  %23 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  store double %4, ptr %23, align 16
  %24 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %5, ptr %24, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store i32 %6, ptr %14, align 4, !tbaa !9
  store ptr %7, ptr %15, align 8, !tbaa !5
  store ptr %8, ptr %16, align 8, !tbaa !5
  %25 = load ptr, ptr %12, align 8
  call void @_ZN3JPH13ShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %25)
  store ptr getelementptr inbounds inrange(-16, 40) ({ [7 x ptr] }, ptr @_ZTVN3JPH24HeightFieldShapeSettingsE, i32 0, i32 0, i32 2), ptr %25, align 16, !tbaa !11
  %26 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !13
  %27 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !13
  %28 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 3
  %29 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %29, ptr %28, align 16, !tbaa !15
  %30 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 4
  store float 0x430C6BF520000000, ptr %30, align 4, !tbaa !30
  %31 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 5
  store float 0xC30C6BF520000000, ptr %31, align 8, !tbaa !31
  %32 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 6
  store i32 0, ptr %32, align 4, !tbaa !32
  %33 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 7
  store i32 2, ptr %33, align 16, !tbaa !33
  %34 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 8
  store i32 8, ptr %34, align 4, !tbaa !34
  %35 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 9
  call void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %35) #6
  %36 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 10
  call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  %37 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 11
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  %38 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 12
  store float 0x3FEFE0D460000000, ptr %38, align 16, !tbaa !35
  %39 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 9
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = load ptr, ptr %13, align 8, !tbaa !5
  %42 = load i32, ptr %14, align 4, !tbaa !9
  %43 = invoke noundef i32 @_ZN3JPH6SquareIjEET_S1_(i32 noundef %42)
          to label %44 unwind label %69

44:                                               ; preds = %9
  %45 = zext i32 %43 to i64
  %46 = getelementptr inbounds float, ptr %41, i64 %45
  invoke void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEE6assignIPKfEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef %40, ptr noundef %46)
          to label %47 unwind label %69

47:                                               ; preds = %44
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  %49 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
          to label %50 unwind label %69

50:                                               ; preds = %47
  br i1 %49, label %73, label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr %15, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %73

54:                                               ; preds = %51
  %55 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 10
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = load i32, ptr %14, align 4, !tbaa !9
  %59 = sub i32 %58, 1
  %60 = invoke noundef i32 @_ZN3JPH6SquareIjEET_S1_(i32 noundef %59)
          to label %61 unwind label %69

61:                                               ; preds = %54
  %62 = zext i32 %60 to i64
  %63 = getelementptr inbounds i8, ptr %57, i64 %62
  invoke void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEE6assignIPKhEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef %56, ptr noundef %63)
          to label %64 unwind label %69

64:                                               ; preds = %61
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %25, i32 0, i32 11
  %67 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(24) %65)
          to label %68 unwind label %69

68:                                               ; preds = %64
  br label %95

69:                                               ; preds = %88, %78, %74, %64, %61, %54, %47, %44, %9
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %17, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %18, align 4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  call void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %35) #6
  call void @_ZN3JPH13ShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %25) #6
  br label %96

73:                                               ; preds = %51, %50
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %75)
          to label %77 unwind label %69

77:                                               ; preds = %74
  br i1 %76, label %82, label %78

78:                                               ; preds = %77
  %79 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 98)
          to label %80 unwind label %69

80:                                               ; preds = %78
  br i1 %79, label %81, label %82

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

82:                                               ; preds = %81, %80, %77
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = icmp eq ptr %86, null
  br i1 %87, label %92, label %88

88:                                               ; preds = %85
  %89 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 99)
          to label %90 unwind label %69

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

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

92:                                               ; preds = %91, %90, %85
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94, %68
  ret void

96:                                               ; preds = %69
  %97 = load ptr, ptr %17, align 8
  %98 = load i32, ptr %18, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH13ShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #1 align 2

; 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) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEE6assignIPKfEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3JPH6SquareIjEET_S1_(i32 noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEE6assignIPKhEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; 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 void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13ShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 align 2

attributes #0 = { 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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{i64 0, i64 16, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !10, i64 96}
!16 = !{!"_ZTSN3JPH24HeightFieldShapeSettingsE", !17, i64 0, !25, i64 64, !25, i64 80, !10, i64 96, !26, i64 100, !26, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !27, i64 120, !28, i64 144, !29, i64 168, !26, i64 192}
!17 = !{!"_ZTSN3JPH13ShapeSettingsE", !18, i64 0, !19, i64 8, !22, i64 16, !23, i64 24}
!18 = !{!"_ZTSN3JPH18SerializableObjectE"}
!19 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !20, i64 0}
!20 = !{!"_ZTSSt6atomicIjE", !21, i64 0}
!21 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !7, i64 0, !24, i64 32}
!24 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !7, i64 0}
!25 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !22, i64 0, !22, i64 8, !6, i64 16}
!28 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !22, i64 0, !22, i64 8, !6, i64 16}
!29 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !22, i64 0, !22, i64 8, !6, i64 16}
!30 = !{!16, !26, i64 100}
!31 = !{!16, !26, i64 104}
!32 = !{!16, !10, i64 108}
!33 = !{!16, !10, i64 112}
!34 = !{!16, !10, i64 116}
!35 = !{!16, !26, i64 192}
!36 = !{i64 2158603970}
!37 = !{i64 2158604335}


; 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"

@_ZTVN3JPH24HeightFieldShapeSettingsE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24HeightFieldShapeSettingsC2EPKfNS_4Vec3ES3_jPKhRKNS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS9_EEEE(ptr noundef nonnull align 16 dereferenceable(208) %0, ptr noundef %1, double %2, double %3, double %4, double %5, i32 noundef %6, ptr noundef %7, ptr noundef nonnull align 8 dereferenceable(24) %8) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN3JPH13ShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0)
  store ptr getelementptr inbounds inrange(-16, 40) (i8, ptr @_ZTVN3JPH24HeightFieldShapeSettingsE, i64 16), ptr %0, align 16, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  store double %2, ptr %10, align 16
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 72
  store double %3, ptr %.sroa.216.0..sroa_idx, align 8, !tbaa !8
  %11 = getelementptr inbounds i8, ptr %0, i64 80
  store double %4, ptr %11, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  store double %5, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !8
  %12 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %6, ptr %12, align 16, !tbaa !10
  %13 = getelementptr inbounds i8, ptr %0, i64 100
  store <2 x float> <float 0x430C6BF520000000, float 0xC30C6BF520000000>, ptr %13, align 4, !tbaa !27
  %14 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 0, ptr %14, align 4, !tbaa !28
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 2, ptr %15, align 16, !tbaa !29
  %16 = getelementptr inbounds i8, ptr %0, i64 116
  store i32 8, ptr %16, align 4, !tbaa !30
  %17 = getelementptr inbounds i8, ptr %0, i64 120
  tail call void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %18 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %19 = getelementptr inbounds i8, ptr %0, i64 168
  tail call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %20 = getelementptr inbounds i8, ptr %0, i64 192
  store float 0x3FEFE0D460000000, ptr %20, align 16, !tbaa !31
  %21 = tail call noundef i32 @_ZN3JPH6SquareIjEET_S1_(i32 noundef %6)
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds float, ptr %1, i64 %22
  invoke void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEE6assignIPKfEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef %1, ptr noundef %23)
          to label %24 unwind label %34

24:                                               ; preds = %9
  %25 = tail call noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %26 = icmp eq ptr %7, null
  %or.cond.not = or i1 %26, %25
  br i1 %or.cond.not, label %36, label %27

27:                                               ; preds = %24
  %28 = add i32 %6, -1
  %29 = tail call noundef i32 @_ZN3JPH6SquareIjEET_S1_(i32 noundef %28)
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %7, i64 %30
  invoke void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEE6assignIPKhEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull %7, ptr noundef %31)
          to label %32 unwind label %34

32:                                               ; preds = %27
  %33 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %47 unwind label %34

34:                                               ; preds = %43, %38, %32, %27, %9
  %35 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  tail call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  tail call void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  tail call void @_ZN3JPH13ShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0) #5
  resume { ptr, i32 } %35

36:                                               ; preds = %24
  %37 = tail call noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  br i1 %37, label %42, label %38

38:                                               ; preds = %36
  %39 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 98)
          to label %40 unwind label %34

40:                                               ; preds = %38
  br i1 %39, label %41, label %42

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

42:                                               ; preds = %36, %40, %41
  br i1 %26, label %47, label %43

43:                                               ; preds = %42
  %44 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 99)
          to label %45 unwind label %34

45:                                               ; preds = %43
  br i1 %44, label %46, label %47

46:                                               ; preds = %45
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !33
  br label %47

47:                                               ; preds = %42, %45, %46, %32
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH13ShapeSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIfNS_12STLAllocatorIfEEE6assignIPKfEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3JPH6SquareIjEET_S1_(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEE6assignIPKhEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13ShapeSettingsD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4 align 2

attributes #0 = { 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 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 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 = { 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 = { 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = !{!11, !17, i64 96}
!11 = !{!"_ZTSN3JPH24HeightFieldShapeSettingsE", !12, i64 0, !21, i64 64, !21, i64 80, !17, i64 96, !22, i64 100, !22, i64 104, !17, i64 108, !17, i64 112, !17, i64 116, !23, i64 120, !25, i64 144, !26, i64 168, !22, i64 192}
!12 = !{!"_ZTSN3JPH13ShapeSettingsE", !13, i64 0, !14, i64 8, !18, i64 16, !19, i64 24}
!13 = !{!"_ZTSN3JPH18SerializableObjectE"}
!14 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !15, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !9, i64 0}
!18 = !{!"long", !9, i64 0}
!19 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !9, i64 0, !20, i64 32}
!20 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !9, i64 0}
!21 = !{!"_ZTSN3JPH4Vec3E", !9, i64 0}
!22 = !{!"float", !9, i64 0}
!23 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !18, i64 0, !18, i64 8, !24, i64 16}
!24 = !{!"any pointer", !9, i64 0}
!25 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !18, i64 0, !18, i64 8, !24, i64 16}
!26 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !18, i64 0, !18, i64 8, !24, i64 16}
!27 = !{!22, !22, i64 0}
!28 = !{!11, !17, i64 108}
!29 = !{!11, !17, i64 112}
!30 = !{!11, !17, i64 116}
!31 = !{!11, !22, i64 192}
!32 = !{i64 2158603970}
!33 = !{i64 2158604335}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass