; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui/imgui_widgets.ll (ZN5ImGui12BeginMenuBarEv)

; 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, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, float, float, float, float, 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, i16, i16, i16, i16, i16, i32, i8, i8, i8, i8, i32, i8, i8, i8, i8, i32, %struct.ImVec2, %struct.ImVec2, %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, [2 x i32], [2 x %struct.ImRect], 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, 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, ptr, %struct.ImVector.7, %struct.ImVector.8, %struct.ImVector.9, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, float, [4 x i8] }>
%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.ImVector.8 = type { i32, i32, ptr }
%struct.ImVector.9 = type { i32, i32, ptr }
%struct.ImDrawCmdHeader = type <{ %struct.ImVec4, ptr, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.10 }
%struct.ImVector.10 = type { i32, i32, ptr }

@.str.4 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui12BeginMenuBarEv = external hidden unnamed_addr constant [27 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [10 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5ImGui16GetCurrentWindowEv() #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 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) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef, float noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImRectC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui23AlignTextToFramePaddingEv() #5

declare void @_ZN5ImGui12PushClipRectERK6ImVec2S2_b(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i1 noundef zeroext) #6

declare void @_ZN5ImGui10BeginGroupEv() #6

declare void @_ZN5ImGui6PushIDEPKc(ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImRect8ClipWithERKS_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #7 align 2

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

12:                                               ; preds = %0
  store i1 false, ptr %1, align 1
  store i32 1, ptr %3, align 4
  br label %121

13:                                               ; preds = %0
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.ImGuiWindow, ptr %14, i32 0, i32 3
  %16 = load i32, ptr %15, align 4, !tbaa !41
  %17 = and i32 %16, 1024
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %13
  store i1 false, ptr %1, align 1
  store i32 1, ptr %3, align 4
  br label %121

20:                                               ; preds = %13
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.ImGuiWindow, ptr %21, i32 0, i32 62
  %23 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %22, i32 0, i32 21
  %24 = load i8, ptr %23, align 1, !tbaa !42, !range !39, !noundef !40
  %25 = trunc i8 %24 to i1
  %26 = xor i1 %25, true
  br i1 %26, label %27, label %28

27:                                               ; preds = %20
  br label %30

28:                                               ; preds = %20
  call void @__assert_fail(ptr noundef @.str.160, ptr noundef @.str.4, i32 noundef 6957, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui12BeginMenuBarEv) #9
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  call void @_ZN5ImGui10BeginGroupEv()
  call void @_ZN5ImGui6PushIDEPKc(ptr noundef @.str.161)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #8
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = call { <2 x float>, <2 x float> } @_ZNK11ImGuiWindow11MenuBarRectEv(ptr noundef nonnull align 8 dereferenceable(981) %31)
  %33 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  %34 = extractvalue { <2 x float>, <2 x float> } %32, 0
  store <2 x float> %34, ptr %33, align 4
  %35 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  %36 = extractvalue { <2 x float>, <2 x float> } %32, 1
  store <2 x float> %36, ptr %35, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #8
  %37 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 0
  %38 = getelementptr inbounds %struct.ImVec2, ptr %37, i32 0, i32 0
  %39 = load float, ptr %38, align 4, !tbaa !43
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ImGuiWindow, ptr %40, i32 0, i32 13
  %42 = load float, ptr %41, align 4, !tbaa !44
  %43 = fadd float %39, %42
  %44 = fadd float %43, 5.000000e-01
  %45 = fptosi float %44 to i32
  %46 = sitofp i32 %45 to float
  %47 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 0
  %48 = getelementptr inbounds %struct.ImVec2, ptr %47, i32 0, i32 1
  %49 = load float, ptr %48, align 4, !tbaa !45
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ImGuiWindow, ptr %50, i32 0, i32 13
  %52 = load float, ptr %51, align 4, !tbaa !44
  %53 = fadd float %49, %52
  %54 = fadd float %53, 5.000000e-01
  %55 = fptosi float %54 to i32
  %56 = sitofp i32 %55 to float
  %57 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 0
  %58 = getelementptr inbounds %struct.ImVec2, ptr %57, i32 0, i32 0
  %59 = load float, ptr %58, align 4, !tbaa !43
  %60 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 1
  %61 = getelementptr inbounds %struct.ImVec2, ptr %60, i32 0, i32 0
  %62 = load float, ptr %61, align 4, !tbaa !46
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ImGuiWindow, ptr %63, i32 0, i32 12
  %65 = load float, ptr %64, align 8, !tbaa !47
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.ImGuiWindow, ptr %66, i32 0, i32 13
  %68 = load float, ptr %67, align 4, !tbaa !44
  %69 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %65, float noundef %68)
  %70 = fsub float %62, %69
  %71 = call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %59, float noundef %70)
  %72 = fadd float %71, 5.000000e-01
  %73 = fptosi float %72 to i32
  %74 = sitofp i32 %73 to float
  %75 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 1
  %76 = getelementptr inbounds %struct.ImVec2, ptr %75, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !48
  %78 = fadd float %77, 5.000000e-01
  %79 = fptosi float %78 to i32
  %80 = sitofp i32 %79 to float
  call void @_ZN6ImRectC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef %46, float noundef %56, float noundef %74, float noundef %80)
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ImGuiWindow, ptr %81, i32 0, i32 63
  call void @_ZN6ImRect8ClipWithERKS_(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(16) %82)
  %83 = getelementptr inbounds %struct.ImRect, ptr %5, i32 0, i32 0
  %84 = getelementptr inbounds %struct.ImRect, ptr %5, i32 0, i32 1
  call void @_ZN5ImGui12PushClipRectERK6ImVec2S2_b(ptr noundef nonnull align 4 dereferenceable(8) %83, ptr noundef nonnull align 4 dereferenceable(8) %84, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %85 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 0
  %86 = getelementptr inbounds %struct.ImVec2, ptr %85, i32 0, i32 0
  %87 = load float, ptr %86, align 4, !tbaa !43
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImGuiWindow, ptr %88, i32 0, i32 62
  %90 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %89, i32 0, i32 22
  %91 = getelementptr inbounds %struct.ImVec2, ptr %90, i32 0, i32 0
  %92 = load float, ptr %91, align 4, !tbaa !49
  %93 = fadd float %87, %92
  %94 = getelementptr inbounds %struct.ImRect, ptr %4, i32 0, i32 0
  %95 = getelementptr inbounds %struct.ImVec2, ptr %94, i32 0, i32 1
  %96 = load float, ptr %95, align 4, !tbaa !45
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ImGuiWindow, ptr %97, i32 0, i32 62
  %99 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %98, i32 0, i32 22
  %100 = getelementptr inbounds %struct.ImVec2, ptr %99, i32 0, i32 1
  %101 = load float, ptr %100, align 4, !tbaa !50
  %102 = fadd float %96, %101
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %93, float noundef %102)
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ImGuiWindow, ptr %103, i32 0, i32 62
  %105 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %104, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %105, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !51
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.ImGuiWindow, ptr %106, i32 0, i32 62
  %108 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %107, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %108, ptr align 4 %105, i64 8, i1 false), !tbaa.struct !51
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ImGuiWindow, ptr %109, i32 0, i32 62
  %111 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %110, i32 0, i32 30
  store i32 0, ptr %111, align 4, !tbaa !53
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ImGuiWindow, ptr %112, i32 0, i32 62
  %114 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %113, i32 0, i32 9
  store i8 0, ptr %114, align 8, !tbaa !54
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ImGuiWindow, ptr %115, i32 0, i32 62
  %117 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %116, i32 0, i32 15
  store i32 1, ptr %117, align 8, !tbaa !55
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ImGuiWindow, ptr %118, i32 0, i32 62
  %120 = getelementptr inbounds %struct.ImGuiWindowTempData, ptr %119, i32 0, i32 21
  store i8 1, ptr %120, align 1, !tbaa !42
  call void @_ZN5ImGui23AlignTextToFramePaddingEv()
  store i1 true, ptr %1, align 1
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #8
  br label %121

121:                                              ; preds = %30, %19, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %122 = load i1, ptr %1, align 1
  ret i1 %122
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { "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 #7 = { 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 #8 = { nounwind }
attributes #9 = { 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, !14, i64 187}
!10 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !12, i64 132, !12, i64 140, !12, i64 148, !12, i64 156, !12, i64 164, !12, 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, !15, i64 194, !15, i64 196, !15, i64 198, !15, i64 200, !15, i64 202, !11, i64 204, !7, i64 208, !7, i64 209, !7, i64 210, !14, i64 211, !11, i64 212, !7, i64 216, !7, i64 217, !7, i64 218, !7, i64 219, !11, i64 220, !11, i64 221, !11, i64 222, !12, i64 224, !12, i64 232, !16, i64 240, !17, i64 256, !23, i64 488, !23, i64 504, !23, i64 520, !23, i64 536, !23, i64 552, !23, i64 568, !23, i64 584, !24, i64 600, !24, i64 604, !11, i64 608, !13, i64 612, !13, i64 616, !25, i64 624, !27, i64 640, !13, i64 656, !11, i64 660, !6, i64 664, !28, i64 672, !6, i64 872, !6, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !7, i64 928, !7, i64 936, !11, i64 968, !11, i64 972, !11, i64 976, !14, i64 980}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTS8ImVectorIjE", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!"_ZTS19ImGuiWindowTempData", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !13, i64 60, !14, i64 64, !14, i64 65, !18, i64 68, !18, i64 72, !18, i64 76, !12, i64 80, !19, i64 88, !15, i64 92, !15, i64 94, !14, i64 96, !14, i64 97, !14, i64 98, !14, i64 99, !12, i64 100, !20, i64 108, !11, i64 136, !11, i64 140, !21, i64 144, !6, i64 160, !6, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !13, i64 188, !13, i64 192, !22, i64 200, !22, i64 216}
!18 = !{!"_ZTS6ImVec1", !13, i64 0}
!19 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!20 = !{!"_ZTS16ImGuiMenuColumns", !11, i64 0, !11, i64 4, !15, i64 8, !15, i64 10, !15, i64 12, !15, i64 14, !15, i64 16, !7, i64 18}
!21 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !11, i64 0, !11, i64 4, !6, i64 8}
!22 = !{!"_ZTS8ImVectorIfE", !11, i64 0, !11, i64 4, !6, i64 8}
!23 = !{!"_ZTS6ImRect", !12, i64 0, !12, i64 8}
!24 = !{!"_ZTS8ImVec2ih", !15, i64 0, !15, i64 2}
!25 = !{!"_ZTS12ImGuiStorage", !26, i64 0}
!26 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !11, i64 0, !11, i64 4, !6, i64 8}
!27 = !{!"_ZTS8ImVectorI15ImGuiOldColumnsE", !11, i64 0, !11, i64 4, !6, i64 8}
!28 = !{!"_ZTS10ImDrawList", !29, i64 0, !30, i64 16, !31, i64 32, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !32, i64 88, !33, i64 104, !34, i64 120, !35, i64 136, !37, i64 168, !13, i64 192}
!29 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !11, i64 0, !11, i64 4, !6, i64 8}
!30 = !{!"_ZTS8ImVectorItE", !11, i64 0, !11, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI10ImDrawVertE", !11, i64 0, !11, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorI6ImVec4E", !11, i64 0, !11, i64 4, !6, i64 8}
!33 = !{!"_ZTS8ImVectorIPvE", !11, i64 0, !11, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorI6ImVec2E", !11, i64 0, !11, i64 4, !6, i64 8}
!35 = !{!"_ZTS15ImDrawCmdHeader", !36, i64 0, !6, i64 16, !11, i64 24}
!36 = !{!"_ZTS6ImVec4", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!37 = !{!"_ZTS18ImDrawListSplitter", !11, i64 0, !11, i64 4, !38, i64 8}
!38 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !11, i64 0, !11, i64 4, !6, i64 8}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = !{!10, !11, i64 20}
!42 = !{!10, !14, i64 355}
!43 = !{!23, !13, i64 0}
!44 = !{!10, !13, i64 92}
!45 = !{!23, !13, i64 4}
!46 = !{!23, !13, i64 8}
!47 = !{!10, !13, i64 88}
!48 = !{!23, !13, i64 12}
!49 = !{!10, !13, i64 356}
!50 = !{!10, !13, i64 360}
!51 = !{i64 0, i64 4, !52, i64 4, i64 4, !52}
!52 = !{!13, !13, i64 0}
!53 = !{!10, !11, i64 436}
!54 = !{!10, !14, i64 320}
!55 = !{!10, !19, i64 344}


; 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.4 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.160 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui12BeginMenuBarEv = external hidden unnamed_addr constant [27 x i8], align 1
@.str.161 = external hidden unnamed_addr constant [10 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5ImGui16GetCurrentWindowEv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #2 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: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef, float noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImRectC2Effff(ptr noundef nonnull align 4 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui23AlignTextToFramePaddingEv() local_unnamed_addr #4

declare void @_ZN5ImGui12PushClipRectERK6ImVec2S2_b(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #5

declare void @_ZN5ImGui10BeginGroupEv() local_unnamed_addr #5

declare void @_ZN5ImGui6PushIDEPKc(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ImRect8ClipWithERKS_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui12BeginMenuBarEv() local_unnamed_addr #6 {
  %1 = alloca %struct.ImRect, align 4
  %2 = alloca %struct.ImVec2, align 8
  %3 = tail call noundef ptr @_ZN5ImGui16GetCurrentWindowEv()
  %4 = getelementptr inbounds i8, ptr %3, i64 187
  %5 = load i8, ptr %4, align 1, !tbaa !5, !range !38, !noundef !39
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %55, label %7

7:                                                ; preds = %0
  %8 = getelementptr inbounds i8, ptr %3, i64 20
  %9 = load i32, ptr %8, align 4, !tbaa !40
  %10 = and i32 %9, 1024
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %55, label %11

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %3, i64 355
  %13 = load i8, ptr %12, align 1, !tbaa !41, !range !38, !noundef !39
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %15, label %16

15:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.160, ptr noundef nonnull @.str.4, i32 noundef 6957, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui12BeginMenuBarEv) #7
  unreachable

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %3, i64 256
  tail call void @_ZN5ImGui10BeginGroupEv()
  tail call void @_ZN5ImGui6PushIDEPKc(ptr noundef nonnull @.str.161)
  %18 = tail call { <2 x float>, <2 x float> } @_ZNK11ImGuiWindow11MenuBarRectEv(ptr noundef nonnull align 8 dereferenceable(981) %3)
  %19 = extractvalue { <2 x float>, <2 x float> } %18, 0
  %20 = extractvalue { <2 x float>, <2 x float> } %18, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #8
  %.sroa.0.0.vec.extract = extractelement <2 x float> %19, i64 0
  %21 = getelementptr inbounds i8, ptr %3, i64 92
  %22 = load float, ptr %21, align 4, !tbaa !42
  %23 = fadd float %.sroa.0.0.vec.extract, %22
  %24 = fadd float %23, 5.000000e-01
  %25 = fptosi float %24 to i32
  %26 = sitofp i32 %25 to float
  %.sroa.0.4.vec.extract = extractelement <2 x float> %19, i64 1
  %27 = fadd float %.sroa.0.4.vec.extract, %22
  %28 = fadd float %27, 5.000000e-01
  %29 = fptosi float %28 to i32
  %30 = sitofp i32 %29 to float
  %.sroa.8.8.vec.extract = extractelement <2 x float> %20, i64 0
  %31 = getelementptr inbounds i8, ptr %3, i64 88
  %32 = load float, ptr %31, align 8, !tbaa !43
  %33 = tail call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %32, float noundef %22)
  %34 = fsub float %.sroa.8.8.vec.extract, %33
  %35 = tail call noundef float @_ZL5ImMaxIfET_S0_S0_(float noundef %.sroa.0.0.vec.extract, float noundef %34)
  %36 = fadd float %35, 5.000000e-01
  %37 = fptosi float %36 to i32
  %38 = sitofp i32 %37 to float
  %.sroa.8.12.vec.extract = extractelement <2 x float> %20, i64 1
  %39 = fadd float %.sroa.8.12.vec.extract, 5.000000e-01
  %40 = fptosi float %39 to i32
  %41 = sitofp i32 %40 to float
  call void @_ZN6ImRectC2Effff(ptr noundef nonnull align 4 dereferenceable(16) %1, float noundef %26, float noundef %30, float noundef %38, float noundef %41)
  %42 = getelementptr inbounds i8, ptr %3, i64 488
  call void @_ZN6ImRect8ClipWithERKS_(ptr noundef nonnull align 4 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(16) %42)
  %43 = getelementptr inbounds i8, ptr %1, i64 8
  call void @_ZN5ImGui12PushClipRectERK6ImVec2S2_b(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %43, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %44 = getelementptr inbounds i8, ptr %3, i64 356
  %45 = load float, ptr %44, align 4, !tbaa !44
  %46 = fadd float %.sroa.0.0.vec.extract, %45
  %47 = getelementptr inbounds i8, ptr %3, i64 360
  %48 = load float, ptr %47, align 4, !tbaa !45
  %49 = fadd float %.sroa.0.4.vec.extract, %48
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %2, float noundef %46, float noundef %49)
  %50 = getelementptr inbounds i8, ptr %3, i64 280
  %51 = load i64, ptr %2, align 8
  store i64 %51, ptr %50, align 8
  store i64 %51, ptr %17, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %52 = getelementptr inbounds i8, ptr %3, i64 436
  store i32 0, ptr %52, align 4, !tbaa !46
  %53 = getelementptr inbounds i8, ptr %3, i64 320
  store i8 0, ptr %53, align 8, !tbaa !47
  %54 = getelementptr inbounds i8, ptr %3, i64 344
  store i32 1, ptr %54, align 8, !tbaa !48
  store i8 1, ptr %12, align 1, !tbaa !41
  call void @_ZN5ImGui23AlignTextToFramePaddingEv()
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #8
  br label %55

55:                                               ; preds = %7, %0, %16
  %.0 = phi i1 [ true, %16 ], [ false, %0 ], [ false, %7 ]
  ret i1 %.0
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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"="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 = { "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 = { 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 #7 = { noreturn nounwind }
attributes #8 = { 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, !13, i64 187}
!6 = !{!"_ZTS11ImGuiWindow", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !11, i64 132, !11, i64 140, !11, i64 148, !11, i64 156, !11, i64 164, !11, i64 172, !13, i64 180, !13, i64 181, !13, i64 182, !13, i64 183, !13, i64 184, !13, i64 185, !13, i64 186, !13, i64 187, !13, i64 188, !13, i64 189, !13, i64 190, !13, i64 191, !13, i64 192, !8, i64 193, !14, i64 194, !14, i64 196, !14, i64 198, !14, i64 200, !14, i64 202, !10, i64 204, !8, i64 208, !8, i64 209, !8, i64 210, !13, i64 211, !10, i64 212, !8, i64 216, !8, i64 217, !8, i64 218, !8, i64 219, !10, i64 220, !10, i64 221, !10, i64 222, !11, i64 224, !11, i64 232, !15, i64 240, !16, i64 256, !22, i64 488, !22, i64 504, !22, i64 520, !22, i64 536, !22, i64 552, !22, i64 568, !22, i64 584, !23, i64 600, !23, i64 604, !10, i64 608, !12, i64 612, !12, i64 616, !24, i64 624, !26, i64 640, !12, i64 656, !10, i64 660, !7, i64 664, !27, i64 672, !7, i64 872, !7, i64 880, !7, i64 888, !7, i64 896, !7, i64 904, !7, i64 912, !7, i64 920, !8, i64 928, !8, i64 936, !10, i64 968, !10, i64 972, !10, i64 976, !13, i64 980}
!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 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !7, i64 8}
!16 = !{!"_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, !17, i64 68, !17, i64 72, !17, i64 76, !11, i64 80, !18, i64 88, !14, i64 92, !14, i64 94, !13, i64 96, !13, i64 97, !13, i64 98, !13, i64 99, !11, i64 100, !19, i64 108, !10, i64 136, !10, i64 140, !20, i64 144, !7, i64 160, !7, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !12, i64 188, !12, i64 192, !21, i64 200, !21, i64 216}
!17 = !{!"_ZTS6ImVec1", !12, i64 0}
!18 = !{!"_ZTS13ImGuiNavLayer", !8, i64 0}
!19 = !{!"_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}
!20 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !10, i64 0, !10, i64 4, !7, i64 8}
!21 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !7, i64 8}
!22 = !{!"_ZTS6ImRect", !11, i64 0, !11, i64 8}
!23 = !{!"_ZTS8ImVec2ih", !14, i64 0, !14, i64 2}
!24 = !{!"_ZTS12ImGuiStorage", !25, i64 0}
!25 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !10, i64 0, !10, i64 4, !7, i64 8}
!26 = !{!"_ZTS8ImVectorI15ImGuiOldColumnsE", !10, i64 0, !10, i64 4, !7, i64 8}
!27 = !{!"_ZTS10ImDrawList", !28, i64 0, !29, i64 16, !30, i64 32, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !31, i64 88, !32, i64 104, !33, i64 120, !34, i64 136, !36, i64 168, !12, i64 192}
!28 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !7, i64 8}
!29 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !7, i64 8}
!30 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !7, i64 8}
!31 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !7, i64 8}
!32 = !{!"_ZTS8ImVectorIPvE", !10, i64 0, !10, i64 4, !7, i64 8}
!33 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !7, i64 8}
!34 = !{!"_ZTS15ImDrawCmdHeader", !35, i64 0, !7, i64 16, !10, i64 24}
!35 = !{!"_ZTS6ImVec4", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!36 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !37, i64 8}
!37 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !7, i64 8}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!6, !10, i64 20}
!41 = !{!6, !13, i64 355}
!42 = !{!6, !12, i64 92}
!43 = !{!6, !12, i64 88}
!44 = !{!6, !12, i64 356}
!45 = !{!6, !12, i64 360}
!46 = !{!6, !10, i64 436}
!47 = !{!6, !13, i64 320}
!48 = !{!6, !18, i64 344}


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