; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Codesprints 2016/Codesprint Aug/Problem G/brute.ll (ZN15PalindromicTree3endEv)

; 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.PalindromicTree::Node" = type { i32, i32, i64, i64, ptr, %"class.std::map", %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, std::pair<const char, PalindromicTree::Node *>, std::_Select1st<std::pair<const char, PalindromicTree::Node *>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, PalindromicTree::Node *>, std::_Select1st<std::pair<const char, PalindromicTree::Node *>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.PalindromicTree::ORDER" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZN15PalindromicTree4nodeE = external dso_local global [1000111 x %"struct.PalindromicTree::Node"], align 16
@_ZN15PalindromicTree6node_iE = external dso_local global i32, align 4
@_ZN15PalindromicTree5root0E = external dso_local global ptr, align 8
@_ZN15PalindromicTree1sB5cxx11E = external dso_local global %"class.std::__cxx11::basic_string", align 8

; 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 uwtable
define dso_local void @_ZN15PalindromicTree3endEv() #1 {
  %1 = alloca %"struct.PalindromicTree::ORDER", align 8
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"struct.PalindromicTree::ORDER", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @_ZN15PalindromicTree5ORDERC2ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(32) @_ZN15PalindromicTree1sB5cxx11E)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %7 = load i32, ptr @_ZN15PalindromicTree6node_iE, align 4, !tbaa !5
  %8 = sub nsw i32 %7, 1
  store i32 %8, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %86, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = icmp sge i32 %10, 0
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %89

13:                                               ; preds = %9
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  br label %86

17:                                               ; preds = %13
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 1
  br i1 %19, label %20, label %32

20:                                               ; preds = %17
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %22
  %24 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %23, i32 0, i32 2
  %25 = load i64, ptr %24, align 8, !tbaa !9
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %27
  %29 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %28, i32 0, i32 3
  %30 = load i64, ptr %29, align 8, !tbaa !26
  %31 = add nsw i64 %30, %25
  store i64 %31, ptr %29, align 8, !tbaa !26
  br label %32

32:                                               ; preds = %20, %17
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %34
  %36 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %35, i32 0, i32 2
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %39
  %41 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %42, i32 0, i32 2
  %44 = load i64, ptr %43, align 8, !tbaa !9
  %45 = add nsw i64 %44, %37
  store i64 %45, ptr %43, align 8, !tbaa !9
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %47
  %49 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %48, i32 0, i32 3
  %50 = load i64, ptr %49, align 8, !tbaa !26
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %52
  %54 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %53, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %56 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %55, i32 0, i32 3
  %57 = load i64, ptr %56, align 8, !tbaa !26
  %58 = add nsw i64 %57, %50
  store i64 %58, ptr %56, align 8, !tbaa !26
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %60
  %62 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !27
  %64 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %63, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %66
  store ptr %67, ptr %3, align 8, !tbaa !28
  call void @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %69
  %71 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %70, i32 0, i32 6
  %72 = call ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #5
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %75
  %77 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %76, i32 0, i32 6
  %78 = call ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #5
  %79 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %1, i64 8, i1 false), !tbaa.struct !29
  %80 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8
  %82 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8
  %84 = getelementptr inbounds %"struct.PalindromicTree::ORDER", ptr %6, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN15PalindromicTree4NodeESt6vectorIS4_SaIS4_EEEENS2_5ORDEREEvT_SB_T0_(ptr %81, ptr %83, ptr %85)
  br label %86

86:                                               ; preds = %32, %16
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = add nsw i32 %87, -1
  store i32 %88, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !30

89:                                               ; preds = %12
  %90 = load ptr, ptr @_ZN15PalindromicTree5root0E, align 8, !tbaa !28
  %91 = getelementptr inbounds %"struct.PalindromicTree::Node", ptr %90, i32 0, i32 2
  store i64 0, ptr %91, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN15PalindromicTree4NodeESt6vectorIS4_SaIS4_EEEENS2_5ORDEREEvT_SB_T0_(ptr, ptr, ptr) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; 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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { inlinehint 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !11, i64 8}
!10 = !{!"_ZTSN15PalindromicTree4NodeE", !6, i64 0, !6, i64 4, !11, i64 8, !11, i64 16, !12, i64 24, !13, i64 32, !22, i64 80}
!11 = !{!"long long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSSt3mapIcPN15PalindromicTree4NodeESt4lessIcESaISt4pairIKcS2_EEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeIcSt4pairIKcPN15PalindromicTree4NodeEESt10_Select1stIS5_ESt4lessIcESaIS5_EE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeIcSt4pairIKcPN15PalindromicTree4NodeEESt10_Select1stIS5_ESt4lessIcESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIcEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessIcE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !21, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt6vectorIPN15PalindromicTree4NodeESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIPN15PalindromicTree4NodeESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN15PalindromicTree4NodeESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN15PalindromicTree4NodeESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!26 = !{!10, !11, i64 16}
!27 = !{!10, !12, i64 24}
!28 = !{!12, !12, i64 0}
!29 = !{i64 0, i64 8, !28}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


; 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.PalindromicTree::Node" = type { i32, i32, i64, i64, ptr, %"class.std::map", %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, std::pair<const char, PalindromicTree::Node *>, std::_Select1st<std::pair<const char, PalindromicTree::Node *>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, PalindromicTree::Node *>, std::_Select1st<std::pair<const char, PalindromicTree::Node *>>, std::less<char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PalindromicTree::Node *, std::allocator<PalindromicTree::Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.PalindromicTree::ORDER" = type { ptr }

@_ZN15PalindromicTree4nodeE = external dso_local global [1000111 x %"struct.PalindromicTree::Node"], align 16
@_ZN15PalindromicTree6node_iE = external dso_local local_unnamed_addr global i32, align 4
@_ZN15PalindromicTree5root0E = external dso_local local_unnamed_addr global ptr, align 8
@_ZN15PalindromicTree1sB5cxx11E = external dso_local global %"class.std::__cxx11::basic_string", align 8

; 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 uwtable
define dso_local void @_ZN15PalindromicTree3endEv() local_unnamed_addr #1 {
  %1 = alloca %"struct.PalindromicTree::ORDER", align 8
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  call void @_ZN15PalindromicTree5ORDERC2ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(32) @_ZN15PalindromicTree1sB5cxx11E)
  %3 = load i32, ptr @_ZN15PalindromicTree6node_iE, align 4, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %5 = zext nneg i32 %3 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %32, %0
  %6 = load ptr, ptr @_ZN15PalindromicTree5root0E, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 0, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %32
  %indvars.iv = phi i64 [ %5, %.lr.ph.preheader ], [ %indvars.iv.next, %32 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %8 = icmp eq i64 %indvars.iv.next, 1
  br i1 %8, label %32, label %9

9:                                                ; preds = %.lr.ph
  %10 = icmp ugt i64 %indvars.iv, 2
  %11 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %indvars.iv.next
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %11, i64 16
  %15 = load i64, ptr %14, align 8, !tbaa !27
  br i1 %10, label %16, label %._crit_edge20

16:                                               ; preds = %9
  %17 = add nsw i64 %15, %13
  store i64 %17, ptr %14, align 8, !tbaa !27
  br label %._crit_edge20

._crit_edge20:                                    ; preds = %9, %16
  %18 = phi i64 [ %17, %16 ], [ %15, %9 ]
  %19 = getelementptr inbounds [1000111 x %"struct.PalindromicTree::Node"], ptr @_ZN15PalindromicTree4nodeE, i64 0, i64 %indvars.iv.next
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !28
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = add nsw i64 %23, %13
  store i64 %24, ptr %22, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %21, i64 16
  %26 = load i64, ptr %25, align 8, !tbaa !27
  %27 = add nsw i64 %26, %18
  store i64 %27, ptr %25, align 8, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %21, i64 80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store ptr %19, ptr %2, align 8, !tbaa !9
  call void @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %29 = getelementptr inbounds i8, ptr %19, i64 80
  %30 = call ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %31 = call ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %.sroa.0.0.copyload = load ptr, ptr %1, align 8, !tbaa !9
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN15PalindromicTree4NodeESt6vectorIS4_SaIS4_EEEENS2_5ORDEREEvT_SB_T0_(ptr %30, ptr %31, ptr %.sroa.0.0.copyload)
  br label %32

32:                                               ; preds = %.lr.ph, %._crit_edge20
  %33 = icmp ugt i64 %indvars.iv, 1
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !29
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPPN15PalindromicTree4NodeESt6vectorIS4_SaIS4_EEEENS2_5ORDEREEvT_SB_T0_(ptr, ptr, ptr) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN15PalindromicTree4NodeESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { inlinehint 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 #4 = { 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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN15PalindromicTree4NodeE", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 16, !10, i64 24, !14, i64 32, !23, i64 80}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_ZTSSt3mapIcPN15PalindromicTree4NodeESt4lessIcESaISt4pairIKcS2_EEE", !15, i64 0}
!15 = !{!"_ZTSSt8_Rb_treeIcSt4pairIKcPN15PalindromicTree4NodeEESt10_Select1stIS5_ESt4lessIcESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSNSt8_Rb_treeIcSt4pairIKcPN15PalindromicTree4NodeEESt10_Select1stIS5_ESt4lessIcESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !17, i64 0, !19, i64 8}
!17 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIcEE", !18, i64 0}
!18 = !{!"_ZTSSt4lessIcE"}
!19 = !{!"_ZTSSt15_Rb_tree_header", !20, i64 0, !22, i64 32}
!20 = !{!"_ZTSSt18_Rb_tree_node_base", !21, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!21 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSSt6vectorIPN15PalindromicTree4NodeESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIPN15PalindromicTree4NodeESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN15PalindromicTree4NodeESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN15PalindromicTree4NodeESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!27 = !{!12, !13, i64 16}
!28 = !{!12, !10, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass