; LLVM IR from ClementineAccount/Albuquerque :: lib/bullet/include/LinearMath (btConvexHull)

; 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.PHullResult = type { i32, i32, i32, ptr, %class.btAlignedObjectArray.8 }
%class.btAlignedObjectArray.8 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.btAlignedObjectArray = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.btVector3 = type { [4 x float] }
%class.HullDesc = type { i32, i32, ptr, i32, float, i32, i32 }
%class.HullResult = type { i8, i32, %class.btAlignedObjectArray, i32, i32, %class.btAlignedObjectArray.8 }

; 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 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11HullLibrary11ComputeHullEjPK9btVector3R11PHullResultj(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11ReleaseHullR11PHullResult(ptr noundef nonnull align 8 dereferenceable(56)) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11HullLibrary16CreateConvexHullERK8HullDescR10HullResult(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(80) %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.PHullResult, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.btAlignedObjectArray, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.btVector3, align 4
  %14 = alloca %class.btVector3, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %class.btAlignedObjectArray, align 8
  %20 = alloca %class.btVector3, align 4
  %21 = alloca %class.btVector3, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %class.btVector3, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #6
  call void @_ZN11PHullResultC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.HullDesc, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !11
  store i32 %34, ptr %9, align 4, !tbaa !15
  %35 = load i32, ptr %9, align 4, !tbaa !15
  %36 = icmp ult i32 %35, 8
  br i1 %36, label %37, label %38

37:                                               ; preds = %3
  store i32 8, ptr %9, align 4, !tbaa !15
  br label %38

38:                                               ; preds = %37, %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  invoke void @_ZN20btAlignedObjectArrayI9btVector3EC2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %39 unwind label %70

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  invoke void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %13)
          to label %40 unwind label %74

40:                                               ; preds = %39
  invoke void @_ZN9btVector37setZeroEv(ptr noundef nonnull align 4 dereferenceable(16) %13)
          to label %41 unwind label %74

41:                                               ; preds = %40
  %42 = load i32, ptr %9, align 4, !tbaa !15
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef %42, ptr noundef nonnull align 4 dereferenceable(16) %13)
          to label %43 unwind label %74

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  invoke void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %44 unwind label %78

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.HullDesc, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %class.HullDesc, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %class.HullDesc, ptr %51, i32 0, i32 3
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %54 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef 0)
          to label %55 unwind label %82

55:                                               ; preds = %44
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %class.HullDesc, ptr %56, i32 0, i32 4
  %58 = load float, ptr %57, align 4, !tbaa !18
  %59 = invoke noundef zeroext i1 @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(ptr noundef nonnull align 8 dereferenceable(64) %31, i32 noundef %47, ptr noundef %50, i32 noundef %53, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef %54, float noundef %58, ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %60 unwind label %82

60:                                               ; preds = %55
  %61 = zext i1 %59 to i8
  store i8 %61, ptr %16, align 1, !tbaa !19
  %62 = load i8, ptr %16, align 1, !tbaa !19, !range !21, !noundef !22
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %400

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !15
  br label %65

65:                                               ; preds = %120, %64
  %66 = load i32, ptr %17, align 4, !tbaa !15
  %67 = load i32, ptr %15, align 4, !tbaa !15
  %68 = icmp ult i32 %66, %67
  br i1 %68, label %86, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %127

70:                                               ; preds = %38
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %11, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %12, align 4
  br label %405

74:                                               ; preds = %41, %40, %39
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  br label %404

78:                                               ; preds = %43
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  br label %403

82:                                               ; preds = %130, %127, %55, %44
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  br label %402

86:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %87 = load i32, ptr %17, align 4, !tbaa !15
  %88 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef %87)
          to label %89 unwind label %123

89:                                               ; preds = %86
  store ptr %88, ptr %18, align 8, !tbaa !5
  %90 = invoke noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %91 unwind label %123

91:                                               ; preds = %89
  %92 = getelementptr inbounds float, ptr %90, i64 0
  %93 = load float, ptr %92, align 4, !tbaa !23
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = invoke noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %94)
          to label %96 unwind label %123

96:                                               ; preds = %91
  %97 = getelementptr inbounds float, ptr %95, i64 0
  %98 = load float, ptr %97, align 4, !tbaa !23
  %99 = fmul float %98, %93
  store float %99, ptr %97, align 4, !tbaa !23
  %100 = invoke noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %101 unwind label %123

101:                                              ; preds = %96
  %102 = getelementptr inbounds float, ptr %100, i64 1
  %103 = load float, ptr %102, align 4, !tbaa !23
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  %105 = invoke noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %104)
          to label %106 unwind label %123

106:                                              ; preds = %101
  %107 = getelementptr inbounds float, ptr %105, i64 1
  %108 = load float, ptr %107, align 4, !tbaa !23
  %109 = fmul float %108, %103
  store float %109, ptr %107, align 4, !tbaa !23
  %110 = invoke noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %14)
          to label %111 unwind label %123

111:                                              ; preds = %106
  %112 = getelementptr inbounds float, ptr %110, i64 2
  %113 = load float, ptr %112, align 4, !tbaa !23
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = invoke noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %114)
          to label %116 unwind label %123

116:                                              ; preds = %111
  %117 = getelementptr inbounds float, ptr %115, i64 2
  %118 = load float, ptr %117, align 4, !tbaa !23
  %119 = fmul float %118, %113
  store float %119, ptr %117, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %120

120:                                              ; preds = %116
  %121 = load i32, ptr %17, align 4, !tbaa !15
  %122 = add i32 %121, 1
  store i32 %122, ptr %17, align 4, !tbaa !15
  br label %65, !llvm.loop !24

123:                                              ; preds = %111, %106, %101, %96, %91, %89, %86
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %11, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %402

127:                                              ; preds = %69
  %128 = load i32, ptr %15, align 4, !tbaa !15
  %129 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %10, i32 noundef 0)
          to label %130 unwind label %82

130:                                              ; preds = %127
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %class.HullDesc, ptr %131, i32 0, i32 5
  %133 = load i32, ptr %132, align 8, !tbaa !26
  %134 = invoke noundef zeroext i1 @_ZN11HullLibrary11ComputeHullEjPK9btVector3R11PHullResultj(ptr noundef nonnull align 8 dereferenceable(64) %31, i32 noundef %128, ptr noundef %129, ptr noundef nonnull align 8 dereferenceable(56) %8, i32 noundef %133)
          to label %135 unwind label %82

135:                                              ; preds = %130
  %136 = zext i1 %134 to i8
  store i8 %136, ptr %16, align 1, !tbaa !19
  %137 = load i8, ptr %16, align 1, !tbaa !19, !range !21, !noundef !22
  %138 = trunc i8 %137 to i1
  br i1 %138, label %139, label %399

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  invoke void @_ZN20btAlignedObjectArrayI9btVector3EC2Ev(ptr noundef nonnull align 8 dereferenceable(25) %19)
          to label %140 unwind label %210

140:                                              ; preds = %139
  %141 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 0
  %142 = load i32, ptr %141, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  invoke void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %20)
          to label %143 unwind label %214

143:                                              ; preds = %140
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %19, i32 noundef %142, ptr noundef nonnull align 4 dereferenceable(16) %20)
          to label %144 unwind label %214

144:                                              ; preds = %143
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  %145 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 3
  %146 = load ptr, ptr %145, align 8, !tbaa !31
  %147 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !27
  %149 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %19, i32 noundef 0)
          to label %150 unwind label %218

150:                                              ; preds = %144
  %151 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 4
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %151, i32 noundef 0)
          to label %153 unwind label %218

153:                                              ; preds = %150
  %154 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 1
  %155 = load i32, ptr %154, align 4, !tbaa !32
  invoke void @_ZN11HullLibrary16BringOutYourDeadEPK9btVector3jPS0_RjPjj(ptr noundef nonnull align 8 dereferenceable(64) %31, ptr noundef %146, i32 noundef %148, ptr noundef %149, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef %152, i32 noundef %155)
          to label %156 unwind label %218

156:                                              ; preds = %153
  store i32 0, ptr %7, align 4, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = invoke noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32) %157, i32 noundef 1)
          to label %159 unwind label %218

159:                                              ; preds = %156
  br i1 %158, label %160, label %276

160:                                              ; preds = %159
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %class.HullResult, ptr %161, i32 0, i32 0
  store i8 0, ptr %162, align 8, !tbaa !33
  %163 = load i32, ptr %15, align 4, !tbaa !15
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %class.HullResult, ptr %164, i32 0, i32 1
  store i32 %163, ptr %165, align 4, !tbaa !37
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %class.HullResult, ptr %166, i32 0, i32 2
  %168 = load i32, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  invoke void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %21)
          to label %169 unwind label %222

169:                                              ; preds = %160
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %167, i32 noundef %168, ptr noundef nonnull align 4 dereferenceable(16) %21)
          to label %170 unwind label %222

170:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  %171 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 2
  %172 = load i32, ptr %171, align 8, !tbaa !38
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %class.HullResult, ptr %173, i32 0, i32 3
  store i32 %172, ptr %174, align 8, !tbaa !39
  %175 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 1
  %176 = load i32, ptr %175, align 4, !tbaa !32
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %class.HullResult, ptr %177, i32 0, i32 4
  store i32 %176, ptr %178, align 4, !tbaa !40
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %class.HullResult, ptr %179, i32 0, i32 5
  %181 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !15
  invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(ptr noundef nonnull align 8 dereferenceable(25) %180, i32 noundef %182, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %183 unwind label %226

183:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %class.HullResult, ptr %184, i32 0, i32 2
  %186 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %185, i32 noundef 0)
          to label %187 unwind label %218

187:                                              ; preds = %183
  %188 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %19, i32 noundef 0)
          to label %189 unwind label %218

189:                                              ; preds = %187
  %190 = load i32, ptr %15, align 4, !tbaa !15
  %191 = zext i32 %190 to i64
  %192 = mul i64 16, %191
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %186, ptr align 4 %188, i64 %192, i1 false)
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = invoke noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32) %193, i32 noundef 2)
          to label %195 unwind label %218

195:                                              ; preds = %189
  br i1 %194, label %196, label %263

196:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %197 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 4
  %198 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %197, i32 noundef 0)
          to label %199 unwind label %230

199:                                              ; preds = %196
  store ptr %198, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %class.HullResult, ptr %200, i32 0, i32 5
  %202 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %201, i32 noundef 0)
          to label %203 unwind label %234

203:                                              ; preds = %199
  store ptr %202, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !15
  br label %204

204:                                              ; preds = %258, %203
  %205 = load i32, ptr %25, align 4, !tbaa !15
  %206 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 2
  %207 = load i32, ptr %206, align 8, !tbaa !38
  %208 = icmp ult i32 %205, %207
  br i1 %208, label %238, label %209

209:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %261

210:                                              ; preds = %139
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %11, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %12, align 4
  br label %398

214:                                              ; preds = %143, %140
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %11, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  br label %397

218:                                              ; preds = %395, %307, %303, %267, %263, %189, %187, %183, %156, %153, %150, %144
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %11, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %12, align 4
  br label %397

222:                                              ; preds = %169, %160
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %11, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  br label %397

226:                                              ; preds = %170
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %11, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %397

230:                                              ; preds = %196
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %11, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %12, align 4
  br label %262

234:                                              ; preds = %199
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %11, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %262

238:                                              ; preds = %204
  %239 = load ptr, ptr %23, align 8, !tbaa !5
  %240 = getelementptr inbounds i32, ptr %239, i64 2
  %241 = load i32, ptr %240, align 4, !tbaa !15
  %242 = load ptr, ptr %24, align 8, !tbaa !5
  %243 = getelementptr inbounds i32, ptr %242, i64 0
  store i32 %241, ptr %243, align 4, !tbaa !15
  %244 = load ptr, ptr %23, align 8, !tbaa !5
  %245 = getelementptr inbounds i32, ptr %244, i64 1
  %246 = load i32, ptr %245, align 4, !tbaa !15
  %247 = load ptr, ptr %24, align 8, !tbaa !5
  %248 = getelementptr inbounds i32, ptr %247, i64 1
  store i32 %246, ptr %248, align 4, !tbaa !15
  %249 = load ptr, ptr %23, align 8, !tbaa !5
  %250 = getelementptr inbounds i32, ptr %249, i64 0
  %251 = load i32, ptr %250, align 4, !tbaa !15
  %252 = load ptr, ptr %24, align 8, !tbaa !5
  %253 = getelementptr inbounds i32, ptr %252, i64 2
  store i32 %251, ptr %253, align 4, !tbaa !15
  %254 = load ptr, ptr %24, align 8, !tbaa !5
  %255 = getelementptr inbounds i32, ptr %254, i64 3
  store ptr %255, ptr %24, align 8, !tbaa !5
  %256 = load ptr, ptr %23, align 8, !tbaa !5
  %257 = getelementptr inbounds i32, ptr %256, i64 3
  store ptr %257, ptr %23, align 8, !tbaa !5
  br label %258

258:                                              ; preds = %238
  %259 = load i32, ptr %25, align 4, !tbaa !15
  %260 = add i32 %259, 1
  store i32 %260, ptr %25, align 4, !tbaa !15
  br label %204, !llvm.loop !41

261:                                              ; preds = %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %275

262:                                              ; preds = %234, %230
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %397

263:                                              ; preds = %195
  %264 = load ptr, ptr %6, align 8, !tbaa !5
  %265 = getelementptr inbounds %class.HullResult, ptr %264, i32 0, i32 5
  %266 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %265, i32 noundef 0)
          to label %267 unwind label %218

267:                                              ; preds = %263
  %268 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 4
  %269 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %268, i32 noundef 0)
          to label %270 unwind label %218

270:                                              ; preds = %267
  %271 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 1
  %272 = load i32, ptr %271, align 4, !tbaa !32
  %273 = zext i32 %272 to i64
  %274 = mul i64 4, %273
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %266, ptr align 4 %269, i64 %274, i1 false)
  br label %275

275:                                              ; preds = %270, %261
  br label %395

276:                                              ; preds = %159
  %277 = load ptr, ptr %6, align 8, !tbaa !5
  %278 = getelementptr inbounds %class.HullResult, ptr %277, i32 0, i32 0
  store i8 1, ptr %278, align 8, !tbaa !33
  %279 = load i32, ptr %15, align 4, !tbaa !15
  %280 = load ptr, ptr %6, align 8, !tbaa !5
  %281 = getelementptr inbounds %class.HullResult, ptr %280, i32 0, i32 1
  store i32 %279, ptr %281, align 4, !tbaa !37
  %282 = load ptr, ptr %6, align 8, !tbaa !5
  %283 = getelementptr inbounds %class.HullResult, ptr %282, i32 0, i32 2
  %284 = load i32, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  invoke void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %26)
          to label %285 unwind label %326

285:                                              ; preds = %276
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %283, i32 noundef %284, ptr noundef nonnull align 4 dereferenceable(16) %26)
          to label %286 unwind label %326

286:                                              ; preds = %285
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  %287 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 2
  %288 = load i32, ptr %287, align 8, !tbaa !38
  %289 = load ptr, ptr %6, align 8, !tbaa !5
  %290 = getelementptr inbounds %class.HullResult, ptr %289, i32 0, i32 3
  store i32 %288, ptr %290, align 8, !tbaa !39
  %291 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 1
  %292 = load i32, ptr %291, align 4, !tbaa !32
  %293 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 2
  %294 = load i32, ptr %293, align 8, !tbaa !38
  %295 = add i32 %292, %294
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = getelementptr inbounds %class.HullResult, ptr %296, i32 0, i32 4
  store i32 %295, ptr %297, align 4, !tbaa !40
  %298 = load ptr, ptr %6, align 8, !tbaa !5
  %299 = getelementptr inbounds %class.HullResult, ptr %298, i32 0, i32 5
  %300 = load ptr, ptr %6, align 8, !tbaa !5
  %301 = getelementptr inbounds %class.HullResult, ptr %300, i32 0, i32 4
  %302 = load i32, ptr %301, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !15
  invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(ptr noundef nonnull align 8 dereferenceable(25) %299, i32 noundef %302, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %303 unwind label %330

303:                                              ; preds = %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = getelementptr inbounds %class.HullResult, ptr %304, i32 0, i32 2
  %306 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %305, i32 noundef 0)
          to label %307 unwind label %218

307:                                              ; preds = %303
  %308 = invoke noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %19, i32 noundef 0)
          to label %309 unwind label %218

309:                                              ; preds = %307
  %310 = load i32, ptr %15, align 4, !tbaa !15
  %311 = zext i32 %310 to i64
  %312 = mul i64 16, %311
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %306, ptr align 4 %308, i64 %312, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %313 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 4
  %314 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %313, i32 noundef 0)
          to label %315 unwind label %334

315:                                              ; preds = %309
  store ptr %314, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %316 = load ptr, ptr %6, align 8, !tbaa !5
  %317 = getelementptr inbounds %class.HullResult, ptr %316, i32 0, i32 5
  %318 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %317, i32 noundef 0)
          to label %319 unwind label %338

319:                                              ; preds = %315
  store ptr %318, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !15
  br label %320

320:                                              ; preds = %389, %319
  %321 = load i32, ptr %30, align 4, !tbaa !15
  %322 = getelementptr inbounds %class.PHullResult, ptr %8, i32 0, i32 2
  %323 = load i32, ptr %322, align 8, !tbaa !38
  %324 = icmp ult i32 %321, %323
  br i1 %324, label %342, label %325

325:                                              ; preds = %320
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %392

326:                                              ; preds = %285, %276
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %11, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  br label %397

330:                                              ; preds = %286
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %11, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %397

334:                                              ; preds = %309
  %335 = landingpad { ptr, i32 }
          cleanup
  %336 = extractvalue { ptr, i32 } %335, 0
  store ptr %336, ptr %11, align 8
  %337 = extractvalue { ptr, i32 } %335, 1
  store i32 %337, ptr %12, align 4
  br label %394

338:                                              ; preds = %315
  %339 = landingpad { ptr, i32 }
          cleanup
  %340 = extractvalue { ptr, i32 } %339, 0
  store ptr %340, ptr %11, align 8
  %341 = extractvalue { ptr, i32 } %339, 1
  store i32 %341, ptr %12, align 4
  br label %393

342:                                              ; preds = %320
  %343 = load ptr, ptr %29, align 8, !tbaa !5
  %344 = getelementptr inbounds i32, ptr %343, i64 0
  store i32 3, ptr %344, align 4, !tbaa !15
  %345 = load ptr, ptr %5, align 8, !tbaa !5
  %346 = invoke noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32) %345, i32 noundef 2)
          to label %347 unwind label %364

347:                                              ; preds = %342
  br i1 %346, label %348, label %368

348:                                              ; preds = %347
  %349 = load ptr, ptr %28, align 8, !tbaa !5
  %350 = getelementptr inbounds i32, ptr %349, i64 2
  %351 = load i32, ptr %350, align 4, !tbaa !15
  %352 = load ptr, ptr %29, align 8, !tbaa !5
  %353 = getelementptr inbounds i32, ptr %352, i64 1
  store i32 %351, ptr %353, align 4, !tbaa !15
  %354 = load ptr, ptr %28, align 8, !tbaa !5
  %355 = getelementptr inbounds i32, ptr %354, i64 1
  %356 = load i32, ptr %355, align 4, !tbaa !15
  %357 = load ptr, ptr %29, align 8, !tbaa !5
  %358 = getelementptr inbounds i32, ptr %357, i64 2
  store i32 %356, ptr %358, align 4, !tbaa !15
  %359 = load ptr, ptr %28, align 8, !tbaa !5
  %360 = getelementptr inbounds i32, ptr %359, i64 0
  %361 = load i32, ptr %360, align 4, !tbaa !15
  %362 = load ptr, ptr %29, align 8, !tbaa !5
  %363 = getelementptr inbounds i32, ptr %362, i64 3
  store i32 %361, ptr %363, align 4, !tbaa !15
  br label %384

364:                                              ; preds = %342
  %365 = landingpad { ptr, i32 }
          cleanup
  %366 = extractvalue { ptr, i32 } %365, 0
  store ptr %366, ptr %11, align 8
  %367 = extractvalue { ptr, i32 } %365, 1
  store i32 %367, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %393

368:                                              ; preds = %347
  %369 = load ptr, ptr %28, align 8, !tbaa !5
  %370 = getelementptr inbounds i32, ptr %369, i64 0
  %371 = load i32, ptr %370, align 4, !tbaa !15
  %372 = load ptr, ptr %29, align 8, !tbaa !5
  %373 = getelementptr inbounds i32, ptr %372, i64 1
  store i32 %371, ptr %373, align 4, !tbaa !15
  %374 = load ptr, ptr %28, align 8, !tbaa !5
  %375 = getelementptr inbounds i32, ptr %374, i64 1
  %376 = load i32, ptr %375, align 4, !tbaa !15
  %377 = load ptr, ptr %29, align 8, !tbaa !5
  %378 = getelementptr inbounds i32, ptr %377, i64 2
  store i32 %376, ptr %378, align 4, !tbaa !15
  %379 = load ptr, ptr %28, align 8, !tbaa !5
  %380 = getelementptr inbounds i32, ptr %379, i64 2
  %381 = load i32, ptr %380, align 4, !tbaa !15
  %382 = load ptr, ptr %29, align 8, !tbaa !5
  %383 = getelementptr inbounds i32, ptr %382, i64 3
  store i32 %381, ptr %383, align 4, !tbaa !15
  br label %384

384:                                              ; preds = %368, %348
  %385 = load ptr, ptr %29, align 8, !tbaa !5
  %386 = getelementptr inbounds i32, ptr %385, i64 4
  store ptr %386, ptr %29, align 8, !tbaa !5
  %387 = load ptr, ptr %28, align 8, !tbaa !5
  %388 = getelementptr inbounds i32, ptr %387, i64 3
  store ptr %388, ptr %28, align 8, !tbaa !5
  br label %389

389:                                              ; preds = %384
  %390 = load i32, ptr %30, align 4, !tbaa !15
  %391 = add i32 %390, 1
  store i32 %391, ptr %30, align 4, !tbaa !15
  br label %320, !llvm.loop !42

392:                                              ; preds = %325
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %395

393:                                              ; preds = %364, %338
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %394

394:                                              ; preds = %393, %334
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %397

395:                                              ; preds = %392, %275
  invoke void @_Z11ReleaseHullR11PHullResult(ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %396 unwind label %218

396:                                              ; preds = %395
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  br label %399

397:                                              ; preds = %394, %330, %326, %262, %226, %222, %218, %214
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %19) #6
  br label %398

398:                                              ; preds = %397, %210
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  br label %402

399:                                              ; preds = %396, %135
  br label %400

400:                                              ; preds = %399, %60
  %401 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @_ZN11PHullResultD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret i32 %401

402:                                              ; preds = %398, %123, %82
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %403

403:                                              ; preds = %402, %78
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %404

404:                                              ; preds = %403, %74
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10) #6
  br label %405

405:                                              ; preds = %404, %70
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @_ZN11PHullResultD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %406

406:                                              ; preds = %405
  %407 = load ptr, ptr %11, align 8
  %408 = load i32, ptr %12, align 4
  %409 = insertvalue { ptr, i32 } poison, ptr %407, 0
  %410 = insertvalue { ptr, i32 } %409, i32 %408, 1
  resume { ptr, i32 } %410
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9btVector37setZeroEv(ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11HullLibrary16BringOutYourDeadEPK9btVector3jPS0_RjPjj(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #5 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 = !{!"_ZTS9HullError", !7, i64 0}
!11 = !{!12, !13, i64 4}
!12 = !{!"_ZTS8HullDesc", !13, i64 0, !13, i64 4, !6, i64 8, !13, i64 16, !14, i64 20, !13, i64 24, !13, i64 28}
!13 = !{!"int", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!13, !13, i64 0}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !13, i64 16}
!18 = !{!12, !14, i64 20}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!14, !14, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!12, !13, i64 24}
!27 = !{!28, !13, i64 0}
!28 = !{!"_ZTS11PHullResult", !13, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !29, i64 24}
!29 = !{!"_ZTS20btAlignedObjectArrayIjE", !30, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !20, i64 24}
!30 = !{!"_ZTS18btAlignedAllocatorIjLj16EE"}
!31 = !{!28, !6, i64 16}
!32 = !{!28, !13, i64 4}
!33 = !{!34, !20, i64 0}
!34 = !{!"_ZTS10HullResult", !20, i64 0, !13, i64 4, !35, i64 8, !13, i64 40, !13, i64 44, !29, i64 48}
!35 = !{!"_ZTS20btAlignedObjectArrayI9btVector3E", !36, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !20, i64 24}
!36 = !{!"_ZTS18btAlignedAllocatorI9btVector3Lj16EE"}
!37 = !{!34, !13, i64 4}
!38 = !{!28, !13, i64 8}
!39 = !{!34, !13, i64 40}
!40 = !{!34, !13, i64 44}
!41 = distinct !{!41, !25}
!42 = distinct !{!42, !25}


; 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.PHullResult = type { i32, i32, i32, ptr, %class.btAlignedObjectArray.8 }
%class.btAlignedObjectArray.8 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.btAlignedObjectArray = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.btVector3 = 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 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11HullLibrary11ComputeHullEjPK9btVector3R11PHullResultj(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11ReleaseHullR11PHullResult(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN11HullLibrary16CreateConvexHullERK8HullDescR10HullResult(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(80) %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.PHullResult, align 8
  %5 = alloca %class.btAlignedObjectArray, align 8
  %6 = alloca %class.btVector3, align 4
  %7 = alloca %class.btVector3, align 4
  %8 = alloca i32, align 4
  %9 = alloca %class.btAlignedObjectArray, align 8
  %10 = alloca %class.btVector3, align 4
  %11 = alloca %class.btVector3, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.btVector3, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #7
  call void @_ZN11PHullResultC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4)
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %spec.store.select = call i32 @llvm.umax.i32(i32 %16, i32 8)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  invoke void @_ZN20btAlignedObjectArrayI9btVector3EC2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5)
          to label %17 unwind label %35

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %6)
  invoke void @_ZN9btVector37setZeroEv(ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %18 unwind label %37

18:                                               ; preds = %17
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %5, i32 noundef %spec.store.select, ptr noundef nonnull align 4 dereferenceable(16) %6)
          to label %19 unwind label %37

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %20 = load i32, ptr %15, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %1, i64 16
  %24 = load i32, ptr %23, align 8, !tbaa !13
  %25 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %5, i32 noundef 0)
  %26 = getelementptr inbounds i8, ptr %1, i64 20
  %27 = load float, ptr %26, align 4, !tbaa !14
  %28 = invoke noundef zeroext i1 @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %20, ptr noundef %22, i32 noundef %24, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull %25, float noundef %27, ptr noundef nonnull align 4 dereferenceable(16) %7)
          to label %29 unwind label %39

29:                                               ; preds = %19
  br i1 %28, label %.preheader, label %177

.preheader:                                       ; preds = %29
  %30 = load i32, ptr %8, align 4, !tbaa !15
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %.lcssa = phi i32 [ 0, %.preheader ], [ %62, %.lr.ph ]
  %31 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %5, i32 noundef 0)
  %32 = getelementptr inbounds i8, ptr %1, i64 24
  %33 = load i32, ptr %32, align 8, !tbaa !16
  %34 = invoke noundef zeroext i1 @_ZN11HullLibrary11ComputeHullEjPK9btVector3R11PHullResultj(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %.lcssa, ptr noundef nonnull %31, ptr noundef nonnull align 8 dereferenceable(56) %4, i32 noundef %33)
          to label %64 unwind label %39

35:                                               ; preds = %3
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %180

37:                                               ; preds = %18, %17
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %179

39:                                               ; preds = %._crit_edge, %19
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %178

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.07387 = phi i32 [ %61, %.lr.ph ], [ 0, %.preheader ]
  %41 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %5, i32 noundef %.07387)
  %42 = call noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %7)
  %43 = load float, ptr %42, align 4, !tbaa !17
  %44 = call noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %41)
  %45 = load float, ptr %44, align 4, !tbaa !17
  %46 = fmul float %43, %45
  store float %46, ptr %44, align 4, !tbaa !17
  %47 = call noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %7)
  %48 = getelementptr inbounds i8, ptr %47, i64 4
  %49 = load float, ptr %48, align 4, !tbaa !17
  %50 = call noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %41)
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load float, ptr %51, align 4, !tbaa !17
  %53 = fmul float %49, %52
  store float %53, ptr %51, align 4, !tbaa !17
  %54 = call noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %7)
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load float, ptr %55, align 4, !tbaa !17
  %57 = call noundef ptr @_ZN9btVector3cvPfEv(ptr noundef nonnull align 4 dereferenceable(16) %41)
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load float, ptr %58, align 4, !tbaa !17
  %60 = fmul float %56, %59
  store float %60, ptr %58, align 4, !tbaa !17
  %61 = add nuw i32 %.07387, 1
  %62 = load i32, ptr %8, align 4, !tbaa !15
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %.lr.ph, label %._crit_edge, !llvm.loop !18

64:                                               ; preds = %._crit_edge
  br i1 %34, label %65, label %177

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  invoke void @_ZN20btAlignedObjectArrayI9btVector3EC2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9)
          to label %66 unwind label %101

66:                                               ; preds = %65
  %67 = load i32, ptr %4, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %10)
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %9, i32 noundef %67, ptr noundef nonnull align 4 dereferenceable(16) %10)
          to label %68 unwind label %103

68:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  %69 = getelementptr inbounds i8, ptr %4, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !25
  %71 = load i32, ptr %4, align 8, !tbaa !20
  %72 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %9, i32 noundef 0)
  %73 = getelementptr inbounds i8, ptr %4, i64 24
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %73, i32 noundef 0)
  %75 = getelementptr inbounds i8, ptr %4, i64 4
  %76 = load i32, ptr %75, align 4, !tbaa !26
  invoke void @_ZN11HullLibrary16BringOutYourDeadEPK9btVector3jPS0_RjPjj(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %70, i32 noundef %71, ptr noundef nonnull %72, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull %74, i32 noundef %76)
          to label %77 unwind label %105

77:                                               ; preds = %68
  %78 = call noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1)
  %79 = getelementptr inbounds i8, ptr %2, i64 4
  %80 = getelementptr inbounds i8, ptr %2, i64 8
  br i1 %78, label %81, label %129

81:                                               ; preds = %77
  store i8 0, ptr %2, align 8, !tbaa !27
  %82 = load i32, ptr %8, align 4, !tbaa !15
  store i32 %82, ptr %79, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %11)
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %80, i32 noundef %82, ptr noundef nonnull align 4 dereferenceable(16) %11)
          to label %83 unwind label %107

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  %84 = getelementptr inbounds i8, ptr %4, i64 8
  %85 = load i32, ptr %84, align 8, !tbaa !32
  %86 = getelementptr inbounds i8, ptr %2, i64 40
  store i32 %85, ptr %86, align 8, !tbaa !33
  %87 = load i32, ptr %75, align 4, !tbaa !26
  %88 = getelementptr inbounds i8, ptr %2, i64 44
  store i32 %87, ptr %88, align 4, !tbaa !34
  %89 = getelementptr inbounds i8, ptr %2, i64 48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 0, ptr %12, align 4, !tbaa !15
  invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(ptr noundef nonnull align 8 dereferenceable(25) %89, i32 noundef %87, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %90 unwind label %109

90:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %91 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %80, i32 noundef 0)
  %92 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %9, i32 noundef 0)
  %93 = load i32, ptr %8, align 4, !tbaa !15
  %94 = zext i32 %93 to i64
  %95 = shl nuw nsw i64 %94, 4
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %91, ptr nonnull align 4 %92, i64 %95, i1 false)
  %96 = call noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 2)
  br i1 %96, label %97, label %123

97:                                               ; preds = %90
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %73, i32 noundef 0)
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %89, i32 noundef 0)
  %100 = load i32, ptr %84, align 8, !tbaa !32
  %.not99 = icmp eq i32 %100, 0
  br i1 %.not99, label %.loopexit, label %.lr.ph97

101:                                              ; preds = %65
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %176

103:                                              ; preds = %66
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %175

105:                                              ; preds = %.loopexit, %68
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %175

107:                                              ; preds = %81
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %175

109:                                              ; preds = %83
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %175

.lr.ph97:                                         ; preds = %97, %.lr.ph97
  %.06995 = phi i32 [ %120, %.lr.ph97 ], [ 0, %97 ]
  %.07094 = phi ptr [ %118, %.lr.ph97 ], [ %99, %97 ]
  %.07193 = phi ptr [ %119, %.lr.ph97 ], [ %98, %97 ]
  %111 = getelementptr inbounds i8, ptr %.07193, i64 8
  %112 = load i32, ptr %111, align 4, !tbaa !15
  store i32 %112, ptr %.07094, align 4, !tbaa !15
  %113 = getelementptr inbounds i8, ptr %.07193, i64 4
  %114 = load i32, ptr %113, align 4, !tbaa !15
  %115 = getelementptr inbounds i8, ptr %.07094, i64 4
  store i32 %114, ptr %115, align 4, !tbaa !15
  %116 = load i32, ptr %.07193, align 4, !tbaa !15
  %117 = getelementptr inbounds i8, ptr %.07094, i64 8
  store i32 %116, ptr %117, align 4, !tbaa !15
  %118 = getelementptr inbounds i8, ptr %.07094, i64 12
  %119 = getelementptr inbounds i8, ptr %.07193, i64 12
  %120 = add nuw i32 %.06995, 1
  %121 = load i32, ptr %84, align 8, !tbaa !32
  %122 = icmp ult i32 %120, %121
  br i1 %122, label %.lr.ph97, label %.loopexit, !llvm.loop !35

123:                                              ; preds = %90
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %89, i32 noundef 0)
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %73, i32 noundef 0)
  %126 = load i32, ptr %75, align 4, !tbaa !26
  %127 = zext i32 %126 to i64
  %128 = shl nuw nsw i64 %127, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %124, ptr nonnull align 4 %125, i64 %128, i1 false)
  br label %.loopexit

129:                                              ; preds = %77
  store i8 1, ptr %2, align 8, !tbaa !27
  %130 = load i32, ptr %8, align 4, !tbaa !15
  store i32 %130, ptr %79, align 4, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  call void @_ZN9btVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(16) %13)
  invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(ptr noundef nonnull align 8 dereferenceable(25) %80, i32 noundef %130, ptr noundef nonnull align 4 dereferenceable(16) %13)
          to label %131 unwind label %148

131:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  %132 = getelementptr inbounds i8, ptr %4, i64 8
  %133 = load i32, ptr %132, align 8, !tbaa !32
  %134 = getelementptr inbounds i8, ptr %2, i64 40
  store i32 %133, ptr %134, align 8, !tbaa !33
  %135 = load i32, ptr %75, align 4, !tbaa !26
  %136 = add i32 %135, %133
  %137 = getelementptr inbounds i8, ptr %2, i64 44
  store i32 %136, ptr %137, align 4, !tbaa !34
  %138 = getelementptr inbounds i8, ptr %2, i64 48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 0, ptr %14, align 4, !tbaa !15
  invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(ptr noundef nonnull align 8 dereferenceable(25) %138, i32 noundef %136, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %139 unwind label %150

139:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  %140 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %80, i32 noundef 0)
  %141 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN20btAlignedObjectArrayI9btVector3EixEi(ptr noundef nonnull align 8 dereferenceable(25) %9, i32 noundef 0)
  %142 = load i32, ptr %8, align 4, !tbaa !15
  %143 = zext i32 %142 to i64
  %144 = shl nuw nsw i64 %143, 4
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %140, ptr nonnull align 4 %141, i64 %144, i1 false)
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %73, i32 noundef 0)
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20btAlignedObjectArrayIjEixEi(ptr noundef nonnull align 8 dereferenceable(25) %138, i32 noundef 0)
  %147 = load i32, ptr %132, align 8, !tbaa !32
  %.not98 = icmp eq i32 %147, 0
  br i1 %.not98, label %.loopexit, label %.lr.ph92

148:                                              ; preds = %129
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  br label %175

150:                                              ; preds = %131
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  br label %175

.lr.ph92:                                         ; preds = %139, %167
  %.090 = phi i32 [ %171, %167 ], [ 0, %139 ]
  %.06789 = phi ptr [ %169, %167 ], [ %146, %139 ]
  %.06888 = phi ptr [ %170, %167 ], [ %145, %139 ]
  store i32 3, ptr %.06789, align 4, !tbaa !15
  %152 = call noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 2)
  br i1 %152, label %153, label %160

153:                                              ; preds = %.lr.ph92
  %154 = getelementptr inbounds i8, ptr %.06888, i64 8
  %155 = load i32, ptr %154, align 4, !tbaa !15
  %156 = getelementptr inbounds i8, ptr %.06789, i64 4
  store i32 %155, ptr %156, align 4, !tbaa !15
  %157 = getelementptr inbounds i8, ptr %.06888, i64 4
  %158 = load i32, ptr %157, align 4, !tbaa !15
  %159 = getelementptr inbounds i8, ptr %.06789, i64 8
  store i32 %158, ptr %159, align 4, !tbaa !15
  br label %167

160:                                              ; preds = %.lr.ph92
  %161 = load i32, ptr %.06888, align 4, !tbaa !15
  %162 = getelementptr inbounds i8, ptr %.06789, i64 4
  store i32 %161, ptr %162, align 4, !tbaa !15
  %163 = getelementptr inbounds i8, ptr %.06888, i64 4
  %164 = load i32, ptr %163, align 4, !tbaa !15
  %165 = getelementptr inbounds i8, ptr %.06789, i64 8
  store i32 %164, ptr %165, align 4, !tbaa !15
  %166 = getelementptr inbounds i8, ptr %.06888, i64 8
  br label %167

167:                                              ; preds = %160, %153
  %.sink.in = phi ptr [ %.06888, %153 ], [ %166, %160 ]
  %.sink = load i32, ptr %.sink.in, align 4, !tbaa !15
  %168 = getelementptr inbounds i8, ptr %.06789, i64 12
  store i32 %.sink, ptr %168, align 4
  %169 = getelementptr inbounds i8, ptr %.06789, i64 16
  %170 = getelementptr inbounds i8, ptr %.06888, i64 12
  %171 = add nuw i32 %.090, 1
  %172 = load i32, ptr %132, align 8, !tbaa !32
  %173 = icmp ult i32 %171, %172
  br i1 %173, label %.lr.ph92, label %.loopexit, !llvm.loop !36

.loopexit:                                        ; preds = %167, %.lr.ph97, %139, %97, %123
  invoke void @_Z11ReleaseHullR11PHullResult(ptr noundef nonnull align 8 dereferenceable(56) %4)
          to label %174 unwind label %105

174:                                              ; preds = %.loopexit
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %177

175:                                              ; preds = %150, %148, %109, %107, %105, %103
  %.pn = phi { ptr, i32 } [ %106, %105 ], [ %110, %109 ], [ %108, %107 ], [ %151, %150 ], [ %149, %148 ], [ %104, %103 ]
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %9) #7
  br label %176

176:                                              ; preds = %175, %101
  %.pn.pn = phi { ptr, i32 } [ %.pn, %175 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %178

177:                                              ; preds = %64, %174, %29
  %.072 = phi i32 [ 0, %174 ], [ 1, %64 ], [ 1, %29 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN11PHullResultD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #7
  ret i32 %.072

178:                                              ; preds = %176, %39
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %176 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %179

179:                                              ; preds = %178, %37
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %178 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN20btAlignedObjectArrayI9btVector3ED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %5) #7
  br label %180

180:                                              ; preds = %179, %35
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %179 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN11PHullResultD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9btVector37setZeroEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, float noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11HullLibrary16BringOutYourDeadEPK9btVector3jPS0_RjPjj(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8HullDesc11HasHullFlagE8HullFlag(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 4}
!6 = !{!"_ZTS8HullDesc", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !11, i64 20, !7, i64 24, !7, i64 28}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !11, i64 20}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !7, i64 24}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS11PHullResult", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !22, i64 24}
!22 = !{!"_ZTS20btAlignedObjectArrayIjE", !23, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !24, i64 24}
!23 = !{!"_ZTS18btAlignedAllocatorIjLj16EE"}
!24 = !{!"bool", !8, i64 0}
!25 = !{!21, !10, i64 16}
!26 = !{!21, !7, i64 4}
!27 = !{!28, !24, i64 0}
!28 = !{!"_ZTS10HullResult", !24, i64 0, !7, i64 4, !29, i64 8, !7, i64 40, !7, i64 44, !22, i64 48}
!29 = !{!"_ZTS20btAlignedObjectArrayI9btVector3E", !30, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !24, i64 24}
!30 = !{!"_ZTS18btAlignedAllocatorI9btVector3Lj16EE"}
!31 = !{!28, !7, i64 4}
!32 = !{!21, !7, i64 8}
!33 = !{!28, !7, i64 40}
!34 = !{!28, !7, i64 44}
!35 = distinct !{!35, !19}
!36 = distinct !{!36, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass