; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/Common (StandardShapes)

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

%struct.aiMesh = type { i32, i32, i32, ptr, ptr, ptr, ptr, [8 x ptr], [8 x ptr], [8 x i32], ptr, i32, ptr, i32, %struct.aiString, i32, ptr, i32, %struct.aiAABB, ptr }
%struct.aiString = type { i32, [1024 x i8] }
%struct.aiAABB = type { %class.aiVector3t, %class.aiVector3t }
%class.aiVector3t = type { float, float, float }
%struct.aiFace = type { i32, ptr }

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN6Assimp14StandardShapes8MakeMeshERKSt6vectorI10aiVector3tIfESaIS3_EEj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = call noundef zeroext i1 @_ZNKSt6vectorI10aiVector3tIfESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br i1 %13, label %17, label %14

14:                                               ; preds = %2
  %15 = load i32, ptr %5, align 4, !tbaa !9
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %18, label %17

17:                                               ; preds = %14, %2
  store ptr null, ptr %3, align 8
  br label %149

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %19 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1320) #7
  call void @_ZN6aiMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(1320) %19) #6
  store ptr %19, ptr %6, align 8, !tbaa !5
  %20 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %20, label %30 [
    i32 1, label %21
    i32 2, label %24
    i32 3, label %27
  ]

21:                                               ; preds = %18
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.aiMesh, ptr %22, i32 0, i32 0
  store i32 1, ptr %23, align 8, !tbaa !11
  br label %33

24:                                               ; preds = %18
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.aiMesh, ptr %25, i32 0, i32 0
  store i32 2, ptr %26, align 8, !tbaa !11
  br label %33

27:                                               ; preds = %18
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.aiMesh, ptr %28, i32 0, i32 0
  store i32 4, ptr %29, align 8, !tbaa !11
  br label %33

30:                                               ; preds = %18
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.aiMesh, ptr %31, i32 0, i32 0
  store i32 8, ptr %32, align 8, !tbaa !11
  br label %33

33:                                               ; preds = %30, %27, %24, %21
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = call noundef i64 @_ZNKSt6vectorI10aiVector3tIfESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  %36 = trunc i64 %35 to i32
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = udiv i32 %36, %37
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.aiMesh, ptr %39, i32 0, i32 2
  store i32 %38, ptr %40, align 8, !tbaa !18
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.aiMesh, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !18
  %44 = zext i32 %43 to i64
  %45 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %44, i64 16)
  %46 = extractvalue { i64, i1 } %45, 1
  %47 = extractvalue { i64, i1 } %45, 0
  %48 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %47, i64 8)
  %49 = extractvalue { i64, i1 } %48, 1
  %50 = or i1 %46, %49
  %51 = extractvalue { i64, i1 } %48, 0
  %52 = select i1 %50, i64 -1, i64 %51
  %53 = call noalias noundef nonnull ptr @_Znam(i64 noundef %52) #7
  store i64 %44, ptr %53, align 16
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = icmp eq i64 %44, 0
  br i1 %55, label %62, label %56

56:                                               ; preds = %33
  %57 = getelementptr inbounds %struct.aiFace, ptr %54, i64 %44
  br label %58

58:                                               ; preds = %58, %56
  %59 = phi ptr [ %54, %56 ], [ %60, %58 ]
  call void @_ZN6aiFaceC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %59) #6
  %60 = getelementptr inbounds %struct.aiFace, ptr %59, i64 1
  %61 = icmp eq ptr %60, %57
  br i1 %61, label %62, label %58

62:                                               ; preds = %58, %33
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.aiMesh, ptr %63, i32 0, i32 10
  store ptr %54, ptr %64, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %110, %62
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.aiMesh, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %68, align 8, !tbaa !18
  %70 = icmp ult i32 %66, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %65
  store i32 3, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %113

72:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.aiMesh, ptr %73, i32 0, i32 10
  %75 = load ptr, ptr %74, align 8, !tbaa !19
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds %struct.aiFace, ptr %75, i64 %77
  store ptr %78, ptr %10, align 8, !tbaa !5
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.aiFace, ptr %80, i32 0, i32 0
  store i32 %79, ptr %81, align 8, !tbaa !20
  %82 = load i32, ptr %5, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %83, i64 4)
  %85 = extractvalue { i64, i1 } %84, 1
  %86 = extractvalue { i64, i1 } %84, 0
  %87 = select i1 %85, i64 -1, i64 %86
  %88 = call noalias noundef nonnull ptr @_Znam(i64 noundef %87) #7
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.aiFace, ptr %89, i32 0, i32 1
  store ptr %88, ptr %90, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %104, %72
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = load i32, ptr %5, align 4, !tbaa !9
  %94 = icmp ult i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 6, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %109

96:                                               ; preds = %91
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.aiFace, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !22
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %100, i64 %102
  store i32 %97, ptr %103, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %96
  %105 = load i32, ptr %11, align 4, !tbaa !9
  %106 = add i32 %105, 1
  store i32 %106, ptr %11, align 4, !tbaa !9
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = add i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !9
  br label %91, !llvm.loop !23

109:                                              ; preds = %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = add i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !9
  br label %65, !llvm.loop !25

113:                                              ; preds = %71
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = call noundef i64 @_ZNKSt6vectorI10aiVector3tIfESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #6
  %116 = trunc i64 %115 to i32
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.aiMesh, ptr %117, i32 0, i32 1
  store i32 %116, ptr %118, align 4, !tbaa !26
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.aiMesh, ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !26
  %122 = zext i32 %121 to i64
  %123 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %122, i64 12)
  %124 = extractvalue { i64, i1 } %123, 1
  %125 = extractvalue { i64, i1 } %123, 0
  %126 = select i1 %124, i64 -1, i64 %125
  %127 = call noalias noundef nonnull ptr @_Znam(i64 noundef %126) #7
  %128 = icmp eq i64 %122, 0
  br i1 %128, label %135, label %129

129:                                              ; preds = %113
  %130 = getelementptr inbounds %class.aiVector3t, ptr %127, i64 %122
  br label %131

131:                                              ; preds = %131, %129
  %132 = phi ptr [ %127, %129 ], [ %133, %131 ]
  call void @_ZN10aiVector3tIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %132) #6
  %133 = getelementptr inbounds %class.aiVector3t, ptr %132, i64 1
  %134 = icmp eq ptr %133, %130
  br i1 %134, label %135, label %131

135:                                              ; preds = %131, %113
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.aiMesh, ptr %136, i32 0, i32 3
  store ptr %127, ptr %137, align 8, !tbaa !27
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.aiMesh, ptr %138, i32 0, i32 3
  %140 = load ptr, ptr %139, align 8, !tbaa !27
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorI10aiVector3tIfESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %141, i64 noundef 0) #6
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.aiMesh, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !26
  %146 = zext i32 %145 to i64
  %147 = mul i64 %146, 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %140, ptr align 4 %142, i64 %147, i1 false)
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %148, ptr %3, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %149

149:                                              ; preds = %135, %17
  %150 = load ptr, ptr %3, align 8
  ret ptr %150
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #5

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorI10aiVector3tIfESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nobuiltin allocsize(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS6aiMesh", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !7, i64 48, !7, i64 112, !7, i64 176, !6, i64 208, !10, i64 216, !6, i64 224, !10, i64 232, !13, i64 236, !10, i64 1264, !6, i64 1272, !14, i64 1280, !15, i64 1284, !6, i64 1312}
!13 = !{!"_ZTS8aiString", !10, i64 0, !7, i64 4}
!14 = !{!"_ZTS16aiMorphingMethod", !7, i64 0}
!15 = !{!"_ZTS6aiAABB", !16, i64 0, !16, i64 12}
!16 = !{!"_ZTS10aiVector3tIfE", !17, i64 0, !17, i64 4, !17, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{!12, !10, i64 8}
!19 = !{!12, !6, i64 208}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTS6aiFace", !10, i64 0, !6, i64 8}
!22 = !{!21, !6, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!12, !10, i64 4}
!27 = !{!12, !6, i64 16}


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

%struct.aiFace = type { i32, ptr }
%class.aiVector3t = type { float, float, float }

@switch.table._ZN6Assimp14StandardShapes8MakeMeshERKSt6vectorI10aiVector3tIfESaIS3_EEj = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 4], align 4

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

; 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: mustprogress uwtable
define dso_local noundef ptr @_ZN6Assimp14StandardShapes8MakeMeshERKSt6vectorI10aiVector3tIfESaIS3_EEj(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1) local_unnamed_addr #2 align 2 {
  %3 = tail call noundef zeroext i1 @_ZNKSt6vectorI10aiVector3tIfESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %4 = icmp eq i32 %1, 0
  %or.cond.not = or i1 %4, %3
  br i1 %or.cond.not, label %57, label %5

5:                                                ; preds = %2
  %6 = tail call noalias noundef nonnull dereferenceable(1320) ptr @_Znwm(i64 noundef 1320) #6
  tail call void @_ZN6aiMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(1320) %6) #5
  %switch.tableidx = add i32 %1, -1
  %7 = icmp ult i32 %switch.tableidx, 3
  br i1 %7, label %switch.lookup, label %9

switch.lookup:                                    ; preds = %5
  %8 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [3 x i32], ptr @switch.table._ZN6Assimp14StandardShapes8MakeMeshERKSt6vectorI10aiVector3tIfESaIS3_EEj, i64 0, i64 %8
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %9

9:                                                ; preds = %5, %switch.lookup
  %.sink = phi i32 [ %switch.load, %switch.lookup ], [ 8, %5 ]
  store i32 %.sink, ptr %6, align 8, !tbaa !5
  %10 = tail call noundef i64 @_ZNKSt6vectorI10aiVector3tIfESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %11 = trunc i64 %10 to i32
  %12 = udiv i32 %11, %1
  %13 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %12, ptr %13, align 8, !tbaa !16
  %14 = zext i32 %12 to i64
  %15 = shl nuw nsw i64 %14, 4
  %16 = or disjoint i64 %15, 8
  %17 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %16) #6
  store i64 %14, ptr %17, align 16
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = icmp ult i32 %11, %1
  br i1 %19, label %.loopexit44, label %20

20:                                               ; preds = %9
  %21 = getelementptr inbounds %struct.aiFace, ptr %18, i64 %14
  br label %22

22:                                               ; preds = %22, %20
  %23 = phi ptr [ %18, %20 ], [ %24, %22 ]
  tail call void @_ZN6aiFaceC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #5
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = icmp eq ptr %24, %21
  br i1 %25, label %.loopexit44.loopexit, label %22

.loopexit44.loopexit:                             ; preds = %22
  %.pre = load i32, ptr %13, align 8, !tbaa !16
  br label %.loopexit44

.loopexit44:                                      ; preds = %.loopexit44.loopexit, %9
  %26 = phi i32 [ %.pre, %.loopexit44.loopexit ], [ %12, %9 ]
  %27 = getelementptr inbounds i8, ptr %6, i64 208
  store ptr %18, ptr %27, align 8, !tbaa !17
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.loopexit44
  %28 = zext i32 %1 to i64
  %29 = shl nuw nsw i64 %28, 2
  %umax = tail call i32 @llvm.umax.i32(i32 %1, i32 1)
  %wide.trip.count53 = zext i32 %26 to i64
  %wide.trip.count = zext i32 %umax to i64
  %min.iters.check = icmp ult i32 %1, 8
  %n.vec = and i64 %wide.trip.count, 4294967288
  %.cast = trunc nuw i64 %n.vec to i32
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %37

._crit_edge:                                      ; preds = %.loopexit57, %.loopexit44
  %30 = tail call noundef i64 @_ZNKSt6vectorI10aiVector3tIfESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %31 = trunc i64 %30 to i32
  %32 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 %31, ptr %32, align 4, !tbaa !18
  %33 = and i64 %30, 4294967295
  %34 = mul nuw nsw i64 %33, 12
  %35 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %34) #6
  %36 = icmp eq i64 %33, 0
  br i1 %36, label %.loopexit, label %46

37:                                               ; preds = %.lr.ph, %.loopexit57
  %indvars.iv50 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next51, %.loopexit57 ]
  %.03848 = phi i32 [ 0, %.lr.ph ], [ %.lcssa, %.loopexit57 ]
  %38 = getelementptr inbounds %struct.aiFace, ptr %18, i64 %indvars.iv50
  store i32 %1, ptr %38, align 8, !tbaa !19
  %39 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %29) #6
  %40 = getelementptr inbounds i8, ptr %38, i64 8
  store ptr %39, ptr %40, align 8, !tbaa !21
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %37
  %indvars.iv.ph = phi i64 [ 0, %37 ], [ %n.vec, %middle.block ]
  %.145.ph = phi i32 [ %.03848, %37 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %37
  %ind.end = add i32 %.03848, %.cast
  %.splatinsert = insertelement <4 x i32> poison, i32 %.03848, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %41 = getelementptr inbounds i32, ptr %39, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store <4 x i32> %vec.ind, ptr %41, align 4, !tbaa !22
  store <4 x i32> %step.add, ptr %42, align 4, !tbaa !22
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %.loopexit57, label %scalar.ph.preheader

.loopexit57:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %ind.end, %middle.block ], [ %45, %scalar.ph ]
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next51, %wide.trip.count53
  br i1 %exitcond54.not, label %._crit_edge, label %37, !llvm.loop !27

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.145 = phi i32 [ %45, %scalar.ph ], [ %.145.ph, %scalar.ph.preheader ]
  %44 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv
  store i32 %.145, ptr %44, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = add i32 %.145, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit57, label %scalar.ph, !llvm.loop !28

46:                                               ; preds = %._crit_edge
  %47 = getelementptr inbounds %class.aiVector3t, ptr %35, i64 %33
  br label %48

48:                                               ; preds = %48, %46
  %49 = phi ptr [ %35, %46 ], [ %50, %48 ]
  tail call void @_ZN10aiVector3tIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %49) #5
  %50 = getelementptr inbounds i8, ptr %49, i64 12
  %51 = icmp eq ptr %50, %47
  br i1 %51, label %.loopexit, label %48

.loopexit:                                        ; preds = %48, %._crit_edge
  %52 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %35, ptr %52, align 8, !tbaa !29
  %53 = tail call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorI10aiVector3tIfESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #5
  %54 = load i32, ptr %32, align 4, !tbaa !18
  %55 = zext i32 %54 to i64
  %56 = mul nuw nsw i64 %55, 12
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %35, ptr nonnull align 4 %53, i64 %56, i1 false)
  br label %57

57:                                               ; preds = %2, %.loopexit
  %.037 = phi ptr [ %6, %.loopexit ], [ null, %2 ]
  ret ptr %.037
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10aiVector3tIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS6aiMesh", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !8, i64 48, !8, i64 112, !8, i64 176, !10, i64 208, !7, i64 216, !10, i64 224, !7, i64 232, !11, i64 236, !7, i64 1264, !10, i64 1272, !12, i64 1280, !13, i64 1284, !10, i64 1312}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS8aiString", !7, i64 0, !8, i64 4}
!12 = !{!"_ZTS16aiMorphingMethod", !8, i64 0}
!13 = !{!"_ZTS6aiAABB", !14, i64 0, !14, i64 12}
!14 = !{!"_ZTS10aiVector3tIfE", !15, i64 0, !15, i64 4, !15, i64 8}
!15 = !{!"float", !8, i64 0}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !10, i64 208}
!18 = !{!6, !7, i64 4}
!19 = !{!20, !7, i64 0}
!20 = !{!"_ZTS6aiFace", !7, i64 0, !10, i64 8}
!21 = !{!20, !10, i64 8}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24, !26, !25}
!29 = !{!6, !10, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass