; LLVM IR from upupming/algorithm :: kick-start/2021/RoundB/D. naive (main)

; 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.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@e = external dso_local global [50010 x %"class.std::vector"], align 16
@L = external dso_local global %"class.std::unordered_map", align 8
@A = external dso_local global %"class.std::unordered_map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solvev() #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %93, %0
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = load i32, ptr @t, align 4, !tbaa !5
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %96

26:                                               ; preds = %21
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %38, %26
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %41

34:                                               ; preds = %29
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [50010 x %"class.std::vector"], ptr @e, i64 0, i64 %36
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %37) #5
  br label %38

38:                                               ; preds = %34
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %4, align 4, !tbaa !5
  br label %29, !llvm.loop !9

41:                                               ; preds = %33
  call void @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @L) #5
  call void @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @A) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %87, %41
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sub nsw i32 %44, 1
  %46 = icmp slt i32 %43, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %42
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %90

48:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %53 = load i64, ptr %6, align 8, !tbaa !11
  %54 = getelementptr inbounds [50010 x %"class.std::vector"], ptr @e, i64 0, i64 %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %55 = load i64, ptr %7, align 8, !tbaa !11
  %56 = trunc i64 %55 to i32
  store i32 %56, ptr %10, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %57 = load i64, ptr %7, align 8, !tbaa !11
  %58 = getelementptr inbounds [50010 x %"class.std::vector"], ptr @e, i64 0, i64 %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %59 = load i64, ptr %6, align 8, !tbaa !11
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %11, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %61 = load i64, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %62 = load i64, ptr %7, align 8, !tbaa !11
  %63 = trunc i64 %62 to i32
  store i32 %63, ptr %12, align 4, !tbaa !5
  %64 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @L, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %65 = load i64, ptr %6, align 8, !tbaa !11
  %66 = trunc i64 %65 to i32
  store i32 %66, ptr %13, align 4, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %64, ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i64 %61, ptr %67, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %68 = load i64, ptr %6, align 8, !tbaa !11
  %69 = trunc i64 %68 to i32
  store i32 %69, ptr %14, align 4, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @L, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %71 = load i64, ptr %7, align 8, !tbaa !11
  %72 = trunc i64 %71 to i32
  store i32 %72, ptr %15, align 4, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %70, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i64 %61, ptr %73, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %74 = load i64, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %75 = load i64, ptr %7, align 8, !tbaa !11
  %76 = trunc i64 %75 to i32
  store i32 %76, ptr %16, align 4, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @A, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %78 = load i64, ptr %6, align 8, !tbaa !11
  %79 = trunc i64 %78 to i32
  store i32 %79, ptr %17, align 4, !tbaa !5
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %77, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i64 %74, ptr %80, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %81 = load i64, ptr %6, align 8, !tbaa !11
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %18, align 4, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @A, ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %84 = load i64, ptr %7, align 8, !tbaa !11
  %85 = trunc i64 %84 to i32
  store i32 %85, ptr %19, align 4, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %83, ptr noundef nonnull align 4 dereferenceable(4) %19)
  store i64 %74, ptr %86, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %87

87:                                               ; preds = %48
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %42, !llvm.loop !13

90:                                               ; preds = %47
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %91)
  call void @_Z5solvev()
  br label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %2, align 4, !tbaa !5
  br label %21, !llvm.loop !14

96:                                               ; preds = %25
  ret i32 0
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare i32 @printf(ptr noundef, ...) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { mustprogress norecurse 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; 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.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@e = external dso_local global [50010 x %"class.std::vector"], align 16
@L = external dso_local global %"class.std::unordered_map", align 8
@A = external dso_local global %"class.std::unordered_map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solvev() local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  %16 = load i32, ptr @t, align 4, !tbaa !5
  %.not17 = icmp slt i32 %16, 1
  br i1 %.not17, label %._crit_edge21, label %.lr.ph20

._crit_edge21:                                    ; preds = %._crit_edge16, %0
  ret i32 0

.lr.ph20:                                         ; preds = %0, %._crit_edge16
  %.0918 = phi i32 [ %26, %._crit_edge16 ], [ 1, %0 ]
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @q)
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %.not1011 = icmp slt i32 %19, 1
  br i1 %.not1011, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph20
  call void @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @L) #6
  call void @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @A) #6
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 1
  br i1 %21, label %.lr.ph15, label %._crit_edge16

.lr.ph:                                           ; preds = %.lr.ph20, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph20 ]
  %22 = getelementptr inbounds [50010 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %.not10.not = icmp slt i64 %indvars.iv, %24
  br i1 %.not10.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge16:                                    ; preds = %.lr.ph15, %._crit_edge
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.0918)
  call void @_Z5solvev()
  %26 = add nuw nsw i32 %.0918, 1
  %27 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.0918, %27
  br i1 %.not.not, label %.lr.ph20, label %._crit_edge21, !llvm.loop !11

.lr.ph15:                                         ; preds = %._crit_edge, %.lr.ph15
  %.013 = phi i32 [ %66, %.lr.ph15 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %32 = load i64, ptr %1, align 8, !tbaa !12
  %33 = getelementptr inbounds [50010 x %"class.std::vector"], ptr @e, i64 0, i64 %32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %34 = load i64, ptr %2, align 8, !tbaa !12
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %5, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %36 = load i64, ptr %2, align 8, !tbaa !12
  %37 = getelementptr inbounds [50010 x %"class.std::vector"], ptr @e, i64 0, i64 %36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %38 = load i64, ptr %1, align 8, !tbaa !12
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %6, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %40 = load i64, ptr %3, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %41 = load i64, ptr %2, align 8, !tbaa !12
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr %7, align 4, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @L, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %44 = load i64, ptr %1, align 8, !tbaa !12
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %8, align 4, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %40, ptr %46, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %47 = load i64, ptr %1, align 8, !tbaa !12
  %48 = trunc i64 %47 to i32
  store i32 %48, ptr %9, align 4, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @L, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %50 = load i64, ptr %2, align 8, !tbaa !12
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %10, align 4, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %49, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %40, ptr %52, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %53 = load i64, ptr %4, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %54 = load i64, ptr %2, align 8, !tbaa !12
  %55 = trunc i64 %54 to i32
  store i32 %55, ptr %11, align 4, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @A, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %57 = load i64, ptr %1, align 8, !tbaa !12
  %58 = trunc i64 %57 to i32
  store i32 %58, ptr %12, align 4, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i64 %53, ptr %59, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  %60 = load i64, ptr %1, align 8, !tbaa !12
  %61 = trunc i64 %60 to i32
  store i32 %61, ptr %13, align 4, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) @A, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  %63 = load i64, ptr %2, align 8, !tbaa !12
  %64 = trunc i64 %63 to i32
  store i32 %64, ptr %14, align 4, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56) %62, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %53, ptr %65, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %66 = add nuw nsw i32 %.013, 1
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = add nsw i32 %67, -1
  %69 = icmp slt i32 %66, %68
  br i1 %69, label %.lr.ph15, label %._crit_edge16, !llvm.loop !14
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiS_IixSt4hashIiESt8equal_toIiESaISt4pairIKixEEES1_S3_SaIS4_IS5_S8_EEEixEOi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIixSt4hashIiESt8equal_toIiESaISt4pairIKixEEEixEOi(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { mustprogress norecurse 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 = { 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 = { nofree 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 #6 = { 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 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass