; LLVM IR from zeux/meshoptimizer :: gltf/parseobj.ll (Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_)

; 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.fastObjMesh = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr }
%struct.fastObjMaterial = type { ptr, [3 x float], [3 x float], [3 x float], [3 x float], [3 x float], float, float, [3 x float], float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.cgltf_data = type { i32, ptr, %struct.cgltf_asset, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, i64, ptr, ptr, i64, ptr, i64, %struct.cgltf_extras, i64, ptr, ptr, i64, ptr, i64, ptr, i64, ptr, i64, %struct.cgltf_memory_options, %struct.cgltf_file_options }
%struct.cgltf_asset = type { ptr, ptr, ptr, ptr, %struct.cgltf_extras, i64, ptr }
%struct.cgltf_extras = type { i64, i64, ptr }
%struct.cgltf_memory_options = type { ptr, ptr, ptr }
%struct.cgltf_file_options = type { ptr, ptr, ptr }
%struct.fastObjGroup = type { ptr, i32, i32, i32 }
%struct.cgltf_node = type { ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, i64, i32, i32, i32, i32, [3 x float], [4 x float], [3 x float], [16 x float], %struct.cgltf_extras, i32, %struct.cgltf_mesh_gpu_instancing, i64, ptr }
%struct.cgltf_mesh_gpu_instancing = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_ = external hidden unnamed_addr constant [71 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call ptr @fast_obj_read(ptr noundef %14)
  store ptr %15, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %20, label %18

18:                                               ; preds = %3
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr @.str, ptr %19, align 8, !tbaa !5
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %102

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %39, %20
  %22 = load i32, ptr %11, align 4, !tbaa !9
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.fastObjMesh, ptr %23, i32 0, i32 13
  %25 = load i32, ptr %24, align 8, !tbaa !11
  %26 = icmp ult i32 %22, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %21
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %42

28:                                               ; preds = %21
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.fastObjMesh, ptr %29, i32 0, i32 14
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = load i32, ptr %11, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds %struct.fastObjMaterial, ptr %31, i64 %33
  %35 = getelementptr inbounds %struct.fastObjMaterial, ptr %34, i32 0, i32 11
  %36 = load i32, ptr %35, align 8, !tbaa !14
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = add nsw i32 %37, %36
  store i32 %38, ptr %10, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %28
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = add i32 %40, 1
  store i32 %41, ptr %11, align 4, !tbaa !9
  br label %21, !llvm.loop !17

42:                                               ; preds = %27
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %52

45:                                               ; preds = %42
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.fastObjMesh, ptr %48, i32 0, i32 13
  %50 = load i32, ptr %49, align 8, !tbaa !11
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.1, i32 noundef %47, i32 noundef %50) #7
  br label %52

52:                                               ; preds = %45, %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %53 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 488) #8
  store ptr %53, ptr %12, align 8, !tbaa !5
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.cgltf_data, ptr %54, i32 0, i32 45
  %56 = getelementptr inbounds %struct.cgltf_memory_options, ptr %55, i32 0, i32 1
  store ptr @_ZL11defaultFreePvS_, ptr %56, align 8, !tbaa !19
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZL17parseMaterialsObjP11fastObjMeshP10cgltf_data(ptr noundef %57, ptr noundef %58)
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZL13parseNodesObjP11fastObjMeshP10cgltf_data(ptr noundef %59, ptr noundef %60)
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.cgltf_data, ptr %61, i32 0, i32 26
  %63 = load i64, ptr %62, align 8, !tbaa !27
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.fastObjMesh, ptr %64, i32 0, i32 17
  %66 = load i32, ptr %65, align 8, !tbaa !28
  %67 = zext i32 %66 to i64
  %68 = icmp eq i64 %63, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %52
  br label %72

70:                                               ; preds = %52
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 301, ptr noundef @__PRETTY_FUNCTION__._Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_) #9
  unreachable

71:                                               ; No predecessors!
  br label %72

72:                                               ; preds = %71, %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %96, %72
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.fastObjMesh, ptr %75, i32 0, i32 17
  %77 = load i32, ptr %76, align 8, !tbaa !28
  %78 = icmp ult i32 %74, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %73
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %99

80:                                               ; preds = %73
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.fastObjMesh, ptr %82, i32 0, i32 18
  %84 = load ptr, ptr %83, align 8, !tbaa !29
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds %struct.fastObjGroup, ptr %84, i64 %86
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.cgltf_data, ptr %89, i32 0, i32 25
  %91 = load ptr, ptr %90, align 8, !tbaa !30
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds %struct.cgltf_node, ptr %91, i64 %93
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZL17parseMeshGroupObjP11fastObjMeshRK12fastObjGroupP10cgltf_dataP10cgltf_nodeRSt6vectorI4MeshSaIS9_EE(ptr noundef %81, ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef %88, ptr noundef %94, ptr noundef nonnull align 8 dereferenceable(24) %95)
  br label %96

96:                                               ; preds = %80
  %97 = load i32, ptr %13, align 4, !tbaa !9
  %98 = add i32 %97, 1
  store i32 %98, ptr %13, align 4, !tbaa !9
  br label %73, !llvm.loop !31

99:                                               ; preds = %79
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  call void @fast_obj_destroy(ptr noundef %100)
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %101, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %102

102:                                              ; preds = %99, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %103 = load ptr, ptr %4, align 8
  ret ptr %103
}

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

declare ptr @fast_obj_read(ptr noundef) #2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL11defaultFreePvS_(ptr noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17parseMaterialsObjP11fastObjMeshP10cgltf_data(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL13parseNodesObjP11fastObjMeshP10cgltf_data(ptr noundef, ptr noundef) #5

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17parseMeshGroupObjP11fastObjMeshRK12fastObjGroupP10cgltf_dataP10cgltf_nodeRSt6vectorI4MeshSaIS9_EE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

declare void @fast_obj_destroy(ptr noundef) #2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nounwind allocsize(0,1) "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 = { 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 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 104}
!12 = !{!"_ZTS11fastObjMesh", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !6, i64 96, !10, i64 104, !6, i64 112, !10, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !10, i64 152, !6, i64 160}
!13 = !{!12, !6, i64 112}
!14 = !{!15, !10, i64 96}
!15 = !{!"_ZTS15fastObjMaterial", !6, i64 0, !7, i64 8, !7, i64 20, !7, i64 32, !7, i64 44, !7, i64 56, !16, i64 68, !16, i64 72, !7, i64 76, !16, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 448}
!20 = !{!"_ZTS10cgltf_data", !21, i64 0, !6, i64 8, !22, i64 16, !6, i64 88, !24, i64 96, !6, i64 104, !24, i64 112, !6, i64 120, !24, i64 128, !6, i64 136, !24, i64 144, !6, i64 152, !24, i64 160, !6, i64 168, !24, i64 176, !6, i64 184, !24, i64 192, !6, i64 200, !24, i64 208, !6, i64 216, !24, i64 224, !6, i64 232, !24, i64 240, !6, i64 248, !24, i64 256, !6, i64 264, !24, i64 272, !6, i64 280, !24, i64 288, !6, i64 296, !6, i64 304, !24, i64 312, !6, i64 320, !24, i64 328, !23, i64 336, !24, i64 360, !6, i64 368, !6, i64 376, !24, i64 384, !6, i64 392, !24, i64 400, !6, i64 408, !24, i64 416, !6, i64 424, !24, i64 432, !25, i64 440, !26, i64 464}
!21 = !{!"_ZTS15cgltf_file_type", !7, i64 0}
!22 = !{!"_ZTS11cgltf_asset", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !23, i64 32, !24, i64 56, !6, i64 64}
!23 = !{!"_ZTS12cgltf_extras", !24, i64 0, !24, i64 8, !6, i64 16}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTS20cgltf_memory_options", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTS18cgltf_file_options", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!20, !24, i64 272}
!28 = !{!12, !10, i64 136}
!29 = !{!12, !6, i64 144}
!30 = !{!20, !6, i64 264}
!31 = distinct !{!31, !18}


; 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.fastObjMaterial = type { ptr, [3 x float], [3 x float], [3 x float], [3 x float], [3 x float], float, float, [3 x float], float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.fastObjGroup = type { ptr, i32, i32, i32 }
%struct.cgltf_node = type { ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, i64, i32, i32, i32, i32, [3 x float], [4 x float], [3 x float], [16 x float], %struct.cgltf_extras, i32, %struct.cgltf_mesh_gpu_instancing, i64, ptr }
%struct.cgltf_extras = type { i64, i64, ptr }
%struct.cgltf_mesh_gpu_instancing = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_ = external hidden unnamed_addr constant [71 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #0 {
  %4 = tail call ptr @fast_obj_read(ptr noundef %0)
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %44, label %.preheader37

.preheader37:                                     ; preds = %3
  %5 = getelementptr inbounds i8, ptr %4, i64 104
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %.not44 = icmp eq i32 %6, 0
  br i1 %.not44, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader37
  %7 = getelementptr inbounds i8, ptr %4, i64 112
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %wide.trip.count = zext i32 %6 to i64
  %min.iters.check = icmp ult i32 %6, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.03338.ph = phi i32 [ 0, %.lr.ph ], [ %43, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 4294967288
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %40, %vector.body ]
  %vec.phi52 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %41, %vector.body ]
  %9 = or disjoint i64 %index, 1
  %10 = or disjoint i64 %index, 2
  %11 = or disjoint i64 %index, 3
  %12 = or disjoint i64 %index, 4
  %13 = or disjoint i64 %index, 5
  %14 = or disjoint i64 %index, 6
  %15 = or disjoint i64 %index, 7
  %16 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %index, i32 11
  %17 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %9, i32 11
  %18 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %10, i32 11
  %19 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %11, i32 11
  %20 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %12, i32 11
  %21 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %13, i32 11
  %22 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %14, i32 11
  %23 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %15, i32 11
  %24 = load i32, ptr %16, align 8, !tbaa !12
  %25 = load i32, ptr %17, align 8, !tbaa !12
  %26 = load i32, ptr %18, align 8, !tbaa !12
  %27 = load i32, ptr %19, align 8, !tbaa !12
  %28 = insertelement <4 x i32> poison, i32 %24, i64 0
  %29 = insertelement <4 x i32> %28, i32 %25, i64 1
  %30 = insertelement <4 x i32> %29, i32 %26, i64 2
  %31 = insertelement <4 x i32> %30, i32 %27, i64 3
  %32 = load i32, ptr %20, align 8, !tbaa !12
  %33 = load i32, ptr %21, align 8, !tbaa !12
  %34 = load i32, ptr %22, align 8, !tbaa !12
  %35 = load i32, ptr %23, align 8, !tbaa !12
  %36 = insertelement <4 x i32> poison, i32 %32, i64 0
  %37 = insertelement <4 x i32> %36, i32 %33, i64 1
  %38 = insertelement <4 x i32> %37, i32 %34, i64 2
  %39 = insertelement <4 x i32> %38, i32 %35, i64 3
  %40 = add <4 x i32> %31, %vec.phi
  %41 = add <4 x i32> %39, %vec.phi52
  %index.next = add nuw i64 %index, 8
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %41, %40
  %43 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

44:                                               ; preds = %3
  store ptr @.str, ptr %2, align 8, !tbaa !19
  br label %70

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %43, %middle.block ], [ %47, %scalar.ph ]
  %.not36 = icmp eq i32 %.lcssa, 0
  br i1 %.not36, label %._crit_edge.thread, label %48

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.03338 = phi i32 [ %47, %scalar.ph ], [ %.03338.ph, %scalar.ph.preheader ]
  %45 = getelementptr inbounds %struct.fastObjMaterial, ptr %8, i64 %indvars.iv, i32 11
  %46 = load i32, ptr %45, align 8, !tbaa !12
  %47 = add nsw i32 %46, %.03338
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !20

48:                                               ; preds = %._crit_edge
  %49 = load ptr, ptr @stderr, align 8, !tbaa !19
  %50 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.1, i32 noundef %.lcssa, i32 noundef %6) #7
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.preheader37, %48, %._crit_edge
  %51 = tail call noalias dereferenceable_or_null(488) ptr @calloc(i64 noundef 1, i64 noundef 488) #8
  %52 = getelementptr inbounds i8, ptr %51, i64 448
  store ptr @_ZL11defaultFreePvS_, ptr %52, align 8, !tbaa !21
  tail call void @_ZL17parseMaterialsObjP11fastObjMeshP10cgltf_data(ptr noundef nonnull %4, ptr noundef %51)
  tail call void @_ZL13parseNodesObjP11fastObjMeshP10cgltf_data(ptr noundef nonnull %4, ptr noundef %51)
  %53 = getelementptr inbounds i8, ptr %51, i64 272
  %54 = load i64, ptr %53, align 8, !tbaa !29
  %55 = getelementptr inbounds i8, ptr %4, i64 136
  %56 = load i32, ptr %55, align 8, !tbaa !30
  %57 = zext i32 %56 to i64
  %58 = icmp eq i64 %54, %57
  br i1 %58, label %.preheader, label %61

.preheader:                                       ; preds = %._crit_edge.thread
  %.not45 = icmp eq i32 %56, 0
  br i1 %.not45, label %._crit_edge43, label %.lr.ph42

.lr.ph42:                                         ; preds = %.preheader
  %59 = getelementptr inbounds i8, ptr %4, i64 144
  %60 = getelementptr inbounds i8, ptr %51, i64 264
  br label %62

61:                                               ; preds = %._crit_edge.thread
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 301, ptr noundef nonnull @__PRETTY_FUNCTION__._Z8parseObjPKcRSt6vectorI4MeshSaIS2_EEPS0_) #9
  unreachable

._crit_edge43:                                    ; preds = %62, %.preheader
  tail call void @fast_obj_destroy(ptr noundef nonnull %4)
  br label %70

62:                                               ; preds = %.lr.ph42, %62
  %indvars.iv47 = phi i64 [ 0, %.lr.ph42 ], [ %indvars.iv.next48, %62 ]
  %63 = load ptr, ptr %59, align 8, !tbaa !31
  %64 = getelementptr inbounds %struct.fastObjGroup, ptr %63, i64 %indvars.iv47
  %65 = load ptr, ptr %60, align 8, !tbaa !32
  %66 = getelementptr inbounds %struct.cgltf_node, ptr %65, i64 %indvars.iv47
  tail call void @_ZL17parseMeshGroupObjP11fastObjMeshRK12fastObjGroupP10cgltf_dataP10cgltf_nodeRSt6vectorI4MeshSaIS9_EE(ptr noundef nonnull %4, ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull %51, ptr noundef %66, ptr noundef nonnull align 8 dereferenceable(24) %1)
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %67 = load i32, ptr %55, align 8, !tbaa !30
  %68 = zext i32 %67 to i64
  %69 = icmp ult i64 %indvars.iv.next48, %68
  br i1 %69, label %62, label %._crit_edge43, !llvm.loop !33

70:                                               ; preds = %._crit_edge43, %44
  %.031 = phi ptr [ %51, %._crit_edge43 ], [ null, %44 ]
  ret ptr %.031
}

declare ptr @fast_obj_read(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL11defaultFreePvS_(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17parseMaterialsObjP11fastObjMeshP10cgltf_data(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL13parseNodesObjP11fastObjMeshP10cgltf_data(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17parseMeshGroupObjP11fastObjMeshRK12fastObjGroupP10cgltf_dataP10cgltf_nodeRSt6vectorI4MeshSaIS9_EE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

declare void @fast_obj_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { cold nounwind }
attributes #8 = { nounwind allocsize(0,1) }
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, !7, i64 104}
!6 = !{!"_ZTS11fastObjMesh", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !7, i64 48, !10, i64 56, !7, i64 64, !10, i64 72, !10, i64 80, !7, i64 88, !10, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 112}
!12 = !{!13, !7, i64 96}
!13 = !{!"_ZTS15fastObjMaterial", !10, i64 0, !8, i64 8, !8, i64 20, !8, i64 32, !8, i64 44, !8, i64 56, !14, i64 68, !14, i64 72, !8, i64 76, !14, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132}
!14 = !{!"float", !8, i64 0}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = !{!10, !10, i64 0}
!20 = distinct !{!20, !16, !18, !17}
!21 = !{!22, !10, i64 448}
!22 = !{!"_ZTS10cgltf_data", !23, i64 0, !10, i64 8, !24, i64 16, !10, i64 88, !26, i64 96, !10, i64 104, !26, i64 112, !10, i64 120, !26, i64 128, !10, i64 136, !26, i64 144, !10, i64 152, !26, i64 160, !10, i64 168, !26, i64 176, !10, i64 184, !26, i64 192, !10, i64 200, !26, i64 208, !10, i64 216, !26, i64 224, !10, i64 232, !26, i64 240, !10, i64 248, !26, i64 256, !10, i64 264, !26, i64 272, !10, i64 280, !26, i64 288, !10, i64 296, !10, i64 304, !26, i64 312, !10, i64 320, !26, i64 328, !25, i64 336, !26, i64 360, !10, i64 368, !10, i64 376, !26, i64 384, !10, i64 392, !26, i64 400, !10, i64 408, !26, i64 416, !10, i64 424, !26, i64 432, !27, i64 440, !28, i64 464}
!23 = !{!"_ZTS15cgltf_file_type", !8, i64 0}
!24 = !{!"_ZTS11cgltf_asset", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !25, i64 32, !26, i64 56, !10, i64 64}
!25 = !{!"_ZTS12cgltf_extras", !26, i64 0, !26, i64 8, !10, i64 16}
!26 = !{!"long", !8, i64 0}
!27 = !{!"_ZTS20cgltf_memory_options", !10, i64 0, !10, i64 8, !10, i64 16}
!28 = !{!"_ZTS18cgltf_file_options", !10, i64 0, !10, i64 8, !10, i64 16}
!29 = !{!22, !26, i64 272}
!30 = !{!6, !7, i64 136}
!31 = !{!6, !10, i64 144}
!32 = !{!22, !10, i64 264}
!33 = distinct !{!33, !16}


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