; LLVM IR from merpheus-dev/LavaEngine :: src/Utils/AssetImporter.ll (ZN4Lava9Importers13AssetImporter4LoadEPKc)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.aiScene = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, ptr }
%"struct.Lava::MeshMaterialPack" = type { ptr, ptr }
%struct.aiMesh = type <{ i32, i32, i32, [4 x i8], ptr, ptr, ptr, ptr, [8 x ptr], [8 x ptr], [8 x i32], ptr, i32, [4 x i8], ptr, i32, %struct.aiString, i32, [4 x i8], ptr, i32, %struct.aiAABB, [4 x i8] }>
%struct.aiString = type { i32, [1024 x i8] }
%struct.aiAABB = type { %class.aiVector3t, %class.aiVector3t }
%class.aiVector3t = type { float, float, float }
%"struct.Lava::Mesh" = type { ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32 }
%struct.aiFace = type { i32, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN4Lava9Importers13AssetImporter4LoadEPKc(ptr noundef %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = call ptr @aiImportFile(ptr noundef %10, i32 noundef 3645131)
  store ptr %11, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %19, label %14

14:                                               ; preds = %1
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %16)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %435

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.aiScene, ptr %20, i32 0, i32 3
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %22, i64 0
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %25 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #10
  call void @llvm.memset.p0.i64(ptr align 16 %25, i8 0, i64 16, i1 false)
  store ptr %25, ptr %7, align 8, !tbaa !5
  %26 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #10
  call void @llvm.memset.p0.i64(ptr align 16 %26, i8 0, i64 96, i1 false)
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %27, i32 0, i32 0
  store ptr %26, ptr %28, align 8, !tbaa !12
  %29 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 80) #10
  call void @llvm.memset.p0.i64(ptr align 16 %29, i8 0, i64 80, i1 false)
  call void @_ZN4Lava8MaterialC2Ev(ptr noundef nonnull align 8 dereferenceable(76) %29) #9
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %30, i32 0, i32 1
  store ptr %29, ptr %31, align 8, !tbaa !14
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.aiMesh, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = mul i32 %34, 3
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !12
  %39 = getelementptr inbounds %"struct.Lava::Mesh", ptr %38, i32 0, i32 1
  store i32 %35, ptr %39, align 8, !tbaa !21
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.aiMesh, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = mul i32 %42, 3
  %44 = zext i32 %43 to i64
  %45 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %44, i64 4)
  %46 = extractvalue { i64, i1 } %45, 1
  %47 = extractvalue { i64, i1 } %45, 0
  %48 = select i1 %46, i64 -1, i64 %47
  %49 = call noalias noundef nonnull ptr @_Znam(i64 noundef %48) #10
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds %"struct.Lava::Mesh", ptr %52, i32 0, i32 0
  store ptr %49, ptr %53, align 8, !tbaa !23
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.aiMesh, ptr %54, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !15
  %57 = mul i32 %56, 3
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !12
  %61 = getelementptr inbounds %"struct.Lava::Mesh", ptr %60, i32 0, i32 3
  store i32 %57, ptr %61, align 8, !tbaa !24
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.aiMesh, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !15
  %65 = mul i32 %64, 3
  %66 = zext i32 %65 to i64
  %67 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %66, i64 4)
  %68 = extractvalue { i64, i1 } %67, 1
  %69 = extractvalue { i64, i1 } %67, 0
  %70 = select i1 %68, i64 -1, i64 %69
  %71 = call noalias noundef nonnull ptr @_Znam(i64 noundef %70) #10
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !12
  %75 = getelementptr inbounds %"struct.Lava::Mesh", ptr %74, i32 0, i32 2
  store ptr %71, ptr %75, align 8, !tbaa !25
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.aiMesh, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = mul i32 %78, 3
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !12
  %83 = getelementptr inbounds %"struct.Lava::Mesh", ptr %82, i32 0, i32 5
  store i32 %79, ptr %83, align 8, !tbaa !26
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.aiMesh, ptr %84, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !15
  %87 = mul i32 %86, 3
  %88 = zext i32 %87 to i64
  %89 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %88, i64 4)
  %90 = extractvalue { i64, i1 } %89, 1
  %91 = extractvalue { i64, i1 } %89, 0
  %92 = select i1 %90, i64 -1, i64 %91
  %93 = call noalias noundef nonnull ptr @_Znam(i64 noundef %92) #10
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !12
  %97 = getelementptr inbounds %"struct.Lava::Mesh", ptr %96, i32 0, i32 4
  store ptr %93, ptr %97, align 8, !tbaa !27
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.aiMesh, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !15
  %101 = mul i32 %100, 2
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !12
  %105 = getelementptr inbounds %"struct.Lava::Mesh", ptr %104, i32 0, i32 9
  store i32 %101, ptr %105, align 8, !tbaa !28
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.aiMesh, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !15
  %109 = mul i32 %108, 2
  %110 = zext i32 %109 to i64
  %111 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %110, i64 4)
  %112 = extractvalue { i64, i1 } %111, 1
  %113 = extractvalue { i64, i1 } %111, 0
  %114 = select i1 %112, i64 -1, i64 %113
  %115 = call noalias noundef nonnull ptr @_Znam(i64 noundef %114) #10
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !12
  %119 = getelementptr inbounds %"struct.Lava::Mesh", ptr %118, i32 0, i32 8
  store ptr %115, ptr %119, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !30
  br label %120

120:                                              ; preds = %337, %19
  %121 = load i32, ptr %8, align 4, !tbaa !30
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.aiMesh, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !15
  %125 = icmp ult i32 %121, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %120
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %340

127:                                              ; preds = %120
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.aiMesh, ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !31
  %131 = load i32, ptr %8, align 4, !tbaa !30
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %class.aiVector3t, ptr %130, i64 %132
  %134 = getelementptr inbounds %class.aiVector3t, ptr %133, i32 0, i32 0
  %135 = load float, ptr %134, align 4, !tbaa !32
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !12
  %139 = getelementptr inbounds %"struct.Lava::Mesh", ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !23
  %141 = load i32, ptr %8, align 4, !tbaa !30
  %142 = mul nsw i32 %141, 3
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds float, ptr %140, i64 %143
  store float %135, ptr %144, align 4, !tbaa !33
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.aiMesh, ptr %145, i32 0, i32 4
  %147 = load ptr, ptr %146, align 8, !tbaa !31
  %148 = load i32, ptr %8, align 4, !tbaa !30
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %class.aiVector3t, ptr %147, i64 %149
  %151 = getelementptr inbounds %class.aiVector3t, ptr %150, i32 0, i32 1
  %152 = load float, ptr %151, align 4, !tbaa !34
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !12
  %156 = getelementptr inbounds %"struct.Lava::Mesh", ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !23
  %158 = load i32, ptr %8, align 4, !tbaa !30
  %159 = mul nsw i32 %158, 3
  %160 = add nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds float, ptr %157, i64 %161
  store float %152, ptr %162, align 4, !tbaa !33
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.aiMesh, ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !31
  %166 = load i32, ptr %8, align 4, !tbaa !30
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds %class.aiVector3t, ptr %165, i64 %167
  %169 = getelementptr inbounds %class.aiVector3t, ptr %168, i32 0, i32 2
  %170 = load float, ptr %169, align 4, !tbaa !35
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !12
  %174 = getelementptr inbounds %"struct.Lava::Mesh", ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !23
  %176 = load i32, ptr %8, align 4, !tbaa !30
  %177 = mul nsw i32 %176, 3
  %178 = add nsw i32 %177, 2
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds float, ptr %175, i64 %179
  store float %170, ptr %180, align 4, !tbaa !33
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = call noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1308) %181)
  br i1 %182, label %183, label %237

183:                                              ; preds = %127
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.aiMesh, ptr %184, i32 0, i32 5
  %186 = load ptr, ptr %185, align 8, !tbaa !36
  %187 = load i32, ptr %8, align 4, !tbaa !30
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds %class.aiVector3t, ptr %186, i64 %188
  %190 = getelementptr inbounds %class.aiVector3t, ptr %189, i32 0, i32 0
  %191 = load float, ptr %190, align 4, !tbaa !32
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !12
  %195 = getelementptr inbounds %"struct.Lava::Mesh", ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !25
  %197 = load i32, ptr %8, align 4, !tbaa !30
  %198 = mul nsw i32 %197, 3
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds float, ptr %196, i64 %199
  store float %191, ptr %200, align 4, !tbaa !33
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.aiMesh, ptr %201, i32 0, i32 5
  %203 = load ptr, ptr %202, align 8, !tbaa !36
  %204 = load i32, ptr %8, align 4, !tbaa !30
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds %class.aiVector3t, ptr %203, i64 %205
  %207 = getelementptr inbounds %class.aiVector3t, ptr %206, i32 0, i32 1
  %208 = load float, ptr %207, align 4, !tbaa !34
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %210, align 8, !tbaa !12
  %212 = getelementptr inbounds %"struct.Lava::Mesh", ptr %211, i32 0, i32 2
  %213 = load ptr, ptr %212, align 8, !tbaa !25
  %214 = load i32, ptr %8, align 4, !tbaa !30
  %215 = mul nsw i32 %214, 3
  %216 = add nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds float, ptr %213, i64 %217
  store float %208, ptr %218, align 4, !tbaa !33
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.aiMesh, ptr %219, i32 0, i32 5
  %221 = load ptr, ptr %220, align 8, !tbaa !36
  %222 = load i32, ptr %8, align 4, !tbaa !30
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds %class.aiVector3t, ptr %221, i64 %223
  %225 = getelementptr inbounds %class.aiVector3t, ptr %224, i32 0, i32 2
  %226 = load float, ptr %225, align 4, !tbaa !35
  %227 = load ptr, ptr %7, align 8, !tbaa !5
  %228 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %227, i32 0, i32 0
  %229 = load ptr, ptr %228, align 8, !tbaa !12
  %230 = getelementptr inbounds %"struct.Lava::Mesh", ptr %229, i32 0, i32 2
  %231 = load ptr, ptr %230, align 8, !tbaa !25
  %232 = load i32, ptr %8, align 4, !tbaa !30
  %233 = mul nsw i32 %232, 3
  %234 = add nsw i32 %233, 2
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds float, ptr %231, i64 %235
  store float %226, ptr %236, align 4, !tbaa !33
  br label %237

237:                                              ; preds = %183, %127
  %238 = load ptr, ptr %6, align 8, !tbaa !5
  %239 = call noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1308) %238)
  br i1 %239, label %240, label %294

240:                                              ; preds = %237
  %241 = load ptr, ptr %6, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.aiMesh, ptr %241, i32 0, i32 6
  %243 = load ptr, ptr %242, align 8, !tbaa !37
  %244 = load i32, ptr %8, align 4, !tbaa !30
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds %class.aiVector3t, ptr %243, i64 %245
  %247 = getelementptr inbounds %class.aiVector3t, ptr %246, i32 0, i32 0
  %248 = load float, ptr %247, align 4, !tbaa !32
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !12
  %252 = getelementptr inbounds %"struct.Lava::Mesh", ptr %251, i32 0, i32 4
  %253 = load ptr, ptr %252, align 8, !tbaa !27
  %254 = load i32, ptr %8, align 4, !tbaa !30
  %255 = mul nsw i32 %254, 3
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds float, ptr %253, i64 %256
  store float %248, ptr %257, align 4, !tbaa !33
  %258 = load ptr, ptr %6, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.aiMesh, ptr %258, i32 0, i32 6
  %260 = load ptr, ptr %259, align 8, !tbaa !37
  %261 = load i32, ptr %8, align 4, !tbaa !30
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds %class.aiVector3t, ptr %260, i64 %262
  %264 = getelementptr inbounds %class.aiVector3t, ptr %263, i32 0, i32 1
  %265 = load float, ptr %264, align 4, !tbaa !34
  %266 = load ptr, ptr %7, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %266, i32 0, i32 0
  %268 = load ptr, ptr %267, align 8, !tbaa !12
  %269 = getelementptr inbounds %"struct.Lava::Mesh", ptr %268, i32 0, i32 4
  %270 = load ptr, ptr %269, align 8, !tbaa !27
  %271 = load i32, ptr %8, align 4, !tbaa !30
  %272 = mul nsw i32 %271, 3
  %273 = add nsw i32 %272, 1
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds float, ptr %270, i64 %274
  store float %265, ptr %275, align 4, !tbaa !33
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.aiMesh, ptr %276, i32 0, i32 6
  %278 = load ptr, ptr %277, align 8, !tbaa !37
  %279 = load i32, ptr %8, align 4, !tbaa !30
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds %class.aiVector3t, ptr %278, i64 %280
  %282 = getelementptr inbounds %class.aiVector3t, ptr %281, i32 0, i32 2
  %283 = load float, ptr %282, align 4, !tbaa !35
  %284 = load ptr, ptr %7, align 8, !tbaa !5
  %285 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %284, i32 0, i32 0
  %286 = load ptr, ptr %285, align 8, !tbaa !12
  %287 = getelementptr inbounds %"struct.Lava::Mesh", ptr %286, i32 0, i32 4
  %288 = load ptr, ptr %287, align 8, !tbaa !27
  %289 = load i32, ptr %8, align 4, !tbaa !30
  %290 = mul nsw i32 %289, 3
  %291 = add nsw i32 %290, 2
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds float, ptr %288, i64 %292
  store float %283, ptr %293, align 4, !tbaa !33
  br label %294

294:                                              ; preds = %240, %237
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = call noundef zeroext i1 @_ZNK6aiMesh16HasTextureCoordsEj(ptr noundef nonnull align 8 dereferenceable(1308) %295, i32 noundef 0)
  br i1 %296, label %297, label %336

297:                                              ; preds = %294
  %298 = load ptr, ptr %6, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.aiMesh, ptr %298, i32 0, i32 9
  %300 = getelementptr inbounds [8 x ptr], ptr %299, i64 0, i64 0
  %301 = load ptr, ptr %300, align 8, !tbaa !5
  %302 = load i32, ptr %8, align 4, !tbaa !30
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds %class.aiVector3t, ptr %301, i64 %303
  %305 = getelementptr inbounds %class.aiVector3t, ptr %304, i32 0, i32 0
  %306 = load float, ptr %305, align 4, !tbaa !32
  %307 = load ptr, ptr %7, align 8, !tbaa !5
  %308 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %307, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8, !tbaa !12
  %310 = getelementptr inbounds %"struct.Lava::Mesh", ptr %309, i32 0, i32 8
  %311 = load ptr, ptr %310, align 8, !tbaa !29
  %312 = load i32, ptr %8, align 4, !tbaa !30
  %313 = mul nsw i32 %312, 2
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds float, ptr %311, i64 %314
  store float %306, ptr %315, align 4, !tbaa !33
  %316 = load ptr, ptr %6, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.aiMesh, ptr %316, i32 0, i32 9
  %318 = getelementptr inbounds [8 x ptr], ptr %317, i64 0, i64 0
  %319 = load ptr, ptr %318, align 8, !tbaa !5
  %320 = load i32, ptr %8, align 4, !tbaa !30
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds %class.aiVector3t, ptr %319, i64 %321
  %323 = getelementptr inbounds %class.aiVector3t, ptr %322, i32 0, i32 1
  %324 = load float, ptr %323, align 4, !tbaa !34
  %325 = fsub float 1.000000e+00, %324
  %326 = load ptr, ptr %7, align 8, !tbaa !5
  %327 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %326, i32 0, i32 0
  %328 = load ptr, ptr %327, align 8, !tbaa !12
  %329 = getelementptr inbounds %"struct.Lava::Mesh", ptr %328, i32 0, i32 8
  %330 = load ptr, ptr %329, align 8, !tbaa !29
  %331 = load i32, ptr %8, align 4, !tbaa !30
  %332 = mul nsw i32 %331, 2
  %333 = add nsw i32 %332, 1
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds float, ptr %330, i64 %334
  store float %325, ptr %335, align 4, !tbaa !33
  br label %336

336:                                              ; preds = %297, %294
  br label %337

337:                                              ; preds = %336
  %338 = load i32, ptr %8, align 4, !tbaa !30
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %8, align 4, !tbaa !30
  br label %120, !llvm.loop !38

340:                                              ; preds = %126
  %341 = load ptr, ptr %6, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.aiMesh, ptr %341, i32 0, i32 2
  %343 = load i32, ptr %342, align 8, !tbaa !40
  %344 = mul i32 %343, 3
  %345 = load ptr, ptr %7, align 8, !tbaa !5
  %346 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %345, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !12
  %348 = getelementptr inbounds %"struct.Lava::Mesh", ptr %347, i32 0, i32 7
  store i32 %344, ptr %348, align 8, !tbaa !41
  %349 = load ptr, ptr %6, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.aiMesh, ptr %349, i32 0, i32 2
  %351 = load i32, ptr %350, align 8, !tbaa !40
  %352 = mul i32 %351, 3
  %353 = zext i32 %352 to i64
  %354 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %353, i64 4)
  %355 = extractvalue { i64, i1 } %354, 1
  %356 = extractvalue { i64, i1 } %354, 0
  %357 = select i1 %355, i64 -1, i64 %356
  %358 = call noalias noundef nonnull ptr @_Znam(i64 noundef %357) #10
  %359 = load ptr, ptr %7, align 8, !tbaa !5
  %360 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %359, i32 0, i32 0
  %361 = load ptr, ptr %360, align 8, !tbaa !12
  %362 = getelementptr inbounds %"struct.Lava::Mesh", ptr %361, i32 0, i32 6
  store ptr %358, ptr %362, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !30
  br label %363

363:                                              ; preds = %430, %340
  %364 = load i32, ptr %9, align 4, !tbaa !30
  %365 = load ptr, ptr %6, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.aiMesh, ptr %365, i32 0, i32 2
  %367 = load i32, ptr %366, align 8, !tbaa !40
  %368 = icmp ult i32 %364, %367
  br i1 %368, label %370, label %369

369:                                              ; preds = %363
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %433

370:                                              ; preds = %363
  %371 = load ptr, ptr %6, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.aiMesh, ptr %371, i32 0, i32 11
  %373 = load ptr, ptr %372, align 8, !tbaa !43
  %374 = load i32, ptr %9, align 4, !tbaa !30
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds %struct.aiFace, ptr %373, i64 %375
  %377 = getelementptr inbounds %struct.aiFace, ptr %376, i32 0, i32 1
  %378 = load ptr, ptr %377, align 8, !tbaa !44
  %379 = getelementptr inbounds i32, ptr %378, i64 0
  %380 = load i32, ptr %379, align 4, !tbaa !30
  %381 = load ptr, ptr %7, align 8, !tbaa !5
  %382 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %381, i32 0, i32 0
  %383 = load ptr, ptr %382, align 8, !tbaa !12
  %384 = getelementptr inbounds %"struct.Lava::Mesh", ptr %383, i32 0, i32 6
  %385 = load ptr, ptr %384, align 8, !tbaa !42
  %386 = load i32, ptr %9, align 4, !tbaa !30
  %387 = mul nsw i32 %386, 3
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds i32, ptr %385, i64 %388
  store i32 %380, ptr %389, align 4, !tbaa !30
  %390 = load ptr, ptr %6, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.aiMesh, ptr %390, i32 0, i32 11
  %392 = load ptr, ptr %391, align 8, !tbaa !43
  %393 = load i32, ptr %9, align 4, !tbaa !30
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds %struct.aiFace, ptr %392, i64 %394
  %396 = getelementptr inbounds %struct.aiFace, ptr %395, i32 0, i32 1
  %397 = load ptr, ptr %396, align 8, !tbaa !44
  %398 = getelementptr inbounds i32, ptr %397, i64 1
  %399 = load i32, ptr %398, align 4, !tbaa !30
  %400 = load ptr, ptr %7, align 8, !tbaa !5
  %401 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %400, i32 0, i32 0
  %402 = load ptr, ptr %401, align 8, !tbaa !12
  %403 = getelementptr inbounds %"struct.Lava::Mesh", ptr %402, i32 0, i32 6
  %404 = load ptr, ptr %403, align 8, !tbaa !42
  %405 = load i32, ptr %9, align 4, !tbaa !30
  %406 = mul nsw i32 %405, 3
  %407 = add nsw i32 %406, 1
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds i32, ptr %404, i64 %408
  store i32 %399, ptr %409, align 4, !tbaa !30
  %410 = load ptr, ptr %6, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.aiMesh, ptr %410, i32 0, i32 11
  %412 = load ptr, ptr %411, align 8, !tbaa !43
  %413 = load i32, ptr %9, align 4, !tbaa !30
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds %struct.aiFace, ptr %412, i64 %414
  %416 = getelementptr inbounds %struct.aiFace, ptr %415, i32 0, i32 1
  %417 = load ptr, ptr %416, align 8, !tbaa !44
  %418 = getelementptr inbounds i32, ptr %417, i64 2
  %419 = load i32, ptr %418, align 4, !tbaa !30
  %420 = load ptr, ptr %7, align 8, !tbaa !5
  %421 = getelementptr inbounds %"struct.Lava::MeshMaterialPack", ptr %420, i32 0, i32 0
  %422 = load ptr, ptr %421, align 8, !tbaa !12
  %423 = getelementptr inbounds %"struct.Lava::Mesh", ptr %422, i32 0, i32 6
  %424 = load ptr, ptr %423, align 8, !tbaa !42
  %425 = load i32, ptr %9, align 4, !tbaa !30
  %426 = mul nsw i32 %425, 3
  %427 = add nsw i32 %426, 2
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds i32, ptr %424, i64 %428
  store i32 %419, ptr %429, align 4, !tbaa !30
  br label %430

430:                                              ; preds = %370
  %431 = load i32, ptr %9, align 4, !tbaa !30
  %432 = add nsw i32 %431, 1
  store i32 %432, ptr %9, align 4, !tbaa !30
  br label %363, !llvm.loop !46

433:                                              ; preds = %369
  %434 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %434, ptr %2, align 8
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %435

435:                                              ; preds = %433, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  %436 = load ptr, ptr %2, align 8
  ret ptr %436
}

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

declare ptr @aiImportFile(ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

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

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

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

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { 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, !6, i64 24}
!10 = !{!"_ZTS7aiScene", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !6, i64 88, !11, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSN4Lava16MeshMaterialPackE", !6, i64 0, !6, i64 8}
!14 = !{!13, !6, i64 8}
!15 = !{!16, !11, i64 4}
!16 = !{!"_ZTS6aiMesh", !11, i64 0, !11, i64 4, !11, 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, !11, i64 216, !6, i64 224, !11, i64 232, !17, i64 236, !11, i64 1264, !6, i64 1272, !11, i64 1280, !18, i64 1284}
!17 = !{!"_ZTS8aiString", !11, i64 0, !7, i64 4}
!18 = !{!"_ZTS6aiAABB", !19, i64 0, !19, i64 12}
!19 = !{!"_ZTS10aiVector3tIfE", !20, i64 0, !20, i64 4, !20, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!22, !11, i64 8}
!22 = !{!"_ZTSN4Lava4MeshE", !6, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !11, i64 88}
!23 = !{!22, !6, i64 0}
!24 = !{!22, !11, i64 24}
!25 = !{!22, !6, i64 16}
!26 = !{!22, !11, i64 40}
!27 = !{!22, !6, i64 32}
!28 = !{!22, !11, i64 72}
!29 = !{!22, !6, i64 64}
!30 = !{!11, !11, i64 0}
!31 = !{!16, !6, i64 16}
!32 = !{!19, !20, i64 0}
!33 = !{!20, !20, i64 0}
!34 = !{!19, !20, i64 4}
!35 = !{!19, !20, i64 8}
!36 = !{!16, !6, i64 24}
!37 = !{!16, !6, i64 32}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!16, !11, i64 8}
!41 = !{!22, !11, i64 56}
!42 = !{!22, !6, i64 48}
!43 = !{!16, !6, i64 208}
!44 = !{!45, !6, i64 8}
!45 = !{!"_ZTS6aiFace", !11, i64 0, !6, i64 8}
!46 = distinct !{!46, !39}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.aiVector3t = type { float, float, float }
%struct.aiFace = type { i32, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noalias noundef ptr @_ZN4Lava9Importers13AssetImporter4LoadEPKc(ptr noundef %0) local_unnamed_addr #0 align 2 {
  %2 = tail call ptr @aiImportFile(ptr noundef %0, i32 noundef 3645131)
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %3, label %7

3:                                                ; preds = %1
  %4 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %0)
  %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %2, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = tail call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #7
  %12 = tail call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(96) %12, i8 0, i64 96, i1 false)
  store ptr %12, ptr %11, align 8, !tbaa !12
  %13 = tail call noalias noundef nonnull dereferenceable(80) ptr @_Znwm(i64 noundef 80) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80) %13, i8 0, i64 80, i1 false)
  tail call void @_ZN4Lava8MaterialC2Ev(ptr noundef nonnull align 8 dereferenceable(76) %13) #8
  %14 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr %13, ptr %14, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %10, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !15
  %17 = mul i32 %16, 3
  %18 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 %17, ptr %18, align 8, !tbaa !21
  %19 = zext i32 %17 to i64
  %20 = shl nuw nsw i64 %19, 2
  %21 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %20) #7
  store ptr %21, ptr %12, align 8, !tbaa !23
  %22 = getelementptr inbounds i8, ptr %12, i64 24
  store i32 %17, ptr %22, align 8, !tbaa !24
  %23 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %20) #7
  %24 = getelementptr inbounds i8, ptr %12, i64 16
  store ptr %23, ptr %24, align 8, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %12, i64 40
  store i32 %17, ptr %25, align 8, !tbaa !26
  %26 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %20) #7
  %27 = getelementptr inbounds i8, ptr %12, i64 32
  store ptr %26, ptr %27, align 8, !tbaa !27
  %28 = shl i32 %16, 1
  %29 = getelementptr inbounds i8, ptr %12, i64 72
  store i32 %28, ptr %29, align 8, !tbaa !28
  %30 = zext i32 %28 to i64
  %31 = shl nuw nsw i64 %30, 2
  %32 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %31) #7
  %33 = getelementptr inbounds i8, ptr %12, i64 64
  store ptr %32, ptr %33, align 8, !tbaa !29
  %.not99 = icmp eq i32 %16, 0
  br i1 %.not99, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %7
  %34 = getelementptr inbounds i8, ptr %10, i64 16
  %35 = getelementptr inbounds i8, ptr %10, i64 24
  %36 = getelementptr inbounds i8, ptr %10, i64 32
  %37 = getelementptr inbounds i8, ptr %10, i64 112
  br label %50

._crit_edge:                                      ; preds = %106, %7
  %38 = getelementptr inbounds i8, ptr %10, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !30
  %40 = mul i32 %39, 3
  %41 = getelementptr inbounds i8, ptr %12, i64 56
  store i32 %40, ptr %41, align 8, !tbaa !31
  %42 = zext i32 %40 to i64
  %43 = shl nuw nsw i64 %42, 2
  %44 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %43) #7
  %45 = getelementptr inbounds i8, ptr %12, i64 48
  store ptr %44, ptr %45, align 8, !tbaa !32
  %.not100 = icmp eq i32 %39, 0
  br i1 %.not100, label %.loopexit, label %.lr.ph98

.lr.ph98:                                         ; preds = %._crit_edge
  %46 = getelementptr inbounds i8, ptr %10, i64 208
  %47 = load ptr, ptr %46, align 8, !tbaa !33
  %48 = zext i32 %39 to i64
  %xtraiter = and i64 %48, 1
  %49 = icmp eq i32 %39, 1
  br i1 %49, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph98.new

.lr.ph98.new:                                     ; preds = %.lr.ph98
  %unroll_iter = and i64 %48, 4294967294
  br label %110

50:                                               ; preds = %.lr.ph, %106
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %106 ]
  %51 = load ptr, ptr %34, align 8, !tbaa !34
  %52 = getelementptr inbounds %class.aiVector3t, ptr %51, i64 %indvars.iv
  %53 = load float, ptr %52, align 4, !tbaa !35
  %54 = load ptr, ptr %12, align 8, !tbaa !23
  %55 = mul nuw nsw i64 %indvars.iv, 3
  %56 = getelementptr inbounds float, ptr %54, i64 %55
  store float %53, ptr %56, align 4, !tbaa !36
  %57 = getelementptr inbounds %class.aiVector3t, ptr %51, i64 %indvars.iv, i32 1
  %58 = load float, ptr %57, align 4, !tbaa !37
  %59 = add nuw nsw i64 %55, 1
  %60 = getelementptr inbounds float, ptr %54, i64 %59
  store float %58, ptr %60, align 4, !tbaa !36
  %61 = getelementptr inbounds %class.aiVector3t, ptr %51, i64 %indvars.iv, i32 2
  %62 = load float, ptr %61, align 4, !tbaa !38
  %63 = add nuw nsw i64 %55, 2
  %64 = getelementptr inbounds float, ptr %54, i64 %63
  store float %62, ptr %64, align 4, !tbaa !36
  %65 = tail call noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1308) %10)
  br i1 %65, label %66, label %78

66:                                               ; preds = %50
  %67 = load ptr, ptr %35, align 8, !tbaa !39
  %68 = getelementptr inbounds %class.aiVector3t, ptr %67, i64 %indvars.iv
  %69 = load float, ptr %68, align 4, !tbaa !35
  %70 = load ptr, ptr %24, align 8, !tbaa !25
  %71 = getelementptr inbounds float, ptr %70, i64 %55
  store float %69, ptr %71, align 4, !tbaa !36
  %72 = getelementptr inbounds %class.aiVector3t, ptr %67, i64 %indvars.iv, i32 1
  %73 = load float, ptr %72, align 4, !tbaa !37
  %74 = getelementptr inbounds float, ptr %70, i64 %59
  store float %73, ptr %74, align 4, !tbaa !36
  %75 = getelementptr inbounds %class.aiVector3t, ptr %67, i64 %indvars.iv, i32 2
  %76 = load float, ptr %75, align 4, !tbaa !38
  %77 = getelementptr inbounds float, ptr %70, i64 %63
  store float %76, ptr %77, align 4, !tbaa !36
  br label %78

78:                                               ; preds = %66, %50
  %79 = tail call noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1308) %10)
  br i1 %79, label %80, label %92

80:                                               ; preds = %78
  %81 = load ptr, ptr %36, align 8, !tbaa !40
  %82 = getelementptr inbounds %class.aiVector3t, ptr %81, i64 %indvars.iv
  %83 = load float, ptr %82, align 4, !tbaa !35
  %84 = load ptr, ptr %27, align 8, !tbaa !27
  %85 = getelementptr inbounds float, ptr %84, i64 %55
  store float %83, ptr %85, align 4, !tbaa !36
  %86 = getelementptr inbounds %class.aiVector3t, ptr %81, i64 %indvars.iv, i32 1
  %87 = load float, ptr %86, align 4, !tbaa !37
  %88 = getelementptr inbounds float, ptr %84, i64 %59
  store float %87, ptr %88, align 4, !tbaa !36
  %89 = getelementptr inbounds %class.aiVector3t, ptr %81, i64 %indvars.iv, i32 2
  %90 = load float, ptr %89, align 4, !tbaa !38
  %91 = getelementptr inbounds float, ptr %84, i64 %63
  store float %90, ptr %91, align 4, !tbaa !36
  br label %92

92:                                               ; preds = %80, %78
  %93 = tail call noundef zeroext i1 @_ZNK6aiMesh16HasTextureCoordsEj(ptr noundef nonnull align 8 dereferenceable(1308) %10, i32 noundef 0)
  br i1 %93, label %94, label %106

94:                                               ; preds = %92
  %95 = load ptr, ptr %37, align 8, !tbaa !11
  %96 = getelementptr inbounds %class.aiVector3t, ptr %95, i64 %indvars.iv
  %97 = load float, ptr %96, align 4, !tbaa !35
  %98 = load ptr, ptr %33, align 8, !tbaa !29
  %99 = shl nuw nsw i64 %indvars.iv, 1
  %100 = getelementptr inbounds float, ptr %98, i64 %99
  store float %97, ptr %100, align 4, !tbaa !36
  %101 = getelementptr inbounds %class.aiVector3t, ptr %95, i64 %indvars.iv, i32 1
  %102 = load float, ptr %101, align 4, !tbaa !37
  %103 = fsub float 1.000000e+00, %102
  %104 = or disjoint i64 %99, 1
  %105 = getelementptr inbounds float, ptr %98, i64 %104
  store float %103, ptr %105, align 4, !tbaa !36
  br label %106

106:                                              ; preds = %92, %94
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %107 = load i32, ptr %15, align 4, !tbaa !15
  %108 = zext i32 %107 to i64
  %109 = icmp ult i64 %indvars.iv.next, %108
  br i1 %109, label %50, label %._crit_edge, !llvm.loop !41

110:                                              ; preds = %110, %.lr.ph98.new
  %indvars.iv102 = phi i64 [ 0, %.lr.ph98.new ], [ %indvars.iv.next103.1, %110 ]
  %niter = phi i64 [ 0, %.lr.ph98.new ], [ %niter.next.1, %110 ]
  %111 = getelementptr inbounds %struct.aiFace, ptr %47, i64 %indvars.iv102, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !43
  %113 = load i32, ptr %112, align 4, !tbaa !45
  %.idx = mul nuw nsw i64 %indvars.iv102, 12
  %114 = getelementptr inbounds i8, ptr %44, i64 %.idx
  store i32 %113, ptr %114, align 4, !tbaa !45
  %115 = getelementptr inbounds i8, ptr %112, i64 4
  %116 = load i32, ptr %115, align 4, !tbaa !45
  %117 = getelementptr inbounds i8, ptr %114, i64 4
  store i32 %116, ptr %117, align 4, !tbaa !45
  %118 = getelementptr inbounds i8, ptr %112, i64 8
  %119 = load i32, ptr %118, align 4, !tbaa !45
  %120 = getelementptr inbounds i8, ptr %114, i64 8
  store i32 %119, ptr %120, align 4, !tbaa !45
  %indvars.iv.next103 = or disjoint i64 %indvars.iv102, 1
  %121 = getelementptr inbounds %struct.aiFace, ptr %47, i64 %indvars.iv.next103, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !43
  %123 = load i32, ptr %122, align 4, !tbaa !45
  %.idx.1 = mul nuw nsw i64 %indvars.iv.next103, 12
  %124 = getelementptr inbounds i8, ptr %44, i64 %.idx.1
  store i32 %123, ptr %124, align 4, !tbaa !45
  %125 = getelementptr inbounds i8, ptr %122, i64 4
  %126 = load i32, ptr %125, align 4, !tbaa !45
  %127 = getelementptr inbounds i8, ptr %124, i64 4
  store i32 %126, ptr %127, align 4, !tbaa !45
  %128 = getelementptr inbounds i8, ptr %122, i64 8
  %129 = load i32, ptr %128, align 4, !tbaa !45
  %130 = getelementptr inbounds i8, ptr %124, i64 8
  store i32 %129, ptr %130, align 4, !tbaa !45
  %indvars.iv.next103.1 = add nuw nsw i64 %indvars.iv102, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %.loopexit.loopexit.unr-lcssa, label %110, !llvm.loop !46

.loopexit.loopexit.unr-lcssa:                     ; preds = %110, %.lr.ph98
  %indvars.iv102.unr = phi i64 [ 0, %.lr.ph98 ], [ %indvars.iv.next103.1, %110 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %131 = getelementptr inbounds %struct.aiFace, ptr %47, i64 %indvars.iv102.unr, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !43
  %133 = load i32, ptr %132, align 4, !tbaa !45
  %.idx.epil = mul nuw nsw i64 %indvars.iv102.unr, 12
  %134 = getelementptr inbounds i8, ptr %44, i64 %.idx.epil
  store i32 %133, ptr %134, align 4, !tbaa !45
  %135 = getelementptr inbounds i8, ptr %132, i64 4
  %136 = load i32, ptr %135, align 4, !tbaa !45
  %137 = getelementptr inbounds i8, ptr %134, i64 4
  store i32 %136, ptr %137, align 4, !tbaa !45
  %138 = getelementptr inbounds i8, ptr %132, i64 8
  %139 = load i32, ptr %138, align 4, !tbaa !45
  %140 = getelementptr inbounds i8, ptr %134, i64 8
  store i32 %139, ptr %140, align 4, !tbaa !45
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %._crit_edge, %3
  %.093 = phi ptr [ null, %3 ], [ %11, %._crit_edge ], [ %11, %.loopexit.loopexit.unr-lcssa ], [ %11, %.loopexit.loopexit.epilog-lcssa ]
  ret ptr %.093
}

declare ptr @aiImportFile(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4Lava8MaterialC2Ev(ptr noundef nonnull align 8 dereferenceable(76)) unnamed_addr #5 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 noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1308)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1308)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh16HasTextureCoordsEj(ptr noundef nonnull align 8 dereferenceable(1308), i32 noundef) local_unnamed_addr #6 align 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 = { "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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #7 = { builtin allocsize(0) }
attributes #8 = { 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, !10, i64 24}
!6 = !{!"_ZTS7aiScene", !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, !7, i64 80, !10, i64 88, !7, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTSN4Lava16MeshMaterialPackE", !10, i64 0, !10, i64 8}
!14 = !{!13, !10, i64 8}
!15 = !{!16, !7, i64 4}
!16 = !{!"_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, !17, i64 236, !7, i64 1264, !10, i64 1272, !7, i64 1280, !18, i64 1284}
!17 = !{!"_ZTS8aiString", !7, i64 0, !8, i64 4}
!18 = !{!"_ZTS6aiAABB", !19, i64 0, !19, i64 12}
!19 = !{!"_ZTS10aiVector3tIfE", !20, i64 0, !20, i64 4, !20, i64 8}
!20 = !{!"float", !8, i64 0}
!21 = !{!22, !7, i64 8}
!22 = !{!"_ZTSN4Lava4MeshE", !10, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !7, i64 88}
!23 = !{!22, !10, i64 0}
!24 = !{!22, !7, i64 24}
!25 = !{!22, !10, i64 16}
!26 = !{!22, !7, i64 40}
!27 = !{!22, !10, i64 32}
!28 = !{!22, !7, i64 72}
!29 = !{!22, !10, i64 64}
!30 = !{!16, !7, i64 8}
!31 = !{!22, !7, i64 56}
!32 = !{!22, !10, i64 48}
!33 = !{!16, !10, i64 208}
!34 = !{!16, !10, i64 16}
!35 = !{!19, !20, i64 0}
!36 = !{!20, !20, i64 0}
!37 = !{!19, !20, i64 4}
!38 = !{!19, !20, i64 8}
!39 = !{!16, !10, i64 24}
!40 = !{!16, !10, i64 32}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!44, !10, i64 8}
!44 = !{!"_ZTS6aiFace", !7, i64 0, !10, i64 8}
!45 = !{!7, !7, i64 0}
!46 = distinct !{!46, !42}


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