; LLVM IR from yangfengzzz/DigitalVox4 :: editor (imgui_node_editor)

; 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.vox::NodeEditor::Detail::NavigateAction" = type <{ %"struct.vox::NodeEditor::Detail::EditorAction", i8, [3 x i8], float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, ptr, %struct.ImVec2, %struct.ImVec2, %"struct.vox::NodeEditor::Detail::NavigateAnimation", i32, [4 x i8], i64, ptr, i8, [3 x i8], %struct.ImVec2, [4 x i8] }>
%"struct.vox::NodeEditor::Detail::EditorAction" = type { ptr, ptr }
%"struct.vox::NodeEditor::Detail::NavigateAnimation" = type { %"struct.vox::NodeEditor::Detail::Animation.base", ptr, %struct.ImRect, %struct.ImRect }
%"struct.vox::NodeEditor::Detail::Animation.base" = type <{ ptr, ptr, i32, float, float }>
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }

@_ZTVN3vox10NodeEditor6Detail14NavigateActionE = external dso_local unnamed_addr constant { [19 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vox10NodeEditor6Detail14NavigateActionC2EPNS1_13EditorContextERN7ImGuiEx6CanvasE(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(172) %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3vox10NodeEditor6Detail12EditorActionC2EPNS1_13EditorContextE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %10)
  store ptr getelementptr inbounds inrange(-16, 136) ({ [19 x ptr] }, ptr @_ZTVN3vox10NodeEditor6Detail14NavigateActionE, i32 0, i32 0, i32 2), ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 1
  store i8 0, ptr %11, align 8, !tbaa !11
  %12 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 3
  store float 1.000000e+00, ptr %12, align 4, !tbaa !23
  %13 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 4
  invoke void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %14 unwind label %34

14:                                               ; preds = %3
  %15 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 5
  invoke void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %16 unwind label %34

16:                                               ; preds = %14
  %17 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 6
  invoke void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %18 unwind label %34

18:                                               ; preds = %16
  %19 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 7
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %20, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 8
  invoke void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %21, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %22 unwind label %34

22:                                               ; preds = %18
  %23 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 9
  invoke void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %23, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %24 unwind label %34

24:                                               ; preds = %22
  %25 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 10
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3vox10NodeEditor6Detail17NavigateAnimationC1EPNS1_13EditorContextERNS1_14NavigateActionE(ptr noundef nonnull align 8 dereferenceable(72) %25, ptr noundef %26, ptr noundef nonnull align 8 dereferenceable(184) %9)
          to label %27 unwind label %34

27:                                               ; preds = %24
  %28 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 11
  store i32 0, ptr %28, align 8, !tbaa !24
  %29 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 13
  store i64 0, ptr %29, align 8, !tbaa !25
  %30 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 14
  store ptr null, ptr %30, align 8, !tbaa !26
  %31 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 15
  store i8 0, ptr %31, align 8, !tbaa !27
  %32 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::NavigateAction", ptr %9, i32 0, i32 17
  invoke void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %32, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %33 unwind label %38

33:                                               ; preds = %27
  ret void

34:                                               ; preds = %24, %22, %18, %16, %14, %3
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %7, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %8, align 4
  br label %42

38:                                               ; preds = %27
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  call void @_ZN3vox10NodeEditor6Detail9AnimationD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %25) #2
  br label %42

42:                                               ; preds = %38, %34
  call void @_ZN3vox10NodeEditor6Detail12EditorActionD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #2
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %7, align 8
  %45 = load i32, ptr %8, align 4
  %46 = insertvalue { ptr, i32 } poison, ptr %44, 0
  %47 = insertvalue { ptr, i32 } %46, i32 %45, 1
  resume { ptr, i32 } %47
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox10NodeEditor6Detail9AnimationD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox10NodeEditor6Detail12EditorActionD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare void @_ZN3vox10NodeEditor6Detail17NavigateAnimationC1EPNS1_13EditorContextERNS1_14NavigateActionE(ptr, ptr, ptr)

attributes #0 = { 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 #1 = { 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 #2 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 16}
!12 = !{!"_ZTSN3vox10NodeEditor6Detail14NavigateActionE", !13, i64 0, !14, i64 16, !15, i64 20, !16, i64 24, !16, i64 32, !16, i64 40, !6, i64 48, !16, i64 56, !16, i64 64, !17, i64 72, !21, i64 144, !22, i64 152, !6, i64 160, !14, i64 168, !16, i64 172}
!13 = !{!"_ZTSN3vox10NodeEditor6Detail12EditorActionE", !6, i64 8}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!17 = !{!"_ZTSN3vox10NodeEditor6Detail17NavigateAnimationE", !18, i64 0, !6, i64 32, !20, i64 40, !20, i64 56}
!18 = !{!"_ZTSN3vox10NodeEditor6Detail9AnimationE", !6, i64 8, !19, i64 16, !15, i64 20, !15, i64 24}
!19 = !{!"_ZTSN3vox10NodeEditor6Detail9Animation5StateE", !7, i64 0}
!20 = !{!"_ZTS6ImRect", !16, i64 0, !16, i64 8}
!21 = !{!"_ZTSN3vox10NodeEditor6Detail14NavigateAction16NavigationReasonE", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!12, !15, i64 20}
!24 = !{!12, !21, i64 144}
!25 = !{!12, !22, i64 152}
!26 = !{!12, !6, i64 160}
!27 = !{!12, !14, i64 168}


; 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"

@_ZTVN3vox10NodeEditor6Detail14NavigateActionE = external dso_local unnamed_addr constant { [19 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vox10NodeEditor6Detail14NavigateActionC2EPNS1_13EditorContextERN7ImGuiEx6CanvasE(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(172) %2) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN3vox10NodeEditor6Detail12EditorActionC2EPNS1_13EditorContextE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1)
  store ptr getelementptr inbounds inrange(-16, 136) (i8, ptr @_ZTVN3vox10NodeEditor6Detail14NavigateActionE, i64 16), ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 0, ptr %4, align 8, !tbaa !8
  %5 = getelementptr inbounds i8, ptr %0, i64 20
  store float 1.000000e+00, ptr %5, align 4, !tbaa !22
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %9 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %2, ptr %9, align 8, !tbaa !23
  %10 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %11 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %12 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN3vox10NodeEditor6Detail17NavigateAnimationC1EPNS1_13EditorContextERNS1_14NavigateActionE(ptr noundef nonnull align 8 dereferenceable(72) %12, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(184) %0)
          to label %13 unwind label %17

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %0, i64 144
  store i32 0, ptr %14, align 8, !tbaa !24
  %15 = getelementptr inbounds i8, ptr %0, i64 152
  %16 = getelementptr inbounds i8, ptr %0, i64 172
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(17) %15, i8 0, i64 17, i1 false)
  tail call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef 0.000000e+00, float noundef 0.000000e+00)
  ret void

