; LLVM IR from erwincoumans/tiny-differentiable-simulator :: examples/opengl_imgui_test.ll (Z11MyDockSpacev)

; 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.ImVec2 = type { float, float }
%struct.ImGuiViewport = type <{ i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, [4 x i8], ptr, i32, [4 x i8], ptr, ptr, ptr, ptr, i8, i8, i8, [5 x i8] }>
%struct.ImGuiIO = type { i32, i32, %struct.ImVec2, float, float, ptr, ptr, float, float, float, [22 x i32], float, float, ptr, ptr, float, i8, ptr, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], float, float, i32, i8, i8, i8, i8, [512 x i8], [21 x float], i8, i8, i8, i8, i8, i8, i8, float, i32, i32, i32, i32, i32, %struct.ImVec2, i32, %struct.ImVec2, [5 x %struct.ImVec2], [5 x double], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x i8], [5 x float], [5 x float], [5 x %struct.ImVec2], [5 x float], [512 x float], [512 x float], [21 x float], [21 x float], float, i16, %struct.ImVector }
%struct.ImVector = type { i32, i32, ptr }

@_ZZ11MyDockSpacevE14opt_fullscreen = external hidden global i8, align 1
@_ZZ11MyDockSpacevE11opt_padding = external hidden global i8, align 1
@_ZZ11MyDockSpacevE15dockspace_flags = external hidden global i32, align 4
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1

declare noundef nonnull align 8 dereferenceable(5464) ptr @_ZN5ImGui5GetIOEv() #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11MyDockSpacev() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %struct.ImVec2, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %struct.ImVec2, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #4
  store i8 1, ptr %2, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 2098176, ptr %3, align 4, !tbaa !5
  %11 = load i8, ptr @_ZZ11MyDockSpacevE14opt_fullscreen, align 1, !tbaa !9, !range !11, !noundef !12
  %12 = trunc i8 %11 to i1
  br i1 %12, label %13, label %28

13:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %14 = call noundef ptr @_ZN5ImGui15GetMainViewportEv()
  store ptr %14, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !13
  %16 = call <2 x float> @_ZN13ImGuiViewport10GetWorkPosEv(ptr noundef nonnull align 8 dereferenceable(99) %15)
  store <2 x float> %16, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_(ptr noundef nonnull align 4 dereferenceable(8) %5, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %17 = load ptr, ptr %4, align 8, !tbaa !13
  %18 = call <2 x float> @_ZN13ImGuiViewport11GetWorkSizeEv(ptr noundef nonnull align 8 dereferenceable(99) %17)
  store <2 x float> %18, ptr %7, align 4
  call void @_ZN5ImGui17SetNextWindowSizeERK6ImVec2i(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %19 = load ptr, ptr %4, align 8, !tbaa !13
  %20 = getelementptr inbounds %struct.ImGuiViewport, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !15
  call void @_ZN5ImGui21SetNextWindowViewportEj(i32 noundef %21)
  call void @_ZN5ImGui12PushStyleVarEif(i32 noundef 2, float noundef 0.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEif(i32 noundef 3, float noundef 0.000000e+00)
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = or i32 %22, 39
  store i32 %23, ptr %3, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = or i32 %24, 532480
  store i32 %25, ptr %3, align 4, !tbaa !5
  %26 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %27 = or i32 %26, 8
  store i32 %27, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %31

28:                                               ; preds = %0
  %29 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %30 = and i32 %29, -9
  store i32 %30, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %28, %13
  %32 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %33 = and i32 %32, 8
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %38

35:                                               ; preds = %31
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = or i32 %36, 128
  store i32 %37, ptr %3, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %35, %31
  %39 = load i8, ptr @_ZZ11MyDockSpacevE11opt_padding, align 1, !tbaa !9, !range !11, !noundef !12
  %40 = trunc i8 %39 to i1
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %42

42:                                               ; preds = %41, %38
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef @.str.9, ptr noundef %2, i32 noundef %43)
  %45 = load i8, ptr @_ZZ11MyDockSpacevE11opt_padding, align 1, !tbaa !9, !range !11, !noundef !12
  %46 = trunc i8 %45 to i1
  br i1 %46, label %48, label %47

47:                                               ; preds = %42
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 1)
  br label %48

48:                                               ; preds = %47, %42
  %49 = load i8, ptr @_ZZ11MyDockSpacevE14opt_fullscreen, align 1, !tbaa !9, !range !11, !noundef !12
  %50 = trunc i8 %49 to i1
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 2)
  br label %52

52:                                               ; preds = %51, %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %53 = call noundef nonnull align 8 dereferenceable(5464) ptr @_ZN5ImGui5GetIOEv()
  store ptr %53, ptr %9, align 8, !tbaa !13
  %54 = load ptr, ptr %9, align 8, !tbaa !13
  %55 = getelementptr inbounds %struct.ImGuiIO, ptr %54, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !19
  %57 = and i32 %56, 64
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %63

59:                                               ; preds = %52
  %60 = call noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef @.str.10)
  store i32 %60, ptr %1, align 4, !tbaa !5
  %61 = load i32, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %62 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  call void @_ZN5ImGui9DockSpaceEjRK6ImVec2iPK16ImGuiWindowClass(i32 noundef %61, ptr noundef nonnull align 4 dereferenceable(8) %10, i32 noundef %62, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %63

63:                                               ; preds = %59, %52
  %64 = call noundef zeroext i1 @_ZN5ImGui12BeginMenuBarEv()
  br i1 %64, label %65, label %120

65:                                               ; preds = %63
  %66 = call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef @.str.11, i1 noundef zeroext true)
  br i1 %66, label %67, label %119

67:                                               ; preds = %65
  %68 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_Pbb(ptr noundef @.str.12, ptr noundef null, ptr noundef @_ZZ11MyDockSpacevE14opt_fullscreen, i1 noundef zeroext true)
  %69 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_Pbb(ptr noundef @.str.13, ptr noundef null, ptr noundef @_ZZ11MyDockSpacevE11opt_padding, i1 noundef zeroext true)
  call void @_ZN5ImGui9SeparatorEv()
  %70 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %71 = and i32 %70, 16
  %72 = icmp ne i32 %71, 0
  %73 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.14, ptr noundef @.str.15, i1 noundef zeroext %72, i1 noundef zeroext true)
  br i1 %73, label %74, label %77

74:                                               ; preds = %67
  %75 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %76 = xor i32 %75, 16
  store i32 %76, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %74, %67
  %78 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %79 = and i32 %78, 32
  %80 = icmp ne i32 %79, 0
  %81 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.16, ptr noundef @.str.15, i1 noundef zeroext %80, i1 noundef zeroext true)
  br i1 %81, label %82, label %85

82:                                               ; preds = %77
  %83 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %84 = xor i32 %83, 32
  store i32 %84, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %82, %77
  %86 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %87 = and i32 %86, 4
  %88 = icmp ne i32 %87, 0
  %89 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.17, ptr noundef @.str.15, i1 noundef zeroext %88, i1 noundef zeroext true)
  br i1 %89, label %90, label %93

90:                                               ; preds = %85
  %91 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %92 = xor i32 %91, 4
  store i32 %92, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %90, %85
  %94 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %95 = and i32 %94, 64
  %96 = icmp ne i32 %95, 0
  %97 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.18, ptr noundef @.str.15, i1 noundef zeroext %96, i1 noundef zeroext true)
  br i1 %97, label %98, label %101

98:                                               ; preds = %93
  %99 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %100 = xor i32 %99, 64
  store i32 %100, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %98, %93
  %102 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %103 = and i32 %102, 8
  %104 = icmp ne i32 %103, 0
  %105 = load i8, ptr @_ZZ11MyDockSpacevE14opt_fullscreen, align 1, !tbaa !9, !range !11, !noundef !12
  %106 = trunc i8 %105 to i1
  %107 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.19, ptr noundef @.str.15, i1 noundef zeroext %104, i1 noundef zeroext %106)
  br i1 %107, label %108, label %111

108:                                              ; preds = %101
  %109 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  %110 = xor i32 %109, 8
  store i32 %110, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %108, %101
  call void @_ZN5ImGui9SeparatorEv()
  %112 = load i8, ptr %2, align 1, !tbaa !9, !range !11, !noundef !12
  %113 = trunc i8 %112 to i1
  %114 = zext i1 %113 to i64
  %115 = icmp ne i64 %114, 0
  %116 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.20, ptr noundef null, i1 noundef zeroext false, i1 noundef zeroext %115)
  br i1 %116, label %117, label %118

117:                                              ; preds = %111
  store i8 0, ptr %2, align 1, !tbaa !9
  br label %118

118:                                              ; preds = %117, %111
  call void @_ZN5ImGui7EndMenuEv()
  br label %119

119:                                              ; preds = %118, %65
  call void @_ZN5ImGui10EndMenuBarEv()
  br label %120

120:                                              ; preds = %119, %63
  call void @_ZN5ImGui3EndEv()
  %121 = load i32, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret i32 %121
}

declare noundef ptr @_ZN5ImGui15GetMainViewportEv() #0

declare void @_ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN13ImGuiViewport10GetWorkPosEv(ptr noundef nonnull align 8 dereferenceable(99)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

declare void @_ZN5ImGui17SetNextWindowSizeERK6ImVec2i(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN13ImGuiViewport11GetWorkSizeEv(ptr noundef nonnull align 8 dereferenceable(99)) #2 align 2

declare void @_ZN5ImGui21SetNextWindowViewportEj(i32 noundef) #0

declare void @_ZN5ImGui12PushStyleVarEif(i32 noundef, float noundef) #0

declare void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) #0

declare noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef, ptr noundef, i32 noundef) #0

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) #0

declare noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef) #0

declare void @_ZN5ImGui9DockSpaceEjRK6ImVec2iPK16ImGuiWindowClass(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef) #0

declare noundef zeroext i1 @_ZN5ImGui12BeginMenuBarEv() #0

declare noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef, i1 noundef zeroext) #0

declare noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_Pbb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #0

declare void @_ZN5ImGui9SeparatorEv() #0

declare noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext) #0

declare void @_ZN5ImGui7EndMenuEv() #0

declare void @_ZN5ImGui10EndMenuBarEv() #0

declare void @_ZN5ImGui3EndEv() #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTS13ImGuiViewport", !6, i64 0, !6, i64 4, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !18, i64 40, !14, i64 48, !6, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !10, i64 96, !10, i64 97, !10, i64 98}
!17 = !{!"_ZTS6ImVec2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"_ZTS7ImGuiIO", !6, i64 0, !6, i64 4, !17, i64 8, !18, i64 16, !18, i64 20, !14, i64 24, !14, i64 32, !18, i64 40, !18, i64 44, !18, i64 48, !7, i64 52, !18, i64 140, !18, i64 144, !14, i64 152, !14, i64 160, !18, i64 168, !10, i64 172, !14, i64 176, !17, i64 184, !10, i64 192, !10, i64 193, !10, i64 194, !10, i64 195, !10, i64 196, !10, i64 197, !10, i64 198, !10, i64 199, !10, i64 200, !10, i64 201, !10, i64 202, !10, i64 203, !10, i64 204, !18, i64 208, !14, i64 216, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !14, i64 264, !14, i64 272, !14, i64 280, !17, i64 288, !7, i64 296, !18, i64 304, !18, i64 308, !6, i64 312, !10, i64 316, !10, i64 317, !10, i64 318, !10, i64 319, !7, i64 320, !7, i64 832, !10, i64 916, !10, i64 917, !10, i64 918, !10, i64 919, !10, i64 920, !10, i64 921, !10, i64 922, !18, i64 924, !6, i64 928, !6, i64 932, !6, i64 936, !6, i64 940, !6, i64 944, !17, i64 948, !6, i64 956, !17, i64 960, !7, i64 968, !7, i64 1008, !7, i64 1048, !7, i64 1053, !7, i64 1058, !7, i64 1063, !7, i64 1068, !7, i64 1076, !7, i64 1096, !7, i64 1116, !7, i64 1156, !7, i64 1176, !7, i64 3224, !7, i64 5272, !7, i64 5356, !18, i64 5440, !21, i64 5444, !22, i64 5448}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTS8ImVectorItE", !6, i64 0, !6, i64 4, !14, i64 8}


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

%struct.ImVec2 = type { float, float }

@_ZZ11MyDockSpacevE14opt_fullscreen = external hidden global i8, align 1
@_ZZ11MyDockSpacevE11opt_padding = external hidden global i8, align 1
@_ZZ11MyDockSpacevE15dockspace_flags = external hidden local_unnamed_addr global i32, align 4
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1

declare noundef nonnull align 8 dereferenceable(5464) ptr @_ZN5ImGui5GetIOEv() local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11MyDockSpacev() local_unnamed_addr #2 {
  %1 = alloca i8, align 1
  %2 = alloca %struct.ImVec2, align 8
  %3 = alloca %struct.ImVec2, align 4
  %4 = alloca %struct.ImVec2, align 8
  %5 = alloca %struct.ImVec2, align 4
  %6 = alloca %struct.ImVec2, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #4
  store i8 1, ptr %1, align 1, !tbaa !5
  %7 = load i8, ptr @_ZZ11MyDockSpacevE14opt_fullscreen, align 1, !tbaa !5, !range !9, !noundef !10
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %9, label %16

9:                                                ; preds = %0
  %10 = tail call noundef ptr @_ZN5ImGui15GetMainViewportEv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %11 = tail call <2 x float> @_ZN13ImGuiViewport10GetWorkPosEv(ptr noundef nonnull align 8 dereferenceable(99) %10)
  store <2 x float> %11, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_(ptr noundef nonnull align 4 dereferenceable(8) %2, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %12 = call <2 x float> @_ZN13ImGuiViewport11GetWorkSizeEv(ptr noundef nonnull align 8 dereferenceable(99) %10)
  store <2 x float> %12, ptr %4, align 8
  call void @_ZN5ImGui17SetNextWindowSizeERK6ImVec2i(ptr noundef nonnull align 4 dereferenceable(8) %4, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %13 = load i32, ptr %10, align 8, !tbaa !11
  call void @_ZN5ImGui21SetNextWindowViewportEj(i32 noundef %13)
  call void @_ZN5ImGui12PushStyleVarEif(i32 noundef 2, float noundef 0.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEif(i32 noundef 3, float noundef 0.000000e+00)
  %14 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  %15 = or i32 %14, 8
  br label %19

16:                                               ; preds = %0
  %17 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  %18 = and i32 %17, -9
  br label %19

19:                                               ; preds = %16, %9
  %storemerge = phi i32 [ %18, %16 ], [ %15, %9 ]
  %.09 = phi i32 [ 2098176, %16 ], [ 2630695, %9 ]
  store i32 %storemerge, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  %20 = shl i32 %storemerge, 4
  %21 = and i32 %20, 128
  %spec.select = or disjoint i32 %21, %.09
  %22 = load i8, ptr @_ZZ11MyDockSpacevE11opt_padding, align 1, !tbaa !5, !range !9, !noundef !10
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %25, label %24

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef 1, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %25

25:                                               ; preds = %24, %19
  %26 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef nonnull @.str.9, ptr noundef nonnull %1, i32 noundef %spec.select)
  %27 = load i8, ptr @_ZZ11MyDockSpacevE11opt_padding, align 1, !tbaa !5, !range !9, !noundef !10
  %28 = trunc nuw i8 %27 to i1
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 1)
  br label %30

30:                                               ; preds = %29, %25
  %31 = load i8, ptr @_ZZ11MyDockSpacevE14opt_fullscreen, align 1, !tbaa !5, !range !9, !noundef !10
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 2)
  br label %34

34:                                               ; preds = %33, %30
  %35 = call noundef nonnull align 8 dereferenceable(5464) ptr @_ZN5ImGui5GetIOEv()
  %36 = load i32, ptr %35, align 8, !tbaa !18
  %37 = and i32 %36, 64
  %.not10 = icmp eq i32 %37, 0
  br i1 %.not10, label %41, label %38

38:                                               ; preds = %34
  %39 = call noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef nonnull @.str.10)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %40 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  call void @_ZN5ImGui9DockSpaceEjRK6ImVec2iPK16ImGuiWindowClass(i32 noundef %39, ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef %40, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %41

41:                                               ; preds = %38, %34
  %.0 = phi i32 [ %39, %38 ], [ 0, %34 ]
  %42 = call noundef zeroext i1 @_ZN5ImGui12BeginMenuBarEv()
  br i1 %42, label %43, label %92

43:                                               ; preds = %41
  %44 = call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef nonnull @.str.11, i1 noundef zeroext true)
  br i1 %44, label %45, label %91

45:                                               ; preds = %43
  %46 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_Pbb(ptr noundef nonnull @.str.12, ptr noundef null, ptr noundef nonnull @_ZZ11MyDockSpacevE14opt_fullscreen, i1 noundef zeroext true)
  %47 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_Pbb(ptr noundef nonnull @.str.13, ptr noundef null, ptr noundef nonnull @_ZZ11MyDockSpacevE11opt_padding, i1 noundef zeroext true)
  call void @_ZN5ImGui9SeparatorEv()
  %48 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  %49 = and i32 %48, 16
  %50 = icmp ne i32 %49, 0
  %51 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.15, i1 noundef zeroext %50, i1 noundef zeroext true)
  %.pre = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br i1 %51, label %52, label %54

52:                                               ; preds = %45
  %53 = xor i32 %.pre, 16
  store i32 %53, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br label %54

54:                                               ; preds = %52, %45
  %55 = phi i32 [ %53, %52 ], [ %.pre, %45 ]
  %56 = and i32 %55, 32
  %57 = icmp ne i32 %56, 0
  %58 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.15, i1 noundef zeroext %57, i1 noundef zeroext true)
  %.pre11 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br i1 %58, label %59, label %61

59:                                               ; preds = %54
  %60 = xor i32 %.pre11, 32
  store i32 %60, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br label %61

61:                                               ; preds = %59, %54
  %62 = phi i32 [ %60, %59 ], [ %.pre11, %54 ]
  %63 = and i32 %62, 4
  %64 = icmp ne i32 %63, 0
  %65 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.15, i1 noundef zeroext %64, i1 noundef zeroext true)
  %.pre12 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br i1 %65, label %66, label %68

66:                                               ; preds = %61
  %67 = xor i32 %.pre12, 4
  store i32 %67, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br label %68

68:                                               ; preds = %66, %61
  %69 = phi i32 [ %67, %66 ], [ %.pre12, %61 ]
  %70 = and i32 %69, 64
  %71 = icmp ne i32 %70, 0
  %72 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.15, i1 noundef zeroext %71, i1 noundef zeroext true)
  %.pre13 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br i1 %72, label %73, label %75

73:                                               ; preds = %68
  %74 = xor i32 %.pre13, 64
  store i32 %74, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br label %75

75:                                               ; preds = %73, %68
  %76 = phi i32 [ %74, %73 ], [ %.pre13, %68 ]
  %77 = and i32 %76, 8
  %78 = icmp ne i32 %77, 0
  %79 = load i8, ptr @_ZZ11MyDockSpacevE14opt_fullscreen, align 1, !tbaa !5, !range !9, !noundef !10
  %80 = trunc nuw i8 %79 to i1
  %81 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.15, i1 noundef zeroext %78, i1 noundef zeroext %80)
  br i1 %81, label %82, label %85

82:                                               ; preds = %75
  %83 = load i32, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  %84 = xor i32 %83, 8
  store i32 %84, ptr @_ZZ11MyDockSpacevE15dockspace_flags, align 4, !tbaa !17
  br label %85

85:                                               ; preds = %82, %75
  call void @_ZN5ImGui9SeparatorEv()
  %86 = load i8, ptr %1, align 1, !tbaa !5, !range !9, !noundef !10
  %87 = trunc nuw i8 %86 to i1
  %88 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.20, ptr noundef null, i1 noundef zeroext false, i1 noundef zeroext %87)
  br i1 %88, label %89, label %90

89:                                               ; preds = %85
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %90

90:                                               ; preds = %89, %85
  call void @_ZN5ImGui7EndMenuEv()
  br label %91

91:                                               ; preds = %90, %43
  call void @_ZN5ImGui10EndMenuBarEv()
  br label %92

92:                                               ; preds = %91, %41
  call void @_ZN5ImGui3EndEv()
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #4
  ret i32 %.0
}

declare noundef ptr @_ZN5ImGui15GetMainViewportEv() local_unnamed_addr #0

declare void @_ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN13ImGuiViewport10GetWorkPosEv(ptr noundef nonnull align 8 dereferenceable(99)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

declare void @_ZN5ImGui17SetNextWindowSizeERK6ImVec2i(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN13ImGuiViewport11GetWorkSizeEv(ptr noundef nonnull align 8 dereferenceable(99)) local_unnamed_addr #2 align 2

declare void @_ZN5ImGui21SetNextWindowViewportEj(i32 noundef) local_unnamed_addr #0

declare void @_ZN5ImGui12PushStyleVarEif(i32 noundef, float noundef) local_unnamed_addr #0

declare void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) local_unnamed_addr #0

declare noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef) local_unnamed_addr #0

declare void @_ZN5ImGui9DockSpaceEjRK6ImVec2iPK16ImGuiWindowClass(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN5ImGui12BeginMenuBarEv() local_unnamed_addr #0

declare noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_Pbb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

declare void @_ZN5ImGui9SeparatorEv() local_unnamed_addr #0

declare noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #0

declare void @_ZN5ImGui7EndMenuEv() local_unnamed_addr #0

declare void @_ZN5ImGui10EndMenuBarEv() local_unnamed_addr #0

declare void @_ZN5ImGui3EndEv() local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS13ImGuiViewport", !13, i64 0, !13, i64 4, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !15, i64 40, !16, i64 48, !13, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !6, i64 96, !6, i64 97, !6, i64 98}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !13, i64 0}
!19 = !{!"_ZTS7ImGuiIO", !13, i64 0, !13, i64 4, !14, i64 8, !15, i64 16, !15, i64 20, !16, i64 24, !16, i64 32, !15, i64 40, !15, i64 44, !15, i64 48, !7, i64 52, !15, i64 140, !15, i64 144, !16, i64 152, !16, i64 160, !15, i64 168, !6, i64 172, !16, i64 176, !14, i64 184, !6, i64 192, !6, i64 193, !6, i64 194, !6, i64 195, !6, i64 196, !6, i64 197, !6, i64 198, !6, i64 199, !6, i64 200, !6, i64 201, !6, i64 202, !6, i64 203, !6, i64 204, !15, i64 208, !16, i64 216, !16, i64 224, !16, i64 232, !16, i64 240, !16, i64 248, !16, i64 256, !16, i64 264, !16, i64 272, !16, i64 280, !14, i64 288, !7, i64 296, !15, i64 304, !15, i64 308, !13, i64 312, !6, i64 316, !6, i64 317, !6, i64 318, !6, i64 319, !7, i64 320, !7, i64 832, !6, i64 916, !6, i64 917, !6, i64 918, !6, i64 919, !6, i64 920, !6, i64 921, !6, i64 922, !15, i64 924, !13, i64 928, !13, i64 932, !13, i64 936, !13, i64 940, !13, i64 944, !14, i64 948, !13, i64 956, !14, i64 960, !7, i64 968, !7, i64 1008, !7, i64 1048, !7, i64 1053, !7, i64 1058, !7, i64 1063, !7, i64 1068, !7, i64 1076, !7, i64 1096, !7, i64 1116, !7, i64 1156, !7, i64 1176, !7, i64 3224, !7, i64 5272, !7, i64 5356, !15, i64 5440, !20, i64 5444, !21, i64 5448}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_ZTS8ImVectorItE", !13, i64 0, !13, i64 4, !16, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass