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

; 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.__gnu_cxx::__normal_iterator.50" = type { ptr }
%struct.aiMaterial = type { ptr, i32, i32 }
%struct.aiMaterialProperty = type { %struct.aiString, i32, i32, i32, i32, ptr }
%struct.aiString = type { i32, [1024 x i8] }

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #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) #3

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(1028) ptr @_ZN8aiStringaSERKS_(ptr noundef nonnull align 4 dereferenceable(1028), ptr noundef nonnull align 4 dereferenceable(1028)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK8aiString5C_StrEv(ptr noundef nonnull align 4 dereferenceable(1028)) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner14MergeMaterialsEPP10aiMaterialN9__gnu_cxx17__normal_iteratorIPKS2_St6vectorIS2_SaIS2_EEEESB_(ptr noundef %0, ptr %1, ptr %2) #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.50", 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 %"class.__gnu_cxx::__normal_iterator.50", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.50", ptr %4, i32 0, i32 0
  store ptr %1, ptr %18, align 8
  %19 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.50", ptr %5, i32 0, i32 0
  store ptr %2, ptr %19, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = icmp eq ptr null, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %3
  br label %168

23:                                               ; preds = %3
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br i1 %24, label %25, label %27

25:                                               ; preds = %23
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr null, ptr %26, align 8, !tbaa !5
  br label %168

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %28 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #10
  invoke void @_ZN10aiMaterialC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %29 unwind label %34

29:                                               ; preds = %27
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %28, ptr %30, align 8, !tbaa !5
  store ptr %28, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %4, i64 8, i1 false), !tbaa.struct !11
  br label %31

31:                                               ; preds = %45, %29
  %32 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br i1 %32, label %38, label %33

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %47

34:                                               ; preds = %27
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %8, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %28, i64 noundef 16) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %169

38:                                               ; preds = %31
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.aiMaterial, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !12
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = add i32 %43, %42
  store i32 %44, ptr %10, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %38
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  br label %31, !llvm.loop !14

47:                                               ; preds = %33
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN10aiMaterial5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %48)
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.aiMaterial, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = icmp eq ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %47
  call void @_ZdaPv(ptr noundef %51) #11
  br label %54

54:                                               ; preds = %53, %47
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.aiMaterial, ptr %56, i32 0, i32 2
  store i32 %55, ptr %57, align 4, !tbaa !17
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.aiMaterial, ptr %58, i32 0, i32 1
  store i32 0, ptr %59, align 8, !tbaa !12
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.aiMaterial, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !17
  %63 = zext i32 %62 to i64
  %64 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %63, i64 8)
  %65 = extractvalue { i64, i1 } %64, 1
  %66 = extractvalue { i64, i1 } %64, 0
  %67 = select i1 %65, i64 -1, i64 %66
  %68 = call noalias noundef nonnull ptr @_Znam(i64 noundef %67) #10
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.aiMaterial, ptr %69, i32 0, i32 0
  store ptr %68, ptr %70, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %4, i64 8, i1 false), !tbaa.struct !11
  br label %71

71:                                               ; preds = %165, %54
  %72 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %161, %74
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.aiMaterial, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 8, !tbaa !12
  %81 = icmp ult i32 %76, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %75
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %164

83:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.aiMaterial, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !16
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds ptr, ptr %87, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  store ptr %91, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.aiMaterialProperty, ptr %93, i32 0, i32 0
  %95 = call noundef ptr @_ZNK8aiString5C_StrEv(ptr noundef nonnull align 4 dereferenceable(1028) %94)
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.aiMaterialProperty, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !18
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.aiMaterialProperty, ptr %99, i32 0, i32 2
  %101 = load i32, ptr %100, align 8, !tbaa !22
  %102 = call i32 @aiGetMaterialProperty(ptr noundef %92, ptr noundef %95, i32 noundef %98, i32 noundef %101, ptr noundef %16)
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %160

104:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %105 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1056) #10
  call void @_ZN18aiMaterialPropertyC2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %105) #9
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.aiMaterial, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !16
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.aiMaterial, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 8, !tbaa !12
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds ptr, ptr %108, i64 %112
  store ptr %105, ptr %113, align 8, !tbaa !5
  store ptr %105, ptr %17, align 8, !tbaa !5
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.aiMaterialProperty, ptr %114, i32 0, i32 3
  %116 = load i32, ptr %115, align 4, !tbaa !23
  %117 = load ptr, ptr %17, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.aiMaterialProperty, ptr %117, i32 0, i32 3
  store i32 %116, ptr %118, align 4, !tbaa !23
  %119 = load ptr, ptr %17, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.aiMaterialProperty, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 4, !tbaa !23
  %122 = zext i32 %121 to i64
  %123 = call noalias noundef nonnull ptr @_Znam(i64 noundef %122) #10
  %124 = load ptr, ptr %17, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.aiMaterialProperty, ptr %124, i32 0, i32 5
  store ptr %123, ptr %125, align 8, !tbaa !24
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.aiMaterialProperty, ptr %126, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !24
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.aiMaterialProperty, ptr %129, i32 0, i32 5
  %131 = load ptr, ptr %130, align 8, !tbaa !24
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.aiMaterialProperty, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !23
  %135 = zext i32 %134 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %128, ptr align 1 %131, i64 %135, i1 false)
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.aiMaterialProperty, ptr %136, i32 0, i32 2
  %138 = load i32, ptr %137, align 8, !tbaa !22
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.aiMaterialProperty, ptr %139, i32 0, i32 2
  store i32 %138, ptr %140, align 8, !tbaa !22
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.aiMaterialProperty, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !18
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.aiMaterialProperty, ptr %144, i32 0, i32 1
  store i32 %143, ptr %145, align 4, !tbaa !18
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.aiMaterialProperty, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %17, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.aiMaterialProperty, ptr %148, i32 0, i32 0
  %150 = call noundef nonnull align 4 dereferenceable(1028) ptr @_ZN8aiStringaSERKS_(ptr noundef nonnull align 4 dereferenceable(1028) %149, ptr noundef nonnull align 4 dereferenceable(1028) %147)
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.aiMaterialProperty, ptr %151, i32 0, i32 4
  %153 = load i32, ptr %152, align 8, !tbaa !25
  %154 = load ptr, ptr %17, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.aiMaterialProperty, ptr %154, i32 0, i32 4
  store i32 %153, ptr %155, align 8, !tbaa !25
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.aiMaterial, ptr %156, i32 0, i32 1
  %158 = load i32, ptr %157, align 8, !tbaa !12
  %159 = add i32 %158, 1
  store i32 %159, ptr %157, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %160

160:                                              ; preds = %104, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %14, align 4, !tbaa !9
  %163 = add i32 %162, 1
  store i32 %163, ptr %14, align 4, !tbaa !9
  br label %75, !llvm.loop !26

164:                                              ; preds = %82
  br label %165

165:                                              ; preds = %164
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %71, !llvm.loop !27

167:                                              ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %168

168:                                              ; preds = %167, %25, %22
  ret void

169:                                              ; preds = %34
  %170 = load ptr, ptr %8, align 8
  %171 = load i32, ptr %9, align 4
  %172 = insertvalue { ptr, i32 } poison, ptr %170, 0
  %173 = insertvalue { ptr, i32 } %172, i32 %171, 1
  resume { ptr, i32 } %173
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

declare void @_ZN10aiMaterialC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

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

declare void @_ZN10aiMaterial5ClearEv(ptr noundef nonnull align 8 dereferenceable(16)) #8

declare i32 @aiGetMaterialProperty(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #8

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nobuiltin 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { "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) }
attributes #11 = { builtin 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 = !{i64 0, i64 8, !5}
!12 = !{!13, !10, i64 8}
!13 = !{!"_ZTS10aiMaterial", !6, i64 0, !10, i64 8, !10, i64 12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!13, !6, i64 0}
!17 = !{!13, !10, i64 12}
!18 = !{!19, !10, i64 1028}
!19 = !{!"_ZTS18aiMaterialProperty", !20, i64 0, !10, i64 1028, !10, i64 1032, !10, i64 1036, !21, i64 1040, !6, i64 1048}
!20 = !{!"_ZTS8aiString", !10, i64 0, !7, i64 4}
!21 = !{!"_ZTS18aiPropertyTypeInfo", !7, i64 0}
!22 = !{!19, !10, i64 1032}
!23 = !{!19, !10, i64 1036}
!24 = !{!19, !6, i64 1048}
!25 = !{!19, !21, i64 1040}
!26 = distinct !{!26, !15}
!27 = distinct !{!27, !15}


; 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.__gnu_cxx::__normal_iterator.50" = type { ptr }

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #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) #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(1028) ptr @_ZN8aiStringaSERKS_(ptr noundef nonnull align 4 dereferenceable(1028), ptr noundef nonnull align 4 dereferenceable(1028)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner14MergeMaterialsEPP10aiMaterialN9__gnu_cxx17__normal_iteratorIPKS2_St6vectorIS2_SaIS2_EEEESB_(ptr noundef writeonly %0, ptr %1, ptr %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.50", align 8
  %8 = alloca ptr, align 8
  store ptr %1, ptr %4, align 8
  store ptr %2, ptr %5, align 8
  %9 = icmp eq ptr %0, null
  br i1 %9, label %84, label %10

10:                                               ; preds = %3
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %11, label %12, label %13

12:                                               ; preds = %10
  store ptr null, ptr %0, align 8, !tbaa !5
  br label %84

13:                                               ; preds = %10
  %14 = call noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #9
  invoke void @_ZN10aiMaterialC1Ev(ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %15 unwind label %20

15:                                               ; preds = %13
  store ptr %14, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %16 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %16, ptr %6, align 8, !tbaa !5
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %17, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %15
  %.0.lcssa = phi i32 [ 0, %15 ], [ %26, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN10aiMaterial5ClearEv(ptr noundef nonnull align 8 dereferenceable(16) %14)
  %18 = load ptr, ptr %14, align 8, !tbaa !9
  %19 = icmp eq ptr %18, null
  br i1 %19, label %30, label %29

20:                                               ; preds = %13
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %14, i64 noundef 16) #10
  resume { ptr, i32 } %21

.lr.ph:                                           ; preds = %15, %.lr.ph
  %.040 = phi i32 [ %26, %.lr.ph ], [ 0, %15 ]
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !12
  %26 = add i32 %25, %.040
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !13

29:                                               ; preds = %._crit_edge
  call void @_ZdaPv(ptr noundef nonnull %18) #10
  br label %30

30:                                               ; preds = %29, %._crit_edge
  %31 = getelementptr inbounds i8, ptr %14, i64 12
  store i32 %.0.lcssa, ptr %31, align 4, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %14, i64 8
  store i32 0, ptr %32, align 8, !tbaa !12
  %33 = zext i32 %.0.lcssa to i64
  %34 = shl nuw nsw i64 %33, 3
  %35 = call noalias noundef nonnull ptr @_Znam(i64 noundef %34) #9
  store ptr %35, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %36 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %36, ptr %7, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %37, label %.preheader, label %._crit_edge44

.preheader:                                       ; preds = %30, %._crit_edge43
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load i32, ptr %40, align 8, !tbaa !12
  %.not45 = icmp eq i32 %41, 0
  br i1 %.not45, label %._crit_edge43, label %.lr.ph42

._crit_edge44:                                    ; preds = %._crit_edge43, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %84

._crit_edge43:                                    ; preds = %77, %.preheader
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %43, label %.preheader, label %._crit_edge44, !llvm.loop !16

.lr.ph42:                                         ; preds = %.preheader, %77
  %indvars.iv = phi i64 [ %indvars.iv.next, %77 ], [ 0, %.preheader ]
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i64 %indvars.iv
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %49 = call noundef ptr @_ZNK8aiString5C_StrEv(ptr noundef nonnull align 4 dereferenceable(1028) %48)
  %50 = getelementptr inbounds i8, ptr %48, i64 1028
  %51 = load i32, ptr %50, align 4, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %48, i64 1032
  %53 = load i32, ptr %52, align 8, !tbaa !21
  %54 = call i32 @aiGetMaterialProperty(ptr noundef nonnull %14, ptr noundef %49, i32 noundef %51, i32 noundef %53, ptr noundef nonnull %8)
  %.not = icmp eq i32 %54, 0
  br i1 %.not, label %77, label %55

55:                                               ; preds = %.lr.ph42
  %56 = call noalias noundef nonnull dereferenceable(1056) ptr @_Znwm(i64 noundef 1056) #9
  call void @_ZN18aiMaterialPropertyC2Ev(ptr noundef nonnull align 8 dereferenceable(1056) %56) #8
  %57 = load ptr, ptr %14, align 8, !tbaa !9
  %58 = load i32, ptr %32, align 8, !tbaa !12
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %57, i64 %59
  store ptr %56, ptr %60, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %48, i64 1036
  %62 = load i32, ptr %61, align 4, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %56, i64 1036
  store i32 %62, ptr %63, align 4, !tbaa !22
  %64 = zext i32 %62 to i64
  %65 = call noalias noundef nonnull ptr @_Znam(i64 noundef %64) #9
  %66 = getelementptr inbounds i8, ptr %56, i64 1048
  store ptr %65, ptr %66, align 8, !tbaa !23
  %67 = getelementptr inbounds i8, ptr %48, i64 1048
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %65, ptr align 1 %68, i64 %64, i1 false)
  %69 = getelementptr inbounds i8, ptr %56, i64 1028
  %70 = load <2 x i32>, ptr %50, align 4, !tbaa !24
  store <2 x i32> %70, ptr %69, align 4, !tbaa !24
  %71 = call noundef nonnull align 4 dereferenceable(1028) ptr @_ZN8aiStringaSERKS_(ptr noundef nonnull align 4 dereferenceable(1028) %56, ptr noundef nonnull align 4 dereferenceable(1028) %48)
  %72 = getelementptr inbounds i8, ptr %48, i64 1040
  %73 = load i32, ptr %72, align 8, !tbaa !25
  %74 = getelementptr inbounds i8, ptr %56, i64 1040
  store i32 %73, ptr %74, align 8, !tbaa !25
  %75 = load i32, ptr %32, align 8, !tbaa !12
  %76 = add i32 %75, 1
  store i32 %76, ptr %32, align 8, !tbaa !12
  br label %77

77:                                               ; preds = %55, %.lr.ph42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = load i32, ptr %80, align 8, !tbaa !12
  %82 = zext i32 %81 to i64
  %83 = icmp ult i64 %indvars.iv.next, %82
  br i1 %83, label %.lr.ph42, label %._crit_edge43, !llvm.loop !26

84:                                               ; preds = %3, %._crit_edge44, %12
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

declare void @_ZN10aiMaterialC1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKP10aiMaterialSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

declare void @_ZN10aiMaterial5ClearEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #7

declare i32 @aiGetMaterialProperty(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nobuiltin 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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, !6, i64 0}
!10 = !{!"_ZTS10aiMaterial", !6, i64 0, !11, i64 8, !11, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!10, !11, i64 12}
!16 = distinct !{!16, !14}
!17 = !{!18, !11, i64 1028}
!18 = !{!"_ZTS18aiMaterialProperty", !19, i64 0, !11, i64 1028, !11, i64 1032, !11, i64 1036, !20, i64 1040, !6, i64 1048}
!19 = !{!"_ZTS8aiString", !11, i64 0, !7, i64 4}
!20 = !{!"_ZTS18aiPropertyTypeInfo", !7, i64 0}
!21 = !{!18, !11, i64 1032}
!22 = !{!18, !11, i64 1036}
!23 = !{!18, !6, i64 1048}
!24 = !{!11, !11, i64 0}
!25 = !{!18, !20, i64 1040}
!26 = distinct !{!26, !14}


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