; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/Common/scene.ll (ZN7aiSceneD2Ev)

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7aiSceneD2Ev(ptr noundef nonnull align 8 dereferenceable(1168) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  %10 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 1
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = icmp eq ptr %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %1
  call void @_ZN6aiNodeD1Ev(ptr noundef nonnull align 8 dereferenceable(1144) %11) #6
  call void @_ZdlPvm(ptr noundef %11, i64 noundef 1144) #7
  br label %14

14:                                               ; preds = %13, %1
  %15 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 2
  %16 = load i32, ptr %15, align 8, !tbaa !13
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %43

18:                                               ; preds = %14
  %19 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 3
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %43

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !15
  br label %23

23:                                               ; preds = %39, %22
  %24 = load i32, ptr %3, align 4, !tbaa !15
  %25 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 2
  %26 = load i32, ptr %25, align 8, !tbaa !13
  %27 = icmp ult i32 %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %42

29:                                               ; preds = %23
  %30 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 3
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = load i32, ptr %3, align 4, !tbaa !15
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds ptr, ptr %31, i64 %33
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %29
  call void @_ZN6aiMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(1320) %35) #6
  call void @_ZdlPvm(ptr noundef %35, i64 noundef 1320) #7
  br label %38

38:                                               ; preds = %37, %29
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %3, align 4, !tbaa !15
  %41 = add i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !15
  br label %23, !llvm.loop !16

42:                                               ; preds = %28
  br label %43

43:                                               ; preds = %42, %18, %14
  %44 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  %46 = icmp eq ptr %45, null
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @_ZdaPv(ptr noundef %45) #7
  br label %48

48:                                               ; preds = %47, %43
  %49 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 4
  %50 = load i32, ptr %49, align 8, !tbaa !18
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %77

52:                                               ; preds = %48
  %53 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 5
  %54 = load ptr, ptr %53, align 8, !tbaa !19
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %77

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !15
  br label %57

57:                                               ; preds = %73, %56
  %58 = load i32, ptr %4, align 4, !tbaa !15
  %59 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 4
  %60 = load i32, ptr %59, align 8, !tbaa !18
  %61 = icmp ult i32 %58, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %76

63:                                               ; preds = %57
  %64 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 5
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = load i32, ptr %4, align 4, !tbaa !15
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = icmp eq ptr %69, null
  br i1 %70, label %72, label %71

71:                                               ; preds = %63
  call void @_ZN10aiMaterialD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %69) #6
  call void @_ZdlPvm(ptr noundef %69, i64 noundef 16) #7
  br label %72

72:                                               ; preds = %71, %63
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %4, align 4, !tbaa !15
  %75 = add i32 %74, 1
  store i32 %75, ptr %4, align 4, !tbaa !15
  br label %57, !llvm.loop !20

76:                                               ; preds = %62
  br label %77

77:                                               ; preds = %76, %52, %48
  %78 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 5
  %79 = load ptr, ptr %78, align 8, !tbaa !19
  %80 = icmp eq ptr %79, null
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  call void @_ZdaPv(ptr noundef %79) #7
  br label %82

82:                                               ; preds = %81, %77
  %83 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 6
  %84 = load i32, ptr %83, align 8, !tbaa !21
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %111

86:                                               ; preds = %82
  %87 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 7
  %88 = load ptr, ptr %87, align 8, !tbaa !22
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %111

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !15
  br label %91

91:                                               ; preds = %107, %90
  %92 = load i32, ptr %5, align 4, !tbaa !15
  %93 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 6
  %94 = load i32, ptr %93, align 8, !tbaa !21
  %95 = icmp ult i32 %92, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %110

97:                                               ; preds = %91
  %98 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 7
  %99 = load ptr, ptr %98, align 8, !tbaa !22
  %100 = load i32, ptr %5, align 4, !tbaa !15
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds ptr, ptr %99, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = icmp eq ptr %103, null
  br i1 %104, label %106, label %105

105:                                              ; preds = %97
  call void @_ZN11aiAnimationD2Ev(ptr noundef nonnull align 8 dereferenceable(1096) %103) #6
  call void @_ZdlPvm(ptr noundef %103, i64 noundef 1096) #7
  br label %106

106:                                              ; preds = %105, %97
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %5, align 4, !tbaa !15
  %109 = add i32 %108, 1
  store i32 %109, ptr %5, align 4, !tbaa !15
  br label %91, !llvm.loop !23

110:                                              ; preds = %96
  br label %111

111:                                              ; preds = %110, %86, %82
  %112 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 7
  %113 = load ptr, ptr %112, align 8, !tbaa !22
  %114 = icmp eq ptr %113, null
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  call void @_ZdaPv(ptr noundef %113) #7
  br label %116

116:                                              ; preds = %115, %111
  %117 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 8
  %118 = load i32, ptr %117, align 8, !tbaa !24
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %145

120:                                              ; preds = %116
  %121 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 9
  %122 = load ptr, ptr %121, align 8, !tbaa !25
  %123 = icmp ne ptr %122, null
  br i1 %123, label %124, label %145

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !15
  br label %125

125:                                              ; preds = %141, %124
  %126 = load i32, ptr %6, align 4, !tbaa !15
  %127 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 8
  %128 = load i32, ptr %127, align 8, !tbaa !24
  %129 = icmp ult i32 %126, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %144

131:                                              ; preds = %125
  %132 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 9
  %133 = load ptr, ptr %132, align 8, !tbaa !25
  %134 = load i32, ptr %6, align 4, !tbaa !15
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds ptr, ptr %133, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = icmp eq ptr %137, null
  br i1 %138, label %140, label %139

139:                                              ; preds = %131
  call void @_ZN9aiTextureD2Ev(ptr noundef nonnull align 8 dereferenceable(1060) %137) #6
  call void @_ZdlPvm(ptr noundef %137, i64 noundef 1064) #7
  br label %140

140:                                              ; preds = %139, %131
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %6, align 4, !tbaa !15
  %143 = add i32 %142, 1
  store i32 %143, ptr %6, align 4, !tbaa !15
  br label %125, !llvm.loop !26

144:                                              ; preds = %130
  br label %145

145:                                              ; preds = %144, %120, %116
  %146 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 9
  %147 = load ptr, ptr %146, align 8, !tbaa !25
  %148 = icmp eq ptr %147, null
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  call void @_ZdaPv(ptr noundef %147) #7
  br label %150

150:                                              ; preds = %149, %145
  %151 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 10
  %152 = load i32, ptr %151, align 8, !tbaa !27
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %179

154:                                              ; preds = %150
  %155 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 11
  %156 = load ptr, ptr %155, align 8, !tbaa !28
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %179

158:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !15
  br label %159

159:                                              ; preds = %175, %158
  %160 = load i32, ptr %7, align 4, !tbaa !15
  %161 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 10
  %162 = load i32, ptr %161, align 8, !tbaa !27
  %163 = icmp ult i32 %160, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %178

165:                                              ; preds = %159
  %166 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 11
  %167 = load ptr, ptr %166, align 8, !tbaa !28
  %168 = load i32, ptr %7, align 4, !tbaa !15
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds ptr, ptr %167, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  %172 = icmp eq ptr %171, null
  br i1 %172, label %174, label %173

173:                                              ; preds = %165
  call void @_ZdlPvm(ptr noundef %171, i64 noundef 1132) #7
  br label %174

174:                                              ; preds = %173, %165
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %7, align 4, !tbaa !15
  %177 = add i32 %176, 1
  store i32 %177, ptr %7, align 4, !tbaa !15
  br label %159, !llvm.loop !29

178:                                              ; preds = %164
  br label %179

179:                                              ; preds = %178, %154, %150
  %180 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 11
  %181 = load ptr, ptr %180, align 8, !tbaa !28
  %182 = icmp eq ptr %181, null
  br i1 %182, label %184, label %183

183:                                              ; preds = %179
  call void @_ZdaPv(ptr noundef %181) #7
  br label %184

184:                                              ; preds = %183, %179
  %185 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 12
  %186 = load i32, ptr %185, align 8, !tbaa !30
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %213

188:                                              ; preds = %184
  %189 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 13
  %190 = load ptr, ptr %189, align 8, !tbaa !31
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %213

192:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !15
  br label %193

193:                                              ; preds = %209, %192
  %194 = load i32, ptr %8, align 4, !tbaa !15
  %195 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 12
  %196 = load i32, ptr %195, align 8, !tbaa !30
  %197 = icmp ult i32 %194, %196
  br i1 %197, label %199, label %198

198:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %212

199:                                              ; preds = %193
  %200 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 13
  %201 = load ptr, ptr %200, align 8, !tbaa !31
  %202 = load i32, ptr %8, align 4, !tbaa !15
  %203 = zext i32 %202 to i64
  %204 = getelementptr inbounds ptr, ptr %201, i64 %203
  %205 = load ptr, ptr %204, align 8, !tbaa !5
  %206 = icmp eq ptr %205, null
  br i1 %206, label %208, label %207

207:                                              ; preds = %199
  call void @_ZdlPvm(ptr noundef %205, i64 noundef 1084) #7
  br label %208

208:                                              ; preds = %207, %199
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %8, align 4, !tbaa !15
  %211 = add i32 %210, 1
  store i32 %211, ptr %8, align 4, !tbaa !15
  br label %193, !llvm.loop !32

212:                                              ; preds = %198
  br label %213

213:                                              ; preds = %212, %188, %184
  %214 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 13
  %215 = load ptr, ptr %214, align 8, !tbaa !31
  %216 = icmp eq ptr %215, null
  br i1 %216, label %218, label %217

217:                                              ; preds = %213
  call void @_ZdaPv(ptr noundef %215) #7
  br label %218

218:                                              ; preds = %217, %213
  %219 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 14
  %220 = load ptr, ptr %219, align 8, !tbaa !33
  invoke void @_ZN10aiMetadata7DeallocEPS_(ptr noundef %220)
          to label %221 unwind label %232

221:                                              ; preds = %218
  %222 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 17
  %223 = load ptr, ptr %222, align 8, !tbaa !34
  %224 = icmp eq ptr %223, null
  br i1 %224, label %226, label %225

225:                                              ; preds = %221
  call void @_ZdaPv(ptr noundef %223) #7
  br label %226

226:                                              ; preds = %225, %221
  %227 = getelementptr inbounds %struct.aiScene, ptr %9, i32 0, i32 18
  %228 = load ptr, ptr %227, align 8, !tbaa !35
  %229 = icmp eq ptr %228, null
  br i1 %229, label %231, label %230

230:                                              ; preds = %226
  call void @_ZdlPvm(ptr noundef %228, i64 noundef 16) #7
  br label %231

231:                                              ; preds = %230, %226
  ret void

232:                                              ; preds = %218
  %233 = landingpad { ptr, i32 }
          catch ptr null
  %234 = extractvalue { ptr, i32 } %233, 0
  call void @__clang_call_terminate(ptr %234) #8
  unreachable
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #1

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN10aiMaterialD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10aiMetadata7DeallocEPS_(ptr noundef) #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #5

declare void @_ZN6aiNodeD1Ev(ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!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, !12, i64 120, !11, i64 1148, !6, i64 1152, !6, i64 1160}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8aiString", !11, i64 0, !7, i64 4}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !6, i64 24}
!15 = !{!11, !11, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !11, i64 32}
!19 = !{!10, !6, i64 40}
!20 = distinct !{!20, !17}
!21 = !{!10, !11, i64 48}
!22 = !{!10, !6, i64 56}
!23 = distinct !{!23, !17}
!24 = !{!10, !11, i64 64}
!25 = !{!10, !6, i64 72}
!26 = distinct !{!26, !17}
!27 = !{!10, !11, i64 80}
!28 = !{!10, !6, i64 88}
!29 = distinct !{!29, !17}
!30 = !{!10, !11, i64 96}
!31 = !{!10, !6, i64 104}
!32 = distinct !{!32, !17}
!33 = !{!10, !6, i64 112}
!34 = !{!10, !6, i64 1152}
!35 = !{!10, !6, i64 1160}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN7aiSceneD2Ev(ptr nocapture noundef nonnull readonly align 8 dereferenceable(1168) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  br i1 %4, label %6, label %5

5:                                                ; preds = %1
  tail call void @_ZN6aiNodeD1Ev(ptr noundef nonnull align 8 dereferenceable(1144) %3) #4
  tail call void @_ZdlPvm(ptr noundef nonnull %3, i64 noundef 1144) #5
  br label %6

6:                                                ; preds = %5, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i32, ptr %7, align 8
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %.loopexit58, label %9

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %.not38.not = icmp eq ptr %11, null
  br i1 %.not38.not, label %.loopexit58, label %.lr.ph

.lr.ph:                                           ; preds = %9, %18
  %12 = phi i32 [ %19, %18 ], [ %8, %9 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %18 ], [ 0, %9 ]
  %13 = load ptr, ptr %10, align 8, !tbaa !12
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  %15 = load ptr, ptr %14, align 8, !tbaa !13
  %16 = icmp eq ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %.lr.ph
  tail call void @_ZN6aiMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(1320) %15) #4
  tail call void @_ZdlPvm(ptr noundef nonnull %15, i64 noundef 1320) #5
  %.pre = load i32, ptr %7, align 8, !tbaa !14
  br label %18

18:                                               ; preds = %.lr.ph, %17
  %19 = phi i32 [ %12, %.lr.ph ], [ %.pre, %17 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = zext i32 %19 to i64
  %21 = icmp ult i64 %indvars.iv.next, %20
  br i1 %21, label %.lr.ph, label %.loopexit58, !llvm.loop !15

.loopexit58:                                      ; preds = %18, %9, %6
  %22 = getelementptr inbounds i8, ptr %0, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = icmp eq ptr %23, null
  br i1 %24, label %26, label %25

25:                                               ; preds = %.loopexit58
  tail call void @_ZdaPv(ptr noundef nonnull %23) #5
  br label %26

26:                                               ; preds = %25, %.loopexit58
  %27 = getelementptr inbounds i8, ptr %0, i64 32
  %28 = load i32, ptr %27, align 8
  %.not39 = icmp eq i32 %28, 0
  br i1 %.not39, label %.loopexit56, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 40
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %.not40.not = icmp eq ptr %31, null
  br i1 %.not40.not, label %.loopexit56, label %.lr.ph61

.lr.ph61:                                         ; preds = %29, %38
  %32 = phi i32 [ %39, %38 ], [ %28, %29 ]
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %38 ], [ 0, %29 ]
  %33 = load ptr, ptr %30, align 8, !tbaa !17
  %34 = getelementptr inbounds ptr, ptr %33, i64 %indvars.iv82
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = icmp eq ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %.lr.ph61
  tail call void @_ZN10aiMaterialD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #4
  tail call void @_ZdlPvm(ptr noundef nonnull %35, i64 noundef 16) #5
  %.pre97 = load i32, ptr %27, align 8, !tbaa !18
  br label %38

38:                                               ; preds = %.lr.ph61, %37
  %39 = phi i32 [ %32, %.lr.ph61 ], [ %.pre97, %37 ]
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %40 = zext i32 %39 to i64
  %41 = icmp ult i64 %indvars.iv.next83, %40
  br i1 %41, label %.lr.ph61, label %.loopexit56, !llvm.loop !19

.loopexit56:                                      ; preds = %38, %29, %26
  %42 = getelementptr inbounds i8, ptr %0, i64 40
  %43 = load ptr, ptr %42, align 8, !tbaa !17
  %44 = icmp eq ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %.loopexit56
  tail call void @_ZdaPv(ptr noundef nonnull %43) #5
  br label %46

46:                                               ; preds = %45, %.loopexit56
  %47 = getelementptr inbounds i8, ptr %0, i64 48
  %48 = load i32, ptr %47, align 8
  %.not41 = icmp eq i32 %48, 0
  br i1 %.not41, label %.loopexit54, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds i8, ptr %0, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !20
  %.not42.not = icmp eq ptr %51, null
  br i1 %.not42.not, label %.loopexit54, label %.lr.ph63

.lr.ph63:                                         ; preds = %49, %58
  %52 = phi i32 [ %59, %58 ], [ %48, %49 ]
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %58 ], [ 0, %49 ]
  %53 = load ptr, ptr %50, align 8, !tbaa !20
  %54 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv85
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = icmp eq ptr %55, null
  br i1 %56, label %58, label %57

57:                                               ; preds = %.lr.ph63
  tail call void @_ZN11aiAnimationD2Ev(ptr noundef nonnull align 8 dereferenceable(1096) %55) #4
  tail call void @_ZdlPvm(ptr noundef nonnull %55, i64 noundef 1096) #5
  %.pre98 = load i32, ptr %47, align 8, !tbaa !21
  br label %58

58:                                               ; preds = %.lr.ph63, %57
  %59 = phi i32 [ %52, %.lr.ph63 ], [ %.pre98, %57 ]
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %60 = zext i32 %59 to i64
  %61 = icmp ult i64 %indvars.iv.next86, %60
  br i1 %61, label %.lr.ph63, label %.loopexit54, !llvm.loop !22

.loopexit54:                                      ; preds = %58, %49, %46
  %62 = getelementptr inbounds i8, ptr %0, i64 56
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = icmp eq ptr %63, null
  br i1 %64, label %66, label %65

65:                                               ; preds = %.loopexit54
  tail call void @_ZdaPv(ptr noundef nonnull %63) #5
  br label %66

66:                                               ; preds = %65, %.loopexit54
  %67 = getelementptr inbounds i8, ptr %0, i64 64
  %68 = load i32, ptr %67, align 8
  %.not43 = icmp eq i32 %68, 0
  br i1 %.not43, label %.loopexit52, label %69

69:                                               ; preds = %66
  %70 = getelementptr inbounds i8, ptr %0, i64 72
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %.not44.not = icmp eq ptr %71, null
  br i1 %.not44.not, label %.loopexit52, label %.lr.ph65

.lr.ph65:                                         ; preds = %69, %78
  %72 = phi i32 [ %79, %78 ], [ %68, %69 ]
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %78 ], [ 0, %69 ]
  %73 = load ptr, ptr %70, align 8, !tbaa !23
  %74 = getelementptr inbounds ptr, ptr %73, i64 %indvars.iv88
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = icmp eq ptr %75, null
  br i1 %76, label %78, label %77

77:                                               ; preds = %.lr.ph65
  tail call void @_ZN9aiTextureD2Ev(ptr noundef nonnull align 8 dereferenceable(1060) %75) #4
  tail call void @_ZdlPvm(ptr noundef nonnull %75, i64 noundef 1064) #5
  %.pre99 = load i32, ptr %67, align 8, !tbaa !24
  br label %78

78:                                               ; preds = %.lr.ph65, %77
  %79 = phi i32 [ %72, %.lr.ph65 ], [ %.pre99, %77 ]
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %80 = zext i32 %79 to i64
  %81 = icmp ult i64 %indvars.iv.next89, %80
  br i1 %81, label %.lr.ph65, label %.loopexit52, !llvm.loop !25

.loopexit52:                                      ; preds = %78, %69, %66
  %82 = getelementptr inbounds i8, ptr %0, i64 72
  %83 = load ptr, ptr %82, align 8, !tbaa !23
  %84 = icmp eq ptr %83, null
  br i1 %84, label %86, label %85

85:                                               ; preds = %.loopexit52
  tail call void @_ZdaPv(ptr noundef nonnull %83) #5
  br label %86

86:                                               ; preds = %85, %.loopexit52
  %87 = getelementptr inbounds i8, ptr %0, i64 80
  %88 = load i32, ptr %87, align 8
  %.not45 = icmp eq i32 %88, 0
  br i1 %.not45, label %.loopexit50, label %89

89:                                               ; preds = %86
  %90 = getelementptr inbounds i8, ptr %0, i64 88
  %91 = load ptr, ptr %90, align 8, !tbaa !26
  %.not46.not = icmp eq ptr %91, null
  br i1 %.not46.not, label %.loopexit50, label %.lr.ph67

.lr.ph67:                                         ; preds = %89, %98
  %92 = phi i32 [ %99, %98 ], [ %88, %89 ]
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %98 ], [ 0, %89 ]
  %93 = load ptr, ptr %90, align 8, !tbaa !26
  %94 = getelementptr inbounds ptr, ptr %93, i64 %indvars.iv91
  %95 = load ptr, ptr %94, align 8, !tbaa !13
  %96 = icmp eq ptr %95, null
  br i1 %96, label %98, label %97

97:                                               ; preds = %.lr.ph67
  tail call void @_ZdlPvm(ptr noundef nonnull %95, i64 noundef 1132) #5
  %.pre100 = load i32, ptr %87, align 8, !tbaa !27
  br label %98

98:                                               ; preds = %.lr.ph67, %97
  %99 = phi i32 [ %92, %.lr.ph67 ], [ %.pre100, %97 ]
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %100 = zext i32 %99 to i64
  %101 = icmp ult i64 %indvars.iv.next92, %100
  br i1 %101, label %.lr.ph67, label %.loopexit50, !llvm.loop !28

.loopexit50:                                      ; preds = %98, %89, %86
  %102 = getelementptr inbounds i8, ptr %0, i64 88
  %103 = load ptr, ptr %102, align 8, !tbaa !26
  %104 = icmp eq ptr %103, null
  br i1 %104, label %106, label %105

105:                                              ; preds = %.loopexit50
  tail call void @_ZdaPv(ptr noundef nonnull %103) #5
  br label %106

106:                                              ; preds = %105, %.loopexit50
  %107 = getelementptr inbounds i8, ptr %0, i64 96
  %108 = load i32, ptr %107, align 8
  %.not47 = icmp eq i32 %108, 0
  br i1 %.not47, label %.loopexit, label %109

109:                                              ; preds = %106
  %110 = getelementptr inbounds i8, ptr %0, i64 104
  %111 = load ptr, ptr %110, align 8, !tbaa !29
  %.not48.not = icmp eq ptr %111, null
  br i1 %.not48.not, label %.loopexit, label %.lr.ph69

.lr.ph69:                                         ; preds = %109, %118
  %112 = phi i32 [ %119, %118 ], [ %108, %109 ]
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %118 ], [ 0, %109 ]
  %113 = load ptr, ptr %110, align 8, !tbaa !29
  %114 = getelementptr inbounds ptr, ptr %113, i64 %indvars.iv94
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  %116 = icmp eq ptr %115, null
  br i1 %116, label %118, label %117

117:                                              ; preds = %.lr.ph69
  tail call void @_ZdlPvm(ptr noundef nonnull %115, i64 noundef 1084) #5
  %.pre101 = load i32, ptr %107, align 8, !tbaa !30
  br label %118

118:                                              ; preds = %.lr.ph69, %117
  %119 = phi i32 [ %112, %.lr.ph69 ], [ %.pre101, %117 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %120 = zext i32 %119 to i64
  %121 = icmp ult i64 %indvars.iv.next95, %120
  br i1 %121, label %.lr.ph69, label %.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %118, %109, %106
  %122 = getelementptr inbounds i8, ptr %0, i64 104
  %123 = load ptr, ptr %122, align 8, !tbaa !29
  %124 = icmp eq ptr %123, null
  br i1 %124, label %126, label %125

125:                                              ; preds = %.loopexit
  tail call void @_ZdaPv(ptr noundef nonnull %123) #5
  br label %126

126:                                              ; preds = %125, %.loopexit
  %127 = getelementptr inbounds i8, ptr %0, i64 112
  %128 = load ptr, ptr %127, align 8, !tbaa !32
  tail call void @_ZN10aiMetadata7DeallocEPS_(ptr noundef %128)
  %129 = getelementptr inbounds i8, ptr %0, i64 1152
  %130 = load ptr, ptr %129, align 8, !tbaa !33
  %131 = icmp eq ptr %130, null
  br i1 %131, label %133, label %132

132:                                              ; preds = %126
  tail call void @_ZdaPv(ptr noundef nonnull %130) #5
  br label %133

133:                                              ; preds = %132, %126
  %134 = getelementptr inbounds i8, ptr %0, i64 1160
  %135 = load ptr, ptr %134, align 8, !tbaa !34
  %136 = icmp eq ptr %135, null
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  tail call void @_ZdlPvm(ptr noundef nonnull %135, i64 noundef 16) #5
  br label %138

138:                                              ; preds = %137, %133
  ret void
}

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind
declare void @_ZN10aiMaterialD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10aiMetadata7DeallocEPS_(ptr noundef) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6aiNodeD1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { 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 = { 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 #4 = { nounwind }
attributes #5 = { 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, !10, i64 8}
!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, !11, i64 120, !7, i64 1148, !10, i64 1152, !10, i64 1160}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS8aiString", !7, i64 0, !8, i64 4}
!12 = !{!6, !10, i64 24}
!13 = !{!10, !10, i64 0}
!14 = !{!6, !7, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!6, !10, i64 40}
!18 = !{!6, !7, i64 32}
!19 = distinct !{!19, !16}
!20 = !{!6, !10, i64 56}
!21 = !{!6, !7, i64 48}
!22 = distinct !{!22, !16}
!23 = !{!6, !10, i64 72}
!24 = !{!6, !7, i64 64}
!25 = distinct !{!25, !16}
!26 = !{!6, !10, i64 88}
!27 = !{!6, !7, i64 80}
!28 = distinct !{!28, !16}
!29 = !{!6, !10, i64 104}
!30 = !{!6, !7, i64 96}
!31 = distinct !{!31, !16}
!32 = !{!6, !10, i64 112}
!33 = !{!6, !10, i64 1152}
!34 = !{!6, !10, i64 1160}


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