; LLVM IR from Sonryle/JoePhys :: testbed/src/GUIManager.ll (ZN10GUIManager10AddMenuBarEv)

; 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.SceneManager = type <{ ptr, i32, [4 x i8] }>
%struct.ImVec2 = type { float, float }
%struct.ImVec4 = type { float, float, float, float }
%struct.GUIManager = type { i8, i8, i8, i8 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@scene_manager = external global %struct.SceneManager, align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [35 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10GUIManager10AddMenuBarEv(ptr noundef nonnull align 1 dereferenceable(4) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.ImVec2, align 4
  %4 = alloca %struct.ImVec2, align 4
  %5 = alloca %struct.ImVec4, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8
  call void @_Z23ImGui_ImplGlfw_NewFramev()
  call void @_Z26ImGui_ImplOpenGL3_NewFramev()
  call void @_ZN5ImGui8NewFrameEv()
  %7 = call noundef zeroext i1 @_ZN5ImGui16BeginMainMenuBarEv()
  br i1 %7, label %8, label %118

8:                                                ; preds = %1
  %9 = call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef @.str, i1 noundef zeroext true)
  br i1 %9, label %10, label %47

10:                                               ; preds = %8
  %11 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 0
  %12 = load i8, ptr %11, align 1, !tbaa !9, !range !12, !noundef !13
  %13 = trunc i8 %12 to i1
  %14 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.1, ptr noundef @.str.2, i1 noundef zeroext %13, i1 noundef zeroext true)
  br i1 %14, label %15, label %22

15:                                               ; preds = %10
  %16 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 0
  %17 = load i8, ptr %16, align 1, !tbaa !9, !range !12, !noundef !13
  %18 = trunc i8 %17 to i1
  %19 = xor i1 %18, true
  %20 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 0
  %21 = zext i1 %19 to i8
  store i8 %21, ptr %20, align 1, !tbaa !9
  br label %22

22:                                               ; preds = %15, %10
  %23 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 1
  %24 = load i8, ptr %23, align 1, !tbaa !14, !range !12, !noundef !13
  %25 = trunc i8 %24 to i1
  %26 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.3, ptr noundef @.str.4, i1 noundef zeroext %25, i1 noundef zeroext true)
  br i1 %26, label %27, label %34

27:                                               ; preds = %22
  %28 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 1
  %29 = load i8, ptr %28, align 1, !tbaa !14, !range !12, !noundef !13
  %30 = trunc i8 %29 to i1
  %31 = xor i1 %30, true
  %32 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 1
  %33 = zext i1 %31 to i8
  store i8 %33, ptr %32, align 1, !tbaa !14
  br label %34

34:                                               ; preds = %27, %22
  %35 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 2
  %36 = load i8, ptr %35, align 1, !tbaa !15, !range !12, !noundef !13
  %37 = trunc i8 %36 to i1
  %38 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.5, ptr noundef @.str.6, i1 noundef zeroext %37, i1 noundef zeroext true)
  br i1 %38, label %39, label %46

39:                                               ; preds = %34
  %40 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 2
  %41 = load i8, ptr %40, align 1, !tbaa !15, !range !12, !noundef !13
  %42 = trunc i8 %41 to i1
  %43 = xor i1 %42, true
  %44 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 2
  %45 = zext i1 %43 to i8
  store i8 %45, ptr %44, align 1, !tbaa !15
  br label %46

46:                                               ; preds = %39, %34
  call void @_ZN5ImGui7EndMenuEv()
  br label %47

47:                                               ; preds = %46, %8
  %48 = call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef @.str.7, i1 noundef zeroext true)
  br i1 %48, label %49, label %95

49:                                               ; preds = %47
  %50 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %51 = icmp eq i32 %50, 0
  %52 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.8, ptr noundef null, i1 noundef zeroext %51, i1 noundef zeroext true)
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 0)
  br label %54

54:                                               ; preds = %53, %49
  %55 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %56 = icmp eq i32 %55, 1
  %57 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.9, ptr noundef null, i1 noundef zeroext %56, i1 noundef zeroext true)
  br i1 %57, label %58, label %59

58:                                               ; preds = %54
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 1)
  br label %59

59:                                               ; preds = %58, %54
  %60 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %61 = icmp eq i32 %60, 2
  %62 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.10, ptr noundef null, i1 noundef zeroext %61, i1 noundef zeroext true)
  br i1 %62, label %63, label %64

63:                                               ; preds = %59
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 2)
  br label %64

64:                                               ; preds = %63, %59
  %65 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %66 = icmp eq i32 %65, 3
  %67 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.11, ptr noundef null, i1 noundef zeroext %66, i1 noundef zeroext true)
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 3)
  br label %69

69:                                               ; preds = %68, %64
  %70 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %71 = icmp eq i32 %70, 4
  %72 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.12, ptr noundef null, i1 noundef zeroext %71, i1 noundef zeroext true)
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 4)
  br label %74

74:                                               ; preds = %73, %69
  %75 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %76 = icmp eq i32 %75, 5
  %77 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.13, ptr noundef null, i1 noundef zeroext %76, i1 noundef zeroext true)
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 5)
  br label %79

79:                                               ; preds = %78, %74
  %80 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %81 = icmp eq i32 %80, 6
  %82 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.14, ptr noundef null, i1 noundef zeroext %81, i1 noundef zeroext true)
  br i1 %82, label %83, label %84

83:                                               ; preds = %79
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 6)
  br label %84

84:                                               ; preds = %83, %79
  %85 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %86 = icmp eq i32 %85, 7
  %87 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.15, ptr noundef null, i1 noundef zeroext %86, i1 noundef zeroext true)
  br i1 %87, label %88, label %89

88:                                               ; preds = %84
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 7)
  br label %89

89:                                               ; preds = %88, %84
  %90 = load i32, ptr getelementptr inbounds (%struct.SceneManager, ptr @scene_manager, i32 0, i32 1), align 8, !tbaa !16
  %91 = icmp eq i32 %90, 8
  %92 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.16, ptr noundef null, i1 noundef zeroext %91, i1 noundef zeroext true)
  br i1 %92, label %93, label %94

93:                                               ; preds = %89
  call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 8)
  br label %94

94:                                               ; preds = %93, %89
  call void @_ZN5ImGui7EndMenuEv()
  br label %95

95:                                               ; preds = %94, %47
  %96 = call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef @.str.17, i1 noundef zeroext true)
  br i1 %96, label %97, label %110

97:                                               ; preds = %95
  %98 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 3
  %99 = load i8, ptr %98, align 1, !tbaa !19, !range !12, !noundef !13
  %100 = trunc i8 %99 to i1
  %101 = call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef @.str.18, ptr noundef null, i1 noundef zeroext %100, i1 noundef zeroext true)
  br i1 %101, label %102, label %109

102:                                              ; preds = %97
  %103 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 3
  %104 = load i8, ptr %103, align 1, !tbaa !19, !range !12, !noundef !13
  %105 = trunc i8 %104 to i1
  %106 = xor i1 %105, true
  %107 = getelementptr inbounds %struct.GUIManager, ptr %6, i32 0, i32 3
  %108 = zext i1 %106 to i8
  store i8 %108, ptr %107, align 1, !tbaa !19
  br label %109

109:                                              ; preds = %102, %97
  call void @_ZN5ImGui7EndMenuEv()
  br label %110

110:                                              ; preds = %109, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %111 = call <2 x float> @_ZN5ImGui25GetWindowContentRegionMaxEv()
  store <2 x float> %111, ptr %3, align 4
  %112 = getelementptr inbounds %struct.ImVec2, ptr %3, i32 0, i32 0
  %113 = load float, ptr %112, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %114 = call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef @.str.19, ptr noundef null, i1 noundef zeroext false, float noundef -1.000000e+00)
  store <2 x float> %114, ptr %4, align 4
  %115 = getelementptr inbounds %struct.ImVec2, ptr %4, i32 0, i32 0
  %116 = load float, ptr %115, align 4, !tbaa !20
  %117 = fsub float %113, %116
  call void @_ZN5ImGui8SameLineEff(float noundef %117, float noundef -1.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 1.000000e+00)
  call void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef @.str.20)
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 1)
  call void @_ZN5ImGui14EndMainMenuBarEv()
  br label %118

118:                                              ; preds = %110, %1
  ret void
}

declare void @_Z23ImGui_ImplGlfw_NewFramev() #2

declare void @_Z26ImGui_ImplOpenGL3_NewFramev() #2

declare void @_ZN5ImGui8NewFrameEv() #2

declare noundef zeroext i1 @_ZN5ImGui16BeginMainMenuBarEv() #2

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

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

declare void @_ZN5ImGui7EndMenuEv() #2

declare void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #2

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) #2

declare <2 x float> @_ZN5ImGui25GetWindowContentRegionMaxEv() #2

declare <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef, ptr noundef, i1 noundef zeroext, float noundef) #2

declare void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef, ptr noundef nonnull align 4 dereferenceable(16)) #2

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

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) #2

declare void @_ZN5ImGui13PopStyleColorEi(i32 noundef) #2

declare void @_ZN5ImGui14EndMainMenuBarEv() #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS10GUIManager", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3}
!11 = !{!"bool", !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!10, !11, i64 1}
!15 = !{!10, !11, i64 2}
!16 = !{!17, !18, i64 8}
!17 = !{!"_ZTS12SceneManager", !6, i64 0, !18, i64 8}
!18 = !{!"int", !7, i64 0}
!19 = !{!10, !11, i64 3}
!20 = !{!21, !22, i64 0}
!21 = !{!"_ZTS6ImVec2", !22, i64 0, !22, i64 4}
!22 = !{!"float", !7, i64 0}


; 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.SceneManager = type <{ ptr, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [21 x i8], align 1
@scene_manager = external global %struct.SceneManager, align 8
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [35 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10GUIManager10AddMenuBarEv(ptr nocapture noundef nonnull align 1 dereferenceable(4) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca %struct.ImVec4, align 4
  tail call void @_Z23ImGui_ImplGlfw_NewFramev()
  tail call void @_Z26ImGui_ImplOpenGL3_NewFramev()
  tail call void @_ZN5ImGui8NewFrameEv()
  %3 = tail call noundef zeroext i1 @_ZN5ImGui16BeginMainMenuBarEv()
  br i1 %3, label %4, label %94

4:                                                ; preds = %1
  %5 = tail call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef nonnull @.str, i1 noundef zeroext true)
  br i1 %5, label %6, label %30

6:                                                ; preds = %4
  %7 = load i8, ptr %0, align 1, !tbaa !5, !range !10, !noundef !11
  %8 = trunc nuw i8 %7 to i1
  %9 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i1 noundef zeroext %8, i1 noundef zeroext true)
  br i1 %9, label %10, label %13

10:                                               ; preds = %6
  %11 = load i8, ptr %0, align 1, !tbaa !5, !range !10, !noundef !11
  %12 = xor i8 %11, 1
  store i8 %12, ptr %0, align 1, !tbaa !5
  br label %13

13:                                               ; preds = %10, %6
  %14 = getelementptr inbounds i8, ptr %0, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !12, !range !10, !noundef !11
  %16 = trunc nuw i8 %15 to i1
  %17 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i1 noundef zeroext %16, i1 noundef zeroext true)
  br i1 %17, label %18, label %21

18:                                               ; preds = %13
  %19 = load i8, ptr %14, align 1, !tbaa !12, !range !10, !noundef !11
  %20 = xor i8 %19, 1
  store i8 %20, ptr %14, align 1, !tbaa !12
  br label %21

21:                                               ; preds = %18, %13
  %22 = getelementptr inbounds i8, ptr %0, i64 2
  %23 = load i8, ptr %22, align 1, !tbaa !13, !range !10, !noundef !11
  %24 = trunc nuw i8 %23 to i1
  %25 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i1 noundef zeroext %24, i1 noundef zeroext true)
  br i1 %25, label %26, label %29

26:                                               ; preds = %21
  %27 = load i8, ptr %22, align 1, !tbaa !13, !range !10, !noundef !11
  %28 = xor i8 %27, 1
  store i8 %28, ptr %22, align 1, !tbaa !13
  br label %29

29:                                               ; preds = %26, %21
  tail call void @_ZN5ImGui7EndMenuEv()
  br label %30

30:                                               ; preds = %29, %4
  %31 = tail call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef nonnull @.str.7, i1 noundef zeroext true)
  br i1 %31, label %32, label %78

32:                                               ; preds = %30
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %34 = icmp eq i32 %33, 0
  %35 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.8, ptr noundef null, i1 noundef zeroext %34, i1 noundef zeroext true)
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 0)
  br label %37

37:                                               ; preds = %36, %32
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %39 = icmp eq i32 %38, 1
  %40 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.9, ptr noundef null, i1 noundef zeroext %39, i1 noundef zeroext true)
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 1)
  br label %42

42:                                               ; preds = %41, %37
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %44 = icmp eq i32 %43, 2
  %45 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.10, ptr noundef null, i1 noundef zeroext %44, i1 noundef zeroext true)
  br i1 %45, label %46, label %47

46:                                               ; preds = %42
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 2)
  br label %47

47:                                               ; preds = %46, %42
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %49 = icmp eq i32 %48, 3
  %50 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.11, ptr noundef null, i1 noundef zeroext %49, i1 noundef zeroext true)
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 3)
  br label %52

52:                                               ; preds = %51, %47
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %54 = icmp eq i32 %53, 4
  %55 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.12, ptr noundef null, i1 noundef zeroext %54, i1 noundef zeroext true)
  br i1 %55, label %56, label %57

56:                                               ; preds = %52
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 4)
  br label %57

57:                                               ; preds = %56, %52
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %59 = icmp eq i32 %58, 5
  %60 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.13, ptr noundef null, i1 noundef zeroext %59, i1 noundef zeroext true)
  br i1 %60, label %61, label %62

61:                                               ; preds = %57
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 5)
  br label %62

62:                                               ; preds = %61, %57
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %64 = icmp eq i32 %63, 6
  %65 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.14, ptr noundef null, i1 noundef zeroext %64, i1 noundef zeroext true)
  br i1 %65, label %66, label %67

66:                                               ; preds = %62
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 6)
  br label %67

67:                                               ; preds = %66, %62
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %69 = icmp eq i32 %68, 7
  %70 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.15, ptr noundef null, i1 noundef zeroext %69, i1 noundef zeroext true)
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 7)
  br label %72

72:                                               ; preds = %71, %67
  %73 = load i32, ptr getelementptr inbounds (i8, ptr @scene_manager, i64 8), align 8, !tbaa !14
  %74 = icmp eq i32 %73, 8
  %75 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.16, ptr noundef null, i1 noundef zeroext %74, i1 noundef zeroext true)
  br i1 %75, label %76, label %77

76:                                               ; preds = %72
  tail call void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12) @scene_manager, i32 noundef 8)
  br label %77

77:                                               ; preds = %76, %72
  tail call void @_ZN5ImGui7EndMenuEv()
  br label %78

78:                                               ; preds = %77, %30
  %79 = tail call noundef zeroext i1 @_ZN5ImGui9BeginMenuEPKcb(ptr noundef nonnull @.str.17, i1 noundef zeroext true)
  br i1 %79, label %80, label %89

80:                                               ; preds = %78
  %81 = getelementptr inbounds i8, ptr %0, i64 3
  %82 = load i8, ptr %81, align 1, !tbaa !18, !range !10, !noundef !11
  %83 = trunc nuw i8 %82 to i1
  %84 = tail call noundef zeroext i1 @_ZN5ImGui8MenuItemEPKcS1_bb(ptr noundef nonnull @.str.18, ptr noundef null, i1 noundef zeroext %83, i1 noundef zeroext true)
  br i1 %84, label %85, label %88

85:                                               ; preds = %80
  %86 = load i8, ptr %81, align 1, !tbaa !18, !range !10, !noundef !11
  %87 = xor i8 %86, 1
  store i8 %87, ptr %81, align 1, !tbaa !18
  br label %88

88:                                               ; preds = %85, %80
  tail call void @_ZN5ImGui7EndMenuEv()
  br label %89

89:                                               ; preds = %88, %78
  %90 = tail call <2 x float> @_ZN5ImGui25GetWindowContentRegionMaxEv()
  %91 = tail call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef nonnull @.str.19, ptr noundef null, i1 noundef zeroext false, float noundef -1.000000e+00)
  %92 = fsub <2 x float> %90, %91
  %93 = extractelement <2 x float> %92, i64 0
  tail call void @_ZN5ImGui8SameLineEff(float noundef %93, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  call void @_ZN6ImVec4C2Effff(ptr noundef nonnull align 4 dereferenceable(16) %2, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 5.000000e-01, float noundef 1.000000e+00)
  call void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef 0, ptr noundef nonnull align 4 dereferenceable(16) %2)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  call void (ptr, ...) @_ZN5ImGui4TextEPKcz(ptr noundef nonnull @.str.20)
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 1)
  call void @_ZN5ImGui14EndMainMenuBarEv()
  br label %94

94:                                               ; preds = %89, %1
  ret void
}

declare void @_Z23ImGui_ImplGlfw_NewFramev() local_unnamed_addr #2

declare void @_Z26ImGui_ImplOpenGL3_NewFramev() local_unnamed_addr #2

declare void @_ZN5ImGui8NewFrameEv() local_unnamed_addr #2

declare noundef zeroext i1 @_ZN5ImGui16BeginMainMenuBarEv() local_unnamed_addr #2

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

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

declare void @_ZN5ImGui7EndMenuEv() local_unnamed_addr #2

declare void @_ZN12SceneManager11SwitchSceneEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) local_unnamed_addr #2

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) local_unnamed_addr #2

declare <2 x float> @_ZN5ImGui25GetWindowContentRegionMaxEv() local_unnamed_addr #2

declare <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef, ptr noundef, i1 noundef zeroext, float noundef) local_unnamed_addr #2

declare void @_ZN5ImGui14PushStyleColorEiRK6ImVec4(i32 noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2

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

declare void @_ZN5ImGui4TextEPKcz(ptr noundef, ...) local_unnamed_addr #2

declare void @_ZN5ImGui13PopStyleColorEi(i32 noundef) local_unnamed_addr #2

declare void @_ZN5ImGui14EndMainMenuBarEv() local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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, !7, i64 0}
!6 = !{!"_ZTS10GUIManager", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{i8 0, i8 2}
!11 = !{}
!12 = !{!6, !7, i64 1}
!13 = !{!6, !7, i64 2}
!14 = !{!15, !17, i64 8}
!15 = !{!"_ZTS12SceneManager", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!6, !7, i64 3}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass,VectorCombinePass