; LLVM IR from zeux/meshoptimizer :: demo/main.ll (Z8stripifyRK4Meshbc)

; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%struct.Mesh = type { %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl" }
%"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.meshopt_VertexCacheStatistics = type { i32, i32, float, float }

@.str.17 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [61 x i8], align 1
@__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc = external hidden unnamed_addr constant [40 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [107 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z9timestampv() #1

declare i32 @printf(ptr noundef, ...) #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isMeshValidRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z8hashMeshRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48)) #1

declare { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4MeshC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8stripifyRK4Meshbc(ptr noundef nonnull align 8 dereferenceable(48) %0, i1 noundef zeroext %1, i8 noundef signext %2) #7 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %struct.Mesh, align 8
  %17 = alloca %struct.meshopt_VertexCacheStatistics, align 4
  %18 = alloca %struct.meshopt_VertexCacheStatistics, align 4
  %19 = alloca %struct.meshopt_VertexCacheStatistics, align 4
  %20 = alloca %struct.meshopt_VertexCacheStatistics, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %21 = zext i1 %1 to i8
  store i8 %21, ptr %5, align 1, !tbaa !9
  store i8 %2, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %22 = load i8, ptr %5, align 1, !tbaa !9, !range !12, !noundef !13
  %23 = trunc i8 %22 to i1
  %24 = zext i1 %23 to i64
  %25 = select i1 %23, i32 -1, i32 0
  store i32 %25, ptr %7, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %26 = call noundef double @_Z9timestampv()
  store double %26, ptr %8, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.Mesh, ptr %27, i32 0, i32 1
  %29 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  %30 = call i64 @meshopt_stripifyBound(i64 noundef %29)
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #8
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  invoke void @_ZNSt6vectorIjSaIjEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %30, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %31 unwind label %52

31:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #8
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.Mesh, ptr %33, i32 0, i32 1
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef 0) #8
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.Mesh, ptr %36, i32 0, i32 1
  %38 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #8
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.Mesh, ptr %39, i32 0, i32 0
  %41 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #8
  %42 = load i32, ptr %7, align 4, !tbaa !14
  %43 = invoke i64 @meshopt_stripify(ptr noundef %32, ptr noundef %35, i64 noundef %38, i64 noundef %41, i32 noundef %42)
          to label %44 unwind label %56

44:                                               ; preds = %31
  invoke void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %43)
          to label %45 unwind label %56

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %46 = call noundef double @_Z9timestampv()
  store double %46, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store i64 0, ptr %14, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !18
  br label %47

47:                                               ; preds = %74, %45
  %48 = load i64, ptr %15, align 8, !tbaa !18
  %49 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %50 = icmp ult i64 %48, %49
  br i1 %50, label %60, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %77

52:                                               ; preds = %3
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #8
  br label %245

56:                                               ; preds = %44, %31
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  br label %244

60:                                               ; preds = %47
  %61 = load i8, ptr %5, align 1, !tbaa !9, !range !12, !noundef !13
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %69

63:                                               ; preds = %60
  %64 = load i64, ptr %15, align 8, !tbaa !18
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %64) #8
  %66 = load i32, ptr %65, align 4, !tbaa !14
  %67 = load i32, ptr %7, align 4, !tbaa !14
  %68 = icmp eq i32 %66, %67
  br label %69

69:                                               ; preds = %63, %60
  %70 = phi i1 [ false, %60 ], [ %68, %63 ]
  %71 = zext i1 %70 to i64
  %72 = load i64, ptr %14, align 8, !tbaa !18
  %73 = add i64 %72, %71
  store i64 %73, ptr %14, align 8, !tbaa !18
  br label %74

74:                                               ; preds = %69
  %75 = load i64, ptr %15, align 8, !tbaa !18
  %76 = add i64 %75, 1
  store i64 %76, ptr %15, align 8, !tbaa !18
  br label %47, !llvm.loop !20

77:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 48, ptr %16) #8
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN4MeshC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 8 dereferenceable(48) %78)
          to label %79 unwind label %97

79:                                               ; preds = %77
  %80 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %81 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef 0) #8
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #8
  %84 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %85 = load i32, ptr %7, align 4, !tbaa !14
  %86 = invoke i64 @meshopt_unstripify(ptr noundef %82, ptr noundef %83, i64 noundef %84, i32 noundef %85)
          to label %87 unwind label %101

87:                                               ; preds = %79
  invoke void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %86)
          to label %88 unwind label %101

88:                                               ; preds = %87
  %89 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %90 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %89) #8
  %91 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %92 = invoke i64 @meshopt_unstripifyBound(i64 noundef %91)
          to label %93 unwind label %101

93:                                               ; preds = %88
  %94 = icmp ule i64 %90, %92
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  br label %106

96:                                               ; preds = %93
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.18, i32 noundef 935, ptr noundef @__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc) #9
  unreachable

97:                                               ; preds = %77
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %11, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %12, align 4
  br label %243

101:                                              ; preds = %88, %87, %79
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  br label %242

105:                                              ; No predecessors!
  br label %106

106:                                              ; preds = %105, %95
  %107 = call noundef zeroext i1 @_Z11isMeshValidRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48) %16)
  br i1 %107, label %108, label %109

108:                                              ; preds = %106
  br label %111

109:                                              ; preds = %106
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.18, i32 noundef 937, ptr noundef @__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc) #9
  unreachable

110:                                              ; No predecessors!
  br label %111

111:                                              ; preds = %110, %108
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = call noundef i32 @_Z8hashMeshRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48) %112)
  %114 = call noundef i32 @_Z8hashMeshRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48) %16)
  %115 = icmp eq i32 %113, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %111
  br label %119

117:                                              ; preds = %111
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.18, i32 noundef 938, ptr noundef @__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc) #9
  unreachable

118:                                              ; No predecessors!
  br label %119

119:                                              ; preds = %118, %116
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #8
  %120 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef 0) #8
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.Mesh, ptr %122, i32 0, i32 1
  %124 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #8
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.Mesh, ptr %125, i32 0, i32 0
  %127 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %126) #8
  %128 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef %121, i64 noundef %124, i64 noundef %127, i32 noundef 16, i32 noundef 0, i32 noundef 0)
          to label %129 unwind label %223

129:                                              ; preds = %119
  %130 = getelementptr inbounds { i64, <2 x float> }, ptr %17, i32 0, i32 0
  %131 = extractvalue { i64, <2 x float> } %128, 0
  store i64 %131, ptr %130, align 4
  %132 = getelementptr inbounds { i64, <2 x float> }, ptr %17, i32 0, i32 1
  %133 = extractvalue { i64, <2 x float> } %128, 1
  store <2 x float> %133, ptr %132, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  %134 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %134, i64 noundef 0) #8
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.Mesh, ptr %136, i32 0, i32 1
  %138 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #8
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.Mesh, ptr %139, i32 0, i32 0
  %141 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %140) #8
  %142 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef %135, i64 noundef %138, i64 noundef %141, i32 noundef 32, i32 noundef 32, i32 noundef 32)
          to label %143 unwind label %227

143:                                              ; preds = %129
  %144 = getelementptr inbounds { i64, <2 x float> }, ptr %18, i32 0, i32 0
  %145 = extractvalue { i64, <2 x float> } %142, 0
  store i64 %145, ptr %144, align 4
  %146 = getelementptr inbounds { i64, <2 x float> }, ptr %18, i32 0, i32 1
  %147 = extractvalue { i64, <2 x float> } %142, 1
  store <2 x float> %147, ptr %146, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  %148 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef 0) #8
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.Mesh, ptr %150, i32 0, i32 1
  %152 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #8
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.Mesh, ptr %153, i32 0, i32 0
  %155 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %154) #8
  %156 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef %149, i64 noundef %152, i64 noundef %155, i32 noundef 14, i32 noundef 64, i32 noundef 128)
          to label %157 unwind label %231

157:                                              ; preds = %143
  %158 = getelementptr inbounds { i64, <2 x float> }, ptr %19, i32 0, i32 0
  %159 = extractvalue { i64, <2 x float> } %156, 0
  store i64 %159, ptr %158, align 4
  %160 = getelementptr inbounds { i64, <2 x float> }, ptr %19, i32 0, i32 1
  %161 = extractvalue { i64, <2 x float> } %156, 1
  store <2 x float> %161, ptr %160, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %162 = getelementptr inbounds %struct.Mesh, ptr %16, i32 0, i32 1
  %163 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef 0) #8
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.Mesh, ptr %164, i32 0, i32 1
  %166 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #8
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.Mesh, ptr %167, i32 0, i32 0
  %169 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %168) #8
  %170 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef %163, i64 noundef %166, i64 noundef %169, i32 noundef 128, i32 noundef 0, i32 noundef 0)
          to label %171 unwind label %235

171:                                              ; preds = %157
  %172 = getelementptr inbounds { i64, <2 x float> }, ptr %20, i32 0, i32 0
  %173 = extractvalue { i64, <2 x float> } %170, 0
  store i64 %173, ptr %172, align 4
  %174 = getelementptr inbounds { i64, <2 x float> }, ptr %20, i32 0, i32 1
  %175 = extractvalue { i64, <2 x float> } %170, 1
  store <2 x float> %175, ptr %174, align 4
  %176 = load i8, ptr %6, align 1, !tbaa !11
  %177 = sext i8 %176 to i32
  %178 = getelementptr inbounds %struct.meshopt_VertexCacheStatistics, ptr %17, i32 0, i32 2
  %179 = load float, ptr %178, align 4, !tbaa !22
  %180 = fpext float %179 to double
  %181 = getelementptr inbounds %struct.meshopt_VertexCacheStatistics, ptr %17, i32 0, i32 3
  %182 = load float, ptr %181, align 4, !tbaa !25
  %183 = fpext float %182 to double
  %184 = getelementptr inbounds %struct.meshopt_VertexCacheStatistics, ptr %18, i32 0, i32 3
  %185 = load float, ptr %184, align 4, !tbaa !25
  %186 = fpext float %185 to double
  %187 = getelementptr inbounds %struct.meshopt_VertexCacheStatistics, ptr %19, i32 0, i32 3
  %188 = load float, ptr %187, align 4, !tbaa !25
  %189 = fpext float %188 to double
  %190 = getelementptr inbounds %struct.meshopt_VertexCacheStatistics, ptr %20, i32 0, i32 3
  %191 = load float, ptr %190, align 4, !tbaa !25
  %192 = fpext float %191 to double
  %193 = load i8, ptr %5, align 1, !tbaa !9, !range !12, !noundef !13
  %194 = trunc i8 %193 to i1
  br i1 %194, label %195, label %204

195:                                              ; preds = %171
  %196 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %197 = load i64, ptr %14, align 8, !tbaa !18
  %198 = sub i64 %196, %197
  %199 = uitofp i64 %198 to double
  %200 = load i64, ptr %14, align 8, !tbaa !18
  %201 = add i64 %200, 1
  %202 = uitofp i64 %201 to double
  %203 = fdiv double %199, %202
  br label %205

204:                                              ; preds = %171
  br label %205

205:                                              ; preds = %204, %195
  %206 = phi double [ %203, %195 ], [ 0.000000e+00, %204 ]
  %207 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %208 = trunc i64 %207 to i32
  %209 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %210 = uitofp i64 %209 to double
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.Mesh, ptr %211, i32 0, i32 1
  %213 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %212) #8
  %214 = uitofp i64 %213 to double
  %215 = fdiv double %210, %214
  %216 = fmul double %215, 1.000000e+02
  %217 = load double, ptr %13, align 8, !tbaa !16
  %218 = load double, ptr %8, align 8, !tbaa !16
  %219 = fsub double %217, %218
  %220 = fmul double %219, 1.000000e+03
  %221 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.27, i32 noundef %177, double noundef %180, double noundef %183, double noundef %186, double noundef %189, double noundef %192, double noundef %206, i32 noundef %208, double noundef %216, double noundef %220)
          to label %222 unwind label %235

222:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  ret void

223:                                              ; preds = %119
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %11, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %12, align 4
  br label %241

227:                                              ; preds = %129
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %11, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %12, align 4
  br label %240

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

235:                                              ; preds = %205, %157
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %11, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %239

239:                                              ; preds = %235, %231
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  br label %240

240:                                              ; preds = %239, %227
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %241

241:                                              ; preds = %240, %223
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #8
  br label %242

242:                                              ; preds = %241, %101
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #8
  br label %243

243:                                              ; preds = %242, %97
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %244

244:                                              ; preds = %243, %56
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br label %245

245:                                              ; preds = %244, %52
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %246

246:                                              ; preds = %245
  %247 = load ptr, ptr %11, align 8
  %248 = load i32, ptr %12, align 4
  %249 = insertvalue { ptr, i32 } poison, ptr %247, 0
  %250 = insertvalue { ptr, i32 } %249, i32 %248, 1
  resume { ptr, i32 } %250
}

declare i64 @meshopt_stripifyBound(i64 noundef) #2

declare i64 @meshopt_stripify(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef) #2

declare i64 @meshopt_unstripify(ptr noundef, ptr noundef, i64 noundef, i32 noundef) #2

declare i64 @meshopt_unstripifyBound(i64 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !24, i64 8}
!23 = !{!"_ZTS29meshopt_VertexCacheStatistics", !15, i64 0, !15, i64 4, !24, i64 8, !24, i64 12}
!24 = !{!"float", !7, i64 0}
!25 = !{!23, !24, i64 12}


; 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.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%struct.Mesh = type { %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl" }
%"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl" = type { %"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Vertex, std::allocator<Vertex>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.17 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [61 x i8], align 1
@__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc = external hidden unnamed_addr constant [40 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [107 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z9timestampv() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11isMeshValidRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z8hashMeshRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1

declare { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4MeshC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8stripifyRK4Meshbc(ptr noundef nonnull align 8 dereferenceable(48) %0, i1 noundef zeroext %1, i8 noundef signext %2) local_unnamed_addr #8 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca %struct.Mesh, align 8
  %7 = sext i1 %1 to i32
  %8 = tail call noundef double @_Z9timestampv()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %11 = tail call i64 @meshopt_stripifyBound(i64 noundef %10)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  call void @_ZNSaIjEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt6vectorIjSaIjEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %11, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %12 unwind label %30

12:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #9
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #9
  %15 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %16 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %17 = invoke i64 @meshopt_stripify(ptr noundef nonnull %13, ptr noundef nonnull %14, i64 noundef %15, i64 noundef %16, i32 noundef %7)
          to label %18 unwind label %32

18:                                               ; preds = %12
  invoke void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %17)
          to label %19 unwind label %32

19:                                               ; preds = %18
  %20 = call noundef double @_Z9timestampv()
  %21 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %.not55 = icmp eq i64 %21, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %19
  br i1 %1, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.04454.us = phi i64 [ %26, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %.04553.us = phi i64 [ %27, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.04553.us) #9
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = icmp eq i32 %23, %7
  %25 = zext i1 %24 to i64
  %26 = add i64 %.04454.us, %25
  %27 = add nuw i64 %.04553.us, 1
  %28 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %19
  %.044.lcssa = phi i64 [ 0, %19 ], [ %26, %.lr.ph.split.us ], [ 0, %.lr.ph.split ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #9
  invoke void @_ZN4MeshC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %0)
          to label %37 unwind label %50

30:                                               ; preds = %3
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIjED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %124

32:                                               ; preds = %18, %12
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %123

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.04553 = phi i64 [ %34, %.lr.ph.split ], [ 0, %.lr.ph ]
  %34 = add nuw i64 %.04553, 1
  %35 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %.lr.ph.split, label %._crit_edge, !llvm.loop !9

37:                                               ; preds = %._crit_edge
  %38 = getelementptr inbounds i8, ptr %6, i64 24
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef 0) #9
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #9
  %41 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %42 = invoke i64 @meshopt_unstripify(ptr noundef nonnull %39, ptr noundef nonnull %40, i64 noundef %41, i32 noundef %7)
          to label %43 unwind label %52

43:                                               ; preds = %37
  invoke void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %42)
          to label %44 unwind label %52

44:                                               ; preds = %43
  %45 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #9
  %46 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %47 = invoke i64 @meshopt_unstripifyBound(i64 noundef %46)
          to label %48 unwind label %52

48:                                               ; preds = %44
  %.not = icmp ugt i64 %45, %47
  br i1 %.not, label %49, label %54

49:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.18, i32 noundef 935, ptr noundef nonnull @__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc) #10
  unreachable

50:                                               ; preds = %._crit_edge
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %122

52:                                               ; preds = %44, %43, %37
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %121

54:                                               ; preds = %48
  %55 = call noundef zeroext i1 @_Z11isMeshValidRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48) %6)
  br i1 %55, label %57, label %56

56:                                               ; preds = %54
  call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.18, i32 noundef 937, ptr noundef nonnull @__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc) #10
  unreachable

57:                                               ; preds = %54
  %58 = call noundef i32 @_Z8hashMeshRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %59 = call noundef i32 @_Z8hashMeshRK4Mesh(ptr noundef nonnull align 8 dereferenceable(48) %6)
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.18, i32 noundef 938, ptr noundef nonnull @__PRETTY_FUNCTION__._Z8stripifyRK4Meshbc) #10
  unreachable

62:                                               ; preds = %57
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef 0) #9
  %64 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %65 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %66 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef nonnull %63, i64 noundef %64, i64 noundef %65, i32 noundef 16, i32 noundef 0, i32 noundef 0)
          to label %67 unwind label %113

67:                                               ; preds = %62
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef 0) #9
  %69 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %70 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %71 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef nonnull %68, i64 noundef %69, i64 noundef %70, i32 noundef 32, i32 noundef 32, i32 noundef 32)
          to label %72 unwind label %115

72:                                               ; preds = %67
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef 0) #9
  %74 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %75 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %76 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef nonnull %73, i64 noundef %74, i64 noundef %75, i32 noundef 14, i32 noundef 64, i32 noundef 128)
          to label %77 unwind label %117

77:                                               ; preds = %72
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef 0) #9
  %79 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %80 = call noundef i64 @_ZNKSt6vectorI6VertexSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %81 = invoke { i64, <2 x float> } @meshopt_analyzeVertexCache(ptr noundef nonnull %78, i64 noundef %79, i64 noundef %80, i32 noundef 128, i32 noundef 0, i32 noundef 0)
          to label %82 unwind label %119

82:                                               ; preds = %77
  br i1 %1, label %83, label %90

83:                                               ; preds = %82
  %84 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %85 = sub i64 %84, %.044.lcssa
  %86 = uitofp i64 %85 to double
  %87 = add i64 %.044.lcssa, 1
  %88 = uitofp i64 %87 to double
  %89 = fdiv double %86, %88
  br label %90

90:                                               ; preds = %82, %83
  %91 = phi double [ %89, %83 ], [ 0.000000e+00, %82 ]
  %92 = extractvalue { i64, <2 x float> } %81, 1
  %.sroa.4.12.vec.extract = extractelement <2 x float> %92, i64 1
  %93 = fpext float %.sroa.4.12.vec.extract to double
  %94 = extractvalue { i64, <2 x float> } %76, 1
  %.sroa.42.12.vec.extract = extractelement <2 x float> %94, i64 1
  %95 = fpext float %.sroa.42.12.vec.extract to double
  %96 = extractvalue { i64, <2 x float> } %71, 1
  %.sroa.44.12.vec.extract = extractelement <2 x float> %96, i64 1
  %97 = fpext float %.sroa.44.12.vec.extract to double
  %98 = extractvalue { i64, <2 x float> } %66, 1
  %.sroa.46.12.vec.extract = extractelement <2 x float> %98, i64 1
  %99 = fpext float %.sroa.46.12.vec.extract to double
  %.sroa.46.8.vec.extract = extractelement <2 x float> %98, i64 0
  %100 = fpext float %.sroa.46.8.vec.extract to double
  %101 = sext i8 %2 to i32
  %102 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %103 = trunc i64 %102 to i32
  %104 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %105 = uitofp i64 %104 to double
  %106 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %107 = uitofp i64 %106 to double
  %108 = fdiv double %105, %107
  %109 = fmul double %108, 1.000000e+02
  %110 = fsub double %20, %8
  %111 = fmul double %110, 1.000000e+03
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, i32 noundef %101, double noundef %100, double noundef %99, double noundef %97, double noundef %95, double noundef %93, double noundef %91, i32 noundef %103, double noundef %109, double noundef %111)
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #9
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  ret void

113:                                              ; preds = %62
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %121

115:                                              ; preds = %67
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %121

117:                                              ; preds = %72
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %121

119:                                              ; preds = %77
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %121

121:                                              ; preds = %113, %117, %119, %115, %52
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %53, %52 ], [ %114, %113 ], [ %116, %115 ], [ %120, %119 ], [ %118, %117 ]
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #9
  br label %122

122:                                              ; preds = %121, %50
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %121 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #9
  br label %123

123:                                              ; preds = %122, %32
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %122 ], [ %33, %32 ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  br label %124

124:                                              ; preds = %123, %30
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %123 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn.pn
}

declare i64 @meshopt_stripifyBound(i64 noundef) local_unnamed_addr #5

declare i64 @meshopt_stripify(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #5

declare i64 @meshopt_unstripify(ptr noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #5

declare i64 @meshopt_unstripifyBound(i64 noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nofree nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { 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 #7 = { noreturn nounwind "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 #8 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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