; LLVM IR from yangfengzzz/DigitalVox4 :: editor/imgui_canvas.ll (ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ImVec2 = type { float, float }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%"struct.ImGuiEx::Canvas" = type <{ i8, [3 x i8], %struct.ImVec2, %struct.ImVec2, %struct.ImRect, [4 x i8], ptr, i32, i32, i32, %"struct.ImGuiEx::CanvasView", %struct.ImRect, %struct.ImVec2, i32, float, %struct.ImVec2, %struct.ImVec2, [5 x %struct.ImVec2], %struct.ImVec2, [4 x i8] }>
%"struct.ImGuiEx::CanvasView" = type { %struct.ImVec2, float, float }
%struct.ImDrawList = type <{ %struct.ImVector, %struct.ImVector.0, %struct.ImVector.1, i32, i32, ptr, ptr, ptr, ptr, %struct.ImVector.2, %struct.ImVector.3, %struct.ImVector.4, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, float, [4 x i8] }>
%struct.ImVector = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = 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.5 }
%struct.ImVector.5 = type { i32, i32, ptr }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@__PRETTY_FUNCTION__._ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2 = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2(ptr noundef nonnull align 8 dereferenceable(172) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(8) %2) #0 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 4
  %11 = alloca %struct.ImRect, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImVec2, align 4
  %14 = alloca %struct.ImVec2, align 4
  %15 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  %17 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 0
  %18 = load i8, ptr %17, align 8, !tbaa !11, !range !18, !noundef !19
  %19 = trunc i8 %18 to i1
  %20 = zext i1 %19 to i32
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %3
  br label %25

23:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 88, ptr noundef @__PRETTY_FUNCTION__._ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2) #8
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  %26 = call <2 x float> @_ZN5ImGui18GetCursorScreenPosEv()
  store <2 x float> %26, ptr %8, align 4
  %27 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %29 = call <2 x float> @_ZN5ImGui21GetContentRegionAvailEv()
  store <2 x float> %29, ptr %10, align 4
  %30 = call <2 x float> @_ZL16ImSelectPositiveRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %30, ptr %9, align 4
  %31 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %9, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #9
  %32 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %33 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 2
  %34 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 3
  %35 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(8) %34)
  store <2 x float> %35, ptr %12, align 4
  call void @_ZN6ImRectC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(8) %32, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %36 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #9
  %37 = call noundef ptr @_ZN5ImGui17GetWindowDrawListEv()
  %38 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 6
  store ptr %37, ptr %38, align 8, !tbaa !23
  call void @_ZN7ImGuiEx6Canvas27UpdateViewTransformPositionEv(ptr noundef nonnull align 8 dereferenceable(172) %16)
  %39 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 4
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = call noundef zeroext i1 @_ZN5ImGui11IsClippedExERK6ImRectj(ptr noundef nonnull align 4 dereferenceable(16) %39, i32 noundef %40)
  br i1 %41, label %42, label %43

42:                                               ; preds = %25
  store i1 false, ptr %4, align 1
  br label %61

43:                                               ; preds = %25
  %44 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = getelementptr inbounds %struct.ImDrawList, ptr %45, i32 0, i32 13
  %47 = getelementptr inbounds %struct.ImDrawListSplitter, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !24
  %49 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 7
  store i32 %48, ptr %49, align 8, !tbaa !36
  %50 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 6
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %52 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 4
  %53 = getelementptr inbounds %struct.ImRect, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 4
  %55 = getelementptr inbounds %struct.ImRect, ptr %54, i32 0, i32 1
  call void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196) %51, ptr noundef nonnull align 4 dereferenceable(8) %53, ptr noundef nonnull align 4 dereferenceable(8) %55, i32 noundef 1090453759, float noundef 0.000000e+00, i32 noundef 0, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @_ZN7ImGuiEx6Canvas14SaveInputStateEv(ptr noundef nonnull align 8 dereferenceable(172) %16)
  call void @_ZN7ImGuiEx6Canvas17SaveViewportStateEv(ptr noundef nonnull align 8 dereferenceable(172) %16)
  call void @_ZN7ImGuiEx6Canvas15EnterLocalSpaceEv(ptr noundef nonnull align 8 dereferenceable(172) %16)
  %56 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 11
  %57 = getelementptr inbounds %struct.ImRect, ptr %56, i32 0, i32 0
  call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %57)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %58 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 11
  %59 = call <2 x float> @_ZNK6ImRect7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16) %58)
  store <2 x float> %59, ptr %14, align 4
  call void @_ZN5ImGui5DummyERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  %60 = getelementptr inbounds %"struct.ImGuiEx::Canvas", ptr %16, i32 0, i32 0
  store i8 1, ptr %60, align 8, !tbaa !11
  store i1 true, ptr %4, align 1
  br label %61

61:                                               ; preds = %43, %42
  %62 = load i1, ptr %4, align 1
  ret i1 %62
}

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

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

declare <2 x float> @_ZN5ImGui18GetCursorScreenPosEv() #3

; 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) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL16ImSelectPositiveRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

declare <2 x float> @_ZN5ImGui21GetContentRegionAvailEv() #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

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

declare noundef ptr @_ZN5ImGui17GetWindowDrawListEv() #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas27UpdateViewTransformPositionEv(ptr noundef nonnull align 8 dereferenceable(172)) #0 align 2

declare noundef zeroext i1 @_ZN5ImGui11IsClippedExERK6ImRectj(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) #3

declare void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, i32 noundef, float noundef) #3

declare void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas14SaveInputStateEv(ptr noundef nonnull align 8 dereferenceable(172)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas17SaveViewportStateEv(ptr noundef nonnull align 8 dereferenceable(172)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas15EnterLocalSpaceEv(ptr noundef nonnull align 8 dereferenceable(172)) #0 align 2

declare void @_ZN5ImGui5DummyERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8)) #3

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #6 = { 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 #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { 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, !13, i64 0}
!12 = !{!"_ZTSN7ImGuiEx6CanvasE", !13, i64 0, !14, i64 4, !14, i64 12, !16, i64 20, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !17, i64 60, !16, i64 76, !14, i64 92, !10, i64 100, !15, i64 104, !14, i64 108, !14, i64 116, !7, i64 124, !14, i64 164}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS6ImRect", !14, i64 0, !14, i64 8}
!17 = !{!"_ZTSN7ImGuiEx10CanvasViewE", !14, i64 0, !15, i64 8, !15, i64 12}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !21}
!21 = !{!15, !15, i64 0}
!22 = !{i64 0, i64 4, !21, i64 4, i64 4, !21, i64 8, i64 4, !21, i64 12, i64 4, !21}
!23 = !{!12, !6, i64 40}
!24 = !{!25, !10, i64 168}
!25 = !{!"_ZTS10ImDrawList", !26, i64 0, !27, i64 16, !28, i64 32, !10, i64 48, !10, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !29, i64 88, !30, i64 104, !31, i64 120, !32, i64 136, !34, i64 168, !15, i64 192}
!26 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = !{!"_ZTS8ImVectorItE", !10, i64 0, !10, i64 4, !6, i64 8}
!28 = !{!"_ZTS8ImVectorI10ImDrawVertE", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{!"_ZTS8ImVectorI6ImVec4E", !10, i64 0, !10, i64 4, !6, i64 8}
!30 = !{!"_ZTS8ImVectorIPvE", !10, i64 0, !10, i64 4, !6, i64 8}
!31 = !{!"_ZTS8ImVectorI6ImVec2E", !10, i64 0, !10, i64 4, !6, i64 8}
!32 = !{!"_ZTS15ImDrawCmdHeader", !33, i64 0, !6, i64 16, !10, i64 24}
!33 = !{!"_ZTS6ImVec4", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!34 = !{!"_ZTS18ImDrawListSplitter", !10, i64 0, !10, i64 4, !35, i64 8}
!35 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !10, i64 0, !10, i64 4, !6, i64 8}
!36 = !{!12, !10, i64 48}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ImVec2 = type { float, float }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }

@.str = external hidden unnamed_addr constant [22 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@__PRETTY_FUNCTION__._ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2 = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2(ptr noundef nonnull align 8 dereferenceable(172) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(8) %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %struct.ImVec2, align 8
  %5 = alloca %struct.ImRect, align 4
  %6 = alloca %struct.ImVec2, align 8
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 8
  %9 = alloca %struct.ImVec2, align 4
  %10 = load i8, ptr %0, align 8, !tbaa !5, !range !16, !noundef !17
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 88, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7ImGuiEx6Canvas5BeginEjRK6ImVec2) #8
  unreachable

13:                                               ; preds = %3
  %14 = tail call <2 x float> @_ZN5ImGui18GetCursorScreenPosEv()
  %15 = getelementptr inbounds i8, ptr %0, i64 4
  store <2 x float> %14, ptr %15, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %16 = tail call <2 x float> @_ZN5ImGui21GetContentRegionAvailEv()
  store <2 x float> %16, ptr %4, align 8
  %17 = call <2 x float> @_ZL16ImSelectPositiveRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %18 = getelementptr inbounds i8, ptr %0, i64 12
  store <2 x float> %17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %19 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %18)
  store <2 x float> %19, ptr %6, align 8
  call void @_ZN6ImRectC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %6)
  %20 = getelementptr inbounds i8, ptr %0, i64 20
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  %21 = call noundef ptr @_ZN5ImGui17GetWindowDrawListEv()
  %22 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %21, ptr %22, align 8, !tbaa !20
  call void @_ZN7ImGuiEx6Canvas27UpdateViewTransformPositionEv(ptr noundef nonnull align 8 dereferenceable(172) %0)
  %23 = call noundef zeroext i1 @_ZN5ImGui11IsClippedExERK6ImRectj(ptr noundef nonnull align 4 dereferenceable(16) %20, i32 noundef %1)
  br i1 %23, label %32, label %24

24:                                               ; preds = %13
  %25 = load ptr, ptr %22, align 8, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %25, i64 168
  %27 = load i32, ptr %26, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 %27, ptr %28, align 8, !tbaa !33
  %29 = getelementptr inbounds i8, ptr %0, i64 28
  call void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196) %25, ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %29, i32 noundef 1090453759, float noundef 0.000000e+00, i32 noundef 0, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @_ZN7ImGuiEx6Canvas14SaveInputStateEv(ptr noundef nonnull align 8 dereferenceable(172) %0)
  call void @_ZN7ImGuiEx6Canvas17SaveViewportStateEv(ptr noundef nonnull align 8 dereferenceable(172) %0)
  call void @_ZN7ImGuiEx6Canvas15EnterLocalSpaceEv(ptr noundef nonnull align 8 dereferenceable(172) %0)
  %30 = getelementptr inbounds i8, ptr %0, i64 76
  call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %30)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %31 = call <2 x float> @_ZNK6ImRect7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16) %30)
  store <2 x float> %31, ptr %8, align 8
  call void @_ZN5ImGui5DummyERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  store i8 1, ptr %0, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %13, %24
  %.0 = xor i1 %23, true
  ret i1 %.0
}

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

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

declare <2 x float> @_ZN5ImGui18GetCursorScreenPosEv() local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZL16ImSelectPositiveRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

declare <2 x float> @_ZN5ImGui21GetContentRegionAvailEv() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

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

declare noundef ptr @_ZN5ImGui17GetWindowDrawListEv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas27UpdateViewTransformPositionEv(ptr noundef nonnull align 8 dereferenceable(172)) local_unnamed_addr #0 align 2

declare noundef zeroext i1 @_ZN5ImGui11IsClippedExERK6ImRectj(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) local_unnamed_addr #3

declare void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfif(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, i32 noundef, float noundef) local_unnamed_addr #3

declare void @_ZN5ImGui18SetCursorScreenPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas14SaveInputStateEv(ptr noundef nonnull align 8 dereferenceable(172)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas17SaveViewportStateEv(ptr noundef nonnull align 8 dereferenceable(172)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiEx6Canvas15EnterLocalSpaceEv(ptr noundef nonnull align 8 dereferenceable(172)) local_unnamed_addr #0 align 2

declare void @_ZN5ImGui5DummyERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #6 = { 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 #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"_ZTSN7ImGuiEx6CanvasE", !7, i64 0, !10, i64 4, !10, i64 12, !12, i64 20, !13, i64 40, !14, i64 48, !14, i64 52, !14, i64 56, !15, i64 60, !12, i64 76, !10, i64 92, !14, i64 100, !11, i64 104, !10, i64 108, !10, i64 116, !8, i64 124, !10, i64 164}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6ImVec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTS6ImRect", !10, i64 0, !10, i64 8}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTSN7ImGuiEx10CanvasViewE", !10, i64 0, !11, i64 8, !11, i64 12}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{i64 0, i64 4, !19, i64 4, i64 4, !19, i64 8, i64 4, !19, i64 12, i64 4, !19}
!19 = !{!11, !11, i64 0}
!20 = !{!6, !13, i64 40}
!21 = !{!22, !14, i64 168}
!22 = !{!"_ZTS10ImDrawList", !23, i64 0, !24, i64 16, !25, i64 32, !14, i64 48, !14, i64 52, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !26, i64 88, !27, i64 104, !28, i64 120, !29, i64 136, !31, i64 168, !11, i64 192}
!23 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !14, i64 0, !14, i64 4, !13, i64 8}
!24 = !{!"_ZTS8ImVectorItE", !14, i64 0, !14, i64 4, !13, i64 8}
!25 = !{!"_ZTS8ImVectorI10ImDrawVertE", !14, i64 0, !14, i64 4, !13, i64 8}
!26 = !{!"_ZTS8ImVectorI6ImVec4E", !14, i64 0, !14, i64 4, !13, i64 8}
!27 = !{!"_ZTS8ImVectorIPvE", !14, i64 0, !14, i64 4, !13, i64 8}
!28 = !{!"_ZTS8ImVectorI6ImVec2E", !14, i64 0, !14, i64 4, !13, i64 8}
!29 = !{!"_ZTS15ImDrawCmdHeader", !30, i64 0, !13, i64 16, !14, i64 24}
!30 = !{!"_ZTS6ImVec4", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!31 = !{!"_ZTS18ImDrawListSplitter", !14, i64 0, !14, i64 4, !32, i64 8}
!32 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !14, i64 0, !14, i64 4, !13, i64 8}
!33 = !{!6, !14, i64 48}


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