; LLVM IR from ouuan/CPTH :: tests/HLD/HLD.ll (ZNK4CPTH3HLD4pathEmm)

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

%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.CPTH::HLD" = type { i8, i64, i64, %"class.std::vector", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4CPTH3HLD4pathEmm = external hidden unnamed_addr constant [77 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK4CPTH3HLD8validateEm(ptr noundef nonnull align 8 dereferenceable(264), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind noalias writable sret(%"class.std::vector.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(264) %1, i64 noundef %2, i64 noundef %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store i64 %3, ptr %8, align 8, !tbaa !9
  %12 = load ptr, ptr %6, align 8
  %13 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 0
  %14 = load i8, ptr %13, align 8, !tbaa !11, !range !22, !noundef !23
  %15 = trunc i8 %14 to i1
  br i1 %15, label %16, label %17

16:                                               ; preds = %4
  br label %19

17:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 201, ptr noundef @__PRETTY_FUNCTION__._ZNK4CPTH3HLD4pathEmm) #4
  unreachable

18:                                               ; No predecessors!
  br label %19

19:                                               ; preds = %18, %16
  %20 = load i64, ptr %7, align 8, !tbaa !9
  call void @_ZNK4CPTH3HLD8validateEm(ptr noundef nonnull align 8 dereferenceable(264) %12, i64 noundef %20)
  %21 = load i64, ptr %8, align 8, !tbaa !9
  call void @_ZNK4CPTH3HLD8validateEm(ptr noundef nonnull align 8 dereferenceable(264) %12, i64 noundef %21)
  store i1 false, ptr %9, align 1
  call void @_ZNSt6vectorISt4pairImmESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %22

22:                                               ; preds = %90, %19
  %23 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %24 = load i64, ptr %7, align 8, !tbaa !9
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %24) #5
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %28) #5
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = icmp ne i64 %26, %30
  br i1 %31, label %32, label %91

32:                                               ; preds = %22
  %33 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 6
  %34 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %35 = load i64, ptr %7, align 8, !tbaa !9
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %35) #5
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %37) #5
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 6
  %41 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %42) #5
  %44 = load i64, ptr %43, align 8, !tbaa !9
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %44) #5
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = icmp ugt i64 %39, %46
  br i1 %47, label %48, label %71

48:                                               ; preds = %32
  %49 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 10
  %50 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %51) #5
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %53) #5
  %55 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 10
  %56 = load i64, ptr %7, align 8, !tbaa !9
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56) #5
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJRKmS6_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(8) %57)
          to label %59 unwind label %67

59:                                               ; preds = %48
  %60 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 4
  %61 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %62 = load i64, ptr %7, align 8, !tbaa !9
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %62) #5
  %64 = load i64, ptr %63, align 8, !tbaa !9
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %64) #5
  %66 = load i64, ptr %65, align 8, !tbaa !9
  store i64 %66, ptr %7, align 8, !tbaa !9
  br label %90

67:                                               ; preds = %102, %71, %48
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %114

71:                                               ; preds = %32
  %72 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 10
  %73 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %74) #5
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %76) #5
  %78 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 10
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %79) #5
  %81 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJRKmS6_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %82 unwind label %67

82:                                               ; preds = %71
  %83 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 4
  %84 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 8
  %85 = load i64, ptr %8, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %85) #5
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %87) #5
  %89 = load i64, ptr %88, align 8, !tbaa !9
  store i64 %89, ptr %8, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %82, %59
  br label %22, !llvm.loop !24

91:                                               ; preds = %22
  %92 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 6
  %93 = load i64, ptr %7, align 8, !tbaa !9
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %93) #5
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 6
  %97 = load i64, ptr %8, align 8, !tbaa !9
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %97) #5
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = icmp ugt i64 %95, %99
  br i1 %100, label %101, label %102

101:                                              ; preds = %91
  call void @_ZSt4swapImENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %102

102:                                              ; preds = %101, %91
  %103 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 10
  %104 = load i64, ptr %7, align 8, !tbaa !9
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %104) #5
  %106 = getelementptr inbounds %"class.CPTH::HLD", ptr %12, i32 0, i32 10
  %107 = load i64, ptr %8, align 8, !tbaa !9
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %107) #5
  %109 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJRKmS6_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull align 8 dereferenceable(8) %108)
          to label %110 unwind label %67

110:                                              ; preds = %102
  store i1 true, ptr %9, align 1
  %111 = load i1, ptr %9, align 1
  br i1 %111, label %113, label %112

112:                                              ; preds = %110
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %113

113:                                              ; preds = %112, %110
  ret void

114:                                              ; preds = %67
  %115 = load ptr, ptr %10, align 8
  %116 = load i32, ptr %11, align 4
  %117 = insertvalue { ptr, i32 } poison, ptr %115, 0
  %118 = insertvalue { ptr, i32 } %117, i32 %116, 1
  resume { ptr, i32 } %118
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapImENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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 = { 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 #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 = { noreturn nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN4CPTH3HLDE", !13, i64 0, !10, i64 8, !10, i64 16, !14, i64 24, !18, i64 48, !18, i64 72, !18, i64 96, !18, i64 120, !18, i64 144, !18, i64 168, !18, i64 192, !18, i64 216, !18, i64 240}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorImSaImEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseImSaImEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !25}
!25 = !{!"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"

%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned long, unsigned long>, std::allocator<std::pair<unsigned long, unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZNK4CPTH3HLD4pathEmm = external hidden unnamed_addr constant [77 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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
declare dso_local void @_ZNK4CPTH3HLD8validateEm(ptr noundef nonnull align 8 dereferenceable(264), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4CPTH3HLD4pathEmm(ptr dead_on_unwind noalias writable sret(%"class.std::vector.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(264) %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  store i64 %2, ptr %5, align 8, !tbaa !5
  store i64 %3, ptr %6, align 8, !tbaa !5
  %7 = load i8, ptr %1, align 8, !tbaa !9, !range !21, !noundef !22
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %10, label %9

9:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 201, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK4CPTH3HLD4pathEmm) #4
  unreachable

10:                                               ; preds = %4
  tail call void @_ZNK4CPTH3HLD8validateEm(ptr noundef nonnull align 8 dereferenceable(264) %1, i64 noundef %2)
  tail call void @_ZNK4CPTH3HLD8validateEm(ptr noundef nonnull align 8 dereferenceable(264) %1, i64 noundef %3)
  tail call void @_ZNSt6vectorISt4pairImmESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %11 = getelementptr inbounds i8, ptr %1, i64 144
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %2) #5
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %3) #5
  %15 = load i64, ptr %14, align 8, !tbaa !5
  %.not3 = icmp eq i64 %13, %15
  br i1 %.not3, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %10
  %16 = getelementptr inbounds i8, ptr %1, i64 96
  %17 = getelementptr inbounds i8, ptr %1, i64 192
  %18 = getelementptr inbounds i8, ptr %1, i64 48
  br label %19

19:                                               ; preds = %.lr.ph, %54
  %20 = phi i64 [ %3, %.lr.ph ], [ %55, %54 ]
  %21 = phi i64 [ %2, %.lr.ph ], [ %56, %54 ]
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %21) #5
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %23) #5
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #5
  %27 = load i64, ptr %26, align 8, !tbaa !5
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %27) #5
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = icmp ugt i64 %25, %29
  br i1 %30, label %31, label %43

31:                                               ; preds = %19
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %21) #5
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %33) #5
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %21) #5
  %36 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJRKmS6_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %37 unwind label %.loopexit

37:                                               ; preds = %31
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %21) #5
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %39) #5
  %41 = load i64, ptr %40, align 8, !tbaa !5
  store i64 %41, ptr %5, align 8, !tbaa !5
  br label %54

.loopexit:                                        ; preds = %31, %43
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %42

.loopexit.split-lp:                               ; preds = %70
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %42

42:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorISt4pairImmESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %lpad.phi

43:                                               ; preds = %19
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #5
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %45) #5
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %20) #5
  %48 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJRKmS6_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %47)
          to label %49 unwind label %.loopexit

49:                                               ; preds = %43
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %20) #5
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %51) #5
  %53 = load i64, ptr %52, align 8, !tbaa !5
  store i64 %53, ptr %6, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %49, %37
  %55 = phi i64 [ %53, %49 ], [ %20, %37 ]
  %56 = phi i64 [ %21, %49 ], [ %41, %37 ]
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %56) #5
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %55) #5
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %.not = icmp eq i64 %58, %60
  br i1 %.not, label %._crit_edge, label %19, !llvm.loop !23

._crit_edge:                                      ; preds = %54, %10
  %61 = phi i64 [ %3, %10 ], [ %55, %54 ]
  %62 = phi i64 [ %2, %10 ], [ %56, %54 ]
  %63 = getelementptr inbounds i8, ptr %1, i64 96
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %62) #5
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %61) #5
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = icmp ugt i64 %65, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %._crit_edge
  call void @_ZSt4swapImENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %.pre = load i64, ptr %5, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %69, %._crit_edge
  %71 = phi i64 [ %.pre, %69 ], [ %62, %._crit_edge ]
  %72 = getelementptr inbounds i8, ptr %1, i64 192
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %71) #5
  %74 = load i64, ptr %6, align 8, !tbaa !5
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %72, i64 noundef %74) #5
  %76 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairImmESaIS1_EE12emplace_backIJRKmS6_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef nonnull align 8 dereferenceable(8) %75)
          to label %77 unwind label %.loopexit.split-lp

77:                                               ; preds = %70
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapImENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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 = { 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 #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 = { noreturn nounwind }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN4CPTH3HLDE", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !17, i64 48, !17, i64 72, !17, i64 96, !17, i64 120, !17, i64 144, !17, i64 168, !17, i64 192, !17, i64 216, !17, i64 240}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSSt6vectorImSaImEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseImSaImEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass