; LLVM IR from xhub/reshop :: gui/external/imgui (imgui_widgets)

; 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.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }
%struct.ImGuiWindow = type <{ ptr, ptr, i32, i32, i32, [4 x i8], ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, float, float, float, float, float, float, i32, i32, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i16, i16, i16, i16, i8, i8, i8, [3 x i8], i32, i8, i8, i8, i8, i32, %struct.ImVec2, %struct.ImVec2, [4 x i8], %struct.ImVector, %struct.ImGuiWindowTempData, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImVec2ih, %struct.ImVec2ih, i32, float, float, [4 x i8], %struct.ImGuiStorage, %struct.ImVector.3, float, i32, ptr, %struct.ImDrawList, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [2 x i32], [2 x %struct.ImRect], [2 x %struct.ImVec2], i32, i32, i32, i8, [3 x i8] }>
%struct.ImVector = type { i32, i32, ptr }
%struct.ImGuiWindowTempData = type { %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, i8, i8, %struct.ImVec1, %struct.ImVec1, %struct.ImVec1, %struct.ImVec2, i32, i16, i16, i8, i8, i8, i8, %struct.ImVec2, %struct.ImGuiMenuColumns, i32, i32, %struct.ImVector.0, ptr, ptr, i32, i32, i32, i32, float, float, %struct.ImVector.1, %struct.ImVector.1 }
%struct.ImVec1 = type { float }
%struct.ImGuiMenuColumns = type <{ i32, i32, i16, i16, i16, i16, i16, [4 x i16], [2 x i8] }>
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVec2ih = type { i16, i16 }
%struct.ImGuiStorage = type { %struct.ImVector.2 }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImDrawList = type { %struct.ImVector.4, %struct.ImVector.5, %struct.ImVector.6, i32, i32, ptr, ptr, ptr, %struct.ImVector.7, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, %struct.ImVector.9, %struct.ImVector.10, %struct.ImVector.11, float, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImVector.6 = type { i32, i32, ptr }
%struct.ImVector.7 = type { i32, i32, ptr }
%struct.ImDrawCmdHeader = type <{ %struct.ImVec4, i64, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.8 }
%struct.ImVector.8 = type { i32, i32, ptr }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImVector.10 = type { i32, i32, ptr }
%struct.ImVector.11 = type { i32, i32, ptr }
%struct.ImGuiViewportP = type { %struct.ImGuiViewport, [2 x i32], [2 x ptr], %struct.ImDrawData, %struct.ImDrawDataBuilder, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2 }
%struct.ImGuiViewport = type { i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, ptr, ptr }
%struct.ImDrawData = type { i8, i32, i32, i32, %struct.ImVector.46, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, ptr }
%struct.ImVector.46 = type { i32, i32, ptr }
%struct.ImDrawDataBuilder = type { [2 x ptr], %struct.ImVector.46 }

@.str.2 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewport8ImGuiDirfi = external hidden unnamed_addr constant [99 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: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK6ImRect7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8), i64 noundef) #1 align 2

declare noundef ptr @_ZN5ImGui16FindWindowByNameEPKc(ptr noundef) #5

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

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

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewport8ImGuiDirfi(ptr noundef %0, ptr noundef %1, i32 noundef %2, float noundef %3, i32 noundef %4) #4 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.ImRect, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.ImVec2, align 4
  %16 = alloca %struct.ImVec2, align 4
  %17 = alloca %struct.ImVec2, align 4
  %18 = alloca %struct.ImVec2, align 4
  %19 = alloca i8, align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !11
  store i32 %4, ptr %10, align 4, !tbaa !13
  %20 = load i32, ptr %8, align 4, !tbaa !9
  %21 = icmp ne i32 %20, -1
  br i1 %21, label %22, label %23

22:                                               ; preds = %5
  br label %25

23:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.205, ptr noundef @.str.2, i32 noundef 8702, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewport8ImGuiDirfi) #6
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef ptr @_ZN5ImGui16FindWindowByNameEPKc(ptr noundef %26)
  store ptr %27, ptr %11, align 8, !tbaa !5
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %36, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ImGuiWindow, ptr %31, i32 0, i32 50
  %33 = load i16, ptr %32, align 8, !tbaa !15
  %34 = sext i16 %33 to i32
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %114

36:                                               ; preds = %30, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %41

39:                                               ; preds = %36
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  br label %43

41:                                               ; preds = %36
  %42 = call noundef ptr @_ZN5ImGui15GetMainViewportEv()
  br label %43

43:                                               ; preds = %41, %39
  %44 = phi ptr [ %40, %39 ], [ %42, %41 ]
  store ptr %44, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = call { <2 x float>, <2 x float> } @_ZNK14ImGuiViewportP16GetBuildWorkRectEv(ptr noundef nonnull align 8 dereferenceable(208) %45)
  %47 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %48 = extractvalue { <2 x float>, <2 x float> } %46, 0
  store <2 x float> %48, ptr %47, align 4
  %49 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %50 = extractvalue { <2 x float>, <2 x float> } %46, 1
  store <2 x float> %50, ptr %49, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = icmp eq i32 %51, 2
  br i1 %52, label %56, label %53

53:                                               ; preds = %43
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 3
  br label %56

56:                                               ; preds = %53, %43
  %57 = phi i1 [ true, %43 ], [ %55, %53 ]
  %58 = zext i1 %57 to i64
  %59 = select i1 %57, i32 1, i32 0
  store i32 %59, ptr %14, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %60 = getelementptr inbounds %struct.ImRect, ptr %13, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %60, i64 8, i1 false), !tbaa.struct !47
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %66, label %63

63:                                               ; preds = %56
  %64 = load i32, ptr %8, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 3
  br i1 %65, label %66, label %77

66:                                               ; preds = %63, %56
  %67 = getelementptr inbounds %struct.ImRect, ptr %13, i32 0, i32 1
  %68 = load i32, ptr %14, align 4, !tbaa !45
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %67, i64 noundef %69)
  %71 = load float, ptr %70, align 4, !tbaa !11
  %72 = load float, ptr %9, align 4, !tbaa !11
  %73 = fsub float %71, %72
  %74 = load i32, ptr %14, align 4, !tbaa !45
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %15, i64 noundef %75)
  store float %73, ptr %76, align 4, !tbaa !11
  br label %77

77:                                               ; preds = %66, %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %78 = call <2 x float> @_ZNK6ImRect7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16) %13)
  store <2 x float> %78, ptr %16, align 4
  %79 = load float, ptr %9, align 4, !tbaa !11
  %80 = load i32, ptr %14, align 4, !tbaa !45
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %16, i64 noundef %81)
  store float %79, ptr %82, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_(ptr noundef nonnull align 4 dereferenceable(8) %15, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @_ZN5ImGui17SetNextWindowSizeERK6ImVec2i(ptr noundef nonnull align 4 dereferenceable(8) %16, i32 noundef 0)
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = icmp eq i32 %83, 2
  br i1 %84, label %88, label %85

85:                                               ; preds = %77
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %97

88:                                               ; preds = %85, %77
  %89 = load float, ptr %9, align 4, !tbaa !11
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ImGuiViewportP, ptr %90, i32 0, i32 7
  %92 = load i32, ptr %14, align 4, !tbaa !45
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %91, i64 noundef %93)
  %95 = load float, ptr %94, align 4, !tbaa !11
  %96 = fadd float %95, %89
  store float %96, ptr %94, align 4, !tbaa !11
  br label %113

97:                                               ; preds = %85
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = icmp eq i32 %98, 3
  br i1 %99, label %103, label %100

100:                                              ; preds = %97
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 1
  br i1 %102, label %103, label %112

103:                                              ; preds = %100, %97
  %104 = load float, ptr %9, align 4, !tbaa !11
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ImGuiViewportP, ptr %105, i32 0, i32 8
  %107 = load i32, ptr %14, align 4, !tbaa !45
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %106, i64 noundef %108)
  %110 = load float, ptr %109, align 4, !tbaa !11
  %111 = fadd float %110, %104
  store float %111, ptr %109, align 4, !tbaa !11
  br label %112

112:                                              ; preds = %103, %100
  br label %113

113:                                              ; preds = %112, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %114

114:                                              ; preds = %113, %30
  %115 = load i32, ptr %10, align 4, !tbaa !13
  %116 = or i32 %115, 7
  store i32 %116, ptr %10, align 4, !tbaa !13
  call void @_ZN5ImGui12PushStyleVarEif(i32 noundef 3, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %18, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef 5, ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = load i32, ptr %10, align 4, !tbaa !13
  %119 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef %117, ptr noundef null, i32 noundef %118)
  %120 = zext i1 %119 to i8
  store i8 %120, ptr %19, align 1, !tbaa !48
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 2)
  %121 = load i8, ptr %19, align 1, !tbaa !48, !range !49, !noundef !50
  %122 = trunc i8 %121 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  ret i1 %122
}

declare noundef ptr @_ZN5ImGui15GetMainViewportEv() #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZNK14ImGuiViewportP16GetBuildWorkRectEv(ptr noundef nonnull align 8 dereferenceable(208)) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "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 = { noreturn nounwind }
attributes #7 = { 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 = !{!"_ZTS8ImGuiDir", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !19, i64 216}
!16 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !6, i64 8, !14, i64 16, !14, i64 20, !14, i64 24, !6, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !14, i64 136, !14, i64 140, !14, i64 144, !14, i64 148, !17, i64 152, !17, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !18, i64 200, !18, i64 201, !18, i64 202, !18, i64 203, !18, i64 204, !18, i64 205, !18, i64 206, !18, i64 207, !18, i64 208, !18, i64 209, !18, i64 210, !18, i64 211, !18, i64 212, !18, i64 213, !7, i64 214, !7, i64 215, !19, i64 216, !19, i64 218, !19, i64 220, !19, i64 222, !19, i64 224, !7, i64 226, !7, i64 227, !18, i64 228, !10, i64 232, !7, i64 236, !7, i64 237, !7, i64 238, !7, i64 239, !14, i64 240, !14, i64 241, !14, i64 242, !17, i64 244, !17, i64 252, !20, i64 264, !21, i64 280, !27, i64 512, !27, i64 528, !27, i64 544, !27, i64 560, !27, i64 576, !27, i64 592, !27, i64 608, !28, i64 624, !28, i64 628, !14, i64 632, !12, i64 636, !12, i64 640, !29, i64 648, !31, i64 664, !12, i64 680, !14, i64 684, !6, i64 688, !32, i64 696, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !7, i64 976, !7, i64 984, !7, i64 1016, !14, i64 1032, !14, i64 1036, !14, i64 1040, !18, i64 1044}
!17 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"short", !7, i64 0}
!20 = !{!"_ZTS8ImVectorIjE", !14, i64 0, !14, i64 4, !6, i64 8}
!21 = !{!"_ZTS19ImGuiWindowTempData", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !12, i64 56, !12, i64 60, !18, i64 64, !18, i64 65, !22, i64 68, !22, i64 72, !22, i64 76, !17, i64 80, !23, i64 88, !19, i64 92, !19, i64 94, !18, i64 96, !18, i64 97, !18, i64 98, !18, i64 99, !17, i64 100, !24, i64 108, !14, i64 136, !14, i64 140, !25, i64 144, !6, i64 160, !6, i64 168, !14, i64 176, !14, i64 180, !14, i64 184, !14, i64 188, !12, i64 192, !12, i64 196, !26, i64 200, !26, i64 216}
!22 = !{!"_ZTS6ImVec1", !12, i64 0}
!23 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!24 = !{!"_ZTS16ImGuiMenuColumns", !14, i64 0, !14, i64 4, !19, i64 8, !19, i64 10, !19, i64 12, !19, i64 14, !19, i64 16, !7, i64 18}
!25 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !14, i64 0, !14, i64 4, !6, i64 8}
!26 = !{!"_ZTS8ImVectorIfE", !14, i64 0, !14, i64 4, !6, i64 8}
!27 = !{!"_ZTS6ImRect", !17, i64 0, !17, i64 8}
!28 = !{!"_ZTS8ImVec2ih", !19, i64 0, !19, i64 2}
!29 = !{!"_ZTS12ImGuiStorage", !30, i64 0}
!30 = !{!"_ZTS8ImVectorI16ImGuiStoragePairE", !14, i64 0, !14, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI15ImGuiOldColumnsE", !14, i64 0, !14, i64 4, !6, i64 8}
!32 = !{!"_ZTS10ImDrawList", !33, i64 0, !34, i64 16, !35, i64 32, !14, i64 48, !14, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !36, i64 80, !37, i64 96, !40, i64 128, !42, i64 152, !43, i64 168, !44, i64 184, !12, i64 200, !6, i64 208}
!33 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !14, i64 0, !14, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorItE", !14, i64 0, !14, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorI10ImDrawVertE", !14, i64 0, !14, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorI6ImVec2E", !14, i64 0, !14, i64 4, !6, i64 8}
!37 = !{!"_ZTS15ImDrawCmdHeader", !38, i64 0, !39, i64 16, !14, i64 24}
!38 = !{!"_ZTS6ImVec4", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!39 = !{!"long long", !7, i64 0}
!40 = !{!"_ZTS18ImDrawListSplitter", !14, i64 0, !14, i64 4, !41, i64 8}
!41 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !14, i64 0, !14, i64 4, !6, i64 8}
!42 = !{!"_ZTS8ImVectorI6ImVec4E", !14, i64 0, !14, i64 4, !6, i64 8}
!43 = !{!"_ZTS8ImVectorIyE", !14, i64 0, !14, i64 4, !6, i64 8}
!44 = !{!"_ZTS8ImVectorIhE", !14, i64 0, !14, i64 4, !6, i64 8}
!45 = !{!46, !46, i64 0}
!46 = !{!"_ZTS9ImGuiAxis", !7, i64 0}
!47 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!48 = !{!18, !18, i64 0}
!49 = !{i8 0, i8 2}
!50 = !{}


; 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.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }

@.str.2 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewport8ImGuiDirfi = external hidden unnamed_addr constant [99 x i8], align 1

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

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

; Function Attrs: mustprogress 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) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK6ImRect7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8), i64 noundef) local_unnamed_addr #1 align 2

declare noundef ptr @_ZN5ImGui16FindWindowByNameEPKc(ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewport8ImGuiDirfi(ptr noundef %0, ptr noundef %1, i32 noundef %2, float noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %6 = alloca %struct.ImRect, align 8
  %7 = alloca %struct.ImVec2, align 8
  %8 = alloca %struct.ImVec2, align 8
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 4
  %.not = icmp eq i32 %2, -1
  br i1 %.not, label %11, label %12

11:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.205, ptr noundef nonnull @.str.2, i32 noundef 8702, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewport8ImGuiDirfi) #5
  unreachable

12:                                               ; preds = %5
  %13 = tail call noundef ptr @_ZN5ImGui16FindWindowByNameEPKc(ptr noundef %0)
  %14 = icmp eq ptr %13, null
  br i1 %14, label %19, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %13, i64 216
  %17 = load i16, ptr %16, align 8, !tbaa !5
  %18 = icmp eq i16 %17, 0
  br i1 %18, label %19, label %46

19:                                               ; preds = %15, %12
  %.not36 = icmp eq ptr %1, null
  br i1 %.not36, label %20, label %22

20:                                               ; preds = %19
  %21 = tail call noundef ptr @_ZN5ImGui15GetMainViewportEv()
  br label %22

22:                                               ; preds = %19, %20
  %23 = phi ptr [ %21, %20 ], [ %1, %19 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %24 = tail call { <2 x float>, <2 x float> } @_ZNK14ImGuiViewportP16GetBuildWorkRectEv(ptr noundef nonnull align 8 dereferenceable(208) %23)
  %25 = extractvalue { <2 x float>, <2 x float> } %24, 0
  store <2 x float> %25, ptr %6, align 8
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  %27 = extractvalue { <2 x float>, <2 x float> } %24, 1
  store <2 x float> %27, ptr %26, align 8
  %28 = and i32 %2, -2
  %29 = icmp eq i32 %28, 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store <2 x float> %25, ptr %7, align 8
  switch i32 %2, label %._crit_edge [
    i32 3, label %30
    i32 1, label %30
  ]

._crit_edge:                                      ; preds = %22
  %.pre = zext i1 %29 to i64
  br label %36

30:                                               ; preds = %22, %22
  %31 = zext i1 %29 to i64
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %26, i64 noundef %31)
  %33 = load float, ptr %32, align 4, !tbaa !41
  %34 = fsub float %33, %3
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %7, i64 noundef %31)
  store float %34, ptr %35, align 4, !tbaa !41
  br label %36

36:                                               ; preds = %._crit_edge, %30
  %.pre-phi = phi i64 [ %.pre, %._crit_edge ], [ %31, %30 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %37 = call <2 x float> @_ZNK6ImRect7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16) %6)
  store <2 x float> %37, ptr %8, align 8
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %8, i64 noundef %.pre-phi)
  store float %3, ptr %38, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN5ImGui17SetNextWindowSizeERK6ImVec2i(ptr noundef nonnull align 4 dereferenceable(8) %8, i32 noundef 0)
  %39 = and i32 %2, -3
  %or.cond3 = icmp eq i32 %39, 0
  br i1 %or.cond3, label %.sink.split, label %40

40:                                               ; preds = %36
  switch i32 %2, label %45 [
    i32 3, label %.sink.split
    i32 1, label %.sink.split
  ]

.sink.split:                                      ; preds = %40, %40, %36
  %.sink = phi i64 [ 192, %36 ], [ 200, %40 ], [ 200, %40 ]
  %41 = getelementptr inbounds i8, ptr %23, i64 %.sink
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %41, i64 noundef %.pre-phi)
  %43 = load float, ptr %42, align 4, !tbaa !41
  %44 = fadd float %43, %3
  store float %44, ptr %42, align 4, !tbaa !41
  br label %45

45:                                               ; preds = %.sink.split, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %46

46:                                               ; preds = %45, %15
  %47 = or i32 %4, 7
  call void @_ZN5ImGui12PushStyleVarEif(i32 noundef 3, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef 5, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %48 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef %0, ptr noundef null, i32 noundef %47)
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 2)
  ret i1 %48
}

declare noundef ptr @_ZN5ImGui15GetMainViewportEv() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZNK14ImGuiViewportP16GetBuildWorkRectEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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"="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 #4 = { "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 = { noreturn nounwind }
attributes #6 = { 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, !14, i64 216}
!6 = !{!"_ZTS11ImGuiWindow", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !13, i64 200, !13, i64 201, !13, i64 202, !13, i64 203, !13, i64 204, !13, i64 205, !13, i64 206, !13, i64 207, !13, i64 208, !13, i64 209, !13, i64 210, !13, i64 211, !13, i64 212, !13, i64 213, !8, i64 214, !8, i64 215, !14, i64 216, !14, i64 218, !14, i64 220, !14, i64 222, !14, i64 224, !8, i64 226, !8, i64 227, !13, i64 228, !15, i64 232, !8, i64 236, !8, i64 237, !8, i64 238, !8, i64 239, !10, i64 240, !10, i64 241, !10, i64 242, !11, i64 244, !11, i64 252, !16, i64 264, !17, i64 280, !23, i64 512, !23, i64 528, !23, i64 544, !23, i64 560, !23, i64 576, !23, i64 592, !23, i64 608, !24, i64 624, !24, i64 628, !10, i64 632, !12, i64 636, !12, i64 640, !25, i64 648, !27, i64 664, !12, i64 680, !10, i64 684, !7, i64 688, !28, i64 696, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !7, i64 944, !7, i64 952, !7, i64 960, !7, i64 968, !8, i64 976, !8, i64 984, !8, i64 1016, !10, i64 1032, !10, i64 1036, !10, i64 1040, !13, i64 1044}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!"_ZTS8ImGuiDir", !8, i64 0}
!16 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !7, i64 8}
!17 = !{!"_ZTS19ImGuiWindowTempData", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !12, i64 56, !12, i64 60, !13, i64 64, !13, i64 65, !18, i64 68, !18, i64 72, !18, i64 76, !11, i64 80, !19, i64 88, !14, i64 92, !14, i64 94, !13, i64 96, !13, i64 97, !13, i64 98, !13, i64 99, !11, i64 100, !20, i64 108, !10, i64 136, !10, i64 140, !21, i64 144, !7, i64 160, !7, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !12, i64 192, !12, i64 196, !22, i64 200, !22, i64 216}
!18 = !{!"_ZTS6ImVec1", !12, i64 0}
!19 = !{!"_ZTS13ImGuiNavLayer", !8, i64 0}
!20 = !{!"_ZTS16ImGuiMenuColumns", !10, i64 0, !10, i64 4, !14, i64 8, !14, i64 10, !14, i64 12, !14, i64 14, !14, i64 16, !8, i64 18}
!21 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !10, i64 0, !10, i64 4, !7, i64 8}
!22 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !7, i64 8}
!23 = !{!"_ZTS6ImRect", !11, i64 0, !11, i64 8}
!24 = !{!"_ZTS8ImVec2ih", !14, i64 0, !14, i64 2}
!25 = !{!"_ZTS12ImGuiStorage", !26, i64 0}
!26 = !{!"_ZTS8ImVectorI16ImGuiStoragePairE", !10, i64 0, !10, i64 4, !7, i64 8}
!27 = !{!"_ZTS8ImVectorI15ImGuiOldColumnsE", !10, i64 0, !10, i64 4, !7, i64 8}
!28 = !{!"_ZTS10ImDrawList", !29, i64 0, !30, i64 16, !31, i64 32, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !7, i64 72, !32, i64 80, !33, i64 96, !36, i64 128, !38, i64 152, !39, i64 168, !40, i64 184, !12, i64 200, !7, i64 208}
!29 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !7, i64 8}
!30 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !7, i64 8}
!31 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !7, i64 8}
!32 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !7, i64 8}
!33 = !{!"_ZTS15ImDrawCmdHeader", !34, i64 0, !35, i64 16, !10, i64 24}
!34 = !{!"_ZTS6ImVec4", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!35 = !{!"long long", !8, i64 0}
!36 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !37, i64 8}
!37 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !7, i64 8}
!38 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !7, i64 8}
!39 = !{!"_ZTS8ImVectorIyE", !10, i64 0, !10, i64 4, !7, i64 8}
!40 = !{!"_ZTS8ImVectorIhE", !10, i64 0, !10, i64 4, !7, i64 8}
!41 = !{!12, !12, i64 0}


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