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

; 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 }
%struct.ImGuiDockNode = type <{ i32, i32, i32, [4 x i8], ptr, [2 x ptr], %struct.ImVector.5, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i32, %struct.ImGuiWindowClass, i32, [4 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i16, i8, [5 x i8] }>

@GImGui = external dso_local global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.194 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui13SetWindowDockEP11ImGuiWindowji = external hidden unnamed_addr constant [61 x i8], align 1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5ImGui19DockNodeGetRootNodeEP13ImGuiDockNode(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui13SetWindowDockEP11ImGuiWindowji(ptr noundef %0, i32 noundef %1, i32 noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %10 = load i32, ptr %6, align 4, !tbaa !9
  %11 = icmp ne i32 %10, 0
  br i1 %11, label %12, label %20

12:                                               ; preds = %3
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ImGuiWindow, ptr %13, i32 0, i32 53
  %15 = load i32, ptr %14, align 8, !tbaa !11
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = and i32 %15, %16
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %12
  br label %91

20:                                               ; preds = %12, %3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ImGuiWindow, ptr %21, i32 0, i32 53
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = and i32 %23, -15
  store i32 %24, ptr %22, align 8, !tbaa !11
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.ImGuiWindow, ptr %25, i32 0, i32 95
  %27 = load i32, ptr %26, align 8, !tbaa !43
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = icmp eq i32 %27, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %20
  br label %91

31:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %32 = load ptr, ptr @GImGui, align 8, !tbaa !5
  store ptr %32, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = call noundef ptr @_ZN5ImGuiL23DockContextFindNodeByIDEP12ImGuiContextj(ptr noundef %33, i32 noundef %34)
  store ptr %35, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %68

38:                                               ; preds = %31
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZNK13ImGuiDockNode11IsSplitNodeEv(ptr noundef nonnull align 8 dereferenceable(187) %39)
  br i1 %40, label %41, label %67

41:                                               ; preds = %38
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = call noundef ptr @_ZN5ImGui19DockNodeGetRootNodeEP13ImGuiDockNode(ptr noundef %42)
  store ptr %43, ptr %8, align 8, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImGuiDockNode, ptr %44, i32 0, i32 17
  %46 = load ptr, ptr %45, align 8, !tbaa !44
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %62

48:                                               ; preds = %41
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ImGuiDockNode, ptr %49, i32 0, i32 17
  %51 = load ptr, ptr %50, align 8, !tbaa !44
  %52 = call noundef zeroext i1 @_ZNK13ImGuiDockNode13IsCentralNodeEv(ptr noundef nonnull align 8 dereferenceable(187) %51)
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  br label %56

54:                                               ; preds = %48
  call void @__assert_fail(ptr noundef @.str.194, ptr noundef @.str.3, i32 noundef 14106, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui13SetWindowDockEP11ImGuiWindowji) #6
  unreachable

55:                                               ; No predecessors!
  br label %56

56:                                               ; preds = %55, %53
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ImGuiDockNode, ptr %57, i32 0, i32 17
  %59 = load ptr, ptr %58, align 8, !tbaa !44
  %60 = getelementptr inbounds %struct.ImGuiDockNode, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !48
  store i32 %61, ptr %5, align 4, !tbaa !9
  br label %66

62:                                               ; preds = %41
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ImGuiDockNode, ptr %63, i32 0, i32 22
  %65 = load i32, ptr %64, align 4, !tbaa !49
  store i32 %65, ptr %5, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %62, %56
  br label %67

67:                                               ; preds = %66, %38
  br label %68

68:                                               ; preds = %67, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.ImGuiWindow, ptr %69, i32 0, i32 95
  %71 = load i32, ptr %70, align 8, !tbaa !43
  %72 = load i32, ptr %5, align 4, !tbaa !9
  %73 = icmp eq i32 %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %68
  store i32 1, ptr %9, align 4
  br label %89

75:                                               ; preds = %68
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGuiWindow, ptr %76, i32 0, i32 93
  %78 = load ptr, ptr %77, align 8, !tbaa !50
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %85

80:                                               ; preds = %75
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ImGuiWindow, ptr %81, i32 0, i32 93
  %83 = load ptr, ptr %82, align 8, !tbaa !50
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN5ImGuiL20DockNodeRemoveWindowEP13ImGuiDockNodeP11ImGuiWindowj(ptr noundef %83, ptr noundef %84, i32 noundef 0)
  br label %85

85:                                               ; preds = %80, %75
  %86 = load i32, ptr %5, align 4, !tbaa !9
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.ImGuiWindow, ptr %87, i32 0, i32 95
  store i32 %86, ptr %88, align 8, !tbaa !43
  store i32 0, ptr %9, align 4
  br label %89

89:                                               ; preds = %85, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %90 = load i32, ptr %9, align 4
  switch i32 %90, label %92 [
    i32 0, label %91
    i32 1, label %91
  ]

91:                                               ; preds = %89, %89, %30, %19
  ret void

92:                                               ; preds = %89
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN5ImGuiL23DockContextFindNodeByIDEP12ImGuiContextj(ptr noundef, i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5ImGuiL20DockNodeRemoveWindowEP13ImGuiDockNodeP11ImGuiWindowj(ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = { 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 = { nounwind }
attributes #6 = { 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, !10, i64 232}
!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, !10, i64 1136}
!44 = !{!45, !6, i64 144}
!45 = !{!"_ZTS13ImGuiDockNode", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !7, i64 24, !24, i64 40, !6, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !46, i64 88, !13, i64 92, !47, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 184, !10, i64 184, !14, i64 185, !14, i64 185, !14, i64 185, !14, i64 185, !14, i64 185, !14, i64 185, !14, i64 185, !14, i64 186, !14, i64 186, !14, i64 186, !14, i64 186}
!46 = !{!"_ZTS9ImGuiAxis", !7, i64 0}
!47 = !{!"_ZTS18ImGuiDockNodeState", !7, i64 0}
!48 = !{!45, !10, i64 0}
!49 = !{!45, !10, i64 172}
!50 = !{!12, !6, i64 1120}


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

@GImGui = external dso_local local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.194 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui13SetWindowDockEP11ImGuiWindowji = external hidden unnamed_addr constant [61 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5ImGui19DockNodeGetRootNodeEP13ImGuiDockNode(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui13SetWindowDockEP11ImGuiWindowji(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %.not = icmp ne i32 %2, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 232
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !5
  %4 = and i32 %.pre, %2
  %5 = icmp eq i32 %4, 0
  %or.cond = select i1 %.not, i1 %5, i1 false
  br i1 %or.cond, label %37, label %._crit_edge

._crit_edge:                                      ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 232
  %7 = and i32 %.pre, -15
  store i32 %7, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 1136
  %9 = load i32, ptr %8, align 8, !tbaa !41
  %10 = icmp eq i32 %9, %1
  br i1 %10, label %37, label %11

11:                                               ; preds = %._crit_edge
  %12 = load ptr, ptr @GImGui, align 8, !tbaa !42
  %13 = tail call noundef ptr @_ZN5ImGuiL23DockContextFindNodeByIDEP12ImGuiContextj(ptr noundef %12, i32 noundef %1)
  %.not26 = icmp eq ptr %13, null
  br i1 %.not26, label %29, label %14

14:                                               ; preds = %11
  %15 = tail call noundef zeroext i1 @_ZNK13ImGuiDockNode11IsSplitNodeEv(ptr noundef nonnull align 8 dereferenceable(187) %13)
  br i1 %15, label %16, label %29

16:                                               ; preds = %14
  %17 = tail call noundef ptr @_ZN5ImGui19DockNodeGetRootNodeEP13ImGuiDockNode(ptr noundef nonnull %13)
  %18 = getelementptr inbounds i8, ptr %17, i64 144
  %19 = load ptr, ptr %18, align 8, !tbaa !43
  %.not27 = icmp eq ptr %19, null
  br i1 %.not27, label %26, label %20

20:                                               ; preds = %16
  %21 = tail call noundef zeroext i1 @_ZNK13ImGuiDockNode13IsCentralNodeEv(ptr noundef nonnull align 8 dereferenceable(187) %19)
  br i1 %21, label %23, label %22

22:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.194, ptr noundef nonnull @.str.3, i32 noundef 14106, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui13SetWindowDockEP11ImGuiWindowji) #4
  unreachable

23:                                               ; preds = %20
  %24 = load ptr, ptr %18, align 8, !tbaa !43
  %25 = load i32, ptr %24, align 8, !tbaa !47
  br label %29

26:                                               ; preds = %16
  %27 = getelementptr inbounds i8, ptr %17, i64 172
  %28 = load i32, ptr %27, align 4, !tbaa !48
  br label %29

29:                                               ; preds = %14, %26, %23, %11
  %.0 = phi i32 [ %25, %23 ], [ %28, %26 ], [ %1, %14 ], [ %1, %11 ]
  %30 = load i32, ptr %8, align 8, !tbaa !41
  %31 = icmp eq i32 %30, %.0
  br i1 %31, label %37, label %32

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %0, i64 1120
  %34 = load ptr, ptr %33, align 8, !tbaa !49
  %.not28 = icmp eq ptr %34, null
  br i1 %.not28, label %36, label %35

35:                                               ; preds = %32
  tail call void @_ZN5ImGuiL20DockNodeRemoveWindowEP13ImGuiDockNodeP11ImGuiWindowj(ptr noundef nonnull %34, ptr noundef nonnull %0, i32 noundef 0)
  br label %36

36:                                               ; preds = %35, %32
  store i32 %.0, ptr %8, align 8, !tbaa !41
  br label %37

37:                                               ; preds = %3, %36, %29, %._crit_edge
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK13ImGuiDockNode11IsSplitNodeEv(ptr noundef nonnull align 8 dereferenceable(187)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN5ImGuiL23DockContextFindNodeByIDEP12ImGuiContextj(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK13ImGuiDockNode13IsCentralNodeEv(ptr noundef nonnull align 8 dereferenceable(187)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5ImGuiL20DockNodeRemoveWindowEP13ImGuiDockNodeP11ImGuiWindowj(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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 = { 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 #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 = { 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 = { 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, !10, i64 232}
!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, !10, i64 1136}
!42 = !{!7, !7, i64 0}
!43 = !{!44, !7, i64 144}
!44 = !{!"_ZTS13ImGuiDockNode", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !8, i64 24, !22, i64 40, !7, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !45, i64 88, !11, i64 92, !46, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 184, !10, i64 184, !12, i64 185, !12, i64 185, !12, i64 185, !12, i64 185, !12, i64 185, !12, i64 185, !12, i64 185, !12, i64 186, !12, i64 186, !12, i64 186, !12, i64 186}
!45 = !{!"_ZTS9ImGuiAxis", !8, i64 0}
!46 = !{!"_ZTS18ImGuiDockNodeState", !8, i64 0}
!47 = !{!44, !10, i64 0}
!48 = !{!44, !10, i64 172}
!49 = !{!6, !7, i64 1120}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass