; LLVM IR from reyadussalahin/problem-solving :: graph/lca/codeforces/F191C/Solution.ll (Z3dfsiii)

; 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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@lev = external dso_local global [100010 x i32], align 16
@par = external dso_local global [100010 x i32], align 16
@seen = external dso_local global [100010 x i32], align 16
@od = external dso_local global [100010 x i32], align 16
@sp = external dso_local global [100010 x [18 x i32]], align 16
@g = external dso_local global [100010 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  %12 = load i32, ptr %6, align 4, !tbaa !5
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [100010 x i32], ptr @lev, i64 0, i64 %14
  store i32 %12, ptr %15, align 4, !tbaa !5
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [100010 x i32], ptr @par, i64 0, i64 %18
  store i32 %16, ptr %19, align 4, !tbaa !5
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100010 x i32], ptr @seen, i64 0, i64 %21
  store i32 1, ptr %22, align 4, !tbaa !5
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %25
  %27 = getelementptr inbounds [18 x i32], ptr %26, i64 0, i64 0
  store i32 %23, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %65, %3
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 18
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %68

32:                                               ; preds = %28
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %34
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = sub nsw i32 %36, 1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [18 x i32], ptr %35, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp ne i32 %40, -1
  br i1 %41, label %42, label %64

42:                                               ; preds = %32
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %44
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [18 x i32], ptr %45, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = sub nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [18 x i32], ptr %52, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %59
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [18 x i32], ptr %60, i64 0, i64 %62
  store i32 %57, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %42, %32
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %7, align 4, !tbaa !5
  br label %28, !llvm.loop !9

68:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @g, i64 0, i64 %70
  store ptr %71, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %72 = load ptr, ptr %8, align 8, !tbaa !11
  %73 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %72) #4
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %73, ptr %74, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %75 = load ptr, ptr %8, align 8, !tbaa !11
  %76 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #4
  %77 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  br label %78

78:                                               ; preds = %100, %68
  %79 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br i1 %79, label %81, label %80

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %102

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %83 = load i32, ptr %82, align 4, !tbaa !5
  store i32 %83, ptr %11, align 4, !tbaa !5
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100010 x i32], ptr @seen, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %99, label %89

89:                                               ; preds = %81
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  call void @_Z3dfsiii(i32 noundef %90, i32 noundef %91, i32 noundef %93)
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100010 x i32], ptr @od, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %96, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %89, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %100

100:                                              ; preds = %99
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br label %78

102:                                              ; preds = %80
  ret void
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 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)) #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)) #2 align 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)) #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, 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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@lev = external dso_local local_unnamed_addr global [100010 x i32], align 16
@par = external dso_local local_unnamed_addr global [100010 x i32], align 16
@seen = external dso_local local_unnamed_addr global [100010 x i32], align 16
@od = external dso_local local_unnamed_addr global [100010 x i32], align 16
@sp = external dso_local local_unnamed_addr global [100010 x [18 x i32]], align 16
@g = external dso_local global [100010 x %"class.std::vector"], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z3dfsiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %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 [100010 x i32], ptr @lev, i64 0, i64 %6
  store i32 %2, ptr %7, align 4, !tbaa !5
  %8 = getelementptr inbounds [100010 x i32], ptr @par, i64 0, i64 %6
  store i32 %1, ptr %8, align 4, !tbaa !5
  %9 = getelementptr inbounds [100010 x i32], ptr @seen, i64 0, i64 %6
  store i32 1, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6
  store i32 %1, ptr %10, align 8, !tbaa !5
  %.not24 = icmp eq i32 %1, -1
  br i1 %.not24, label %._crit_edge27, label %13

._crit_edge27:                                    ; preds = %3
  %.phi.trans.insert = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 1
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %18

.lr.ph:                                           ; preds = %130
  %11 = add nsw i32 %2, 1
  %12 = getelementptr inbounds [100010 x i32], ptr @od, i64 0, i64 %6
  br label %135

13:                                               ; preds = %3
  %14 = sext i32 %1 to i64
  %15 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %14, i64 0
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 1
  store i32 %16, ptr %17, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %._crit_edge27, %13
  %19 = phi i32 [ %.pre, %._crit_edge27 ], [ %16, %13 ]
  %.not24.1 = icmp eq i32 %19, -1
  br i1 %.not24.1, label %._crit_edge28, label %20

._crit_edge28:                                    ; preds = %18
  %.phi.trans.insert29 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 2
  %.pre30 = load i32, ptr %.phi.trans.insert29, align 8, !tbaa !5
  br label %25

20:                                               ; preds = %18
  %21 = sext i32 %19 to i64
  %22 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %21, i64 1
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 2
  store i32 %23, ptr %24, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %._crit_edge28, %20
  %26 = phi i32 [ %.pre30, %._crit_edge28 ], [ %23, %20 ]
  %.not24.2 = icmp eq i32 %26, -1
  br i1 %.not24.2, label %._crit_edge31, label %27

._crit_edge31:                                    ; preds = %25
  %.phi.trans.insert32 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 3
  %.pre33 = load i32, ptr %.phi.trans.insert32, align 4, !tbaa !5
  br label %32

27:                                               ; preds = %25
  %28 = sext i32 %26 to i64
  %29 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %28, i64 2
  %30 = load i32, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 3
  store i32 %30, ptr %31, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %._crit_edge31, %27
  %33 = phi i32 [ %.pre33, %._crit_edge31 ], [ %30, %27 ]
  %.not24.3 = icmp eq i32 %33, -1
  br i1 %.not24.3, label %._crit_edge34, label %34

._crit_edge34:                                    ; preds = %32
  %.phi.trans.insert35 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 4
  %.pre36 = load i32, ptr %.phi.trans.insert35, align 8, !tbaa !5
  br label %39

34:                                               ; preds = %32
  %35 = sext i32 %33 to i64
  %36 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %35, i64 3
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 4
  store i32 %37, ptr %38, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %._crit_edge34, %34
  %40 = phi i32 [ %.pre36, %._crit_edge34 ], [ %37, %34 ]
  %.not24.4 = icmp eq i32 %40, -1
  br i1 %.not24.4, label %._crit_edge37, label %41

._crit_edge37:                                    ; preds = %39
  %.phi.trans.insert38 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 5
  %.pre39 = load i32, ptr %.phi.trans.insert38, align 4, !tbaa !5
  br label %46

41:                                               ; preds = %39
  %42 = sext i32 %40 to i64
  %43 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %42, i64 4
  %44 = load i32, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 5
  store i32 %44, ptr %45, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %._crit_edge37, %41
  %47 = phi i32 [ %.pre39, %._crit_edge37 ], [ %44, %41 ]
  %.not24.5 = icmp eq i32 %47, -1
  br i1 %.not24.5, label %._crit_edge40, label %48

._crit_edge40:                                    ; preds = %46
  %.phi.trans.insert41 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 6
  %.pre42 = load i32, ptr %.phi.trans.insert41, align 8, !tbaa !5
  br label %53

48:                                               ; preds = %46
  %49 = sext i32 %47 to i64
  %50 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %49, i64 5
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 6
  store i32 %51, ptr %52, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %._crit_edge40, %48
  %54 = phi i32 [ %.pre42, %._crit_edge40 ], [ %51, %48 ]
  %.not24.6 = icmp eq i32 %54, -1
  br i1 %.not24.6, label %._crit_edge43, label %55

._crit_edge43:                                    ; preds = %53
  %.phi.trans.insert44 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 7
  %.pre45 = load i32, ptr %.phi.trans.insert44, align 4, !tbaa !5
  br label %60

55:                                               ; preds = %53
  %56 = sext i32 %54 to i64
  %57 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %56, i64 6
  %58 = load i32, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 7
  store i32 %58, ptr %59, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %._crit_edge43, %55
  %61 = phi i32 [ %.pre45, %._crit_edge43 ], [ %58, %55 ]
  %.not24.7 = icmp eq i32 %61, -1
  br i1 %.not24.7, label %._crit_edge46, label %62

._crit_edge46:                                    ; preds = %60
  %.phi.trans.insert47 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 8
  %.pre48 = load i32, ptr %.phi.trans.insert47, align 8, !tbaa !5
  br label %67

62:                                               ; preds = %60
  %63 = sext i32 %61 to i64
  %64 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %63, i64 7
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 8
  store i32 %65, ptr %66, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %._crit_edge46, %62
  %68 = phi i32 [ %.pre48, %._crit_edge46 ], [ %65, %62 ]
  %.not24.8 = icmp eq i32 %68, -1
  br i1 %.not24.8, label %._crit_edge49, label %69

._crit_edge49:                                    ; preds = %67
  %.phi.trans.insert50 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 9
  %.pre51 = load i32, ptr %.phi.trans.insert50, align 4, !tbaa !5
  br label %74

69:                                               ; preds = %67
  %70 = sext i32 %68 to i64
  %71 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %70, i64 8
  %72 = load i32, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 9
  store i32 %72, ptr %73, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %._crit_edge49, %69
  %75 = phi i32 [ %.pre51, %._crit_edge49 ], [ %72, %69 ]
  %.not24.9 = icmp eq i32 %75, -1
  br i1 %.not24.9, label %._crit_edge52, label %76

._crit_edge52:                                    ; preds = %74
  %.phi.trans.insert53 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 10
  %.pre54 = load i32, ptr %.phi.trans.insert53, align 8, !tbaa !5
  br label %81

76:                                               ; preds = %74
  %77 = sext i32 %75 to i64
  %78 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %77, i64 9
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 10
  store i32 %79, ptr %80, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %._crit_edge52, %76
  %82 = phi i32 [ %.pre54, %._crit_edge52 ], [ %79, %76 ]
  %.not24.10 = icmp eq i32 %82, -1
  br i1 %.not24.10, label %._crit_edge55, label %83

._crit_edge55:                                    ; preds = %81
  %.phi.trans.insert56 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 11
  %.pre57 = load i32, ptr %.phi.trans.insert56, align 4, !tbaa !5
  br label %88

83:                                               ; preds = %81
  %84 = sext i32 %82 to i64
  %85 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %84, i64 10
  %86 = load i32, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 11
  store i32 %86, ptr %87, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %._crit_edge55, %83
  %89 = phi i32 [ %.pre57, %._crit_edge55 ], [ %86, %83 ]
  %.not24.11 = icmp eq i32 %89, -1
  br i1 %.not24.11, label %._crit_edge58, label %90

._crit_edge58:                                    ; preds = %88
  %.phi.trans.insert59 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 12
  %.pre60 = load i32, ptr %.phi.trans.insert59, align 8, !tbaa !5
  br label %95

90:                                               ; preds = %88
  %91 = sext i32 %89 to i64
  %92 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %91, i64 11
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 12
  store i32 %93, ptr %94, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %._crit_edge58, %90
  %96 = phi i32 [ %.pre60, %._crit_edge58 ], [ %93, %90 ]
  %.not24.12 = icmp eq i32 %96, -1
  br i1 %.not24.12, label %._crit_edge61, label %97

._crit_edge61:                                    ; preds = %95
  %.phi.trans.insert62 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 13
  %.pre63 = load i32, ptr %.phi.trans.insert62, align 4, !tbaa !5
  br label %102

97:                                               ; preds = %95
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %98, i64 12
  %100 = load i32, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 13
  store i32 %100, ptr %101, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %._crit_edge61, %97
  %103 = phi i32 [ %.pre63, %._crit_edge61 ], [ %100, %97 ]
  %.not24.13 = icmp eq i32 %103, -1
  br i1 %.not24.13, label %._crit_edge64, label %104

._crit_edge64:                                    ; preds = %102
  %.phi.trans.insert65 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 14
  %.pre66 = load i32, ptr %.phi.trans.insert65, align 8, !tbaa !5
  br label %109

104:                                              ; preds = %102
  %105 = sext i32 %103 to i64
  %106 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %105, i64 13
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 14
  store i32 %107, ptr %108, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %._crit_edge64, %104
  %110 = phi i32 [ %.pre66, %._crit_edge64 ], [ %107, %104 ]
  %.not24.14 = icmp eq i32 %110, -1
  br i1 %.not24.14, label %._crit_edge67, label %111

._crit_edge67:                                    ; preds = %109
  %.phi.trans.insert68 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 15
  %.pre69 = load i32, ptr %.phi.trans.insert68, align 4, !tbaa !5
  br label %116

111:                                              ; preds = %109
  %112 = sext i32 %110 to i64
  %113 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %112, i64 14
  %114 = load i32, ptr %113, align 8, !tbaa !5
  %115 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 15
  store i32 %114, ptr %115, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %._crit_edge67, %111
  %117 = phi i32 [ %.pre69, %._crit_edge67 ], [ %114, %111 ]
  %.not24.15 = icmp eq i32 %117, -1
  br i1 %.not24.15, label %._crit_edge70, label %118

._crit_edge70:                                    ; preds = %116
  %.phi.trans.insert71 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 16
  %.pre72 = load i32, ptr %.phi.trans.insert71, align 8, !tbaa !5
  br label %123

118:                                              ; preds = %116
  %119 = sext i32 %117 to i64
  %120 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %119, i64 15
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 16
  store i32 %121, ptr %122, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %._crit_edge70, %118
  %124 = phi i32 [ %.pre72, %._crit_edge70 ], [ %121, %118 ]
  %.not24.16 = icmp eq i32 %124, -1
  br i1 %.not24.16, label %130, label %125

125:                                              ; preds = %123
  %126 = sext i32 %124 to i64
  %127 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %126, i64 16
  %128 = load i32, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds [100010 x [18 x i32]], ptr @sp, i64 0, i64 %6, i64 17
  store i32 %128, ptr %129, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %125, %123
  %131 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @g, i64 0, i64 %6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %132 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #3
  store ptr %132, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %133 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #3
  store ptr %133, ptr %5, align 8
  %134 = 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) #3
  br i1 %134, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %144, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret void

135:                                              ; preds = %.lr.ph, %144
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100010 x i32], ptr @seen, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %.not = icmp eq i32 %140, 0
  br i1 %.not, label %141, label %144

141:                                              ; preds = %135
  call void @_Z3dfsiii(i32 noundef %137, i32 noundef %0, i32 noundef %11)
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %12, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %141, %135
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  %146 = 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) #3
  br i1 %146, label %135, label %._crit_edge
}

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

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

; 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 #2

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass