; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/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, 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 }
%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, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, ptr }
%struct.ImDrawData = type { i8, i32, i32, i32, ptr, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2 }
%struct.ImDrawDataBuilder = type { [2 x %struct.ImVector.40] }
%struct.ImVector.40 = type { i32, i32, ptr }

@.str.4 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewportifi = 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 void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) #5

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) #5

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 @_ZN5ImGui12PushStyleVarEif(i32 noundef, float noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewportifi(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 !9
  %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.165, ptr noundef @.str.4, i32 noundef 7025, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewportifi) #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 43
  %33 = load i16, ptr %32, align 2, !tbaa !13
  %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(184) %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 !41
  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 !43
  %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 !41
  %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 !41
  %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 !41
  %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 !41
  %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 !41
  %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 = fsub 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 !9
  %116 = or i32 %115, 7
  store i32 %116, ptr %10, align 4, !tbaa !9
  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 !9
  %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 !44
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 2)
  %121 = load i8, ptr %19, align 1, !tbaa !44, !range !45, !noundef !46
  %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(184)) #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !17, i64 194}
!14 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, 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, !15, i64 132, !15, i64 140, !15, i64 148, !15, i64 156, !15, i64 164, !15, i64 172, !16, i64 180, !16, i64 181, !16, i64 182, !16, i64 183, !16, i64 184, !16, i64 185, !16, i64 186, !16, i64 187, !16, i64 188, !16, i64 189, !16, i64 190, !16, i64 191, !16, i64 192, !7, i64 193, !17, i64 194, !17, i64 196, !17, i64 198, !17, i64 200, !17, i64 202, !10, i64 204, !7, i64 208, !7, i64 209, !7, i64 210, !16, i64 211, !10, i64 212, !7, i64 216, !7, i64 217, !7, i64 218, !7, i64 219, !10, i64 220, !10, i64 221, !10, i64 222, !15, i64 224, !15, i64 232, !18, i64 240, !19, i64 256, !25, i64 488, !25, i64 504, !25, i64 520, !25, i64 536, !25, i64 552, !25, i64 568, !25, i64 584, !26, i64 600, !26, i64 604, !10, i64 608, !12, i64 612, !12, i64 616, !27, i64 624, !29, i64 640, !12, i64 656, !10, i64 660, !6, i64 664, !30, 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, !10, i64 968, !10, i64 972, !10, i64 976, !16, i64 980}
!15 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"short", !7, i64 0}
!18 = !{!"_ZTS8ImVectorIjE", !10, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!"_ZTS19ImGuiWindowTempData", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !12, i64 56, !12, i64 60, !16, i64 64, !16, i64 65, !20, i64 68, !20, i64 72, !20, i64 76, !15, i64 80, !21, i64 88, !17, i64 92, !17, i64 94, !16, i64 96, !16, i64 97, !16, i64 98, !16, i64 99, !15, i64 100, !22, i64 108, !10, i64 136, !10, i64 140, !23, i64 144, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !12, i64 188, !12, i64 192, !24, i64 200, !24, i64 216}
!20 = !{!"_ZTS6ImVec1", !12, i64 0}
!21 = !{!"_ZTS13ImGuiNavLayer", !7, i64 0}
!22 = !{!"_ZTS16ImGuiMenuColumns", !10, i64 0, !10, i64 4, !17, i64 8, !17, i64 10, !17, i64 12, !17, i64 14, !17, i64 16, !7, i64 18}
!23 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !10, i64 0, !10, i64 4, !6, i64 8}
!24 = !{!"_ZTS8ImVectorIfE", !10, i64 0, !10, i64 4, !6, i64 8}
!25 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!26 = !{!"_ZTS8ImVec2ih", !17, i64 0, !17, i64 2}
!27 = !{!"_ZTS12ImGuiStorage", !28, i64 0}
!28 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{!"_ZTS8ImVectorI15ImGuiOldColumnsE", !10, i64 0, !10, i64 4, !6, i64 8}
!30 = !{!"_ZTS10ImDrawList", !31, i64 0, !32, i64 16, !33, i64 32, !10, i64 48, !10, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !34, i64 88, !35, i64 104, !36, i64 120, !37, i64 136, !39, i64 168, !12, i64 192}
!31 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !6, i64 8}
!32 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!33 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !6, i64 8}
!34 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !6, i64 8}
!35 = !{!"_ZTS8ImVectorIPvE", !10, i64 0, !10, i64 4, !6, i64 8}
!36 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !6, i64 8}
!37 = !{!"_ZTS15ImDrawCmdHeader", !38, i64 0, !6, i64 16, !10, i64 24}
!38 = !{!"_ZTS6ImVec4", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!39 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !40, i64 8}
!40 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !6, i64 8}
!41 = !{!42, !42, i64 0}
!42 = !{!"_ZTS9ImGuiAxis", !7, i64 0}
!43 = !{i64 0, i64 4, !11, i64 4, i64 4, !11}
!44 = !{!16, !16, i64 0}
!45 = !{i8 0, i8 2}
!46 = !{}


; 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.165 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewportifi = 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 void @_ZN5ImGui12PushStyleVarEiRK6ImVec2(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4

declare void @_ZN5ImGui11PopStyleVarEi(i32 noundef) local_unnamed_addr #4

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 @_ZN5ImGui12PushStyleVarEif(i32 noundef, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewportifi(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.165, ptr noundef nonnull @.str.4, i32 noundef 7025, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui20BeginViewportSideBarEPKcP13ImGuiViewportifi) #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 194
  %17 = load i16, ptr %16, align 2, !tbaa !5
  %18 = icmp eq i16 %17, 0
  br i1 %18, label %19, label %52

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(184) %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 !38
  %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 !38
  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 !38
  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 %40, label %45

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %23, i64 168
  %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 !38
  %44 = fadd float %43, %3
  store float %44, ptr %42, align 4, !tbaa !38
  br label %51

45:                                               ; preds = %36
  switch i32 %2, label %51 [
    i32 3, label %46
    i32 1, label %46
  ]

46:                                               ; preds = %45, %45
  %47 = getelementptr inbounds i8, ptr %23, i64 176
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6ImVec2ixEm(ptr noundef nonnull align 4 dereferenceable(8) %47, i64 noundef %.pre-phi)
  %49 = load float, ptr %48, align 4, !tbaa !38
  %50 = fsub float %49, %3
  store float %50, ptr %48, align 4, !tbaa !38
  br label %51

51:                                               ; preds = %45, %46, %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 %52

52:                                               ; preds = %51, %15
  %53 = 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
  %54 = call noundef zeroext i1 @_ZN5ImGui5BeginEPKcPbi(ptr noundef %0, ptr noundef null, i32 noundef %53)
  call void @_ZN5ImGui11PopStyleVarEi(i32 noundef 2)
  ret i1 %54
}

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(184)) 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 194}
!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 = !{!12, !12, i64 0}


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