; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/dear_imgui (imgui)

; 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.ImGuiWindow = type <{ ptr, i32, i32, i32, %struct.ImGuiWindowClass, ptr, i32, %struct.ImVec2, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i16, i16, i32, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, [4 x i8], %struct.ImVector.17, %struct.ImGuiWindowTempData, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImVec2ih, %struct.ImVec2ih, i32, i32, float, float, %struct.ImGuiStorage, %struct.ImVector.23, float, float, i32, [4 x i8], ptr, %struct.ImDrawList, ptr, ptr, ptr, ptr, ptr, ptr, [2 x i32], [2 x %struct.ImRect], i8, [3 x i8], i32, i32, [4 x i8], ptr, ptr, i32, i32, %struct.ImRect, i16, i8, [5 x i8] }>
%struct.ImGuiWindowClass = type <{ i32, i32, i32, i32, i32, i32, i8, i8, [2 x i8] }>
%struct.ImVec2 = type { float, float }
%struct.ImVector.17 = type { i32, i32, ptr }
%struct.ImGuiWindowTempData = type <{ %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, %struct.ImVec1, %struct.ImVec1, %struct.ImVec1, i32, i32, %struct.ImRect, %struct.ImRect, i32, i32, i32, i32, i32, i8, i8, i8, i8, %struct.ImVec2, %struct.ImGuiMenuColumns, i32, i32, %struct.ImVector.5, ptr, ptr, i32, i32, i32, i32, i32, float, float, [4 x i8], %struct.ImVector.21, %struct.ImVector.15, %struct.ImVector.15, %struct.ImVector.22, [6 x i16], [4 x i8] }>
%struct.ImVec1 = type { float }
%struct.ImGuiMenuColumns = type { float, float, float, [3 x float], [3 x float] }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImVector.21 = type { i32, i32, ptr }
%struct.ImVector.15 = type { i32, i32, ptr }
%struct.ImVector.22 = type { i32, i32, ptr }
%struct.ImVec2ih = type { i16, i16 }
%struct.ImGuiStorage = type { %struct.ImVector.0 }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.23 = type { i32, i32, ptr }
%struct.ImDrawList = type { %struct.ImVector.24, %struct.ImVector, %struct.ImVector.25, i32, ptr, ptr, i32, ptr, ptr, %struct.ImVector.26, %struct.ImVector.27, %struct.ImVector.28, %struct.ImDrawCmd, %struct.ImDrawListSplitter }
%struct.ImVector.24 = type { i32, i32, ptr }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImVector.25 = type { i32, i32, ptr }
%struct.ImVector.26 = type { i32, i32, ptr }
%struct.ImVector.27 = type { i32, i32, ptr }
%struct.ImVector.28 = type { i32, i32, ptr }
%struct.ImDrawCmd = type { %struct.ImVec4, ptr, i32, i32, i32, ptr, ptr }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.29 }
%struct.ImVector.29 = type { i32, i32, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }

@.str.3 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [49 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui30UpdateWindowParentAndRootLinksEP11ImGuiWindowiS1_ = external hidden unnamed_addr constant [91 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5ImGui30UpdateWindowParentAndRootLinksEP11ImGuiWindowiS1_(ptr noundef %0, i32 noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.ImGuiWindow, ptr %8, i32 0, i32 80
  store ptr %7, ptr %9, align 8, !tbaa !11
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.ImGuiWindow, ptr %11, i32 0, i32 84
  store ptr %10, ptr %12, align 8, !tbaa !43
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ImGuiWindow, ptr %13, i32 0, i32 83
  store ptr %10, ptr %14, align 8, !tbaa !44
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.ImGuiWindow, ptr %15, i32 0, i32 82
  store ptr %10, ptr %16, align 8, !tbaa !45
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ImGuiWindow, ptr %17, i32 0, i32 81
  store ptr %10, ptr %18, align 8, !tbaa !46
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %53

21:                                               ; preds = %3
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = and i32 %22, 16777216
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %53

25:                                               ; preds = %21
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = and i32 %26, 33554432
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %53, label %29

29:                                               ; preds = %25
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ImGuiWindow, ptr %30, i32 0, i32 81
  %32 = load ptr, ptr %31, align 8, !tbaa !46
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ImGuiWindow, ptr %33, i32 0, i32 81
  store ptr %32, ptr %34, align 8, !tbaa !46
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ImGuiWindow, ptr %35, i32 0, i32 99
  %37 = load i8, ptr %36, align 2
  %38 = and i8 %37, 1
  %39 = trunc i8 %38 to i1
  br i1 %39, label %52, label %40

40:                                               ; preds = %29
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ImGuiWindow, ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 4, !tbaa !47
  %44 = and i32 %43, 536870912
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %52, label %46

46:                                               ; preds = %40
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ImGuiWindow, ptr %47, i32 0, i32 82
  %49 = load ptr, ptr %48, align 8, !tbaa !45
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ImGuiWindow, ptr %50, i32 0, i32 82
  store ptr %49, ptr %51, align 8, !tbaa !45
  br label %52

52:                                               ; preds = %46, %40, %29
  br label %53

53:                                               ; preds = %52, %25, %21, %3
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %70

56:                                               ; preds = %53
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = and i32 %57, 134217728
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %70, label %60

60:                                               ; preds = %56
  %61 = load i32, ptr %5, align 4, !tbaa !9
  %62 = and i32 %61, 83886080
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %70

64:                                               ; preds = %60
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ImGuiWindow, ptr %65, i32 0, i32 83
  %67 = load ptr, ptr %66, align 8, !tbaa !44
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ImGuiWindow, ptr %68, i32 0, i32 83
  store ptr %67, ptr %69, align 8, !tbaa !44
  br label %70

70:                                               ; preds = %64, %60, %56, %53
  br label %71

71:                                               ; preds = %89, %70
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ImGuiWindow, ptr %72, i32 0, i32 84
  %74 = load ptr, ptr %73, align 8, !tbaa !43
  %75 = getelementptr inbounds %struct.ImGuiWindow, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !47
  %77 = and i32 %76, 8388608
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %97

79:                                               ; preds = %71
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ImGuiWindow, ptr %80, i32 0, i32 84
  %82 = load ptr, ptr %81, align 8, !tbaa !43
  %83 = getelementptr inbounds %struct.ImGuiWindow, ptr %82, i32 0, i32 80
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %87

86:                                               ; preds = %79
  br label %89

87:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str.99, ptr noundef @.str.3, i32 noundef 5822, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui30UpdateWindowParentAndRootLinksEP11ImGuiWindowiS1_) #2
  unreachable

88:                                               ; No predecessors!
  br label %89

89:                                               ; preds = %88, %86
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ImGuiWindow, ptr %90, i32 0, i32 84
  %92 = load ptr, ptr %91, align 8, !tbaa !43
  %93 = getelementptr inbounds %struct.ImGuiWindow, ptr %92, i32 0, i32 80
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ImGuiWindow, ptr %95, i32 0, i32 84
  store ptr %94, ptr %96, align 8, !tbaa !43
  br label %71, !llvm.loop !48

97:                                               ; preds = %71
  ret void
}

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 1016}
!12 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20, !6, i64 48, !10, i64 56, !15, i64 60, !10, i64 68, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !16, i64 120, !16, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !15, i64 140, !15, i64 148, !15, i64 156, !15, i64 164, !15, i64 172, !14, i64 180, !14, i64 181, !14, i64 182, !14, i64 183, !14, i64 184, !14, i64 185, !14, i64 186, !14, i64 187, !14, i64 188, !14, i64 189, !14, i64 190, !14, i64 191, !14, i64 192, !7, i64 193, !17, i64 194, !17, i64 196, !17, i64 198, !10, i64 200, !7, i64 204, !7, i64 205, !7, i64 206, !14, i64 207, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !15, i64 236, !15, i64 244, !18, i64 256, !19, i64 272, !21, i64 600, !21, i64 616, !21, i64 632, !21, i64 648, !21, i64 664, !21, i64 680, !21, i64 696, !28, i64 712, !28, i64 716, !10, i64 720, !10, i64 724, !16, i64 728, !16, i64 732, !29, i64 736, !31, i64 752, !16, i64 768, !16, i64 772, !10, i64 776, !6, i64 784, !32, i64 792, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !6, i64 1048, !6, i64 1056, !7, i64 1064, !7, i64 1072, !14, i64 1104, !10, i64 1108, !10, i64 1112, !6, i64 1120, !6, i64 1128, !10, i64 1136, !10, i64 1140, !21, i64 1144, !17, i64 1160, !14, i64 1162, !14, i64 1162, !14, i64 1162}
!13 = !{!"_ZTS16ImGuiWindowClass", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !14, i64 24, !14, i64 25}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTS6ImVec2", !16, i64 0, !16, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!"_ZTS19ImGuiWindowTempData", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !16, i64 48, !16, i64 52, !20, i64 56, !20, i64 60, !20, i64 64, !10, i64 68, !10, i64 72, !21, i64 76, !21, i64 92, !22, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !14, i64 128, !14, i64 129, !14, i64 130, !15, i64 132, !23, i64 140, !10, i64 176, !10, i64 180, !24, i64 184, !6, i64 200, !6, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !16, i64 236, !16, i64 240, !25, i64 248, !26, i64 264, !26, i64 280, !27, i64 296, !7, i64 312}
!20 = !{!"_ZTS6ImVec1", !16, i64 0}
!21 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!22 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!23 = !{!"_ZTS16ImGuiMenuColumns", !16, i64 0, !16, i64 4, !16, i64 8, !7, i64 12, !7, i64 24}
!24 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !10, i64 0, !10, i64 4, !6, i64 8}
!25 = !{!"_ZTS8ImVectorIiE", !10, i64 0, !10, i64 4, !6, i64 8}
!26 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = !{!"_ZTS8ImVectorI14ImGuiGroupDataE", !10, i64 0, !10, i64 4, !6, i64 8}
!28 = !{!"_ZTS8ImVec2ih", !17, i64 0, !17, i64 2}
!29 = !{!"_ZTS12ImGuiStorage", !30, i64 0}
!30 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !10, i64 0, !10, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI12ImGuiColumnsE", !10, i64 0, !10, i64 4, !6, i64 8}
!32 = !{!"_ZTS10ImDrawList", !33, i64 0, !34, i64 16, !35, i64 32, !10, i64 48, !6, i64 56, !6, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !36, i64 96, !37, i64 112, !38, i64 128, !39, i64 144, !41, i64 200}
!33 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !6, i64 8}
!37 = !{!"_ZTS8ImVectorIPvE", !10, i64 0, !10, i64 4, !6, i64 8}
!38 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !6, i64 8}
!39 = !{!"_ZTS9ImDrawCmd", !40, i64 0, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40, !6, i64 48}
!40 = !{!"_ZTS6ImVec4", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!41 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !42, i64 8}
!42 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !6, i64 8}
!43 = !{!12, !6, i64 1048}
!44 = !{!12, !6, i64 1040}
!45 = !{!12, !6, i64 1032}
!46 = !{!12, !6, i64 1024}
!47 = !{!12, !10, i64 12}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}


; 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.3 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [49 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui30UpdateWindowParentAndRootLinksEP11ImGuiWindowiS1_ = external hidden unnamed_addr constant [91 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5ImGui30UpdateWindowParentAndRootLinksEP11ImGuiWindowiS1_(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 1016
  store ptr %2, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 1048
  store ptr %0, ptr %5, align 8, !tbaa !41
  %6 = getelementptr inbounds i8, ptr %0, i64 1040
  store ptr %0, ptr %6, align 8, !tbaa !42
  %7 = getelementptr inbounds i8, ptr %0, i64 1032
  store ptr %0, ptr %7, align 8, !tbaa !43
  %8 = getelementptr inbounds i8, ptr %0, i64 1024
  store ptr %0, ptr %8, align 8, !tbaa !44
  %.not = icmp ne ptr %2, null
  %9 = and i32 %1, 50331648
  %10 = icmp eq i32 %9, 16777216
  %or.cond32 = and i1 %.not, %10
  br i1 %or.cond32, label %11, label %24

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %2, i64 1024
  %13 = load ptr, ptr %12, align 8, !tbaa !44
  store ptr %13, ptr %8, align 8, !tbaa !44
  %14 = getelementptr inbounds i8, ptr %0, i64 1162
  %15 = load i8, ptr %14, align 2
  %16 = trunc i8 %15 to i1
  br i1 %16, label %24, label %17

17:                                               ; preds = %11
  %18 = getelementptr inbounds i8, ptr %2, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !45
  %20 = and i32 %19, 536870912
  %.not27 = icmp eq i32 %20, 0
  br i1 %.not27, label %21, label %24

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %2, i64 1032
  %23 = load ptr, ptr %22, align 8, !tbaa !43
  store ptr %23, ptr %7, align 8, !tbaa !43
  br label %24

24:                                               ; preds = %11, %17, %21, %3
  %25 = and i32 %1, 134217728
  %.not28 = icmp eq i32 %25, 0
  %26 = and i32 %1, 83886080
  %.not29 = icmp ne i32 %26, 0
  %27 = and i1 %.not28, %.not29
  %or.cond34.not = and i1 %.not, %27
  br i1 %or.cond34.not, label %28, label %31

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %2, i64 1040
  %30 = load ptr, ptr %29, align 8, !tbaa !42
  store ptr %30, ptr %6, align 8, !tbaa !42
  br label %31

31:                                               ; preds = %28, %24
  %32 = getelementptr inbounds i8, ptr %0, i64 12
  %33 = load i32, ptr %32, align 4, !tbaa !45
  %34 = and i32 %33, 8388608
  %.not3037 = icmp eq i32 %34, 0
  br i1 %.not3037, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %31, %39
  %35 = phi ptr [ %37, %39 ], [ %0, %31 ]
  %36 = getelementptr inbounds i8, ptr %35, i64 1016
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %.not31 = icmp eq ptr %37, null
  br i1 %.not31, label %38, label %39

38:                                               ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.3, i32 noundef 5822, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui30UpdateWindowParentAndRootLinksEP11ImGuiWindowiS1_) #2
  unreachable

39:                                               ; preds = %.lr.ph
  store ptr %37, ptr %5, align 8, !tbaa !41
  %40 = getelementptr inbounds i8, ptr %37, i64 12
  %41 = load i32, ptr %40, align 4, !tbaa !45
  %42 = and i32 %41, 8388608
  %.not30 = icmp eq i32 %42, 0
  br i1 %.not30, label %._crit_edge, label %.lr.ph, !llvm.loop !46

._crit_edge:                                      ; preds = %39, %31
  ret void
}

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 1016}
!6 = !{!"_ZTS11ImGuiWindow", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20, !7, i64 48, !10, i64 56, !13, i64 60, !10, i64 68, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !14, i64 120, !14, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !13, i64 140, !13, i64 148, !13, i64 156, !13, i64 164, !13, i64 172, !12, i64 180, !12, i64 181, !12, i64 182, !12, i64 183, !12, i64 184, !12, i64 185, !12, i64 186, !12, i64 187, !12, i64 188, !12, i64 189, !12, i64 190, !12, i64 191, !12, i64 192, !8, i64 193, !15, i64 194, !15, i64 196, !15, i64 198, !10, i64 200, !8, i64 204, !8, i64 205, !8, i64 206, !12, i64 207, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !13, i64 236, !13, i64 244, !16, i64 256, !17, i64 272, !19, i64 600, !19, i64 616, !19, i64 632, !19, i64 648, !19, i64 664, !19, i64 680, !19, i64 696, !26, i64 712, !26, i64 716, !10, i64 720, !10, i64 724, !14, i64 728, !14, i64 732, !27, i64 736, !29, i64 752, !14, i64 768, !14, i64 772, !10, i64 776, !7, i64 784, !30, i64 792, !7, i64 1016, !7, i64 1024, !7, i64 1032, !7, i64 1040, !7, i64 1048, !7, i64 1056, !8, i64 1064, !8, i64 1072, !12, i64 1104, !10, i64 1108, !10, i64 1112, !7, i64 1120, !7, i64 1128, !10, i64 1136, !10, i64 1140, !19, i64 1144, !15, i64 1160, !12, i64 1162, !12, i64 1162, !12, i64 1162}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS16ImGuiWindowClass", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !12, i64 24, !12, i64 25}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!14 = !{!"float", !8, i64 0}
!15 = !{!"short", !8, i64 0}
!16 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !7, i64 8}
!17 = !{!"_ZTS19ImGuiWindowTempData", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !14, i64 48, !14, i64 52, !18, i64 56, !18, i64 60, !18, i64 64, !10, i64 68, !10, i64 72, !19, i64 76, !19, i64 92, !20, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !12, i64 128, !12, i64 129, !12, i64 130, !13, i64 132, !21, i64 140, !10, i64 176, !10, i64 180, !22, i64 184, !7, i64 200, !7, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !14, i64 236, !14, i64 240, !23, i64 248, !24, i64 264, !24, i64 280, !25, i64 296, !8, i64 312}
!18 = !{!"_ZTS6ImVec1", !14, i64 0}
!19 = !{!"_ZTS6ImRect", !13, i64 0, !13, i64 8}
!20 = !{!"_ZTS13ImGuiNavLayer", !8, i64 0}
!21 = !{!"_ZTS16ImGuiMenuColumns", !14, i64 0, !14, i64 4, !14, i64 8, !8, i64 12, !8, i64 24}
!22 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !10, i64 0, !10, i64 4, !7, i64 8}
!23 = !{!"_ZTS8ImVectorIiE", !10, i64 0, !10, i64 4, !7, i64 8}
!24 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !7, i64 8}
!25 = !{!"_ZTS8ImVectorI14ImGuiGroupDataE", !10, i64 0, !10, i64 4, !7, i64 8}
!26 = !{!"_ZTS8ImVec2ih", !15, i64 0, !15, i64 2}
!27 = !{!"_ZTS12ImGuiStorage", !28, i64 0}
!28 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !10, i64 0, !10, i64 4, !7, i64 8}
!29 = !{!"_ZTS8ImVectorI12ImGuiColumnsE", !10, i64 0, !10, i64 4, !7, i64 8}
!30 = !{!"_ZTS10ImDrawList", !31, i64 0, !32, i64 16, !33, i64 32, !10, i64 48, !7, i64 56, !7, i64 64, !10, i64 72, !7, i64 80, !7, i64 88, !34, i64 96, !35, i64 112, !36, i64 128, !37, i64 144, !39, i64 200}
!31 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !7, i64 8}
!32 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !7, i64 8}
!33 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !7, i64 8}
!34 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !7, i64 8}
!35 = !{!"_ZTS8ImVectorIPvE", !10, i64 0, !10, i64 4, !7, i64 8}
!36 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !7, i64 8}
!37 = !{!"_ZTS9ImDrawCmd", !38, i64 0, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 40, !7, i64 48}
!38 = !{!"_ZTS6ImVec4", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!39 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !40, i64 8}
!40 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !7, i64 8}
!41 = !{!6, !7, i64 1048}
!42 = !{!6, !7, i64 1040}
!43 = !{!6, !7, i64 1032}
!44 = !{!6, !7, i64 1024}
!45 = !{!6, !10, i64 12}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass