; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/dear_imgui/imnodes.ll (ZN7imnodes9BeginNodeEi)

; 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.anon = type <{ ptr, ptr, ptr, %struct.ImGuiStorage, %struct.ImVector.0, %struct.ImVector.0, %struct.ImVec2, %struct.ImRect, i32, [4 x i8], %"struct.imnodes::IO", %"struct.imnodes::Style", %struct.ImVector.1, %struct.ImVector.2, %struct.ImGuiTextBuffer, i32, [4 x i8], %struct.ImVector.0, i32, i32, i32, %"struct.imnodes::(anonymous namespace)::OptionalIndex", %"struct.imnodes::(anonymous namespace)::OptionalIndex", %"struct.imnodes::(anonymous namespace)::OptionalIndex", i32, %"struct.imnodes::(anonymous namespace)::OptionalIndex", %"struct.imnodes::(anonymous namespace)::OptionalIndex", i32, i32, i8, [3 x i8], %struct.ImVec2, i8, i8, i8, i8, i8, [3 x i8] }>
%struct.ImGuiStorage = type { %struct.ImVector }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%"struct.imnodes::IO" = type { %"struct.imnodes::IO::EmulateThreeButtonMouse", %"struct.imnodes::IO::LinkDetachWithModifierClick" }
%"struct.imnodes::IO::EmulateThreeButtonMouse" = type { i8, ptr }
%"struct.imnodes::IO::LinkDetachWithModifierClick" = type { ptr }
%"struct.imnodes::Style" = type { float, float, float, float, float, float, float, float, float, float, float, float, float, i32, [16 x i32] }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImGuiTextBuffer = type { %struct.ImVector.3 }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%"struct.imnodes::(anonymous namespace)::OptionalIndex" = type { i32 }
%struct.ImVec2 = type { float, float }
%"struct.imnodes::EditorContext" = type { %"struct.imnodes::(anonymous namespace)::ObjectPool", %"struct.imnodes::(anonymous namespace)::ObjectPool.6", %"struct.imnodes::(anonymous namespace)::ObjectPool.8", %struct.ImVector.0, %struct.ImVec2, %struct.ImVector.0, %struct.ImVector.0, i32, %"struct.imnodes::(anonymous namespace)::ClickInteractionState" }
%"struct.imnodes::(anonymous namespace)::ObjectPool" = type { %struct.ImVector.4, %struct.ImVector.5, %struct.ImVector.0, %struct.ImGuiStorage }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImVector.5 = type { i32, i32, ptr }
%"struct.imnodes::(anonymous namespace)::ObjectPool.6" = type { %struct.ImVector.7, %struct.ImVector.5, %struct.ImVector.0, %struct.ImGuiStorage }
%struct.ImVector.7 = type { i32, i32, ptr }
%"struct.imnodes::(anonymous namespace)::ObjectPool.8" = type { %struct.ImVector.9, %struct.ImVector.5, %struct.ImVector.0, %struct.ImGuiStorage }
%struct.ImVector.9 = type { i32, i32, ptr }
%"struct.imnodes::(anonymous namespace)::ClickInteractionState" = type { %struct.anon.10, %struct.anon.11 }
%struct.anon.10 = type { i32, %"struct.imnodes::(anonymous namespace)::OptionalIndex", i32 }
%struct.anon.11 = type { %struct.ImRect }
%"struct.imnodes::(anonymous namespace)::NodeData" = type <{ i32, %struct.ImVec2, %struct.ImRect, %struct.ImRect, %struct.anon.12, %struct.anon.13, [4 x i8], %struct.ImVector.0, i8, [7 x i8] }>
%struct.anon.12 = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.13 = type { float, %struct.ImVec2 }

@_ZN7imnodes12_GLOBAL__N_11gE = external hidden global %struct.anon, align 8
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZN7imnodes9BeginNodeEi = 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 nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv() #1

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

declare void @_ZN5ImGui10BeginGroupEv() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(105) ptr @_ZN8ImVectorIN7imnodes12_GLOBAL__N_18NodeDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7imnodes9BeginNodeEi(i32 noundef %0) #6 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %9 = load i32, ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 8), align 8, !tbaa !9
  %10 = icmp eq i32 %9, 2
  br i1 %10, label %11, label %12

11:                                               ; preds = %1
  br label %14

12:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 2122, ptr noundef @__PRETTY_FUNCTION__._ZN7imnodes9BeginNodeEi) #9
  unreachable

13:                                               ; No predecessors!
  br label %14

14:                                               ; preds = %13, %11
  store i32 4, ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 8), align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #10
  %15 = call noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv()
  store ptr %15, ptr %3, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  %16 = load ptr, ptr %3, align 8, !tbaa !29
  %17 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %16, i32 0, i32 0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = call noundef i32 @_ZN7imnodes12_GLOBAL__N_132object_pool_find_or_create_indexINS0_8NodeDataEEEiRNS0_10ObjectPoolIT_EEi(ptr noundef nonnull align 8 dereferenceable(64) %17, i32 noundef %18)
  store i32 %19, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %20, ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 18), align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %21 = load ptr, ptr %3, align 8, !tbaa !29
  %22 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %21, i32 0, i32 0
  %23 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::ObjectPool", ptr %22, i32 0, i32 0
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(105) ptr @_ZN8ImVectorIN7imnodes12_GLOBAL__N_18NodeDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16) %23, i32 noundef %24)
  store ptr %25, ptr %5, align 8, !tbaa !29
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !29
  %28 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %27, i32 0, i32 0
  store i32 %26, ptr %28, align 8, !tbaa !31
  %29 = load i32, ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), align 8, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !29
  %31 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %30, i32 0, i32 4
  %32 = getelementptr inbounds %struct.anon.12, ptr %31, i32 0, i32 0
  store i32 %29, ptr %32, align 4, !tbaa !35
  %33 = load i32, ptr getelementptr inbounds ([16 x i32], ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), i64 0, i64 1), align 4, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !29
  %35 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %34, i32 0, i32 4
  %36 = getelementptr inbounds %struct.anon.12, ptr %35, i32 0, i32 1
  store i32 %33, ptr %36, align 4, !tbaa !36
  %37 = load i32, ptr getelementptr inbounds ([16 x i32], ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), i64 0, i64 2), align 8, !tbaa !5
  %38 = load ptr, ptr %5, align 8, !tbaa !29
  %39 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %38, i32 0, i32 4
  %40 = getelementptr inbounds %struct.anon.12, ptr %39, i32 0, i32 2
  store i32 %37, ptr %40, align 4, !tbaa !37
  %41 = load i32, ptr getelementptr inbounds ([16 x i32], ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), i64 0, i64 3), align 4, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !29
  %43 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %42, i32 0, i32 4
  %44 = getelementptr inbounds %struct.anon.12, ptr %43, i32 0, i32 3
  store i32 %41, ptr %44, align 4, !tbaa !38
  %45 = load i32, ptr getelementptr inbounds ([16 x i32], ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), i64 0, i64 4), align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !29
  %47 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %46, i32 0, i32 4
  %48 = getelementptr inbounds %struct.anon.12, ptr %47, i32 0, i32 4
  store i32 %45, ptr %48, align 4, !tbaa !39
  %49 = load i32, ptr getelementptr inbounds ([16 x i32], ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), i64 0, i64 5), align 4, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !29
  %51 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %50, i32 0, i32 4
  %52 = getelementptr inbounds %struct.anon.12, ptr %51, i32 0, i32 5
  store i32 %49, ptr %52, align 4, !tbaa !40
  %53 = load i32, ptr getelementptr inbounds ([16 x i32], ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 14), i64 0, i64 6), align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !29
  %55 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %54, i32 0, i32 4
  %56 = getelementptr inbounds %struct.anon.12, ptr %55, i32 0, i32 6
  store i32 %53, ptr %56, align 4, !tbaa !41
  %57 = load float, ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 1), align 4, !tbaa !42
  %58 = load ptr, ptr %5, align 8, !tbaa !29
  %59 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %58, i32 0, i32 5
  %60 = getelementptr inbounds %struct.anon.13, ptr %59, i32 0, i32 0
  store float %57, ptr %60, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %61 = load float, ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 2), align 8, !tbaa !44
  %62 = load float, ptr getelementptr inbounds (%"struct.imnodes::Style", ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 11), i32 0, i32 3), align 4, !tbaa !45
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef %61, float noundef %62)
  %63 = load ptr, ptr %5, align 8, !tbaa !29
  %64 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %63, i32 0, i32 5
  %65 = getelementptr inbounds %struct.anon.13, ptr %64, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %65, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !46
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %66 = load ptr, ptr %5, align 8, !tbaa !29
  %67 = call <2 x float> @_ZN7imnodes12_GLOBAL__N_125get_node_title_bar_originERKNS0_8NodeDataE(ptr noundef nonnull align 8 dereferenceable(105) %66)
  store <2 x float> %67, ptr %8, align 4
  %68 = call <2 x float> @_ZN7imnodes12_GLOBAL__N_126grid_space_to_editor_spaceERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %8)
  store <2 x float> %68, ptr %7, align 4
  call void @_ZN5ImGui12SetCursorPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  %69 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN7imnodes12_GLOBAL__N_118draw_list_add_nodeEi(i32 noundef %69)
  call void @_ZN7imnodes12_GLOBAL__N_142draw_list_activate_current_node_foregroundEv()
  %70 = load ptr, ptr %5, align 8, !tbaa !29
  %71 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::NodeData", ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !31
  call void @_ZN5ImGui6PushIDEi(i32 noundef %72)
  call void @_ZN5ImGui10BeginGroupEv()
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #10
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN7imnodes12_GLOBAL__N_132object_pool_find_or_create_indexINS0_8NodeDataEEEiRNS0_10ObjectPoolIT_EEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #7

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7imnodes12_GLOBAL__N_118draw_list_add_nodeEi(i32 noundef) #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7imnodes12_GLOBAL__N_142draw_list_activate_current_node_foregroundEv() #7

declare void @_ZN5ImGui6PushIDEi(i32 noundef) #4

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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 #9 = { noreturn nounwind }
attributes #10 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !7, i64 96}
!10 = !{!"_ZTSN7imnodes12_GLOBAL__N_13$_0E", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !14, i64 40, !14, i64 56, !15, i64 72, !17, i64 80, !7, i64 96, !18, i64 104, !22, i64 128, !24, i64 248, !25, i64 264, !26, i64 280, !6, i64 296, !14, i64 304, !6, i64 320, !6, i64 324, !6, i64 328, !28, i64 332, !28, i64 336, !28, i64 340, !6, i64 344, !28, i64 348, !28, i64 352, !6, i64 356, !6, i64 360, !20, i64 364, !15, i64 368, !20, i64 376, !20, i64 377, !20, i64 378, !20, i64 379, !20, i64 380}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTS12ImGuiStorage", !13, i64 0}
!13 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !6, i64 0, !6, i64 4, !11, i64 8}
!14 = !{!"_ZTS8ImVectorIiE", !6, i64 0, !6, i64 4, !11, i64 8}
!15 = !{!"_ZTS6ImVec2", !16, i64 0, !16, i64 4}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!18 = !{!"_ZTSN7imnodes2IOE", !19, i64 0, !21, i64 16}
!19 = !{!"_ZTSN7imnodes2IO23EmulateThreeButtonMouseE", !20, i64 0, !11, i64 8}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSN7imnodes2IO27LinkDetachWithModifierClickE", !11, i64 0}
!22 = !{!"_ZTSN7imnodes5StyleE", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !16, i64 40, !16, i64 44, !16, i64 48, !23, i64 52, !7, i64 56}
!23 = !{!"_ZTSN7imnodes10StyleFlagsE", !7, i64 0}
!24 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_117ColorStyleElementEE", !6, i64 0, !6, i64 4, !11, i64 8}
!25 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_112StyleElementEE", !6, i64 0, !6, i64 4, !11, i64 8}
!26 = !{!"_ZTS15ImGuiTextBuffer", !27, i64 0}
!27 = !{!"_ZTS8ImVectorIcE", !6, i64 0, !6, i64 4, !11, i64 8}
!28 = !{!"_ZTSN7imnodes12_GLOBAL__N_113OptionalIndexE", !6, i64 0}
!29 = !{!11, !11, i64 0}
!30 = !{!10, !6, i64 320}
!31 = !{!32, !6, i64 0}
!32 = !{!"_ZTSN7imnodes12_GLOBAL__N_18NodeDataE", !6, i64 0, !15, i64 4, !17, i64 12, !17, i64 28, !33, i64 44, !34, i64 72, !14, i64 88, !20, i64 104}
!33 = !{!"_ZTSN7imnodes12_GLOBAL__N_18NodeData3$_3E", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24}
!34 = !{!"_ZTSN7imnodes12_GLOBAL__N_18NodeData3$_4E", !16, i64 0, !15, i64 4}
!35 = !{!32, !6, i64 44}
!36 = !{!32, !6, i64 48}
!37 = !{!32, !6, i64 52}
!38 = !{!32, !6, i64 56}
!39 = !{!32, !6, i64 60}
!40 = !{!32, !6, i64 64}
!41 = !{!32, !6, i64 68}
!42 = !{!10, !16, i64 132}
!43 = !{!32, !16, i64 72}
!44 = !{!10, !16, i64 136}
!45 = !{!10, !16, i64 140}
!46 = !{i64 0, i64 4, !47, i64 4, i64 4, !47}
!47 = !{!16, !16, 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.anon = type <{ ptr, ptr, ptr, %struct.ImGuiStorage, %struct.ImVector.0, %struct.ImVector.0, %struct.ImVec2, %struct.ImRect, i32, [4 x i8], %"struct.imnodes::IO", %"struct.imnodes::Style", %struct.ImVector.1, %struct.ImVector.2, %struct.ImGuiTextBuffer, i32, [4 x i8], %struct.ImVector.0, i32, i32, i32, %"struct.imnodes::(anonymous namespace)::OptionalIndex", %"struct.imnodes::(anonymous namespace)::OptionalIndex", %"struct.imnodes::(anonymous namespace)::OptionalIndex", i32, %"struct.imnodes::(anonymous namespace)::OptionalIndex", %"struct.imnodes::(anonymous namespace)::OptionalIndex", i32, i32, i8, [3 x i8], %struct.ImVec2, i8, i8, i8, i8, i8, [3 x i8] }>
%struct.ImGuiStorage = type { %struct.ImVector }
%struct.ImVector = type { i32, i32, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%"struct.imnodes::IO" = type { %"struct.imnodes::IO::EmulateThreeButtonMouse", %"struct.imnodes::IO::LinkDetachWithModifierClick" }
%"struct.imnodes::IO::EmulateThreeButtonMouse" = type { i8, ptr }
%"struct.imnodes::IO::LinkDetachWithModifierClick" = type { ptr }
%"struct.imnodes::Style" = type { float, float, float, float, float, float, float, float, float, float, float, float, float, i32, [16 x i32] }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImGuiTextBuffer = type { %struct.ImVector.3 }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%"struct.imnodes::(anonymous namespace)::OptionalIndex" = type { i32 }
%struct.ImVec2 = type { float, float }

@_ZN7imnodes12_GLOBAL__N_11gE = external hidden local_unnamed_addr global %struct.anon, align 8
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1
@__PRETTY_FUNCTION__._ZN7imnodes9BeginNodeEi = 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 nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv() local_unnamed_addr #1

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

; 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

declare void @_ZN5ImGui10BeginGroupEv() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(105) ptr @_ZN8ImVectorIN7imnodes12_GLOBAL__N_18NodeDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7imnodes9BeginNodeEi(i32 noundef %0) local_unnamed_addr #5 {
  %2 = alloca %struct.ImVec2, align 8
  %3 = alloca %struct.ImVec2, align 8
  %4 = alloca %struct.ImVec2, align 8
  %5 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 96), align 8, !tbaa !5
  %6 = icmp eq i32 %5, 2
  br i1 %6, label %8, label %7

7:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 2122, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7imnodes9BeginNodeEi) #8
  unreachable

8:                                                ; preds = %1
  store i32 4, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 96), align 8, !tbaa !5
  %9 = tail call noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv()
  %10 = tail call noundef i32 @_ZN7imnodes12_GLOBAL__N_132object_pool_find_or_create_indexINS0_8NodeDataEEEiRNS0_10ObjectPoolIT_EEi(ptr noundef nonnull align 8 dereferenceable(64) %9, i32 noundef %0)
  store i32 %10, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 320), align 8, !tbaa !28
  %11 = tail call noundef nonnull align 8 dereferenceable(105) ptr @_ZN8ImVectorIN7imnodes12_GLOBAL__N_18NodeDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %10)
  store i32 %0, ptr %11, align 8, !tbaa !29
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 184), align 8, !tbaa !33
  %13 = getelementptr inbounds i8, ptr %11, i64 44
  store i32 %12, ptr %13, align 4, !tbaa !34
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 188), align 4, !tbaa !33
  %15 = getelementptr inbounds i8, ptr %11, i64 48
  store i32 %14, ptr %15, align 8, !tbaa !35
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 192), align 8, !tbaa !33
  %17 = getelementptr inbounds i8, ptr %11, i64 52
  store i32 %16, ptr %17, align 4, !tbaa !36
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 196), align 4, !tbaa !33
  %19 = getelementptr inbounds i8, ptr %11, i64 56
  store i32 %18, ptr %19, align 8, !tbaa !37
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 200), align 8, !tbaa !33
  %21 = getelementptr inbounds i8, ptr %11, i64 60
  store i32 %20, ptr %21, align 4, !tbaa !38
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 204), align 4, !tbaa !33
  %23 = getelementptr inbounds i8, ptr %11, i64 64
  store i32 %22, ptr %23, align 8, !tbaa !39
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 208), align 8, !tbaa !33
  %25 = getelementptr inbounds i8, ptr %11, i64 68
  store i32 %24, ptr %25, align 4, !tbaa !40
  %26 = load float, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 132), align 4, !tbaa !41
  %27 = getelementptr inbounds i8, ptr %11, i64 72
  store float %26, ptr %27, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %28 = load float, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 136), align 8, !tbaa !43
  %29 = load float, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 140), align 4, !tbaa !44
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %2, float noundef %28, float noundef %29)
  %30 = getelementptr inbounds i8, ptr %11, i64 76
  %31 = load i64, ptr %2, align 8
  store i64 %31, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %32 = call <2 x float> @_ZN7imnodes12_GLOBAL__N_125get_node_title_bar_originERKNS0_8NodeDataE(ptr noundef nonnull align 8 dereferenceable(105) %11)
  store <2 x float> %32, ptr %4, align 8
  %33 = call <2 x float> @_ZN7imnodes12_GLOBAL__N_126grid_space_to_editor_spaceERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %33, ptr %3, align 8
  call void @_ZN5ImGui12SetCursorPosERK6ImVec2(ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @_ZN7imnodes12_GLOBAL__N_118draw_list_add_nodeEi(i32 noundef %10)
  call void @_ZN7imnodes12_GLOBAL__N_142draw_list_activate_current_node_foregroundEv()
  %34 = load i32, ptr %11, align 8, !tbaa !29
  call void @_ZN5ImGui6PushIDEi(i32 noundef %34)
  call void @_ZN5ImGui10BeginGroupEv()
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN7imnodes12_GLOBAL__N_132object_pool_find_or_create_indexINS0_8NodeDataEEEiRNS0_10ObjectPoolIT_EEi(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZN7imnodes12_GLOBAL__N_125get_node_title_bar_originERKNS0_8NodeDataE(ptr noundef nonnull align 8 dereferenceable(105)) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7imnodes12_GLOBAL__N_118draw_list_add_nodeEi(i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7imnodes12_GLOBAL__N_142draw_list_activate_current_node_foregroundEv() local_unnamed_addr #6

declare void @_ZN5ImGui6PushIDEi(i32 noundef) local_unnamed_addr #3

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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 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 = { 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 #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, !8, i64 96}
!6 = !{!"_ZTSN7imnodes12_GLOBAL__N_13$_0E", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !13, i64 40, !13, i64 56, !14, i64 72, !16, i64 80, !8, i64 96, !17, i64 104, !21, i64 128, !23, i64 248, !24, i64 264, !25, i64 280, !12, i64 296, !13, i64 304, !12, i64 320, !12, i64 324, !12, i64 328, !27, i64 332, !27, i64 336, !27, i64 340, !12, i64 344, !27, i64 348, !27, i64 352, !12, i64 356, !12, i64 360, !19, i64 364, !14, i64 368, !19, i64 376, !19, i64 377, !19, i64 378, !19, i64 379, !19, i64 380}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS12ImGuiStorage", !11, i64 0}
!11 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !12, i64 0, !12, i64 4, !7, i64 8}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTS8ImVectorIiE", !12, i64 0, !12, i64 4, !7, i64 8}
!14 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!15 = !{!"float", !8, i64 0}
!16 = !{!"_ZTS6ImRect", !14, i64 0, !14, i64 8}
!17 = !{!"_ZTSN7imnodes2IOE", !18, i64 0, !20, i64 16}
!18 = !{!"_ZTSN7imnodes2IO23EmulateThreeButtonMouseE", !19, i64 0, !7, i64 8}
!19 = !{!"bool", !8, i64 0}
!20 = !{!"_ZTSN7imnodes2IO27LinkDetachWithModifierClickE", !7, i64 0}
!21 = !{!"_ZTSN7imnodes5StyleE", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !22, i64 52, !8, i64 56}
!22 = !{!"_ZTSN7imnodes10StyleFlagsE", !8, i64 0}
!23 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_117ColorStyleElementEE", !12, i64 0, !12, i64 4, !7, i64 8}
!24 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_112StyleElementEE", !12, i64 0, !12, i64 4, !7, i64 8}
!25 = !{!"_ZTS15ImGuiTextBuffer", !26, i64 0}
!26 = !{!"_ZTS8ImVectorIcE", !12, i64 0, !12, i64 4, !7, i64 8}
!27 = !{!"_ZTSN7imnodes12_GLOBAL__N_113OptionalIndexE", !12, i64 0}
!28 = !{!6, !12, i64 320}
!29 = !{!30, !12, i64 0}
!30 = !{!"_ZTSN7imnodes12_GLOBAL__N_18NodeDataE", !12, i64 0, !14, i64 4, !16, i64 12, !16, i64 28, !31, i64 44, !32, i64 72, !13, i64 88, !19, i64 104}
!31 = !{!"_ZTSN7imnodes12_GLOBAL__N_18NodeData3$_3E", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24}
!32 = !{!"_ZTSN7imnodes12_GLOBAL__N_18NodeData3$_4E", !15, i64 0, !14, i64 4}
!33 = !{!12, !12, i64 0}
!34 = !{!30, !12, i64 44}
!35 = !{!30, !12, i64 48}
!36 = !{!30, !12, i64 52}
!37 = !{!30, !12, i64 56}
!38 = !{!30, !12, i64 60}
!39 = !{!30, !12, i64 64}
!40 = !{!30, !12, i64 68}
!41 = !{!6, !15, i64 132}
!42 = !{!30, !15, i64 72}
!43 = !{!6, !15, i64 136}
!44 = !{!6, !15, i64 140}


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