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

; 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::DeleteItemsAction" = type <{ %"struct.vox::NodeEditor::Detail::EditorAction", i8, i8, [6 x i8], %"class.std::vector.28", i32, i32, %"class.std::vector.28", i32, [4 x i8] }>
%"struct.vox::NodeEditor::Detail::EditorAction" = type { ptr, ptr }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<vox::NodeEditor::Detail::Object *, std::allocator<vox::NodeEditor::Detail::Object *>>::_Vector_impl" }
%"struct.std::_Vector_base<vox::NodeEditor::Detail::Object *, std::allocator<vox::NodeEditor::Detail::Object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<vox::NodeEditor::Detail::Object *, std::allocator<vox::NodeEditor::Detail::Object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vox::NodeEditor::Detail::Object *, std::allocator<vox::NodeEditor::Detail::Object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN3vox10NodeEditor6Detail17DeleteItemsAction5BeginEv = external hidden unnamed_addr constant [57 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN3vox10NodeEditor6Detail17DeleteItemsAction5BeginEv(ptr noundef nonnull align 8 dereferenceable(88) %0) #1 align 2 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8
  %5 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::DeleteItemsAction", ptr %4, i32 0, i32 1
  %6 = load i8, ptr %5, align 8, !tbaa !9, !range !20, !noundef !21
  %7 = trunc i8 %6 to i1
  br i1 %7, label %9, label %8

8:                                                ; preds = %1
  store i1 false, ptr %2, align 1
  br label %24

9:                                                ; preds = %1
  %10 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::DeleteItemsAction", ptr %4, i32 0, i32 2
  %11 = load i8, ptr %10, align 1, !tbaa !22, !range !20, !noundef !21
  %12 = trunc i8 %11 to i1
  %13 = xor i1 %12, true
  br i1 %13, label %14, label %15

14:                                               ; preds = %9
  br label %17

15:                                               ; preds = %9
  call void @__assert_fail(ptr noundef @.str.54, ptr noundef @.str.1, i32 noundef 4059, ptr noundef @__PRETTY_FUNCTION__._ZN3vox10NodeEditor6Detail17DeleteItemsAction5BeginEv) #2
  unreachable

16:                                               ; No predecessors!
  br label %17

17:                                               ; preds = %16, %14
  %18 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::DeleteItemsAction", ptr %4, i32 0, i32 2
  store i8 1, ptr %18, align 1, !tbaa !22
  %19 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::DeleteItemsAction", ptr %4, i32 0, i32 5
  store i32 0, ptr %19, align 8, !tbaa !23
  %20 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::DeleteItemsAction", ptr %4, i32 0, i32 6
  store i32 0, ptr %20, align 4, !tbaa !24
  %21 = getelementptr inbounds %"struct.vox::NodeEditor::Detail::DeleteItemsAction", ptr %4, i32 0, i32 1
  %22 = load i8, ptr %21, align 8, !tbaa !9, !range !20, !noundef !21
  %23 = trunc i8 %22 to i1
  store i1 %23, ptr %2, align 1
  br label %24

24:                                               ; preds = %17, %8
  %25 = load i1, ptr %2, align 1
  ret i1 %25
}

attributes #0 = { 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 #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 }

!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, !12, i64 16}
!10 = !{!"_ZTSN3vox10NodeEditor6Detail17DeleteItemsActionE", !11, i64 0, !12, i64 16, !12, i64 17, !13, i64 24, !17, i64 48, !18, i64 52, !13, i64 56, !19, i64 80}
!11 = !{!"_ZTSN3vox10NodeEditor6Detail12EditorActionE", !6, i64 8}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSN3vox10NodeEditor6Detail17DeleteItemsAction12IteratorTypeE", !7, i64 0}
!18 = !{!"_ZTSN3vox10NodeEditor6Detail17DeleteItemsAction10UserActionE", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!10, !12, i64 17}
!23 = !{!10, !17, i64 48}
!24 = !{!10, !18, i64 52}


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

@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN3vox10NodeEditor6Detail17DeleteItemsAction5BeginEv = external hidden unnamed_addr constant [57 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN3vox10NodeEditor6Detail17DeleteItemsAction5BeginEv(ptr nocapture noundef nonnull align 8 dereferenceable(88) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 16
  %3 = load i8, ptr %2, align 8, !tbaa !5, !range !19, !noundef !20
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %13

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 17
  %7 = load i8, ptr %6, align 1, !tbaa !21, !range !19, !noundef !20
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %9, label %10

9:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.54, ptr noundef nonnull @.str.1, i32 noundef 4059, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3vox10NodeEditor6Detail17DeleteItemsAction5BeginEv) #2
  unreachable

10:                                               ; preds = %5
  store i8 1, ptr %6, align 1, !tbaa !21
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 0, ptr %11, align 8, !tbaa !22
  %12 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 0, ptr %12, align 4, !tbaa !23
  br label %13

13:                                               ; preds = %1, %10
  ret i1 %4
}

attributes #0 = { 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 #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 }

!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, !11, i64 16}
!6 = !{!"_ZTSN3vox10NodeEditor6Detail17DeleteItemsActionE", !7, i64 0, !11, i64 16, !11, i64 17, !12, i64 24, !16, i64 48, !17, i64 52, !12, i64 56, !18, i64 80}
!7 = !{!"_ZTSN3vox10NodeEditor6Detail12EditorActionE", !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSSt6vectorIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN3vox10NodeEditor6Detail6ObjectESaIS4_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!16 = !{!"_ZTSN3vox10NodeEditor6Detail17DeleteItemsAction12IteratorTypeE", !9, i64 0}
!17 = !{!"_ZTSN3vox10NodeEditor6Detail17DeleteItemsAction10UserActionE", !9, i64 0}
!18 = !{!"int", !9, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !11, i64 17}
!22 = !{!6, !16, i64 48}
!23 = !{!6, !17, i64 52}


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