; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 28. Codechef Problems (Nuttela-Path-Unit)

; 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::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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::unordered_map.10" = type { %"class.std::_Hashtable.11" }
%"class.std::_Hashtable.11" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@n = external dso_local global i64, align 8
@visited = external dso_local global %"class.std::unordered_map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxxRSt6vectorIS_IxSaIxEESaIS1_EEPxxS4_(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3lcaxxxPxRSt6vectorIS0_IxSaIxEESaIS2_EE(i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6dfsXorxxRSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEPxRSt6vectorISB_IxSaIxEESaISD_EE(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"class.std::vector.5", align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.std::allocator.7", align 1
  %21 = alloca %"class.std::allocator.2", align 1
  %22 = alloca %"class.std::unordered_map.10", align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %28 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %29 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %30 = getelementptr i8, ptr %29, i64 -24
  %31 = load i64, ptr %30, align 8
  %32 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %31
  %33 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %32, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %35

35:                                               ; preds = %223, %0
  %36 = load i64, ptr %2, align 8, !tbaa !8
  %37 = icmp sgt i64 %36, 0
  br i1 %37, label %38, label %234

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #9
  %41 = load i64, ptr @n, align 8, !tbaa !8
  %42 = add nsw i64 %41, 10
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %42, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %43 unwind label %56

43:                                               ; preds = %38
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  %44 = load i64, ptr @n, align 8, !tbaa !8
  %45 = add nsw i64 %44, 10
  %46 = call ptr @llvm.stacksave.p0()
  store ptr %46, ptr %8, align 8
  %47 = alloca i64, i64 %45, align 16
  store i64 %45, ptr %9, align 8
  %48 = load i64, ptr @n, align 8, !tbaa !8
  %49 = add nsw i64 %48, 10
  %50 = alloca i64, i64 %49, align 16
  store i64 %49, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store i64 1, ptr %11, align 8, !tbaa !8
  br label %51

51:                                               ; preds = %65, %43
  %52 = load i64, ptr %11, align 8, !tbaa !8
  %53 = load i64, ptr @n, align 8, !tbaa !8
  %54 = icmp sle i64 %52, %53
  br i1 %54, label %60, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %72

56:                                               ; preds = %38
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  br label %233

60:                                               ; preds = %51
  %61 = load i64, ptr %11, align 8, !tbaa !8
  %62 = getelementptr inbounds i64, ptr %47, i64 %61
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %62)
          to label %64 unwind label %68

64:                                               ; preds = %60
  br label %65

65:                                               ; preds = %64
  %66 = load i64, ptr %11, align 8, !tbaa !8
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %11, align 8, !tbaa !8
  br label %51, !llvm.loop !11

68:                                               ; preds = %60
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %6, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %232

72:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %73

73:                                               ; preds = %84, %72
  %74 = load i64, ptr %12, align 8, !tbaa !8
  %75 = load i64, ptr @n, align 8, !tbaa !8
  %76 = add nsw i64 %75, 4
  %77 = icmp sle i64 %74, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %91

79:                                               ; preds = %73
  %80 = load i64, ptr %12, align 8, !tbaa !8
  %81 = getelementptr inbounds i64, ptr %50, i64 %80
  store i64 0, ptr %81, align 8, !tbaa !8
  %82 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIxbSt4hashIxESt8equal_toIxESaISt4pairIKxbEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @visited, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %83 unwind label %87

83:                                               ; preds = %79
  store i8 0, ptr %82, align 1, !tbaa !13
  br label %84

84:                                               ; preds = %83
  %85 = load i64, ptr %12, align 8, !tbaa !8
  %86 = add nsw i64 %85, 1
  store i64 %86, ptr %12, align 8, !tbaa !8
  br label %73, !llvm.loop !15

87:                                               ; preds = %79
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %232

91:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %92

92:                                               ; preds = %109, %91
  %93 = load i64, ptr %15, align 8, !tbaa !8
  %94 = load i64, ptr @n, align 8, !tbaa !8
  %95 = sub nsw i64 %94, 1
  %96 = icmp slt i64 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %116

98:                                               ; preds = %92
  %99 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %100 unwind label %112

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %99, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %102 unwind label %112

102:                                              ; preds = %100
  %103 = load i64, ptr %13, align 8, !tbaa !8
  %104 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %103) #9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %104, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %105 unwind label %112

105:                                              ; preds = %102
  %106 = load i64, ptr %14, align 8, !tbaa !8
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %106) #9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %108 unwind label %112

108:                                              ; preds = %105
  br label %109

109:                                              ; preds = %108
  %110 = load i64, ptr %15, align 8, !tbaa !8
  %111 = add nsw i64 %110, 1
  store i64 %111, ptr %15, align 8, !tbaa !8
  br label %92, !llvm.loop !16

112:                                              ; preds = %105, %102, %100, %98
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %6, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %231

116:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %117 = load i64, ptr @n, align 8, !tbaa !8
  %118 = invoke noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %117)
          to label %119 unwind label %135

119:                                              ; preds = %116
  %120 = call double @llvm.ceil.f64(double %118)
  %121 = fptosi double %120 to i64
  store i64 %121, ptr %16, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #9
  %122 = load i64, ptr @n, align 8, !tbaa !8
  %123 = add nsw i64 %122, 10
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #9
  %124 = load i64, ptr %16, align 8, !tbaa !8
  %125 = add nsw i64 %124, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  store i64 -1, ptr %19, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #9
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %125, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %126 unwind label %139

126:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #9
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %123, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %127 unwind label %143

127:                                              ; preds = %126
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #9
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #9
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #9
  %128 = load i64, ptr %16, align 8, !tbaa !8
  invoke void @_Z3dfsxxRSt6vectorIS_IxSaIxEESaIS1_EEPxxS4_(i64 noundef 1, i64 noundef 1, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef %50, i64 noundef %128, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %129 unwind label %148

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #9
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  store i64 1, ptr %23, align 8, !tbaa !8
  br label %130

130:                                              ; preds = %165, %129
  %131 = load i64, ptr %23, align 8, !tbaa !8
  %132 = load i64, ptr @n, align 8, !tbaa !8
  %133 = icmp sle i64 %131, %132
  br i1 %133, label %152, label %134

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %168

135:                                              ; preds = %116
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %6, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %7, align 4
  br label %230

139:                                              ; preds = %119
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %6, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %7, align 4
  br label %147

143:                                              ; preds = %126
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %6, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #9
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #9
  br label %147

147:                                              ; preds = %143, %139
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #9
  br label %229

148:                                              ; preds = %127
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %6, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %7, align 4
  br label %228

152:                                              ; preds = %130
  %153 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIxbSt4hashIxESt8equal_toIxESaISt4pairIKxbEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @visited, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %154 unwind label %160

154:                                              ; preds = %152
  %155 = load i8, ptr %153, align 1, !tbaa !13, !range !17, !noundef !18
  %156 = trunc i8 %155 to i1
  br i1 %156, label %164, label %157

157:                                              ; preds = %154
  %158 = load i64, ptr %23, align 8, !tbaa !8
  invoke void @_Z6dfsXorxxRSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEPxRSt6vectorISB_IxSaIxEESaISD_EE(i64 noundef %158, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef %47, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %159 unwind label %160

159:                                              ; preds = %157
  br label %164

160:                                              ; preds = %157, %152
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %6, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %227

164:                                              ; preds = %159, %154
  br label %165

165:                                              ; preds = %164
  %166 = load i64, ptr %23, align 8, !tbaa !8
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %23, align 8, !tbaa !8
  br label %130, !llvm.loop !19

168:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store i64 0, ptr %24, align 8, !tbaa !8
  br label %169

169:                                              ; preds = %201, %168
  %170 = load i64, ptr %24, align 8, !tbaa !8
  %171 = load i64, ptr %3, align 8, !tbaa !8
  %172 = icmp slt i64 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %223

174:                                              ; preds = %169
  %175 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %176 unwind label %204

176:                                              ; preds = %174
  %177 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %175, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %178 unwind label %204

178:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %179 = load i64, ptr %13, align 8, !tbaa !8
  %180 = load i64, ptr %14, align 8, !tbaa !8
  %181 = load i64, ptr %16, align 8, !tbaa !8
  %182 = invoke noundef i64 @_Z3lcaxxxPxRSt6vectorIS0_IxSaIxEESaIS2_EE(i64 noundef %179, i64 noundef %180, i64 noundef %181, ptr noundef %50, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %183 unwind label %208

183:                                              ; preds = %178
  store i64 %182, ptr %25, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %185 unwind label %212

185:                                              ; preds = %183
  %186 = load i64, ptr %184, align 8, !tbaa !8
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %188 unwind label %212

188:                                              ; preds = %185
  %189 = load i64, ptr %187, align 8, !tbaa !8
  %190 = xor i64 %186, %189
  store i64 %190, ptr %26, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %191 = load i64, ptr %26, align 8, !tbaa !8
  %192 = load i64, ptr %25, align 8, !tbaa !8
  %193 = getelementptr inbounds i64, ptr %47, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !8
  %195 = xor i64 %191, %194
  store i64 %195, ptr %27, align 8, !tbaa !8
  %196 = load i64, ptr %27, align 8, !tbaa !8
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %196)
          to label %198 unwind label %216

198:                                              ; preds = %188
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef @.str)
          to label %200 unwind label %216

200:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %201

201:                                              ; preds = %200
  %202 = load i64, ptr %24, align 8, !tbaa !8
  %203 = add nsw i64 %202, 1
  store i64 %203, ptr %24, align 8, !tbaa !8
  br label %169, !llvm.loop !20

204:                                              ; preds = %176, %174
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %6, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %7, align 4
  br label %222

208:                                              ; preds = %178
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %6, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %7, align 4
  br label %221

212:                                              ; preds = %185, %183
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %6, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %7, align 4
  br label %220

216:                                              ; preds = %198, %188
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %6, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %220

220:                                              ; preds = %216, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  br label %221

221:                                              ; preds = %220, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %222

222:                                              ; preds = %221, %204
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %227

223:                                              ; preds = %173
  %224 = load i64, ptr %2, align 8, !tbaa !8
  %225 = add nsw i64 %224, -1
  store i64 %225, ptr %2, align 8, !tbaa !8
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #9
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  %226 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %226)
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  br label %35, !llvm.loop !21

227:                                              ; preds = %222, %160
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #9
  br label %228

228:                                              ; preds = %227, %148
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #9
  br label %229

229:                                              ; preds = %228, %147
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #9
  br label %230

230:                                              ; preds = %229, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %231

231:                                              ; preds = %230, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %232

232:                                              ; preds = %231, %87, %68
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  br label %233

233:                                              ; preds = %232, %56
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  br label %235

234:                                              ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  ret i32 0

235:                                              ; preds = %233
  %236 = load ptr, ptr %6, align 8
  %237 = load i32, ptr %7, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 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)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; 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::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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.7" = type { i8 }
%"class.std::unordered_map.10" = type { %"class.std::_Hashtable.11" }
%"class.std::_Hashtable.11" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@n = external dso_local global i64, align 8
@visited = external dso_local global %"class.std::unordered_map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsxxRSt6vectorIS_IxSaIxEESaIS1_EEPxxS4_(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3lcaxxxPxRSt6vectorIS0_IxSaIxEESaIS2_EE(i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6dfsXorxxRSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEPxRSt6vectorISB_IxSaIxEESaISD_EE(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator.2", align 1
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector.5", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::allocator.7", align 1
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %"class.std::unordered_map.10", align 8
  %14 = alloca i64, align 8
  %15 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  %21 = 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)
  %22 = load i64, ptr %1, align 8, !tbaa !8
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.lr.ph67, label %._crit_edge68

.lr.ph67:                                         ; preds = %0, %._crit_edge65
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #9
  %26 = load i64, ptr @n, align 8, !tbaa !8
  %27 = add nsw i64 %26, 10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #9
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %27, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %28 unwind label %37

28:                                               ; preds = %.lr.ph67
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  %29 = load i64, ptr @n, align 8, !tbaa !8
  %30 = add nsw i64 %29, 10
  %31 = call ptr @llvm.stacksave.p0()
  %32 = alloca i64, i64 %30, align 16
  %33 = load i64, ptr @n, align 8, !tbaa !8
  %34 = add nsw i64 %33, 10
  %35 = alloca i64, i64 %34, align 16
  %.not47 = icmp slt i64 %33, 1
  br i1 %.not47, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %41, %28
  %36 = phi i64 [ %33, %28 ], [ %43, %41 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  store i64 0, ptr %5, align 8, !tbaa !8
  %.not2949 = icmp slt i64 %36, -4
  br i1 %.not2949, label %._crit_edge53.thread, label %.lr.ph52

._crit_edge53.thread:                             ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  br label %._crit_edge57

37:                                               ; preds = %.lr.ph67
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  br label %145

.lr.ph:                                           ; preds = %28, %41
  %.02548 = phi i64 [ %42, %41 ], [ 1, %28 ]
  %39 = getelementptr inbounds i64, ptr %32, i64 %.02548
  %40 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %41 unwind label %44

41:                                               ; preds = %.lr.ph
  %42 = add nuw nsw i64 %.02548, 1
  %43 = load i64, ptr @n, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.02548, %43
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

44:                                               ; preds = %.lr.ph
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %144

._crit_edge53:                                    ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %46 = icmp sgt i64 %52, 1
  br i1 %46, label %.lr.ph56, label %._crit_edge57

.lr.ph52:                                         ; preds = %._crit_edge, %49
  %storemerge50 = phi i64 [ %51, %49 ], [ 0, %._crit_edge ]
  %47 = getelementptr inbounds i64, ptr %35, i64 %storemerge50
  store i64 0, ptr %47, align 8, !tbaa !8
  %48 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIxbSt4hashIxESt8equal_toIxESaISt4pairIKxbEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @visited, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %49 unwind label %54

49:                                               ; preds = %.lr.ph52
  store i8 0, ptr %48, align 1, !tbaa !13
  %50 = load i64, ptr %5, align 8, !tbaa !8
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %5, align 8, !tbaa !8
  %52 = load i64, ptr @n, align 8, !tbaa !8
  %53 = add nsw i64 %52, 4
  %.not29.not = icmp slt i64 %50, %53
  br i1 %.not29.not, label %.lr.ph52, label %._crit_edge53, !llvm.loop !15

54:                                               ; preds = %.lr.ph52
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %144

._crit_edge57:                                    ; preds = %70, %._crit_edge53.thread, %._crit_edge53
  %.lcssa = phi i64 [ %52, %._crit_edge53 ], [ %36, %._crit_edge53.thread ], [ %72, %70 ]
  %56 = call noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %.lcssa)
  %57 = call double @llvm.ceil.f64(double %56)
  %58 = fptosi double %57 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  %59 = load i64, ptr @n, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  %60 = add nsw i64 %58, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  store i64 -1, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #9
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %60, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %77 unwind label %84

.lr.ph56:                                         ; preds = %._crit_edge53, %70
  %.02754 = phi i64 [ %71, %70 ], [ 0, %._crit_edge53 ]
  %61 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %62 unwind label %75

62:                                               ; preds = %.lr.ph56
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %64 unwind label %75

64:                                               ; preds = %62
  %65 = load i64, ptr %6, align 8, !tbaa !8
  %66 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %65) #9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %67 unwind label %75

67:                                               ; preds = %64
  %68 = load i64, ptr %7, align 8, !tbaa !8
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IxSaIxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %68) #9
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %70 unwind label %75

70:                                               ; preds = %67
  %71 = add nuw nsw i64 %.02754, 1
  %72 = load i64, ptr @n, align 8, !tbaa !8
  %73 = add nsw i64 %72, -1
  %74 = icmp slt i64 %71, %73
  br i1 %74, label %.lr.ph56, label %._crit_edge57, !llvm.loop !16

75:                                               ; preds = %67, %64, %62, %.lr.ph56
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %143

77:                                               ; preds = %._crit_edge57
  %78 = add nsw i64 %59, 10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #9
  call void @_ZNSaISt6vectorIxSaIxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  invoke void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %78, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %79 unwind label %86

79:                                               ; preds = %77
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #9
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  invoke void @_Z3dfsxxRSt6vectorIS_IxSaIxEESaIS1_EEPxxS4_(i64 noundef 1, i64 noundef 1, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %35, i64 noundef %58, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %80 unwind label %89

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #9
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  store i64 1, ptr %14, align 8, !tbaa !8
  %81 = load i64, ptr @n, align 8, !tbaa !8
  %.not3258 = icmp slt i64 %81, 1
  br i1 %.not3258, label %._crit_edge61, label %.lr.ph60

._crit_edge61:                                    ; preds = %99, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  %82 = load i64, ptr %2, align 8, !tbaa !8
  %83 = icmp sgt i64 %82, 0
  br i1 %83, label %.lr.ph64, label %._crit_edge65

84:                                               ; preds = %._crit_edge57
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %88

86:                                               ; preds = %77
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIxSaIxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #9
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  br label %88

88:                                               ; preds = %86, %84
  %.pn = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ]
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  br label %142

89:                                               ; preds = %79
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %141

.lr.ph60:                                         ; preds = %80, %99
  %91 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt13unordered_mapIxbSt4hashIxESt8equal_toIxESaISt4pairIKxbEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @visited, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %92 unwind label %97

92:                                               ; preds = %.lr.ph60
  %93 = load i8, ptr %91, align 1, !tbaa !13, !range !17, !noundef !18
  %94 = trunc nuw i8 %93 to i1
  br i1 %94, label %99, label %95

95:                                               ; preds = %92
  %96 = load i64, ptr %14, align 8, !tbaa !8
  invoke void @_Z6dfsXorxxRSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEPxRSt6vectorISB_IxSaIxEESaISD_EE(i64 noundef %96, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull %32, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %99 unwind label %97

97:                                               ; preds = %95, %.lr.ph60
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %140

99:                                               ; preds = %92, %95
  %100 = load i64, ptr %14, align 8, !tbaa !8
  %101 = add nsw i64 %100, 1
  store i64 %101, ptr %14, align 8, !tbaa !8
  %102 = load i64, ptr @n, align 8, !tbaa !8
  %.not32.not = icmp slt i64 %100, %102
  br i1 %.not32.not, label %.lr.ph60, label %._crit_edge61, !llvm.loop !19

._crit_edge65:                                    ; preds = %128, %._crit_edge61
  %103 = load i64, ptr %1, align 8, !tbaa !8
  %104 = add nsw i64 %103, -1
  store i64 %104, ptr %1, align 8, !tbaa !8
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #9
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.stackrestore.p0(ptr %31)
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  %105 = load i64, ptr %1, align 8, !tbaa !8
  %106 = icmp sgt i64 %105, 0
  br i1 %106, label %.lr.ph67, label %._crit_edge68, !llvm.loop !20

.lr.ph64:                                         ; preds = %._crit_edge61, %128
  %.02662 = phi i64 [ %129, %128 ], [ 0, %._crit_edge61 ]
  %107 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %108 unwind label %132

108:                                              ; preds = %.lr.ph64
  %109 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %110 unwind label %132

110:                                              ; preds = %108
  %111 = load i64, ptr %6, align 8, !tbaa !8
  %112 = load i64, ptr %7, align 8, !tbaa !8
  %113 = invoke noundef i64 @_Z3lcaxxxPxRSt6vectorIS0_IxSaIxEESaIS2_EE(i64 noundef %111, i64 noundef %112, i64 noundef %58, ptr noundef nonnull %35, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %114 unwind label %134

114:                                              ; preds = %110
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %116 unwind label %136

116:                                              ; preds = %114
  %117 = load i64, ptr %115, align 8, !tbaa !8
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %119 unwind label %136

119:                                              ; preds = %116
  %120 = load i64, ptr %118, align 8, !tbaa !8
  %121 = xor i64 %120, %117
  %122 = getelementptr inbounds i64, ptr %32, i64 %113
  %123 = load i64, ptr %122, align 8, !tbaa !8
  %124 = xor i64 %121, %123
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %124)
          to label %126 unwind label %138

126:                                              ; preds = %119
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @.str)
          to label %128 unwind label %138

128:                                              ; preds = %126
  %129 = add nuw nsw i64 %.02662, 1
  %130 = load i64, ptr %2, align 8, !tbaa !8
  %131 = icmp slt i64 %129, %130
  br i1 %131, label %.lr.ph64, label %._crit_edge65, !llvm.loop !21

132:                                              ; preds = %108, %.lr.ph64
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %140

134:                                              ; preds = %110
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %140

136:                                              ; preds = %116, %114
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %140

138:                                              ; preds = %126, %119
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %140

140:                                              ; preds = %132, %136, %138, %134, %97
  %.pn37 = phi { ptr, i32 } [ %98, %97 ], [ %133, %132 ], [ %135, %134 ], [ %139, %138 ], [ %137, %136 ]
  call void @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #9
  br label %141

141:                                              ; preds = %140, %89
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %140 ], [ %90, %89 ]
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br label %142

142:                                              ; preds = %141, %88
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %141 ], [ %.pn, %88 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  br label %143

143:                                              ; preds = %142, %75
  %.pn41 = phi { ptr, i32 } [ %76, %75 ], [ %.pn37.pn.pn, %142 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %144

144:                                              ; preds = %143, %54, %44
  %.pn43 = phi { ptr, i32 } [ %45, %44 ], [ %55, %54 ], [ %.pn41, %143 ]
  call void @_ZNSt6vectorIS_IxSaIxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  br label %145

145:                                              ; preds = %144, %37
  %.pn43.pn = phi { ptr, i32 } [ %.pn43, %144 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn43.pn

._crit_edge68:                                    ; preds = %._crit_edge65, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 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 #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIS_IxSaIxEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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