; LLVM IR from reyadussalahin/problem-solving :: graph/dfs/codeforces/F1294F/Solution.ll (Z3dfsi)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Packet = type { %struct.Chain, %struct.Chain }
%struct.Chain = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@adj = external dso_local global [200020 x %"class.std::vector"], align 16
@visited = external dso_local global [200020 x i8], align 16
@rr = external dso_local global i32, align 4
@aa = external dso_local global i32, align 4
@bb = external dso_local global i32, align 4
@cc = external dso_local global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6updateP5ChainS_(ptr noundef, i64) #0

; 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) #1

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z3dfsi(i32 noundef %0) #2 {
  %2 = alloca %struct.Packet, align 4
  %3 = alloca i32, align 4
  %4 = alloca [3 x %struct.Chain], align 16
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Packet, align 4
  %11 = alloca %struct.Chain, align 4
  %12 = alloca %struct.Chain, align 4
  %13 = alloca %struct.Chain, align 4
  %14 = alloca %struct.Chain, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [200020 x i8], ptr @visited, i64 0, i64 %16
  store i8 1, ptr %17, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %18 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %4, i32 noundef %18, i32 noundef 0)
  %19 = getelementptr inbounds %struct.Chain, ptr %4, i64 1
  %20 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %19, i32 noundef %20, i32 noundef 0)
  %21 = getelementptr inbounds %struct.Chain, ptr %4, i64 2
  %22 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %21, i32 noundef %22, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [200020 x %"class.std::vector"], ptr @adj, i64 0, i64 %24
  store ptr %25, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !11
  %27 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %29 = load ptr, ptr %5, align 8, !tbaa !11
  %30 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %73, %1
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %75

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr %9, align 4, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200020 x i8], ptr @visited, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9, !range !13, !noundef !14
  %42 = trunc i8 %41 to i1
  br i1 %42, label %43, label %44

43:                                               ; preds = %35
  store i32 3, ptr %8, align 4
  br label %70

44:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = call { i64, i64 } @_Z3dfsi(i32 noundef %45)
  %47 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %48 = extractvalue { i64, i64 } %46, 0
  store i64 %48, ptr %47, align 4
  %49 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %50 = extractvalue { i64, i64 } %46, 1
  store i64 %50, ptr %49, align 4
  %51 = getelementptr inbounds %struct.Packet, ptr %10, i32 0, i32 0
  %52 = getelementptr inbounds %struct.Chain, ptr %51, i32 0, i32 1
  %53 = load i32, ptr %52, align 4, !tbaa !15
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %52, align 4, !tbaa !15
  %55 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 0
  %56 = getelementptr inbounds %struct.Packet, ptr %10, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %56, i64 8, i1 false), !tbaa.struct !18
  %57 = load i64, ptr %11, align 4
  call void @_Z6updateP5ChainS_(ptr noundef %55, i64 %57)
  %58 = getelementptr inbounds %struct.Packet, ptr %10, i32 0, i32 1
  %59 = getelementptr inbounds %struct.Chain, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !19
  %61 = getelementptr inbounds %struct.Packet, ptr %10, i32 0, i32 0
  %62 = getelementptr inbounds %struct.Chain, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 4, !tbaa !20
  %64 = icmp ne i32 %60, %63
  br i1 %64, label %65, label %69

65:                                               ; preds = %44
  %66 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 0
  %67 = getelementptr inbounds %struct.Packet, ptr %10, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %67, i64 8, i1 false), !tbaa.struct !18
  %68 = load i64, ptr %12, align 4
  call void @_Z6updateP5ChainS_(ptr noundef %66, i64 %68)
  br label %69

69:                                               ; preds = %65, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  store i32 0, ptr %8, align 4
  br label %70

70:                                               ; preds = %69, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %71 = load i32, ptr %8, align 4
  switch i32 %71, label %116 [
    i32 0, label %72
    i32 3, label %73
  ]

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72, %70
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %32

75:                                               ; preds = %34
  %76 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 0
  %77 = getelementptr inbounds %struct.Chain, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !21
  %79 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 1
  %80 = getelementptr inbounds %struct.Chain, ptr %79, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !21
  %82 = add nsw i32 %78, %81
  %83 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 2
  %84 = getelementptr inbounds %struct.Chain, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 4, !tbaa !21
  %86 = add nsw i32 %82, %85
  %87 = load i32, ptr @rr, align 4, !tbaa !5
  %88 = icmp sgt i32 %86, %87
  br i1 %88, label %89, label %110

89:                                               ; preds = %75
  %90 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 0
  %91 = getelementptr inbounds %struct.Chain, ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !21
  %93 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 1
  %94 = getelementptr inbounds %struct.Chain, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !21
  %96 = add nsw i32 %92, %95
  %97 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 2
  %98 = getelementptr inbounds %struct.Chain, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !21
  %100 = add nsw i32 %96, %99
  store i32 %100, ptr @rr, align 4, !tbaa !5
  %101 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 0
  %102 = getelementptr inbounds %struct.Chain, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 16, !tbaa !22
  store i32 %103, ptr @aa, align 4, !tbaa !5
  %104 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 1
  %105 = getelementptr inbounds %struct.Chain, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 8, !tbaa !22
  store i32 %106, ptr @bb, align 4, !tbaa !5
  %107 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 2
  %108 = getelementptr inbounds %struct.Chain, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %108, align 16, !tbaa !22
  store i32 %109, ptr @cc, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %89, %75
  %111 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 16 %111, i64 8, i1 false), !tbaa.struct !18
  %112 = getelementptr inbounds [3 x %struct.Chain], ptr %4, i64 0, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %112, i64 8, i1 false), !tbaa.struct !18
  %113 = load i64, ptr %13, align 4
  %114 = load i64, ptr %14, align 4
  call void @_ZN6PacketC2E5ChainS0_(ptr noundef nonnull align 4 dereferenceable(16) %2, i64 %113, i64 %114)
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  %115 = load { i64, i64 }, ptr %2, align 4
  ret { i64, i64 } %115

116:                                              ; preds = %70
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6PacketC2E5ChainS0_(ptr noundef nonnull align 4 dereferenceable(16), i64, i64) unnamed_addr #2 align 2

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !6, i64 4}
!16 = !{!"_ZTS6Packet", !17, i64 0, !17, i64 8}
!17 = !{!"_ZTS5Chain", !6, i64 0, !6, i64 4}
!18 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!19 = !{!16, !6, i64 8}
!20 = !{!16, !6, i64 0}
!21 = !{!17, !6, i64 4}
!22 = !{!17, !6, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Packet = type { %struct.Chain, %struct.Chain }
%struct.Chain = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@adj = external dso_local global [200020 x %"class.std::vector"], align 16
@visited = external dso_local local_unnamed_addr global [200020 x i8], align 16
@rr = external dso_local local_unnamed_addr global i32, align 4
@aa = external dso_local local_unnamed_addr global i32, align 4
@bb = external dso_local local_unnamed_addr global i32, align 4
@cc = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6updateP5ChainS_(ptr noundef, i64) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_Z3dfsi(i32 noundef %0) local_unnamed_addr #1 {
  %2 = alloca %struct.Packet, align 8
  %3 = alloca [3 x %struct.Chain], align 16
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = sext i32 %0 to i64
  %7 = getelementptr inbounds [200020 x i8], ptr @visited, i64 0, i64 %6
  store i8 1, ptr %7, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef %0, i32 noundef 0)
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  call void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %8, i32 noundef %0, i32 noundef 0)
  %9 = getelementptr inbounds i8, ptr %3, i64 16
  call void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %9, i32 noundef %0, i32 noundef 0)
  %10 = getelementptr inbounds [200020 x %"class.std::vector"], ptr @adj, i64 0, i64 %6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %11 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  store ptr %11, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %12 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  store ptr %12, ptr %5, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %36, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %14 = getelementptr inbounds i8, ptr %3, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %3, i64 12
  %17 = load i32, ptr %16, align 4, !tbaa !9
  %18 = add nsw i32 %17, %15
  %19 = getelementptr inbounds i8, ptr %3, i64 20
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = add nsw i32 %18, %20
  %22 = load i32, ptr @rr, align 4, !tbaa !12
  %23 = icmp sgt i32 %21, %22
  br i1 %23, label %39, label %43

.lr.ph:                                           ; preds = %1, %36
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %25 = load i32, ptr %24, align 4, !tbaa !12
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [200020 x i8], ptr @visited, i64 0, i64 %26
  %28 = load i8, ptr %27, align 1, !tbaa !5, !range !13, !noundef !14
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %36, label %30

30:                                               ; preds = %.lr.ph
  %31 = call { i64, i64 } @_Z3dfsi(i32 noundef %25)
  %32 = extractvalue { i64, i64 } %31, 0
  %33 = extractvalue { i64, i64 } %31, 1
  %34 = and i64 %32, -4294967296
  %.sroa.04.4.insert.shift = add i64 %34, 4294967296
  %.sroa.04.4.insert.mask = and i64 %32, 4294967295
  %.sroa.04.4.insert.insert = or disjoint i64 %.sroa.04.4.insert.shift, %.sroa.04.4.insert.mask
  call void @_Z6updateP5ChainS_(ptr noundef nonnull %3, i64 %.sroa.04.4.insert.insert)
  %.sroa.7.8.extract.trunc = trunc i64 %33 to i32
  %.sroa.04.0.extract.trunc = trunc i64 %32 to i32
  %.not = icmp eq i32 %.sroa.7.8.extract.trunc, %.sroa.04.0.extract.trunc
  br i1 %.not, label %36, label %35

35:                                               ; preds = %30
  call void @_Z6updateP5ChainS_(ptr noundef nonnull %3, i64 %33)
  br label %36

36:                                               ; preds = %30, %35, %.lr.ph
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %38, label %.lr.ph, label %._crit_edge

39:                                               ; preds = %._crit_edge
  store i32 %21, ptr @rr, align 4, !tbaa !12
  %40 = load i32, ptr %3, align 16, !tbaa !15
  store i32 %40, ptr @aa, align 4, !tbaa !12
  %41 = load i32, ptr %8, align 8, !tbaa !15
  store i32 %41, ptr @bb, align 4, !tbaa !12
  %42 = load i32, ptr %9, align 16, !tbaa !15
  store i32 %42, ptr @cc, align 4, !tbaa !12
  br label %43

43:                                               ; preds = %39, %._crit_edge
  %.sroa.01.0.copyload = load i64, ptr %3, align 16
  %.sroa.0.0.copyload = load i64, ptr %8, align 8
  call void @_ZN6PacketC2E5ChainS0_(ptr noundef nonnull align 4 dereferenceable(16) %2, i64 %.sroa.01.0.copyload, i64 %.sroa.0.0.copyload)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  %.fca.0.load = load i64, ptr %2, align 8
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %2, i64 8
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.fca.1.load, 1
  ret { i64, i64 } %.fca.1.insert
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5ChainC2Eii(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6PacketC2E5ChainS0_(ptr noundef nonnull align 4 dereferenceable(16), i64, i64) unnamed_addr #1 align 2

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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS5Chain", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass