; LLVM IR from Tunghohin/Competitive_Coding :: Luogu/p2899.ll (Z3dfsii)

; 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 }
%"class.std::initializer_list" = type { ptr, i64 }

@dp = external dso_local global [100010 x [3 x i32]], align 16
@G = external dso_local global [100010 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %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
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::initializer_list", align 8
  %14 = alloca [3 x i32], align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %17
  %19 = getelementptr inbounds [3 x i32], ptr %18, i64 0, i64 0
  store i32 1, ptr %19, align 4, !tbaa !5
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %21
  %23 = getelementptr inbounds [3 x i32], ptr %22, i64 0, i64 1
  store i32 0, ptr %23, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %25
  %27 = getelementptr inbounds [3 x i32], ptr %26, i64 0, i64 2
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1061109567, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @G, i64 0, i64 %29
  store ptr %30, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = load ptr, ptr %8, align 8, !tbaa !11
  %32 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %34 = load ptr, ptr %8, align 8, !tbaa !11
  %35 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  br label %37

37:                                               ; preds = %148, %2
  %38 = 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) #5
  br i1 %38, label %40, label %39

39:                                               ; preds = %37
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %150

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %42 = load i32, ptr %41, align 4, !tbaa !5
  store i32 %42, ptr %12, align 4, !tbaa !5
  %43 = load i32, ptr %12, align 4, !tbaa !5
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp eq i32 %43, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %40
  store i32 3, ptr %11, align 4
  br label %145

47:                                               ; preds = %40
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z3dfsii(i32 noundef %48, i32 noundef %49)
  store i8 1, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #5
  %50 = load i32, ptr %12, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %51
  %53 = getelementptr inbounds [3 x i32], ptr %52, i64 0, i64 0
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr %14, align 4, !tbaa !5
  %55 = getelementptr inbounds i32, ptr %14, i64 1
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %57
  %59 = getelementptr inbounds [3 x i32], ptr %58, i64 0, i64 1
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %55, align 4, !tbaa !5
  %61 = getelementptr inbounds i32, ptr %14, i64 2
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %63
  %65 = getelementptr inbounds [3 x i32], ptr %64, i64 0, i64 2
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %61, align 4, !tbaa !5
  %67 = getelementptr inbounds %"class.std::initializer_list", ptr %13, i32 0, i32 0
  store ptr %14, ptr %67, align 8, !tbaa !13
  %68 = getelementptr inbounds %"class.std::initializer_list", ptr %13, i32 0, i32 1
  store i64 3, ptr %68, align 8, !tbaa !16
  %69 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %72 = load i64, ptr %71, align 8
  %73 = call noundef i32 @_ZSt3minIiET_St16initializer_listIS0_E(ptr %70, i64 %72)
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %75
  %77 = getelementptr inbounds [3 x i32], ptr %76, i64 0, i64 0
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = add nsw i32 %78, %73
  store i32 %79, ptr %77, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #5
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %81
  %83 = getelementptr inbounds [3 x i32], ptr %82, i64 0, i64 0
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %85
  %87 = getelementptr inbounds [3 x i32], ptr %86, i64 0, i64 1
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 4 dereferenceable(4) %87)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %91
  %93 = getelementptr inbounds [3 x i32], ptr %92, i64 0, i64 2
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, %89
  store i32 %95, ptr %93, align 4, !tbaa !5
  %96 = load i32, ptr %12, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %97
  %99 = getelementptr inbounds [3 x i32], ptr %98, i64 0, i64 0
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %102
  %104 = getelementptr inbounds [3 x i32], ptr %103, i64 0, i64 1
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp sle i32 %100, %105
  br i1 %106, label %107, label %119

107:                                              ; preds = %47
  store i8 1, ptr %6, align 1, !tbaa !9
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %109
  %111 = getelementptr inbounds [3 x i32], ptr %110, i64 0, i64 0
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %114
  %116 = getelementptr inbounds [3 x i32], ptr %115, i64 0, i64 1
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = add nsw i32 %117, %112
  store i32 %118, ptr %116, align 4, !tbaa !5
  br label %144

119:                                              ; preds = %47
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %121
  %123 = getelementptr inbounds [3 x i32], ptr %122, i64 0, i64 1
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %3, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %126
  %128 = getelementptr inbounds [3 x i32], ptr %127, i64 0, i64 1
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = add nsw i32 %129, %124
  store i32 %130, ptr %128, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %132
  %134 = getelementptr inbounds [3 x i32], ptr %133, i64 0, i64 0
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %137
  %139 = getelementptr inbounds [3 x i32], ptr %138, i64 0, i64 1
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = sub nsw i32 %135, %140
  store i32 %141, ptr %15, align 4, !tbaa !5
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %143 = load i32, ptr %142, align 4, !tbaa !5
  store i32 %143, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %144

144:                                              ; preds = %119, %107
  store i32 0, ptr %11, align 4
  br label %145

145:                                              ; preds = %144, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %146 = load i32, ptr %11, align 4
  switch i32 %146, label %170 [
    i32 0, label %147
    i32 3, label %148
  ]

147:                                              ; preds = %145
  br label %148

148:                                              ; preds = %147, %145
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %37

150:                                              ; preds = %39
  %151 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %152 = trunc i8 %151 to i1
  br i1 %152, label %158, label %153

153:                                              ; preds = %150
  %154 = load i32, ptr %3, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %155
  %157 = getelementptr inbounds [3 x i32], ptr %156, i64 0, i64 1
  store i32 1061109567, ptr %157, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %153, %150
  %159 = load i8, ptr %6, align 1, !tbaa !9, !range !17, !noundef !18
  %160 = trunc i8 %159 to i1
  br i1 %160, label %169, label %161

161:                                              ; preds = %158
  %162 = load i32, ptr %7, align 4, !tbaa !5
  %163 = load i32, ptr %3, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %164
  %166 = getelementptr inbounds [3 x i32], ptr %165, i64 0, i64 1
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = add nsw i32 %167, %162
  store i32 %168, ptr %166, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %161, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

170:                                              ; preds = %145
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZSt3minIiET_St16initializer_listIS0_E(ptr, i64) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #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)) #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 = { 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 #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 = !{!14, !12, i64 0}
!14 = !{!"_ZTSSt16initializer_listIiE", !12, i64 0, !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{i8 0, i8 2}
!18 = !{}


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

@dp = external dso_local global [100010 x [3 x i32]], align 16
@G = external dso_local global [100010 x %"class.std::vector"], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca [3 x i32], align 8
  %7 = alloca i32, align 4
  %8 = sext i32 %0 to i64
  %9 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %8
  store i32 1, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 0, ptr %10, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 1061109567, ptr %3, align 4, !tbaa !5
  %12 = getelementptr inbounds [100010 x %"class.std::vector"], ptr @G, i64 0, i64 %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %13 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  store ptr %13, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %14 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  store ptr %14, ptr %5, align 8
  %15 = 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) #5
  br i1 %15, label %.lr.ph, label %.thread

.thread:                                          ; preds = %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  store i32 1061109567, ptr %10, align 4, !tbaa !5
  br label %51

.lr.ph:                                           ; preds = %2
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  br label %17

._crit_edge:                                      ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br i1 %.1, label %50, label %49

17:                                               ; preds = %.lr.ph, %46
  %.034 = phi i1 [ false, %.lr.ph ], [ %.1, %46 ]
  %.02833 = phi i1 [ false, %.lr.ph ], [ %.2, %46 ]
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp eq i32 %19, %1
  br i1 %20, label %46, label %21

21:                                               ; preds = %17
  call void @_Z3dfsii(i32 noundef %19, i32 noundef %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %22 = sext i32 %19 to i64
  %23 = getelementptr inbounds [100010 x [3 x i32]], ptr @dp, i64 0, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 4
  %25 = load <2 x i32>, ptr %23, align 4, !tbaa !5
  store <2 x i32> %25, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %23, i64 8
  %27 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %27, ptr %16, align 8, !tbaa !5
  %28 = call noundef i32 @_ZSt3minIiET_St16initializer_listIS0_E(ptr nonnull %6, i64 3)
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = add nsw i32 %29, %28
  store i32 %30, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = load i32, ptr %11, align 4, !tbaa !5
  %34 = add nsw i32 %33, %32
  store i32 %34, ptr %11, align 4, !tbaa !5
  %35 = load i32, ptr %23, align 4, !tbaa !5
  %36 = load i32, ptr %24, align 4, !tbaa !5
  %.not = icmp sgt i32 %35, %36
  %37 = load i32, ptr %10, align 4, !tbaa !5
  br i1 %.not, label %40, label %38

38:                                               ; preds = %21
  %39 = add nsw i32 %37, %35
  store i32 %39, ptr %10, align 4, !tbaa !5
  br label %46

40:                                               ; preds = %21
  %41 = add nsw i32 %37, %36
  store i32 %41, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %42 = load i32, ptr %24, align 4, !tbaa !5
  %43 = sub nsw i32 %35, %42
  store i32 %43, ptr %7, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %45, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %46

46:                                               ; preds = %38, %40, %17
  %.2 = phi i1 [ %.02833, %17 ], [ true, %38 ], [ %.02833, %40 ]
  %.1 = phi i1 [ %.034, %17 ], [ true, %38 ], [ true, %40 ]
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %48 = 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) #5
  br i1 %48, label %17, label %._crit_edge

49:                                               ; preds = %._crit_edge
  store i32 1061109567, ptr %10, align 4, !tbaa !5
  br i1 %.2, label %55, label %51

50:                                               ; preds = %._crit_edge
  br i1 %.2, label %55, label %51

51:                                               ; preds = %.thread, %49, %50
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = add nsw i32 %53, %52
  store i32 %54, ptr %10, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %49, %51, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret void
}

; 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 nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZSt3minIiET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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)) local_unnamed_addr #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 = { mustprogress 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 = { 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 #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"}


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