17:                                               ; preds = %3
  %18 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3vox10NodeEditor6Detail12EditorActionD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #3
  resume { ptr, i32 } %18
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox10NodeEditor6Detail12EditorActionD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #0 align 2

declare void @_ZN3vox10NodeEditor6Detail17NavigateAnimationC1EPNS1_13EditorContextERNS1_14NavigateActionE(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 16}
!9 = !{!"_ZTSN3vox10NodeEditor6Detail14NavigateActionE", !10, i64 0, !13, i64 16, !14, i64 20, !15, i64 24, !15, i64 32, !15, i64 40, !11, i64 48, !15, i64 56, !15, i64 64, !16, i64 72, !20, i64 144, !21, i64 152, !11, i64 160, !13, i64 168, !15, i64 172}
!10 = !{!"_ZTSN3vox10NodeEditor6Detail12EditorActionE", !11, i64 8}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"bool", !12, i64 0}
!14 = !{!"float", !12, i64 0}
!15 = !{!"_ZTS6ImVec2", !14, i64 0, !14, i64 4}
!16 = !{!"_ZTSN3vox10NodeEditor6Detail17NavigateAnimationE", !17, i64 0, !11, i64 32, !19, i64 40, !19, i64 56}
!17 = !{!"_ZTSN3vox10NodeEditor6Detail9AnimationE", !11, i64 8, !18, i64 16, !14, i64 20, !14, i64 24}
!18 = !{!"_ZTSN3vox10NodeEditor6Detail9Animation5StateE", !12, i64 0}
!19 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!20 = !{!"_ZTSN3vox10NodeEditor6Detail14NavigateAction16NavigationReasonE", !12, i64 0}
!21 = !{!"long", !12, i64 0}
!22 = !{!9, !14, i64 20}
!23 = !{!11, !11, i64 0}
!24 = !{!9, !20, i64 144}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass