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

; 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)::PinData" = type { i32, i32, %struct.ImRect, i32, i32, %struct.ImVec2, i32, %struct.anon.15 }
%struct.anon.15 = type { i32, i32 }

@_ZN7imnodes12_GLOBAL__N_11gE = external hidden global %struct.anon, align 8
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb = external hidden unnamed_addr constant [65 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [24 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZNK7imnodes12_GLOBAL__N_113OptionalIndex5valueEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7imnodes13IsLinkCreatedEPiS0_Pb(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = 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
  %11 = load i32, ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 8), align 8, !tbaa !9
  %12 = icmp eq i32 %11, 1
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %16

14:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 2558, ptr noundef @__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb) #5
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  br label %22

20:                                               ; preds = %16
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 2559, ptr noundef @__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb) #5
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  br label %28

26:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.1, i32 noundef 2560, ptr noundef @__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb) #5
  unreachable

27:                                               ; No predecessors!
  br label %28

28:                                               ; preds = %27, %25
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  %29 = load i32, ptr getelementptr inbounds (%struct.anon, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i32 0, i32 27), align 4, !tbaa !29
  %30 = and i32 %29, 4
  %31 = icmp ne i32 %30, 0
  %32 = zext i1 %31 to i8
  store i8 %32, ptr %7, align 1, !tbaa !30
  %33 = load i8, ptr %7, align 1, !tbaa !30, !range !31, !noundef !32
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %73

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %36 = call noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv()
  store ptr %36, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %37, i32 0, i32 8
  %39 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::ClickInteractionState", ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.anon.10, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 4, !tbaa !33
  store i32 %41, ptr %9, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %42, i32 0, i32 8
  %44 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::ClickInteractionState", ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.anon.10, ptr %44, i32 0, i32 1
  %46 = call noundef i32 @_ZNK7imnodes12_GLOBAL__N_113OptionalIndex5valueEv(ptr noundef nonnull align 4 dereferenceable(4) %45)
  store i32 %46, ptr %10, align 4, !tbaa !45
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %47, i32 0, i32 1
  %49 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::ObjectPool.6", ptr %48, i32 0, i32 0
  %50 = load i32, ptr %9, align 4, !tbaa !45
  %51 = call noundef nonnull align 4 dereferenceable(52) ptr @_ZNK8ImVectorIN7imnodes12_GLOBAL__N_17PinDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16) %49, i32 noundef %50)
  %52 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::PinData", ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 4, !tbaa !46
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 %53, ptr %54, align 4, !tbaa !45
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %55, i32 0, i32 1
  %57 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::ObjectPool.6", ptr %56, i32 0, i32 0
  %58 = load i32, ptr %10, align 4, !tbaa !45
  %59 = call noundef nonnull align 4 dereferenceable(52) ptr @_ZNK8ImVectorIN7imnodes12_GLOBAL__N_17PinDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16) %57, i32 noundef %58)
  %60 = getelementptr inbounds %"struct.imnodes::(anonymous namespace)::PinData", ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !46
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %61, ptr %62, align 4, !tbaa !45
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %72

65:                                               ; preds = %35
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.imnodes::EditorContext", ptr %66, i32 0, i32 7
  %68 = load i32, ptr %67, align 8, !tbaa !50
  %69 = icmp eq i32 %68, 2
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = zext i1 %69 to i8
  store i8 %71, ptr %70, align 1, !tbaa !30
  br label %72

72:                                               ; preds = %65, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %73

73:                                               ; preds = %72, %28
  %74 = load i8, ptr %7, align 1, !tbaa !30, !range !31, !noundef !32
  %75 = trunc i8 %74 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  ret i1 %75
}

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 = { 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 = { 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 #4 = { 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !7, i64 96}
!10 = !{!"_ZTSN7imnodes12_GLOBAL__N_13$_0E", !6, i64 0, !6, i64 8, !6, i64 16, !11, 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, !13, i64 296, !14, i64 304, !13, i64 320, !13, i64 324, !13, i64 328, !28, i64 332, !28, i64 336, !28, i64 340, !13, i64 344, !28, i64 348, !28, i64 352, !13, i64 356, !13, i64 360, !20, i64 364, !15, i64 368, !20, i64 376, !20, i64 377, !20, i64 378, !20, i64 379, !20, i64 380}
!11 = !{!"_ZTS12ImGuiStorage", !12, i64 0}
!12 = !{!"_ZTS8ImVectorIN12ImGuiStorage16ImGuiStoragePairEE", !13, i64 0, !13, i64 4, !6, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS8ImVectorIiE", !13, i64 0, !13, i64 4, !6, 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, !6, i64 8}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSN7imnodes2IO27LinkDetachWithModifierClickE", !6, 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", !13, i64 0, !13, i64 4, !6, i64 8}
!25 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_112StyleElementEE", !13, i64 0, !13, i64 4, !6, i64 8}
!26 = !{!"_ZTS15ImGuiTextBuffer", !27, i64 0}
!27 = !{!"_ZTS8ImVectorIcE", !13, i64 0, !13, i64 4, !6, i64 8}
!28 = !{!"_ZTSN7imnodes12_GLOBAL__N_113OptionalIndexE", !13, i64 0}
!29 = !{!10, !13, i64 356}
!30 = !{!20, !20, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!34, !13, i64 252}
!34 = !{!"_ZTSN7imnodes13EditorContextE", !35, i64 0, !38, i64 64, !40, i64 128, !14, i64 192, !15, i64 208, !14, i64 216, !14, i64 232, !7, i64 248, !42, i64 252}
!35 = !{!"_ZTSN7imnodes12_GLOBAL__N_110ObjectPoolINS0_8NodeDataEEE", !36, i64 0, !37, i64 16, !14, i64 32, !11, i64 48}
!36 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_18NodeDataEE", !13, i64 0, !13, i64 4, !6, i64 8}
!37 = !{!"_ZTS8ImVectorIbE", !13, i64 0, !13, i64 4, !6, i64 8}
!38 = !{!"_ZTSN7imnodes12_GLOBAL__N_110ObjectPoolINS0_7PinDataEEE", !39, i64 0, !37, i64 16, !14, i64 32, !11, i64 48}
!39 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_17PinDataEE", !13, i64 0, !13, i64 4, !6, i64 8}
!40 = !{!"_ZTSN7imnodes12_GLOBAL__N_110ObjectPoolINS0_8LinkDataEEE", !41, i64 0, !37, i64 16, !14, i64 32, !11, i64 48}
!41 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_18LinkDataEE", !13, i64 0, !13, i64 4, !6, i64 8}
!42 = !{!"_ZTSN7imnodes12_GLOBAL__N_121ClickInteractionStateE", !43, i64 0, !44, i64 12}
!43 = !{!"_ZTSN7imnodes12_GLOBAL__N_121ClickInteractionState3$_1E", !13, i64 0, !28, i64 4, !7, i64 8}
!44 = !{!"_ZTSN7imnodes12_GLOBAL__N_121ClickInteractionState3$_2E", !17, i64 0}
!45 = !{!13, !13, i64 0}
!46 = !{!47, !13, i64 0}
!47 = !{!"_ZTSN7imnodes12_GLOBAL__N_17PinDataE", !13, i64 0, !13, i64 4, !17, i64 8, !7, i64 24, !48, i64 28, !15, i64 32, !13, i64 40, !49, i64 44}
!48 = !{!"_ZTSN7imnodes8PinShapeE", !7, i64 0}
!49 = !{!"_ZTSN7imnodes12_GLOBAL__N_17PinData3$_5E", !13, i64 0, !13, i64 4}
!50 = !{!34, !7, i64 248}


; 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.3 = external hidden unnamed_addr constant [30 x i8], align 1
@__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb = external hidden unnamed_addr constant [65 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv() local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZNK7imnodes12_GLOBAL__N_113OptionalIndex5valueEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN7imnodes13IsLinkCreatedEPiS0_Pb(ptr noundef writeonly %0, ptr noundef writeonly %1, ptr noundef writeonly %2) local_unnamed_addr #0 {
  %4 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 96), align 8, !tbaa !5
  %5 = icmp eq i32 %4, 1
  br i1 %5, label %7, label %6

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 2558, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb) #3
  unreachable

7:                                                ; preds = %3
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 2559, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb) #3
  unreachable

9:                                                ; preds = %7
  %.not16 = icmp eq ptr %1, null
  br i1 %.not16, label %10, label %11

10:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.1, i32 noundef 2560, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7imnodes13IsLinkCreatedEPiS0_Pb) #3
  unreachable

11:                                               ; preds = %9
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN7imnodes12_GLOBAL__N_11gE, i64 356), align 4, !tbaa !28
  %13 = and i32 %12, 4
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %31

15:                                               ; preds = %11
  %16 = tail call noundef nonnull align 8 dereferenceable(280) ptr @_ZN7imnodes12_GLOBAL__N_118editor_context_getEv()
  %17 = getelementptr inbounds i8, ptr %16, i64 252
  %18 = load i32, ptr %17, align 4, !tbaa !29
  %19 = getelementptr inbounds i8, ptr %16, i64 256
  %20 = tail call noundef i32 @_ZNK7imnodes12_GLOBAL__N_113OptionalIndex5valueEv(ptr noundef nonnull align 4 dereferenceable(4) %19)
  %21 = getelementptr inbounds i8, ptr %16, i64 64
  %22 = tail call noundef nonnull align 4 dereferenceable(52) ptr @_ZNK8ImVectorIN7imnodes12_GLOBAL__N_17PinDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %18)
  %23 = load i32, ptr %22, align 4, !tbaa !41
  store i32 %23, ptr %0, align 4, !tbaa !45
  %24 = tail call noundef nonnull align 4 dereferenceable(52) ptr @_ZNK8ImVectorIN7imnodes12_GLOBAL__N_17PinDataEEixEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %20)
  %25 = load i32, ptr %24, align 4, !tbaa !41
  store i32 %25, ptr %1, align 4, !tbaa !45
  %.not17 = icmp eq ptr %2, null
  br i1 %.not17, label %31, label %26

26:                                               ; preds = %15
  %27 = getelementptr inbounds i8, ptr %16, i64 248
  %28 = load i32, ptr %27, align 8, !tbaa !46
  %29 = icmp eq i32 %28, 2
  %30 = zext i1 %29 to i8
  store i8 %30, ptr %2, align 1, !tbaa !47
  br label %31

31:                                               ; preds = %15, %26, %11
  ret i1 %14
}

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 = { 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 = { 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 #3 = { noreturn 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 356}
!29 = !{!30, !12, i64 252}
!30 = !{!"_ZTSN7imnodes13EditorContextE", !31, i64 0, !34, i64 64, !36, i64 128, !13, i64 192, !14, i64 208, !13, i64 216, !13, i64 232, !8, i64 248, !38, i64 252}
!31 = !{!"_ZTSN7imnodes12_GLOBAL__N_110ObjectPoolINS0_8NodeDataEEE", !32, i64 0, !33, i64 16, !13, i64 32, !10, i64 48}
!32 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_18NodeDataEE", !12, i64 0, !12, i64 4, !7, i64 8}
!33 = !{!"_ZTS8ImVectorIbE", !12, i64 0, !12, i64 4, !7, i64 8}
!34 = !{!"_ZTSN7imnodes12_GLOBAL__N_110ObjectPoolINS0_7PinDataEEE", !35, i64 0, !33, i64 16, !13, i64 32, !10, i64 48}
!35 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_17PinDataEE", !12, i64 0, !12, i64 4, !7, i64 8}
!36 = !{!"_ZTSN7imnodes12_GLOBAL__N_110ObjectPoolINS0_8LinkDataEEE", !37, i64 0, !33, i64 16, !13, i64 32, !10, i64 48}
!37 = !{!"_ZTS8ImVectorIN7imnodes12_GLOBAL__N_18LinkDataEE", !12, i64 0, !12, i64 4, !7, i64 8}
!38 = !{!"_ZTSN7imnodes12_GLOBAL__N_121ClickInteractionStateE", !39, i64 0, !40, i64 12}
!39 = !{!"_ZTSN7imnodes12_GLOBAL__N_121ClickInteractionState3$_1E", !12, i64 0, !27, i64 4, !8, i64 8}
!40 = !{!"_ZTSN7imnodes12_GLOBAL__N_121ClickInteractionState3$_2E", !16, i64 0}
!41 = !{!42, !12, i64 0}
!42 = !{!"_ZTSN7imnodes12_GLOBAL__N_17PinDataE", !12, i64 0, !12, i64 4, !16, i64 8, !8, i64 24, !43, i64 28, !14, i64 32, !12, i64 40, !44, i64 44}
!43 = !{!"_ZTSN7imnodes8PinShapeE", !8, i64 0}
!44 = !{!"_ZTSN7imnodes12_GLOBAL__N_17PinData3$_5E", !12, i64 0, !12, i64 4}
!45 = !{!12, !12, i64 0}
!46 = !{!30, !8, i64 248}
!47 = !{!19, !19, i64 0}


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