; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 18. Greedy (Codeforces_Problem_1579E2-38)

; 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::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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

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

38:                                               ; preds = %182, %0
  %39 = load i64, ptr %3, align 8, !tbaa !13
  %40 = add nsw i64 %39, -1
  store i64 %40, ptr %3, align 8, !tbaa !13
  %41 = icmp ne i64 %39, 0
  br i1 %41, label %42, label %186

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %44 = load i64, ptr %4, align 8, !tbaa !13
  %45 = call ptr @llvm.stacksave.p0()
  store ptr %45, ptr %5, align 8
  %46 = alloca i64, i64 %44, align 16
  store i64 %44, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 0, ptr %7, align 8, !tbaa !13
  br label %47

47:                                               ; preds = %56, %42
  %48 = load i64, ptr %7, align 8, !tbaa !13
  %49 = load i64, ptr %4, align 8, !tbaa !13
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %59

52:                                               ; preds = %47
  %53 = load i64, ptr %7, align 8, !tbaa !13
  %54 = getelementptr inbounds i64, ptr %46, i64 %53
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %54)
  br label %56

56:                                               ; preds = %52
  %57 = load i64, ptr %7, align 8, !tbaa !13
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %7, align 8, !tbaa !13
  br label %47, !llvm.loop !15

59:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #8
  call void @_ZNSt5dequeIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %60 = getelementptr inbounds i64, ptr %46, i64 0
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %61 unwind label %81

61:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 0, ptr %11, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  %62 = getelementptr inbounds i64, ptr %46, i64 0
  %63 = load i64, ptr %62, align 16, !tbaa !13
  %64 = add nsw i64 %63, 1000000000
  %65 = add nsw i64 %64, 1
  invoke void @_Z6updateRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef %65)
          to label %66 unwind label %85

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %67 = getelementptr inbounds i64, ptr %46, i64 0
  %68 = load i64, ptr %67, align 16, !tbaa !13
  %69 = add nsw i64 %68, 1000000000
  %70 = add nsw i64 %69, 1
  store i64 %70, ptr %14, align 8, !tbaa !13
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %72 unwind label %89

72:                                               ; preds = %66
  %73 = load i64, ptr %71, align 8, !tbaa !13
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %71, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 1, ptr %15, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %168, %72
  %76 = load i64, ptr %15, align 8, !tbaa !13
  %77 = load i64, ptr %4, align 8, !tbaa !13
  %78 = sub nsw i64 %77, 1
  %79 = icmp sle i64 %76, %78
  br i1 %79, label %93, label %80

80:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %177

81:                                               ; preds = %59
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %9, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %10, align 4
  br label %185

85:                                               ; preds = %180, %177, %61
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  br label %184

89:                                               ; preds = %66
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %9, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %184

93:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %94 = invoke noundef i64 @_Z5checkRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef 2000000010)
          to label %95 unwind label %123

95:                                               ; preds = %93
  store i64 %94, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %96 = load i64, ptr %15, align 8, !tbaa !13
  %97 = getelementptr inbounds i64, ptr %46, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !13
  %99 = add nsw i64 %98, 1000000000
  %100 = add nsw i64 %99, 1
  %101 = invoke noundef i64 @_Z5checkRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef %100)
          to label %102 unwind label %127

102:                                              ; preds = %95
  store i64 %101, ptr %17, align 8, !tbaa !13
  %103 = load i64, ptr %16, align 8, !tbaa !13
  %104 = load i64, ptr %17, align 8, !tbaa !13
  %105 = sub nsw i64 %103, %104
  %106 = load i64, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %107 = load i64, ptr %15, align 8, !tbaa !13
  %108 = getelementptr inbounds i64, ptr %46, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !13
  %110 = add nsw i64 %109, 1000000000
  %111 = add nsw i64 %110, 1
  store i64 %111, ptr %18, align 8, !tbaa !13
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %113 unwind label %131

113:                                              ; preds = %102
  %114 = load i64, ptr %112, align 8, !tbaa !13
  %115 = sub nsw i64 %106, %114
  %116 = icmp slt i64 %105, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br i1 %116, label %117, label %135

117:                                              ; preds = %113
  %118 = load i64, ptr %16, align 8, !tbaa !13
  %119 = load i64, ptr %17, align 8, !tbaa !13
  %120 = sub nsw i64 %118, %119
  %121 = load i64, ptr %11, align 8, !tbaa !13
  %122 = add nsw i64 %121, %120
  store i64 %122, ptr %11, align 8, !tbaa !13
  br label %152

123:                                              ; preds = %93
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %9, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %10, align 4
  br label %176

127:                                              ; preds = %152, %95
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  br label %175

131:                                              ; preds = %102
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %175

135:                                              ; preds = %113
  %136 = load i64, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %137 = load i64, ptr %15, align 8, !tbaa !13
  %138 = getelementptr inbounds i64, ptr %46, i64 %137
  %139 = load i64, ptr %138, align 8, !tbaa !13
  %140 = add nsw i64 %139, 1000000000
  %141 = add nsw i64 %140, 1
  store i64 %141, ptr %19, align 8, !tbaa !13
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %143 unwind label %148

143:                                              ; preds = %135
  %144 = load i64, ptr %142, align 8, !tbaa !13
  %145 = sub nsw i64 %136, %144
  %146 = load i64, ptr %11, align 8, !tbaa !13
  %147 = add nsw i64 %146, %145
  store i64 %147, ptr %11, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %152

148:                                              ; preds = %135
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %9, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %175

152:                                              ; preds = %143, %117
  %153 = load i64, ptr %15, align 8, !tbaa !13
  %154 = getelementptr inbounds i64, ptr %46, i64 %153
  %155 = load i64, ptr %154, align 8, !tbaa !13
  %156 = add nsw i64 %155, 1000000000
  %157 = add nsw i64 %156, 1
  invoke void @_Z6updateRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %12, i64 noundef %157)
          to label %158 unwind label %127

158:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %159 = load i64, ptr %15, align 8, !tbaa !13
  %160 = getelementptr inbounds i64, ptr %46, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !13
  %162 = add nsw i64 %161, 1000000000
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %20, align 8, !tbaa !13
  %164 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %165 unwind label %171

165:                                              ; preds = %158
  %166 = load i64, ptr %164, align 8, !tbaa !13
  %167 = add nsw i64 %166, 1
  store i64 %167, ptr %164, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %168

168:                                              ; preds = %165
  %169 = load i64, ptr %15, align 8, !tbaa !13
  %170 = add nsw i64 %169, 1
  store i64 %170, ptr %15, align 8, !tbaa !13
  br label %75, !llvm.loop !17

171:                                              ; preds = %158
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %9, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %175

175:                                              ; preds = %171, %148, %131, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %176

176:                                              ; preds = %175, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %184

177:                                              ; preds = %80
  %178 = load i64, ptr %11, align 8, !tbaa !13
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %178)
          to label %180 unwind label %85

180:                                              ; preds = %177
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %179, ptr noundef @.str.4)
          to label %182 unwind label %85

182:                                              ; preds = %180
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #8
  %183 = load ptr, ptr %5, align 8
  call void @llvm.stackrestore.p0(ptr %183)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %38, !llvm.loop !18

184:                                              ; preds = %176, %89, %85
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %185

185:                                              ; preds = %184, %81
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %8) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %194

186:                                              ; preds = %38
  %187 = call i64 @clock() #8
  %188 = load i64, ptr %2, align 8, !tbaa !8
  %189 = sub nsw i64 %187, %188
  %190 = sitofp i64 %189 to double
  %191 = fdiv double %190, 1.000000e+06
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %191)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %193 = load i32, ptr %1, align 4
  ret i32 %193

194:                                              ; preds = %185
  %195 = load ptr, ptr %9, align 8
  %196 = load i32, ptr %10, align 4
  %197 = insertvalue { ptr, i32 } poison, ptr %195, 0
  %198 = insertvalue { ptr, i32 } %197, i32 %196, 1
  resume { ptr, i32 } %198
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #4 align 2

; Function Attrs: nounwind
declare i64 @clock() #5

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #3

; 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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #0 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

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

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


; 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::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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl" = type { %"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" }
%"struct.std::_Deque_base<long long, std::allocator<long long>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, std::pair<const long long, long long>, std::_Select1st<std::pair<const long long, long long>>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::deque", align 8
  %4 = alloca %"class.std::map", align 8
  %5 = alloca %"class.std::map", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %18
  %20 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = tail call i64 @clock() #9
  %22 = load ptr, ptr @stdin, align 8, !tbaa !8
  %23 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %22)
  %24 = load ptr, ptr @stdout, align 8, !tbaa !8
  %25 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  %26 = 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)
  %27 = load i64, ptr %1, align 8, !tbaa !11
  %28 = add nsw i64 %27, -1
  store i64 %28, ptr %1, align 8, !tbaa !11
  %.not50 = icmp eq i64 %27, 0
  br i1 %.not50, label %._crit_edge53, label %.lr.ph52

.lr.ph52:                                         ; preds = %0, %104
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %29 = 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)
  %30 = load i64, ptr %2, align 8, !tbaa !11
  %31 = call ptr @llvm.stacksave.p0()
  %32 = alloca i64, i64 %30, align 16
  %33 = load i64, ptr %2, align 8, !tbaa !11
  %34 = icmp sgt i64 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph52
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #9
  call void @_ZNSt5dequeIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3)
  invoke void @_ZNSt5dequeIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %40 unwind label %52

.lr.ph:                                           ; preds = %.lr.ph52, %.lr.ph
  %.043 = phi i64 [ %37, %.lr.ph ], [ 0, %.lr.ph52 ]
  %35 = getelementptr inbounds i64, ptr %32, i64 %.043
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %35)
  %37 = add nuw nsw i64 %.043, 1
  %38 = load i64, ptr %2, align 8, !tbaa !11
  %39 = icmp slt i64 %37, %38
  br i1 %39, label %.lr.ph, label %._crit_edge, !llvm.loop !13

40:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #9
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #9
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #9
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #9
  %41 = load i64, ptr %32, align 16, !tbaa !11
  %42 = add nsw i64 %41, 1000000001
  invoke void @_Z6updateRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef %42)
          to label %43 unwind label %54

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %44 = load i64, ptr %32, align 16, !tbaa !11
  %45 = add nsw i64 %44, 1000000001
  store i64 %45, ptr %6, align 8, !tbaa !11
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %47 unwind label %56

47:                                               ; preds = %43
  %48 = load i64, ptr %46, align 8, !tbaa !11
  %49 = add nsw i64 %48, 1
  store i64 %49, ptr %46, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %50 = load i64, ptr %2, align 8, !tbaa !11
  %.not32.not44 = icmp sgt i64 %50, 1
  br i1 %.not32.not44, label %.lr.ph48, label %._crit_edge49

._crit_edge49:                                    ; preds = %95, %47
  %.025.lcssa = phi i64 [ 0, %47 ], [ %.126, %95 ]
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.025.lcssa)
          to label %102 unwind label %54

52:                                               ; preds = %._crit_edge
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %108

54:                                               ; preds = %102, %._crit_edge49, %40
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %107

56:                                               ; preds = %43
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %107

.lr.ph48:                                         ; preds = %47, %95
  %.02446 = phi i64 [ %98, %95 ], [ 1, %47 ]
  %.02545 = phi i64 [ %.126, %95 ], [ 0, %47 ]
  %58 = invoke noundef i64 @_Z5checkRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef 2000000010)
          to label %59 unwind label %73

59:                                               ; preds = %.lr.ph48
  %60 = getelementptr inbounds i64, ptr %32, i64 %.02446
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = add nsw i64 %61, 1000000001
  %63 = invoke noundef i64 @_Z5checkRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef %62)
          to label %64 unwind label %75

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %65 = load i64, ptr %60, align 8, !tbaa !11
  %66 = add nsw i64 %65, 1000000001
  store i64 %66, ptr %7, align 8, !tbaa !11
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %68 unwind label %77

68:                                               ; preds = %64
  %69 = sub nsw i64 %58, %63
  %70 = load i64, ptr %67, align 8, !tbaa !11
  %71 = sub nsw i64 %63, %70
  %72 = icmp slt i64 %69, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br i1 %72, label %88, label %79

73:                                               ; preds = %.lr.ph48
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %107

75:                                               ; preds = %88, %59
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %107

77:                                               ; preds = %64
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %107

79:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %80 = load i64, ptr %60, align 8, !tbaa !11
  %81 = add nsw i64 %80, 1000000001
  store i64 %81, ptr %8, align 8, !tbaa !11
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %83 unwind label %86

83:                                               ; preds = %79
  %84 = load i64, ptr %82, align 8, !tbaa !11
  %85 = sub nsw i64 %63, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %88

86:                                               ; preds = %79
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %107

88:                                               ; preds = %68, %83
  %.pn = phi i64 [ %85, %83 ], [ %69, %68 ]
  %.126 = add nsw i64 %.pn, %.02545
  %89 = load i64, ptr %60, align 8, !tbaa !11
  %90 = add nsw i64 %89, 1000000001
  invoke void @_Z6updateRSt3mapIxxSt4lessIxESaISt4pairIKxxEEEx(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef %90)
          to label %91 unwind label %75

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %92 = load i64, ptr %60, align 8, !tbaa !11
  %93 = add nsw i64 %92, 1000000001
  store i64 %93, ptr %9, align 8, !tbaa !11
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %95 unwind label %100

95:                                               ; preds = %91
  %96 = load i64, ptr %94, align 8, !tbaa !11
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %94, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  %98 = add nuw nsw i64 %.02446, 1
  %99 = load i64, ptr %2, align 8, !tbaa !11
  %.not32.not = icmp slt i64 %98, %99
  br i1 %.not32.not, label %.lr.ph48, label %._crit_edge49, !llvm.loop !15

100:                                              ; preds = %91
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  br label %107

102:                                              ; preds = %._crit_edge49
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @.str.4)
          to label %104 unwind label %54

104:                                              ; preds = %102
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #9
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #9
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #9
  call void @llvm.stackrestore.p0(ptr %31)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  %105 = load i64, ptr %1, align 8, !tbaa !11
  %106 = add nsw i64 %105, -1
  store i64 %106, ptr %1, align 8, !tbaa !11
  %.not = icmp eq i64 %105, 0
  br i1 %.not, label %._crit_edge53, label %.lr.ph52, !llvm.loop !16

107:                                              ; preds = %73, %100, %86, %77, %75, %56, %54
  %.pn33.pn.pn = phi { ptr, i32 } [ %55, %54 ], [ %57, %56 ], [ %74, %73 ], [ %101, %100 ], [ %76, %75 ], [ %87, %86 ], [ %78, %77 ]
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #9
  call void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #9
  br label %108

108:                                              ; preds = %107, %52
  %.pn33.pn.pn.pn = phi { ptr, i32 } [ %.pn33.pn.pn, %107 ], [ %53, %52 ]
  call void @_ZNSt5dequeIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #9
  call void @llvm.lifetime.end.p0(i64 80, 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 } %.pn33.pn.pn.pn

._crit_edge53:                                    ; preds = %104, %0
  %109 = call i64 @clock() #9
  %110 = sub nsw i64 %109, %21
  %111 = sitofp i64 %110 to double
  %112 = fdiv double %111, 1.000000e+06
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %112)
  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 #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #5

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; 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 nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEEixEOx(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIxxSt4lessIxESaISt4pairIKxxEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

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

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


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