; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/PostProcessing (ValidateDataStructure)

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

@.str.75 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [50 x i8], align 1

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ...) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ...) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp17ValidateDSProcess8ValidateEPK10aiMaterial(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %122, %2
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.aiMaterial, ptr %12, i32 0, i32 1
  %14 = load i32, ptr %13, align 8, !tbaa !11
  %15 = icmp ult i32 %11, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %125

17:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.aiMaterial, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !13
  %21 = load i32, ptr %5, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds ptr, ptr %20, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %24, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %32, label %27

27:                                               ; preds = %17
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.aiMaterial, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !11
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.75, i32 noundef %28, i32 noundef %31) #5
  unreachable

32:                                               ; preds = %17
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.aiMaterialProperty, ptr %33, i32 0, i32 3
  %35 = load i32, ptr %34, align 4, !tbaa !14
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %42

37:                                               ; preds = %32
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.aiMaterialProperty, ptr %38, i32 0, i32 5
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %41 = icmp ne ptr %40, null
  br i1 %41, label %45, label %42

42:                                               ; preds = %37, %32
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = load i32, ptr %5, align 4, !tbaa !9
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.76, i32 noundef %43, i32 noundef %44) #5
  unreachable

45:                                               ; preds = %37
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.aiMaterialProperty, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 8, !tbaa !19
  %49 = icmp eq i32 3, %48
  br i1 %49, label %50, label %85

50:                                               ; preds = %45
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.aiMaterialProperty, ptr %51, i32 0, i32 3
  %53 = load i32, ptr %52, align 4, !tbaa !14
  %54 = icmp ult i32 %53, 5
  br i1 %54, label %66, label %55

55:                                               ; preds = %50
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.aiMaterialProperty, ptr %56, i32 0, i32 3
  %58 = load i32, ptr %57, align 4, !tbaa !14
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.aiMaterialProperty, ptr %59, i32 0, i32 5
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = add i32 4, %62
  %64 = add i32 %63, 1
  %65 = icmp ult i32 %58, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %55, %50
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.aiMaterialProperty, ptr %68, i32 0, i32 3
  %70 = load i32, ptr %69, align 4, !tbaa !14
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.77, i32 noundef %67, i32 noundef %70, i32 noundef 1028) #5
  unreachable

71:                                               ; preds = %55
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.aiMaterialProperty, ptr %72, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.aiMaterialProperty, ptr %75, i32 0, i32 3
  %77 = load i32, ptr %76, align 4, !tbaa !14
  %78 = sub i32 %77, 1
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %74, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !20
  %82 = icmp ne i8 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %71
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.78) #5
  unreachable

84:                                               ; preds = %71
  br label %121

85:                                               ; preds = %45
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.aiMaterialProperty, ptr %86, i32 0, i32 4
  %88 = load i32, ptr %87, align 8, !tbaa !19
  %89 = icmp eq i32 1, %88
  br i1 %89, label %90, label %102

90:                                               ; preds = %85
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.aiMaterialProperty, ptr %91, i32 0, i32 3
  %93 = load i32, ptr %92, align 4, !tbaa !14
  %94 = zext i32 %93 to i64
  %95 = icmp ult i64 %94, 4
  br i1 %95, label %96, label %101

96:                                               ; preds = %90
  %97 = load i32, ptr %5, align 4, !tbaa !9
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.aiMaterialProperty, ptr %98, i32 0, i32 3
  %100 = load i32, ptr %99, align 4, !tbaa !14
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.79, i32 noundef %97, i32 noundef %100, i32 noundef 4) #5
  unreachable

101:                                              ; preds = %90
  br label %120

102:                                              ; preds = %85
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.aiMaterialProperty, ptr %103, i32 0, i32 4
  %105 = load i32, ptr %104, align 8, !tbaa !19
  %106 = icmp eq i32 4, %105
  br i1 %106, label %107, label %119

107:                                              ; preds = %102
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.aiMaterialProperty, ptr %108, i32 0, i32 3
  %110 = load i32, ptr %109, align 4, !tbaa !14
  %111 = zext i32 %110 to i64
  %112 = icmp ult i64 %111, 4
  br i1 %112, label %113, label %118

113:                                              ; preds = %107
  %114 = load i32, ptr %5, align 4, !tbaa !9
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.aiMaterialProperty, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 4, !tbaa !14
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.80, i32 noundef %114, i32 noundef %117, i32 noundef 4) #5
  unreachable

118:                                              ; preds = %107
  br label %119

119:                                              ; preds = %118, %102
  br label %120

120:                                              ; preds = %119, %101
  br label %121

121:                                              ; preds = %120, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %5, align 4, !tbaa !9
  %124 = add i32 %123, 1
  store i32 %124, ptr %5, align 4, !tbaa !9
  br label %10, !llvm.loop !21

125:                                              ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = call i32 @aiGetMaterialInteger(ptr noundef %126, ptr noundef @.str.81, i32 noundef 0, i32 noundef 0, ptr noundef %8)
  %128 = icmp eq i32 0, %127
  br i1 %128, label %129, label %147

129:                                              ; preds = %125
  %130 = load i32, ptr %8, align 4, !tbaa !9
  switch i32 %130, label %145 [
    i32 4, label %131
    i32 8, label %131
    i32 3, label %131
  ]

131:                                              ; preds = %129, %129, %129
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = call i32 @aiGetMaterialFloat(ptr noundef %132, ptr noundef @.str.82, i32 noundef 0, i32 noundef 0, ptr noundef %7)
  %134 = icmp ne i32 0, %133
  br i1 %134, label %135, label %136

135:                                              ; preds = %131
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.83)
  br label %136

136:                                              ; preds = %135, %131
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = call i32 @aiGetMaterialFloat(ptr noundef %137, ptr noundef @.str.84, i32 noundef 0, i32 noundef 0, ptr noundef %7)
  %139 = icmp eq i32 0, %138
  br i1 %139, label %140, label %144

140:                                              ; preds = %136
  %141 = load float, ptr %7, align 4, !tbaa !23
  %142 = fcmp une float %141, 0.000000e+00
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.85)
  br label %144

144:                                              ; preds = %143, %140, %136
  br label %146

145:                                              ; preds = %129
  br label %146

146:                                              ; preds = %145, %144
  br label %147

147:                                              ; preds = %146, %125
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = call i32 @aiGetMaterialFloat(ptr noundef %148, ptr noundef @.str.86, i32 noundef 0, i32 noundef 0, ptr noundef %7)
  %150 = icmp eq i32 0, %149
  br i1 %150, label %151, label %159

151:                                              ; preds = %147
  %152 = load float, ptr %7, align 4, !tbaa !23
  %153 = fcmp une float %152, 0.000000e+00
  br i1 %153, label %154, label %158

154:                                              ; preds = %151
  %155 = load float, ptr %7, align 4, !tbaa !23
  %156 = fpext float %155 to double
  %157 = fcmp ogt double %156, 1.010000e+00
  br i1 %157, label %158, label %159

158:                                              ; preds = %154, %151
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.87)
  br label %159

159:                                              ; preds = %158, %154, %147
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %160, i32 noundef 1)
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %161, i32 noundef 2)
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %162, i32 noundef 3)
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %163, i32 noundef 4)
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %164, i32 noundef 8)
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %165, i32 noundef 7)
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %166, i32 noundef 5)
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %167, i32 noundef 6)
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %168, i32 noundef 9)
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %169, i32 noundef 10)
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %170, i32 noundef 11)
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %171, i32 noundef 12)
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %172, i32 noundef 13)
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %173, i32 noundef 14)
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %174, i32 noundef 15)
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %175, i32 noundef 16)
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %176, i32 noundef 17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @aiGetMaterialInteger(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @aiGetMaterialFloat(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

attributes #0 = { mustprogress noreturn 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 = { 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 = { 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 = { nounwind }
attributes #5 = { noreturn }

!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 8}
!12 = !{!"_ZTS10aiMaterial", !6, i64 0, !10, i64 8, !10, i64 12}
!13 = !{!12, !6, i64 0}
!14 = !{!15, !10, i64 1036}
!15 = !{!"_ZTS18aiMaterialProperty", !16, i64 0, !10, i64 1028, !10, i64 1032, !10, i64 1036, !17, i64 1040, !6, i64 1048}
!16 = !{!"_ZTS8aiString", !10, i64 0, !7, i64 4}
!17 = !{!"_ZTS18aiPropertyTypeInfo", !7, i64 0}
!18 = !{!15, !6, i64 1048}
!19 = !{!15, !17, i64 1040}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}


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

@.str.75 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [50 x i8], align 1

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ...) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ...) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp17ValidateDSProcess8ValidateEPK10aiMaterial(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca float, align 4
  %4 = alloca i32, align 4
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %.not80 = icmp eq i32 %6, 0
  br i1 %.not80, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %7 = load ptr, ptr %1, align 8, !tbaa !11
  %wide.trip.count = zext i32 %6 to i64
  br label %10

._crit_edge:                                      ; preds = %48, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %8 = call i32 @aiGetMaterialInteger(ptr noundef nonnull %1, ptr noundef nonnull @.str.81, i32 noundef 0, i32 noundef 0, ptr noundef nonnull %4)
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %49, label %60

10:                                               ; preds = %.lr.ph, %48
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %48 ]
  %11 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv
  %12 = load ptr, ptr %11, align 8, !tbaa !12
  %.not56 = icmp eq ptr %12, null
  br i1 %.not56, label %13, label %15

13:                                               ; preds = %10
  %14 = trunc nuw i64 %indvars.iv to i32
  tail call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.75, i32 noundef %14, i32 noundef %6) #5
  unreachable

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %12, i64 1036
  %17 = load i32, ptr %16, align 4, !tbaa !13
  %.not57 = icmp eq i32 %17, 0
  br i1 %.not57, label %21, label %18

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %12, i64 1048
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %.not58 = icmp eq ptr %20, null
  br i1 %.not58, label %21, label %23

21:                                               ; preds = %18, %15
  %22 = trunc nuw i64 %indvars.iv to i32
  tail call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.76, i32 noundef %22, i32 noundef %22) #5
  unreachable

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %12, i64 1040
  %25 = load i32, ptr %24, align 8, !tbaa !18
  switch i32 %25, label %48 [
    i32 3, label %26
    i32 1, label %40
    i32 4, label %44
  ]

26:                                               ; preds = %23
  %27 = icmp ult i32 %17, 5
  br i1 %27, label %32, label %28

28:                                               ; preds = %26
  %29 = load i32, ptr %20, align 4, !tbaa !19
  %30 = add i32 %29, 5
  %31 = icmp ult i32 %17, %30
  br i1 %31, label %32, label %34

32:                                               ; preds = %28, %26
  %33 = trunc nuw i64 %indvars.iv to i32
  tail call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.77, i32 noundef %33, i32 noundef %17, i32 noundef 1028) #5
  unreachable

34:                                               ; preds = %28
  %35 = add i32 %17, -1
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %20, i64 %36
  %38 = load i8, ptr %37, align 1, !tbaa !20
  %.not59 = icmp eq i8 %38, 0
  br i1 %.not59, label %48, label %39

39:                                               ; preds = %34
  tail call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.78) #5
  unreachable

40:                                               ; preds = %23
  %41 = icmp ult i32 %17, 4
  br i1 %41, label %42, label %48

42:                                               ; preds = %40
  %43 = trunc nuw i64 %indvars.iv to i32
  tail call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.79, i32 noundef %43, i32 noundef %17, i32 noundef 4) #5
  unreachable

44:                                               ; preds = %23
  %45 = icmp ult i32 %17, 4
  br i1 %45, label %46, label %48

46:                                               ; preds = %44
  %47 = trunc nuw i64 %indvars.iv to i32
  tail call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess11ReportErrorEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.80, i32 noundef %47, i32 noundef %17, i32 noundef 4) #5
  unreachable

48:                                               ; preds = %23, %40, %44, %34
  %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 %10, !llvm.loop !21

49:                                               ; preds = %._crit_edge
  %50 = load i32, ptr %4, align 4, !tbaa !19
  switch i32 %50, label %60 [
    i32 4, label %51
    i32 8, label %51
    i32 3, label %51
  ]

51:                                               ; preds = %49, %49, %49
  %52 = call i32 @aiGetMaterialFloat(ptr noundef nonnull %1, ptr noundef nonnull @.str.82, i32 noundef 0, i32 noundef 0, ptr noundef nonnull %3)
  %.not = icmp eq i32 %52, 0
  br i1 %.not, label %54, label %53

53:                                               ; preds = %51
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.83)
  br label %54

54:                                               ; preds = %53, %51
  %55 = call i32 @aiGetMaterialFloat(ptr noundef nonnull %1, ptr noundef nonnull @.str.84, i32 noundef 0, i32 noundef 0, ptr noundef nonnull %3)
  %56 = icmp ne i32 %55, 0
  %57 = load float, ptr %3, align 4
  %58 = fcmp une float %57, 0.000000e+00
  %or.cond = select i1 %56, i1 true, i1 %58
  br i1 %or.cond, label %60, label %59

59:                                               ; preds = %54
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.85)
  br label %60

60:                                               ; preds = %59, %54, %49, %._crit_edge
  %61 = call i32 @aiGetMaterialFloat(ptr noundef nonnull %1, ptr noundef nonnull @.str.86, i32 noundef 0, i32 noundef 0, ptr noundef nonnull %3)
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %69

63:                                               ; preds = %60
  %64 = load float, ptr %3, align 4, !tbaa !23
  %65 = fcmp oeq float %64, 0.000000e+00
  %66 = fpext float %64 to double
  %67 = fcmp ogt double %66, 1.010000e+00
  %or.cond61 = or i1 %65, %67
  br i1 %or.cond61, label %68, label %69

68:                                               ; preds = %63
  call void (ptr, ptr, ...) @_ZN6Assimp17ValidateDSProcess13ReportWarningEPKcz(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull @.str.87)
  br label %69

69:                                               ; preds = %63, %68, %60
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 1)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 2)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 3)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 4)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 8)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 7)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 5)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 6)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 9)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 10)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 11)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 12)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 13)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 14)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 15)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 16)
  call void @_ZN6Assimp17ValidateDSProcess24SearchForInvalidTexturesEPK10aiMaterial13aiTextureType(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %1, i32 noundef 17)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @aiGetMaterialInteger(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @aiGetMaterialFloat(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

!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 8}
!6 = !{!"_ZTS10aiMaterial", !7, i64 0, !10, i64 8, !10, i64 12}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !10, i64 1036}
!14 = !{!"_ZTS18aiMaterialProperty", !15, i64 0, !10, i64 1028, !10, i64 1032, !10, i64 1036, !16, i64 1040, !7, i64 1048}
!15 = !{!"_ZTS8aiString", !10, i64 0, !8, i64 4}
!16 = !{!"_ZTS18aiPropertyTypeInfo", !8, i64 0}
!17 = !{!14, !7, i64 1048}
!18 = !{!14, !16, i64 1040}
!19 = !{!10, !10, i64 0}
!20 = !{!8, !8, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !8, i64 0}


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