; LLVM IR from devlinzhou/deterministic_physics :: UnrealDemo/Source/UnrealDemo/gphysics/src/utils (glacier_physics_utils)

; 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.GFloat = type { i32 }
%class.GVector3 = type { %class.GFloat, %class.GFloat, %class.GFloat }
%class.GCollisionShape = type { i32, %class.GVector3, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN5GMath7Makef32Eijj(i32 noundef, i32 noundef, i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4), i32) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath4ZeroEv() #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @_ZN12GPhyscsUtils15CalculateVolumeERK15GCollisionShape(ptr noundef nonnull align 8 dereferenceable(24) %0) #4 align 2 {
  %2 = alloca %class.GFloat, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %class.GFloat, align 4
  %5 = alloca %class.GFloat, align 4
  %6 = alloca %class.GFloat, align 4
  %7 = alloca %class.GFloat, align 4
  %8 = alloca %class.GFloat, align 4
  %9 = alloca %class.GFloat, align 4
  %10 = alloca %class.GFloat, align 4
  %11 = alloca %class.GFloat, align 4
  %12 = alloca %class.GFloat, align 4
  %13 = alloca %class.GFloat, align 4
  %14 = alloca %class.GVector3, align 4
  %15 = alloca { i64, i32 }, align 8
  %16 = alloca %class.GFloat, align 4
  %17 = alloca %class.GVector3, align 4
  %18 = alloca { i64, i32 }, align 8
  %19 = alloca %class.GFloat, align 4
  %20 = alloca %class.GVector3, align 4
  %21 = alloca { i64, i32 }, align 8
  %22 = alloca %class.GFloat, align 4
  %23 = alloca %class.GFloat, align 4
  %24 = alloca %class.GFloat, align 4
  %25 = alloca %class.GFloat, align 4
  %26 = alloca %class.GFloat, align 4
  %27 = alloca %class.GFloat, align 4
  %28 = alloca %class.GFloat, align 4
  %29 = alloca %class.GFloat, align 4
  %30 = alloca %class.GFloat, align 4
  %31 = alloca %class.GFloat, align 4
  %32 = alloca %class.GFloat, align 4
  %33 = alloca %class.GFloat, align 4
  %34 = alloca %class.GFloat, align 4
  %35 = alloca %class.GFloat, align 4
  %36 = alloca %class.GFloat, align 4
  %37 = alloca %class.GFloat, align 4
  %38 = alloca %class.GFloat, align 4
  %39 = alloca %class.GFloat, align 4
  %40 = alloca %class.GFloat, align 4
  %41 = alloca %class.GFloat, align 4
  %42 = alloca %class.GFloat, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.GCollisionShape, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 8, !tbaa !9
  switch i32 %45, label %191 [
    i32 0, label %46
    i32 1, label %49
    i32 2, label %79
    i32 3, label %103
    i32 4, label %154
    i32 5, label %178
    i32 6, label %179
    i32 7, label %182
    i32 8, label %185
    i32 9, label %188
  ]

46:                                               ; preds = %1
  %47 = call i32 @_ZN5GMath4ZeroEv()
  %48 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %47, ptr %48, align 4
  br label %195

49:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %50)
  %52 = getelementptr inbounds %class.GFloat, ptr %7, i32 0, i32 0
  store i32 %51, ptr %52, align 4
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
  %55 = getelementptr inbounds %class.GFloat, ptr %8, i32 0, i32 0
  store i32 %54, ptr %55, align 4
  %56 = getelementptr inbounds %class.GFloat, ptr %8, i32 0, i32 0
  %57 = load i32, ptr %56, align 4
  %58 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %57)
  %59 = getelementptr inbounds %class.GFloat, ptr %6, i32 0, i32 0
  store i32 %58, ptr %59, align 4
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
  %62 = getelementptr inbounds %class.GFloat, ptr %9, i32 0, i32 0
  store i32 %61, ptr %62, align 4
  %63 = getelementptr inbounds %class.GFloat, ptr %9, i32 0, i32 0
  %64 = load i32, ptr %63, align 4
  %65 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %64)
  %66 = getelementptr inbounds %class.GFloat, ptr %5, i32 0, i32 0
  store i32 %65, ptr %66, align 4
  %67 = call i32 @_ZN5GMath7Makef32Eijj(i32 noundef 1, i32 noundef 1, i32 noundef 3)
  %68 = getelementptr inbounds %class.GFloat, ptr %10, i32 0, i32 0
  store i32 %67, ptr %68, align 4
  %69 = getelementptr inbounds %class.GFloat, ptr %10, i32 0, i32 0
  %70 = load i32, ptr %69, align 4
  %71 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 %70)
  %72 = getelementptr inbounds %class.GFloat, ptr %4, i32 0, i32 0
  store i32 %71, ptr %72, align 4
  %73 = call i32 @_ZN5GMath2PiEv()
  %74 = getelementptr inbounds %class.GFloat, ptr %11, i32 0, i32 0
  store i32 %73, ptr %74, align 4
  %75 = getelementptr inbounds %class.GFloat, ptr %11, i32 0, i32 0
  %76 = load i32, ptr %75, align 4
  %77 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 %76)
  %78 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %77, ptr %78, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %195

79:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = call { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24) %80)
  store { i64, i32 } %81, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %15, i64 12, i1 false)
  %82 = getelementptr inbounds %class.GVector3, ptr %14, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = call { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24) %83)
  store { i64, i32 } %84, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %18, i64 12, i1 false)
  %85 = getelementptr inbounds %class.GVector3, ptr %17, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %85, i64 4, i1 false), !tbaa.struct !15
  %86 = getelementptr inbounds %class.GFloat, ptr %16, i32 0, i32 0
  %87 = load i32, ptr %86, align 4
  %88 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %82, i32 %87)
  %89 = getelementptr inbounds %class.GFloat, ptr %13, i32 0, i32 0
  store i32 %88, ptr %89, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #5
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = call { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24) %90)
  store { i64, i32 } %91, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  %92 = getelementptr inbounds %class.GVector3, ptr %20, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %92, i64 4, i1 false), !tbaa.struct !15
  %93 = getelementptr inbounds %class.GFloat, ptr %19, i32 0, i32 0
  %94 = load i32, ptr %93, align 4
  %95 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 %94)
  %96 = getelementptr inbounds %class.GFloat, ptr %12, i32 0, i32 0
  store i32 %95, ptr %96, align 4
  %97 = call i32 @_ZN5GMath7Makef32Eijj(i32 noundef 8, i32 noundef 0, i32 noundef 1)
  %98 = getelementptr inbounds %class.GFloat, ptr %22, i32 0, i32 0
  store i32 %97, ptr %98, align 4
  %99 = getelementptr inbounds %class.GFloat, ptr %22, i32 0, i32 0
  %100 = load i32, ptr %99, align 4
  %101 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %100)
  %102 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %101, ptr %102, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %195

103:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %104)
  %106 = getelementptr inbounds %class.GFloat, ptr %25, i32 0, i32 0
  store i32 %105, ptr %106, align 4
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %107)
  %109 = getelementptr inbounds %class.GFloat, ptr %26, i32 0, i32 0
  store i32 %108, ptr %109, align 4
  %110 = getelementptr inbounds %class.GFloat, ptr %26, i32 0, i32 0
  %111 = load i32, ptr %110, align 4
  %112 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %25, i32 %111)
  %113 = getelementptr inbounds %class.GFloat, ptr %24, i32 0, i32 0
  store i32 %112, ptr %113, align 4
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = call i32 @_ZNK15GCollisionShape13GetHalfHeightEv(ptr noundef nonnull align 8 dereferenceable(24) %114)
  %116 = getelementptr inbounds %class.GFloat, ptr %27, i32 0, i32 0
  store i32 %115, ptr %116, align 4
  %117 = getelementptr inbounds %class.GFloat, ptr %27, i32 0, i32 0
  %118 = load i32, ptr %117, align 4
  %119 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 %118)
  %120 = getelementptr inbounds %class.GFloat, ptr %23, i32 0, i32 0
  store i32 %119, ptr %120, align 4
  %121 = call i32 @_ZN5GMath6Pi_TwoEv()
  %122 = getelementptr inbounds %class.GFloat, ptr %28, i32 0, i32 0
  store i32 %121, ptr %122, align 4
  %123 = getelementptr inbounds %class.GFloat, ptr %28, i32 0, i32 0
  %124 = load i32, ptr %123, align 4
  %125 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 %124)
  %126 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %125, ptr %126, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %127)
  %129 = getelementptr inbounds %class.GFloat, ptr %32, i32 0, i32 0
  store i32 %128, ptr %129, align 4
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %130)
  %132 = getelementptr inbounds %class.GFloat, ptr %33, i32 0, i32 0
  store i32 %131, ptr %132, align 4
  %133 = getelementptr inbounds %class.GFloat, ptr %33, i32 0, i32 0
  %134 = load i32, ptr %133, align 4
  %135 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %32, i32 %134)
  %136 = getelementptr inbounds %class.GFloat, ptr %31, i32 0, i32 0
  store i32 %135, ptr %136, align 4
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %137)
  %139 = getelementptr inbounds %class.GFloat, ptr %34, i32 0, i32 0
  store i32 %138, ptr %139, align 4
  %140 = getelementptr inbounds %class.GFloat, ptr %34, i32 0, i32 0
  %141 = load i32, ptr %140, align 4
  %142 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %31, i32 %141)
  %143 = getelementptr inbounds %class.GFloat, ptr %30, i32 0, i32 0
  store i32 %142, ptr %143, align 4
  %144 = call i32 @_ZN5GMath7Makef32Eijj(i32 noundef 1, i32 noundef 1, i32 noundef 3)
  %145 = getelementptr inbounds %class.GFloat, ptr %35, i32 0, i32 0
  store i32 %144, ptr %145, align 4
  %146 = getelementptr inbounds %class.GFloat, ptr %35, i32 0, i32 0
  %147 = load i32, ptr %146, align 4
  %148 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %30, i32 %147)
  %149 = getelementptr inbounds %class.GFloat, ptr %29, i32 0, i32 0
  store i32 %148, ptr %149, align 4
  %150 = getelementptr inbounds %class.GFloat, ptr %29, i32 0, i32 0
  %151 = load i32, ptr %150, align 4
  %152 = call i32 @_ZN6GFloatpLES_(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 %151)
  %153 = getelementptr inbounds %class.GFloat, ptr %36, i32 0, i32 0
  store i32 %152, ptr %153, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %195

154:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %155)
  %157 = getelementptr inbounds %class.GFloat, ptr %39, i32 0, i32 0
  store i32 %156, ptr %157, align 4
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %158)
  %160 = getelementptr inbounds %class.GFloat, ptr %40, i32 0, i32 0
  store i32 %159, ptr %160, align 4
  %161 = getelementptr inbounds %class.GFloat, ptr %40, i32 0, i32 0
  %162 = load i32, ptr %161, align 4
  %163 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %39, i32 %162)
  %164 = getelementptr inbounds %class.GFloat, ptr %38, i32 0, i32 0
  store i32 %163, ptr %164, align 4
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = call i32 @_ZNK15GCollisionShape13GetHalfHeightEv(ptr noundef nonnull align 8 dereferenceable(24) %165)
  %167 = getelementptr inbounds %class.GFloat, ptr %41, i32 0, i32 0
  store i32 %166, ptr %167, align 4
  %168 = getelementptr inbounds %class.GFloat, ptr %41, i32 0, i32 0
  %169 = load i32, ptr %168, align 4
  %170 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %38, i32 %169)
  %171 = getelementptr inbounds %class.GFloat, ptr %37, i32 0, i32 0
  store i32 %170, ptr %171, align 4
  %172 = call i32 @_ZN5GMath6Pi_TwoEv()
  %173 = getelementptr inbounds %class.GFloat, ptr %42, i32 0, i32 0
  store i32 %172, ptr %173, align 4
  %174 = getelementptr inbounds %class.GFloat, ptr %42, i32 0, i32 0
  %175 = load i32, ptr %174, align 4
  %176 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %37, i32 %175)
  %177 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %176, ptr %177, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  br label %195

178:                                              ; preds = %1
  br label %192

179:                                              ; preds = %1
  %180 = call i32 @_ZN5GMath4ZeroEv()
  %181 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %180, ptr %181, align 4
  br label %195

182:                                              ; preds = %1
  %183 = call i32 @_ZN5GMath4ZeroEv()
  %184 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %183, ptr %184, align 4
  br label %195

185:                                              ; preds = %1
  %186 = call i32 @_ZN5GMath4ZeroEv()
  %187 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %186, ptr %187, align 4
  br label %195

188:                                              ; preds = %1
  %189 = call i32 @_ZN5GMath4ZeroEv()
  %190 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %189, ptr %190, align 4
  br label %195

191:                                              ; preds = %1
  br label %192

192:                                              ; preds = %191, %178
  %193 = call i32 @_ZN5GMath4ZeroEv()
  %194 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  store i32 %193, ptr %194, align 4
  br label %195

195:                                              ; preds = %192, %188, %185, %182, %179, %154, %103, %79, %49, %46
  %196 = getelementptr inbounds %class.GFloat, ptr %2, i32 0, i32 0
  %197 = load i32, ptr %196, align 4
  ret i32 %197
}

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath2PiEv() #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath6Pi_TwoEv() #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN6GFloatpLES_(ptr noundef nonnull align 4 dereferenceable(4), i32) #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS15GCollisionShape", !11, i64 0, !12, i64 4, !6, i64 16}
!11 = !{!"_ZTS6EShape", !7, i64 0}
!12 = !{!"_ZTS8GVector3", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"_ZTS6GFloat", !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i64 0, i64 4, !16}
!16 = !{!14, !14, i64 0}


; 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.GFloat = type { i32 }
%class.GVector3 = type { %class.GFloat, %class.GFloat, %class.GFloat }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN5GMath7Makef32Eijj(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath4ZeroEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @_ZN12GPhyscsUtils15CalculateVolumeERK15GCollisionShape(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %class.GFloat, align 4
  %3 = alloca %class.GFloat, align 4
  %4 = alloca %class.GFloat, align 4
  %5 = alloca %class.GFloat, align 4
  %6 = alloca %class.GFloat, align 4
  %7 = alloca %class.GFloat, align 4
  %8 = alloca %class.GFloat, align 4
  %9 = alloca %class.GVector3, align 8
  %10 = alloca %class.GFloat, align 4
  %11 = alloca %class.GFloat, align 4
  %12 = alloca %class.GFloat, align 4
  %13 = alloca %class.GFloat, align 4
  %14 = alloca %class.GFloat, align 4
  %15 = alloca %class.GFloat, align 4
  %16 = alloca %class.GFloat, align 4
  %17 = alloca %class.GFloat, align 4
  %18 = alloca %class.GFloat, align 4
  %19 = load i32, ptr %0, align 8, !tbaa !5
  switch i32 %19, label %72 [
    i32 0, label %20
    i32 1, label %22
    i32 2, label %32
    i32 3, label %40
    i32 4, label %56
    i32 9, label %70
    i32 6, label %64
    i32 7, label %66
    i32 8, label %68
  ]

20:                                               ; preds = %1
  %21 = tail call i32 @_ZN5GMath4ZeroEv()
  br label %74

22:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %23 = tail call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  store i32 %23, ptr %6, align 4
  %24 = tail call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %25 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %24)
  store i32 %25, ptr %5, align 4
  %26 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %27 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 %26)
  store i32 %27, ptr %4, align 4
  %28 = call i32 @_ZN5GMath7Makef32Eijj(i32 noundef 1, i32 noundef 1, i32 noundef 3)
  %29 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 %28)
  store i32 %29, ptr %3, align 4
  %30 = call i32 @_ZN5GMath2PiEv()
  %31 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 %30)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %74

32:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #4
  %33 = tail call { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.fca.0.extract21 = extractvalue { i64, i32 } %33, 0
  %.fca.1.extract22 = extractvalue { i64, i32 } %33, 1
  store i64 %.fca.0.extract21, ptr %9, align 8
  %.sroa.224.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %.fca.1.extract22, ptr %.sroa.224.0..sroa_idx, align 8
  %34 = tail call { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.fca.0.extract15 = extractvalue { i64, i32 } %34, 0
  %.sroa.019.4.extract.shift = lshr i64 %.fca.0.extract15, 32
  %.sroa.019.4.extract.trunc = trunc nuw i64 %.sroa.019.4.extract.shift to i32
  %35 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %.sroa.019.4.extract.trunc)
  store i32 %35, ptr %8, align 4
  %36 = call { i64, i32 } @_ZNK15GCollisionShape13GetHalfExternEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %.fca.1.extract = extractvalue { i64, i32 } %36, 1
  %37 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 %.fca.1.extract)
  store i32 %37, ptr %7, align 4
  %38 = call i32 @_ZN5GMath7Makef32Eijj(i32 noundef 8, i32 noundef 0, i32 noundef 1)
  %39 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %38)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %74

40:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  %41 = tail call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  store i32 %41, ptr %12, align 4
  %42 = tail call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %43 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %42)
  store i32 %43, ptr %11, align 4
  %44 = call i32 @_ZNK15GCollisionShape13GetHalfHeightEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %45 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 %44)
  store i32 %45, ptr %10, align 4
  %46 = call i32 @_ZN5GMath6Pi_TwoEv()
  %47 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 %46)
  store i32 %47, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  %48 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  store i32 %48, ptr %15, align 4
  %49 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %50 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 %49)
  store i32 %50, ptr %14, align 4
  %51 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %52 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 %51)
  store i32 %52, ptr %13, align 4
  %53 = call i32 @_ZN5GMath7Makef32Eijj(i32 noundef 1, i32 noundef 1, i32 noundef 3)
  %54 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 %53)
  %55 = call i32 @_ZN6GFloatpLES_(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 %54)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  %.pre = load i32, ptr %2, align 4
  br label %74

56:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #4
  %57 = tail call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  store i32 %57, ptr %18, align 4
  %58 = tail call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %59 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %58)
  store i32 %59, ptr %17, align 4
  %60 = call i32 @_ZNK15GCollisionShape13GetHalfHeightEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %61 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 %60)
  store i32 %61, ptr %16, align 4
  %62 = call i32 @_ZN5GMath6Pi_TwoEv()
  %63 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 %62)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  br label %74

64:                                               ; preds = %1
  %65 = tail call i32 @_ZN5GMath4ZeroEv()
  br label %74

66:                                               ; preds = %1
  %67 = tail call i32 @_ZN5GMath4ZeroEv()
  br label %74

68:                                               ; preds = %1
  %69 = tail call i32 @_ZN5GMath4ZeroEv()
  br label %74

70:                                               ; preds = %1
  %71 = tail call i32 @_ZN5GMath4ZeroEv()
  br label %74

72:                                               ; preds = %1
  %73 = tail call i32 @_ZN5GMath4ZeroEv()
  br label %74

74:                                               ; preds = %72, %70, %68, %66, %64, %56, %40, %32, %22, %20
  %75 = phi i32 [ %73, %72 ], [ %71, %70 ], [ %69, %68 ], [ %67, %66 ], [ %65, %64 ], [ %63, %56 ], [ %.pre, %40 ], [ %39, %32 ], [ %31, %22 ], [ %21, %20 ]
  ret i32 %75
}

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath2PiEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath6Pi_TwoEv() local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN6GFloatpLES_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !7, i64 0}
!6 = !{!"_ZTS15GCollisionShape", !7, i64 0, !10, i64 4, !13, i64 16}
!7 = !{!"_ZTS6EShape", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS8GVector3", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"_ZTS6GFloat", !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"any pointer", !8, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass