; LLVM IR from eyangch/competitive-programming :: Kattis (flightcollision)

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

%"struct.std::pair" = type { i64, 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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type { x86_fp80, %"struct.std::pair" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = 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.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i64, align 8
@d = external dso_local global [100000 x %"struct.std::pair"], align 16
@cr = external dso_local global [100000 x i8], align 16
@p = external dso_local global [100000 x i64], align 16
@n = external dso_local global [100000 x i64], align 16
@_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
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

33:                                               ; preds = %47, %0
  %34 = load i64, ptr %2, align 8, !tbaa !8
  %35 = load i64, ptr @N, align 8, !tbaa !8
  %36 = icmp slt i64 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %50

38:                                               ; preds = %33
  %39 = load i64, ptr %2, align 8, !tbaa !8
  %40 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %39
  %41 = getelementptr inbounds %"struct.std::pair", ptr %40, i32 0, i32 0
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %41)
  %43 = load i64, ptr %2, align 8, !tbaa !8
  %44 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %43
  %45 = getelementptr inbounds %"struct.std::pair", ptr %44, i32 0, i32 1
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(8) %45)
  br label %47

47:                                               ; preds = %38
  %48 = load i64, ptr %2, align 8, !tbaa !8
  %49 = add nsw i64 %48, 1
  store i64 %49, ptr %2, align 8, !tbaa !8
  br label %33, !llvm.loop !11

50:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #7
  call void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 1, ptr %4, align 8, !tbaa !8
  br label %51

51:                                               ; preds = %104, %50
  %52 = load i64, ptr %4, align 8, !tbaa !8
  %53 = load i64, ptr @N, align 8, !tbaa !8
  %54 = icmp slt i64 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %111

56:                                               ; preds = %51
  %57 = load i64, ptr %4, align 8, !tbaa !8
  %58 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %57
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 1
  %60 = load i64, ptr %59, align 8, !tbaa !13
  %61 = load i64, ptr %4, align 8, !tbaa !8
  %62 = sub nsw i64 %61, 1
  %63 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %62
  %64 = getelementptr inbounds %"struct.std::pair", ptr %63, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !13
  %66 = icmp eq i64 %60, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %56
  br label %104

68:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  %69 = load i64, ptr %4, align 8, !tbaa !8
  %70 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %69
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = load i64, ptr %71, align 16, !tbaa !15
  %73 = load i64, ptr %4, align 8, !tbaa !8
  %74 = sub nsw i64 %73, 1
  %75 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %74
  %76 = getelementptr inbounds %"struct.std::pair", ptr %75, i32 0, i32 0
  %77 = load i64, ptr %76, align 16, !tbaa !15
  %78 = sub nsw i64 %72, %77
  %79 = sitofp i64 %78 to x86_fp80
  %80 = load i64, ptr %4, align 8, !tbaa !8
  %81 = sub nsw i64 %80, 1
  %82 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %81
  %83 = getelementptr inbounds %"struct.std::pair", ptr %82, i32 0, i32 1
  %84 = load i64, ptr %83, align 8, !tbaa !13
  %85 = load i64, ptr %4, align 8, !tbaa !8
  %86 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %85
  %87 = getelementptr inbounds %"struct.std::pair", ptr %86, i32 0, i32 1
  %88 = load i64, ptr %87, align 8, !tbaa !13
  %89 = sub nsw i64 %84, %88
  %90 = sitofp i64 %89 to x86_fp80
  %91 = fdiv x86_fp80 %79, %90
  store x86_fp80 %91, ptr %6, align 16, !tbaa !16
  %92 = load x86_fp80, ptr %6, align 16, !tbaa !16
  %93 = fcmp olt x86_fp80 %92, 0xK00000000000000000000
  br i1 %93, label %94, label %95

94:                                               ; preds = %68
  store i32 7, ptr %5, align 4
  br label %101

95:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %96 = load i64, ptr %4, align 8, !tbaa !8
  %97 = sub nsw i64 %96, 1
  store i64 %97, ptr %9, align 8, !tbaa !8
  invoke void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %98 unwind label %107

98:                                               ; preds = %95
  invoke void @_ZNSt4pairIeS_IxxEEC2IeS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKeRKS0_(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %99 unwind label %107

99:                                               ; preds = %98
  invoke void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 16 dereferenceable(32) %7)
          to label %100 unwind label %107

100:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  store i32 0, ptr %5, align 4
  br label %101

101:                                              ; preds = %100, %94
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  %102 = load i32, ptr %5, align 4
  switch i32 %102, label %318 [
    i32 0, label %103
    i32 7, label %104
  ]

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103, %101, %67
  %105 = load i64, ptr %4, align 8, !tbaa !8
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %4, align 8, !tbaa !8
  br label %51, !llvm.loop !18

107:                                              ; preds = %99, %98, %95
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %10, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %312

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

112:                                              ; preds = %126, %111
  %113 = load i64, ptr %12, align 8, !tbaa !8
  %114 = load i64, ptr @N, align 8, !tbaa !8
  %115 = icmp slt i64 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %129

117:                                              ; preds = %112
  %118 = load i64, ptr %12, align 8, !tbaa !8
  %119 = sub nsw i64 %118, 1
  %120 = load i64, ptr %12, align 8, !tbaa !8
  %121 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %120
  store i64 %119, ptr %121, align 8, !tbaa !8
  %122 = load i64, ptr %12, align 8, !tbaa !8
  %123 = add nsw i64 %122, 1
  %124 = load i64, ptr %12, align 8, !tbaa !8
  %125 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %124
  store i64 %123, ptr %125, align 8, !tbaa !8
  br label %126

126:                                              ; preds = %117
  %127 = load i64, ptr %12, align 8, !tbaa !8
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %12, align 8, !tbaa !8
  br label %112, !llvm.loop !19

129:                                              ; preds = %116
  br label %130

130:                                              ; preds = %243, %241, %129
  %131 = invoke noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %132 unwind label %160

132:                                              ; preds = %130
  %133 = xor i1 %131, true
  br i1 %133, label %134, label %251

134:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %135 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %136 unwind label %164

136:                                              ; preds = %134
  %137 = getelementptr inbounds %"struct.std::pair.0", ptr %135, i32 0, i32 0
  %138 = load x86_fp80, ptr %137, align 16, !tbaa !20
  store x86_fp80 %138, ptr %13, align 16, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %139 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %140 unwind label %168

140:                                              ; preds = %136
  %141 = getelementptr inbounds %"struct.std::pair.0", ptr %139, i32 0, i32 1
  %142 = getelementptr inbounds %"struct.std::pair", ptr %141, i32 0, i32 0
  %143 = load i64, ptr %142, align 16, !tbaa !22
  store i64 %143, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %144 = invoke noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %145 unwind label %172

145:                                              ; preds = %140
  %146 = getelementptr inbounds %"struct.std::pair.0", ptr %144, i32 0, i32 1
  %147 = getelementptr inbounds %"struct.std::pair", ptr %146, i32 0, i32 1
  %148 = load i64, ptr %147, align 8, !tbaa !23
  store i64 %148, ptr %15, align 8, !tbaa !8
  invoke void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %149 unwind label %172

149:                                              ; preds = %145
  %150 = load i64, ptr %14, align 8, !tbaa !8
  %151 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %150
  %152 = load i8, ptr %151, align 1, !tbaa !24, !range !26, !noundef !27
  %153 = trunc i8 %152 to i1
  br i1 %153, label %159, label %154

154:                                              ; preds = %149
  %155 = load i64, ptr %15, align 8, !tbaa !8
  %156 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !24, !range !26, !noundef !27
  %158 = trunc i8 %157 to i1
  br i1 %158, label %159, label %176

159:                                              ; preds = %154, %149
  store i32 11, ptr %5, align 4
  br label %241, !llvm.loop !28

160:                                              ; preds = %130
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %10, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %11, align 4
  br label %312

164:                                              ; preds = %134
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %10, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %11, align 4
  br label %250

168:                                              ; preds = %136
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %10, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %11, align 4
  br label %249

172:                                              ; preds = %145, %140
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %10, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %11, align 4
  br label %248

176:                                              ; preds = %154
  %177 = load i64, ptr %15, align 8, !tbaa !8
  %178 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %177
  store i8 1, ptr %178, align 1, !tbaa !24
  %179 = load i64, ptr %14, align 8, !tbaa !8
  %180 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %179
  store i8 1, ptr %180, align 1, !tbaa !24
  %181 = load i64, ptr %14, align 8, !tbaa !8
  %182 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !8
  store i64 %183, ptr %14, align 8, !tbaa !8
  %184 = load i64, ptr %15, align 8, !tbaa !8
  %185 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !8
  store i64 %186, ptr %15, align 8, !tbaa !8
  %187 = load i64, ptr %14, align 8, !tbaa !8
  %188 = icmp slt i64 %187, 0
  br i1 %188, label %193, label %189

189:                                              ; preds = %176
  %190 = load i64, ptr %15, align 8, !tbaa !8
  %191 = load i64, ptr @N, align 8, !tbaa !8
  %192 = icmp sge i64 %190, %191
  br i1 %192, label %193, label %194

193:                                              ; preds = %189, %176
  store i32 11, ptr %5, align 4
  br label %241, !llvm.loop !28

194:                                              ; preds = %189
  %195 = load i64, ptr %14, align 8, !tbaa !8
  %196 = load i64, ptr %15, align 8, !tbaa !8
  %197 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %196
  store i64 %195, ptr %197, align 8, !tbaa !8
  %198 = load i64, ptr %15, align 8, !tbaa !8
  %199 = load i64, ptr %14, align 8, !tbaa !8
  %200 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %199
  store i64 %198, ptr %200, align 8, !tbaa !8
  %201 = load i64, ptr %14, align 8, !tbaa !8
  %202 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %201
  %203 = getelementptr inbounds %"struct.std::pair", ptr %202, i32 0, i32 1
  %204 = load i64, ptr %203, align 8, !tbaa !13
  %205 = load i64, ptr %15, align 8, !tbaa !8
  %206 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %205
  %207 = getelementptr inbounds %"struct.std::pair", ptr %206, i32 0, i32 1
  %208 = load i64, ptr %207, align 8, !tbaa !13
  %209 = icmp eq i64 %204, %208
  br i1 %209, label %210, label %211

210:                                              ; preds = %194
  store i32 11, ptr %5, align 4
  br label %241, !llvm.loop !28

211:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  %212 = load i64, ptr %14, align 8, !tbaa !8
  %213 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %212
  %214 = getelementptr inbounds %"struct.std::pair", ptr %213, i32 0, i32 0
  %215 = load i64, ptr %214, align 16, !tbaa !15
  %216 = load i64, ptr %15, align 8, !tbaa !8
  %217 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %216
  %218 = getelementptr inbounds %"struct.std::pair", ptr %217, i32 0, i32 0
  %219 = load i64, ptr %218, align 16, !tbaa !15
  %220 = sub nsw i64 %215, %219
  %221 = sitofp i64 %220 to x86_fp80
  %222 = load i64, ptr %15, align 8, !tbaa !8
  %223 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %222
  %224 = getelementptr inbounds %"struct.std::pair", ptr %223, i32 0, i32 1
  %225 = load i64, ptr %224, align 8, !tbaa !13
  %226 = load i64, ptr %14, align 8, !tbaa !8
  %227 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %226
  %228 = getelementptr inbounds %"struct.std::pair", ptr %227, i32 0, i32 1
  %229 = load i64, ptr %228, align 8, !tbaa !13
  %230 = sub nsw i64 %225, %229
  %231 = sitofp i64 %230 to x86_fp80
  %232 = fdiv x86_fp80 %221, %231
  store x86_fp80 %232, ptr %16, align 16, !tbaa !16
  %233 = load x86_fp80, ptr %16, align 16, !tbaa !16
  %234 = fcmp olt x86_fp80 %233, 0xK00000000000000000000
  br i1 %234, label %235, label %236

235:                                              ; preds = %211
  store i32 11, ptr %5, align 4
  br label %240, !llvm.loop !28

236:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  invoke void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %237 unwind label %244

237:                                              ; preds = %236
  invoke void @_ZNSt4pairIeS_IxxEEC2IeS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKeRKS0_(ptr noundef nonnull align 16 dereferenceable(32) %17, ptr noundef nonnull align 16 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %238 unwind label %244

238:                                              ; preds = %237
  invoke void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 16 dereferenceable(32) %17)
          to label %239 unwind label %244

239:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  store i32 0, ptr %5, align 4
  br label %240

240:                                              ; preds = %239, %235
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  br label %241

241:                                              ; preds = %240, %210, %193, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  %242 = load i32, ptr %5, align 4
  switch i32 %242, label %318 [
    i32 0, label %243
    i32 11, label %130
  ]

243:                                              ; preds = %241
  br label %130, !llvm.loop !28

244:                                              ; preds = %238, %237, %236
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %10, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  br label %248

248:                                              ; preds = %244, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %249

249:                                              ; preds = %248, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %250

250:                                              ; preds = %249, %164
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %312

251:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !8
  br label %252

252:                                              ; preds = %271, %251
  %253 = load i64, ptr %20, align 8, !tbaa !8
  %254 = load i64, ptr @N, align 8, !tbaa !8
  %255 = icmp slt i64 %253, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %252
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %274

257:                                              ; preds = %252
  %258 = load i64, ptr %20, align 8, !tbaa !8
  %259 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %258
  %260 = load i8, ptr %259, align 1, !tbaa !24, !range !26, !noundef !27
  %261 = trunc i8 %260 to i1
  br i1 %261, label %270, label %262

262:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %263 = load i64, ptr %20, align 8, !tbaa !8
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %21, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %265 unwind label %266

265:                                              ; preds = %262
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %270

266:                                              ; preds = %262
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %10, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %311

270:                                              ; preds = %265, %257
  br label %271

271:                                              ; preds = %270
  %272 = load i64, ptr %20, align 8, !tbaa !8
  %273 = add nsw i64 %272, 1
  store i64 %273, ptr %20, align 8, !tbaa !8
  br label %252, !llvm.loop !29

274:                                              ; preds = %256
  %275 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  %276 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %275)
          to label %277 unwind label %289

277:                                              ; preds = %274
  %278 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %276, ptr noundef @.str)
          to label %279 unwind label %289

279:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store ptr %19, ptr %22, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %280 = load ptr, ptr %22, align 8, !tbaa !30
  %281 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %280) #7
  %282 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %281, ptr %282, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %283 = load ptr, ptr %22, align 8, !tbaa !30
  %284 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %283) #7
  %285 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %284, ptr %285, align 8
  br label %286

286:                                              ; preds = %301, %279
  %287 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br i1 %287, label %293, label %288

288:                                              ; preds = %286
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %307

289:                                              ; preds = %307, %277, %274
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %10, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %11, align 4
  br label %311

293:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %294 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %295 = load i64, ptr %294, align 8, !tbaa !8
  store i64 %295, ptr %25, align 8, !tbaa !8
  %296 = load i64, ptr %25, align 8, !tbaa !8
  %297 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %296)
          to label %298 unwind label %303

298:                                              ; preds = %293
  %299 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %297, ptr noundef @.str.1)
          to label %300 unwind label %303

300:                                              ; preds = %298
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %301

301:                                              ; preds = %300
  %302 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br label %286

303:                                              ; preds = %298, %293
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %10, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %311

307:                                              ; preds = %288
  %308 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %309 unwind label %289

309:                                              ; preds = %307
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  call void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  %310 = load i32, ptr %1, align 4
  ret i32 %310

311:                                              ; preds = %303, %289, %266
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  br label %312

312:                                              ; preds = %311, %250, %160, %107
  call void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  br label %313

313:                                              ; preds = %312
  %314 = load ptr, ptr %10, align 8
  %315 = load i32, ptr %11, align 4
  %316 = insertvalue { ptr, i32 } poison, ptr %314, 0
  %317 = insertvalue { ptr, i32 } %316, i32 %315, 1
  resume { ptr, i32 } %317

318:                                              ; preds = %241, %101
  unreachable
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #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)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 16 dereferenceable(32)) #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIeS_IxxEEC2IeS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKeRKS0_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3 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) #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #6 align 2

attributes #0 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { 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, !9, i64 8}
!14 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!15 = !{!14, !9, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long double", !10, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{!21, !17, i64 0}
!21 = !{!"_ZTSSt4pairIeS_IxxEE", !17, i64 0, !14, i64 16}
!22 = !{!21, !9, i64 16}
!23 = !{!21, !9, i64 24}
!24 = !{!25, !25, i64 0}
!25 = !{!"bool", !10, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = !{!31, !31, i64 0}
!31 = !{!"any pointer", !10, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::pair" = type { i64, 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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long double, std::pair<long long, long long>>, std::allocator<std::pair<long double, std::pair<long long, long long>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.0" = type { x86_fp80, %"struct.std::pair" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = 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.__gnu_cxx::__normal_iterator" = type { ptr }

@N = external dso_local global i64, align 8
@d = external dso_local global [100000 x %"struct.std::pair"], align 16
@cr = external dso_local local_unnamed_addr global [100000 x i8], align 16
@p = external dso_local local_unnamed_addr global [100000 x i64], align 16
@n = external dso_local local_unnamed_addr global [100000 x i64], align 16
@_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
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::priority_queue", align 8
  %2 = alloca i64, align 8
  %3 = alloca x86_fp80, align 16
  %4 = alloca %"struct.std::pair.0", align 16
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca x86_fp80, align 16
  %10 = alloca %"struct.std::pair.0", align 16
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"class.std::vector.2", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %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)
  %21 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = tail 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)
  %23 = load i64, ptr @N, align 8, !tbaa !8
  %24 = icmp sgt i64 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EEC2IS5_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 1, ptr %2, align 8, !tbaa !8
  %25 = load i64, ptr @N, align 8, !tbaa !8
  %26 = icmp sgt i64 %25, 1
  br i1 %26, label %.lr.ph37, label %._crit_edge38

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.034 = phi i64 [ %31, %.lr.ph ], [ 0, %0 ]
  %27 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %.034
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %29 = getelementptr inbounds i8, ptr %27, i64 8
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %31 = add nuw nsw i64 %.034, 1
  %32 = load i64, ptr @N, align 8, !tbaa !8
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge38:                                    ; preds = %65, %._crit_edge
  %.lcssa = phi i64 [ %25, %._crit_edge ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %34 = icmp sgt i64 %.lcssa, 0
  br i1 %34, label %.lr.ph41.preheader, label %.preheader

.lr.ph41.preheader:                               ; preds = %._crit_edge38
  %min.iters.check = icmp ult i64 %.lcssa, 4
  br i1 %min.iters.check, label %.lr.ph41.preheader62, label %vector.ph

.lr.ph41.preheader62:                             ; preds = %middle.block, %.lr.ph41.preheader
  %.02439.ph = phi i64 [ 0, %.lr.ph41.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph41

vector.ph:                                        ; preds = %.lr.ph41.preheader
  %n.vec = and i64 %.lcssa, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %35 = add nsw <2 x i64> %vec.ind, <i64 -1, i64 -1>
  %36 = add <2 x i64> %vec.ind, <i64 1, i64 1>
  %37 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %index
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  store <2 x i64> %35, ptr %37, align 16, !tbaa !8
  store <2 x i64> %36, ptr %38, align 16, !tbaa !8
  %39 = add nuw nsw <2 x i64> %vec.ind, <i64 1, i64 1>
  %40 = add <2 x i64> %vec.ind, <i64 3, i64 3>
  %41 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store <2 x i64> %39, ptr %41, align 16, !tbaa !8
  store <2 x i64> %40, ptr %42, align 16, !tbaa !8
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %43 = icmp eq i64 %index.next, %n.vec
  br i1 %43, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.lcssa, %n.vec
  br i1 %cmp.n, label %.preheader, label %.lr.ph41.preheader62

.lr.ph37:                                         ; preds = %._crit_edge, %65
  %.pre5255 = phi i64 [ %.pre5256, %65 ], [ %25, %._crit_edge ]
  %44 = phi i64 [ %66, %65 ], [ %25, %._crit_edge ]
  %storemerge35 = phi i64 [ %68, %65 ], [ 1, %._crit_edge ]
  %45 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %storemerge35, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !16
  %47 = add nsw i64 %storemerge35, -1
  %48 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %47, i32 1
  %49 = load i64, ptr %48, align 8, !tbaa !16
  %50 = icmp eq i64 %46, %49
  br i1 %50, label %65, label %51

51:                                               ; preds = %.lr.ph37
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %52 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %storemerge35
  %53 = load i64, ptr %52, align 16, !tbaa !18
  %54 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %47
  %55 = load i64, ptr %54, align 16, !tbaa !18
  %56 = sub nsw i64 %53, %55
  %57 = sitofp i64 %56 to x86_fp80
  %58 = sub nsw i64 %49, %46
  %59 = sitofp i64 %58 to x86_fp80
  %60 = fdiv x86_fp80 %57, %59
  store x86_fp80 %60, ptr %3, align 16, !tbaa !19
  %61 = fcmp olt x86_fp80 %60, 0xK00000000000000000000
  br i1 %61, label %64, label %62

62:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 %47, ptr %6, align 8, !tbaa !8
  call void @_ZNSt4pairIxxEC2IxRxTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @_ZNSt4pairIeS_IxxEEC2IeS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKeRKS0_(ptr noundef nonnull align 16 dereferenceable(32) %4, ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %5)
  invoke void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 16 dereferenceable(32) %4)
          to label %63 unwind label %70

63:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  %.pre.pre = load i64, ptr %2, align 8, !tbaa !8
  %.pre52.pre = load i64, ptr @N, align 8, !tbaa !8
  br label %64

64:                                               ; preds = %51, %63
  %.pre52 = phi i64 [ %.pre5255, %51 ], [ %.pre52.pre, %63 ]
  %.pre = phi i64 [ %storemerge35, %51 ], [ %.pre.pre, %63 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  br label %65

65:                                               ; preds = %64, %.lr.ph37
  %.pre5256 = phi i64 [ %.pre52, %64 ], [ %.pre5255, %.lr.ph37 ]
  %66 = phi i64 [ %.pre52, %64 ], [ %44, %.lr.ph37 ]
  %67 = phi i64 [ %.pre, %64 ], [ %storemerge35, %.lr.ph37 ]
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %2, align 8, !tbaa !8
  %69 = icmp slt i64 %68, %66
  br i1 %69, label %.lr.ph37, label %._crit_edge38, !llvm.loop !21

70:                                               ; preds = %62
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br label %167

.preheader:                                       ; preds = %.lr.ph41, %middle.block, %._crit_edge38
  %72 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  br i1 %72, label %._crit_edge43, label %.lr.ph42

.lr.ph41:                                         ; preds = %.lr.ph41.preheader62, %.lr.ph41
  %.02439 = phi i64 [ %75, %.lr.ph41 ], [ %.02439.ph, %.lr.ph41.preheader62 ]
  %73 = add nsw i64 %.02439, -1
  %74 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %.02439
  store i64 %73, ptr %74, align 8, !tbaa !8
  %75 = add nuw nsw i64 %.02439, 1
  %76 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %.02439
  store i64 %75, ptr %76, align 8, !tbaa !8
  %exitcond.not = icmp eq i64 %75, %.lcssa
  br i1 %exitcond.not, label %.preheader, label %.lr.ph41, !llvm.loop !22

.lr.ph42:                                         ; preds = %.preheader, %125
  %77 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %78 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %79 = getelementptr inbounds i8, ptr %78, i64 16
  %80 = load i64, ptr %79, align 16, !tbaa !23
  store i64 %80, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %81 = call noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  %82 = getelementptr inbounds i8, ptr %81, i64 24
  %83 = load i64, ptr %82, align 8, !tbaa !25
  store i64 %83, ptr %8, align 8, !tbaa !8
  invoke void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
          to label %84 unwind label %94

84:                                               ; preds = %.lr.ph42
  %85 = load i64, ptr %7, align 8, !tbaa !8
  %86 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !26, !range !28, !noundef !29
  %88 = trunc nuw i8 %87 to i1
  br i1 %88, label %125, label %89, !llvm.loop !30

89:                                               ; preds = %84
  %90 = load i64, ptr %8, align 8, !tbaa !8
  %91 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !26, !range !28, !noundef !29
  %93 = trunc nuw i8 %92 to i1
  br i1 %93, label %125, label %96, !llvm.loop !30

94:                                               ; preds = %.lr.ph42
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %129

96:                                               ; preds = %89
  store i8 1, ptr %91, align 1, !tbaa !26
  store i8 1, ptr %86, align 1, !tbaa !26
  %97 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %85
  %98 = load i64, ptr %97, align 8, !tbaa !8
  store i64 %98, ptr %7, align 8, !tbaa !8
  %99 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %90
  %100 = load i64, ptr %99, align 8, !tbaa !8
  store i64 %100, ptr %8, align 8, !tbaa !8
  %101 = icmp sgt i64 %98, -1
  %102 = load i64, ptr @N, align 8
  %.not = icmp slt i64 %100, %102
  %or.cond = select i1 %101, i1 %.not, i1 false
  br i1 %or.cond, label %103, label %125, !llvm.loop !30

103:                                              ; preds = %96
  %104 = getelementptr inbounds [100000 x i64], ptr @p, i64 0, i64 %100
  store i64 %98, ptr %104, align 8, !tbaa !8
  %105 = getelementptr inbounds [100000 x i64], ptr @n, i64 0, i64 %98
  store i64 %100, ptr %105, align 8, !tbaa !8
  %106 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %98, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !16
  %108 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %100, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !16
  %110 = icmp eq i64 %107, %109
  br i1 %110, label %125, label %111, !llvm.loop !30

111:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %112 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %98
  %113 = load i64, ptr %112, align 16, !tbaa !18
  %114 = getelementptr inbounds [100000 x %"struct.std::pair"], ptr @d, i64 0, i64 %100
  %115 = load i64, ptr %114, align 16, !tbaa !18
  %116 = sub nsw i64 %113, %115
  %117 = sitofp i64 %116 to x86_fp80
  %118 = sub nsw i64 %109, %107
  %119 = sitofp i64 %118 to x86_fp80
  %120 = fdiv x86_fp80 %117, %119
  store x86_fp80 %120, ptr %9, align 16, !tbaa !19
  %121 = fcmp olt x86_fp80 %120, 0xK00000000000000000000
  br i1 %121, label %124, label %122, !llvm.loop !30

122:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZNSt4pairIeS_IxxEEC2IeS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKeRKS0_(ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %11)
  invoke void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %1, ptr noundef nonnull align 16 dereferenceable(32) %10)
          to label %123 unwind label %127

123:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %124

124:                                              ; preds = %111, %123
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %125

125:                                              ; preds = %103, %96, %84, %89, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %126 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %1)
  br i1 %126, label %._crit_edge43, label %.lr.ph42

127:                                              ; preds = %122
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %129

129:                                              ; preds = %127, %94
  %.pn29 = phi { ptr, i32 } [ %128, %127 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %167

._crit_edge43:                                    ; preds = %125, %.preheader
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %130 = load i64, ptr @N, align 8, !tbaa !8
  %131 = icmp sgt i64 %130, 0
  br i1 %131, label %.lr.ph46, label %._crit_edge47

._crit_edge47:                                    ; preds = %143, %._crit_edge43
  %132 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %133 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %132)
          to label %146 unwind label %153

.lr.ph46:                                         ; preds = %._crit_edge43, %143
  %134 = phi i64 [ %144, %143 ], [ %130, %._crit_edge43 ]
  %.01944 = phi i64 [ %.pre-phi, %143 ], [ 0, %._crit_edge43 ]
  %135 = getelementptr inbounds [100000 x i8], ptr @cr, i64 0, i64 %.01944
  %136 = load i8, ptr %135, align 1, !tbaa !26, !range !28, !noundef !29
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %.lr.ph46._crit_edge, label %138

.lr.ph46._crit_edge:                              ; preds = %.lr.ph46
  %.pre58 = add nuw nsw i64 %.01944, 1
  br label %143

138:                                              ; preds = %.lr.ph46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %139 = add nuw nsw i64 %.01944, 1
  store i64 %139, ptr %13, align 8, !tbaa !8
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %140 unwind label %141

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %.pre53 = load i64, ptr @N, align 8, !tbaa !8
  br label %143

141:                                              ; preds = %138
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %166

143:                                              ; preds = %.lr.ph46._crit_edge, %140
  %.pre-phi = phi i64 [ %.pre58, %.lr.ph46._crit_edge ], [ %139, %140 ]
  %144 = phi i64 [ %134, %.lr.ph46._crit_edge ], [ %.pre53, %140 ]
  %145 = icmp slt i64 %.pre-phi, %144
  br i1 %145, label %.lr.ph46, label %._crit_edge47, !llvm.loop !31

146:                                              ; preds = %._crit_edge47
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @.str)
          to label %148 unwind label %153

148:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %149 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  store ptr %149, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %150 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  store ptr %150, ptr %15, align 8
  %151 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %151, label %.lr.ph49, label %._crit_edge50

._crit_edge50:                                    ; preds = %160, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %165 unwind label %153

153:                                              ; preds = %._crit_edge50, %146, %._crit_edge47
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %166

.lr.ph49:                                         ; preds = %148, %160
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %156 = load i64, ptr %155, align 8, !tbaa !8
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %156)
          to label %158 unwind label %163

158:                                              ; preds = %.lr.ph49
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef nonnull @.str.1)
          to label %160 unwind label %163

160:                                              ; preds = %158
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %162 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %162, label %.lr.ph49, label %._crit_edge50

163:                                              ; preds = %158, %.lr.ph49
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %166

165:                                              ; preds = %._crit_edge50
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  call void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret i32 0

166:                                              ; preds = %163, %153, %141
  %.pn = phi { ptr, i32 } [ %142, %141 ], [ %164, %163 ], [ %154, %153 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  br label %167

167:                                              ; preds = %166, %129, %70
  %.pn31 = phi { ptr, i32 } [ %71, %70 ], [ %.pn29, %129 ], [ %.pn, %166 ]
  call void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn31
}

; 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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #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 #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #3 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIeS_IxxEEC2IeS0_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKeRKS0_(ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(32) ptr @_ZNKSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 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 #5

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueISt4pairIeS0_IxxEESt6vectorIS2_SaIS2_EESt7greaterIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #6 align 2

attributes #0 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 #7 = { 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 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = !{!17, !9, i64 8}
!17 = !{!"_ZTSSt4pairIxxE", !9, i64 0, !9, i64 8}
!18 = !{!17, !9, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"long double", !10, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12, !15, !14}
!23 = !{!24, !9, i64 16}
!24 = !{!"_ZTSSt4pairIeS_IxxEE", !20, i64 0, !17, i64 16}
!25 = !{!24, !9, i64 24}
!26 = !{!27, !27, i64 0}
!27 = !{!"bool", !10, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass