; LLVM IR from Mohammed-Shoaib/Coding-Problems :: HackerRank/Algorithms/Medium/M0015.ll (Z12queensAttackiiSt4pairIiiERSt6vectorIS0_SaIS0_EE)

; 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 { i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12get_distanceSt4pairIiiES0_(i64, i64) #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 speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2

; 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
define dso_local noundef i32 @_Z12queensAttackiiSt4pairIiiERSt6vectorIS0_SaIS0_EE(i32 noundef %0, i32 noundef %1, i64 %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #3 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca %"class.std::initializer_list", align 8
  %18 = alloca [8 x i32], align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca %"struct.std::pair", align 4
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i64 %2, ptr %5, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %35 = getelementptr inbounds %"struct.std::pair", ptr %5, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !11
  store i32 %36, ptr %9, align 4, !tbaa !5
  %37 = getelementptr inbounds %"struct.std::pair", ptr %5, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !13
  store i32 %38, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = sub nsw i32 %39, %40
  store i32 %41, ptr %18, align 4, !tbaa !5
  %42 = getelementptr inbounds i32, ptr %18, i64 1
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  store i32 %44, ptr %42, align 4, !tbaa !5
  %45 = getelementptr inbounds i32, ptr %18, i64 2
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sub nsw i32 %46, %47
  store i32 %48, ptr %45, align 4, !tbaa !5
  %49 = getelementptr inbounds i32, ptr %18, i64 3
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  store i32 %51, ptr %49, align 4, !tbaa !5
  %52 = getelementptr inbounds i32, ptr %18, i64 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sub nsw i32 %53, %54
  store i32 %55, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  store i32 %58, ptr %20, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %52, align 4, !tbaa !5
  %61 = getelementptr inbounds i32, ptr %18, i64 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = sub nsw i32 %62, %63
  store i32 %64, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %65 = load i32, ptr %10, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  store i32 %66, ptr %22, align 4, !tbaa !5
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %68 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %68, ptr %61, align 4, !tbaa !5
  %69 = getelementptr inbounds i32, ptr %18, i64 6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  store i32 %71, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = sub nsw i32 %72, %73
  store i32 %74, ptr %24, align 4, !tbaa !5
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %76 = load i32, ptr %75, align 4, !tbaa !5
  store i32 %76, ptr %69, align 4, !tbaa !5
  %77 = getelementptr inbounds i32, ptr %18, i64 7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  store i32 %79, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sub nsw i32 %80, 1
  store i32 %81, ptr %26, align 4, !tbaa !5
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %83 = load i32, ptr %82, align 4, !tbaa !5
  store i32 %83, ptr %77, align 4, !tbaa !5
  %84 = getelementptr inbounds %"class.std::initializer_list", ptr %17, i32 0, i32 0
  store ptr %18, ptr %84, align 8, !tbaa !14
  %85 = getelementptr inbounds %"class.std::initializer_list", ptr %17, i32 0, i32 1
  store i64 8, ptr %85, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #6
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  %86 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8
  %88 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %89 = load i64, ptr %88, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr %87, i64 %89, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %90 unwind label %96

90:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %242, %90
  %92 = load i32, ptr %30, align 4, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %100, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %245

96:                                               ; preds = %4
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %28, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %29, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  br label %261

100:                                              ; preds = %91
  %101 = load ptr, ptr %8, align 8, !tbaa !9
  %102 = load i32, ptr %30, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #6
  %105 = getelementptr inbounds %"struct.std::pair", ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !11
  store i32 %106, ptr %11, align 4, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !9
  %108 = load i32, ptr %30, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %109) #6
  %111 = getelementptr inbounds %"struct.std::pair", ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 4, !tbaa !13
  store i32 %112, ptr %12, align 4, !tbaa !5
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = sub nsw i32 %113, %114
  store i32 %115, ptr %13, align 4, !tbaa !5
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sub nsw i32 %116, %117
  store i32 %118, ptr %14, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %5, i64 8, i1 false)
  %119 = load ptr, ptr %8, align 8, !tbaa !9
  %120 = load i32, ptr %30, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %121) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %122, i64 8, i1 false)
  %123 = load i64, ptr %31, align 4
  %124 = load i64, ptr %32, align 4
  %125 = call noundef i32 @_Z12get_distanceSt4pairIiiES0_(i64 %123, i64 %124)
  store i32 %125, ptr %15, align 4, !tbaa !5
  %126 = load i32, ptr %9, align 4, !tbaa !5
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = icmp eq i32 %126, %127
  br i1 %128, label %129, label %155

129:                                              ; preds = %100
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %133, label %143

133:                                              ; preds = %129
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 0) #6
  %135 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %134)
          to label %136 unwind label %139

136:                                              ; preds = %133
  %137 = load i32, ptr %135, align 4, !tbaa !5
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 0) #6
  store i32 %137, ptr %138, align 4, !tbaa !5
  br label %154

139:                                              ; preds = %229, %217, %205, %193, %173, %163, %147, %133
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %28, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %260

143:                                              ; preds = %129
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = load i32, ptr %12, align 4, !tbaa !5
  %146 = icmp sgt i32 %144, %145
  br i1 %146, label %147, label %153

147:                                              ; preds = %143
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 1) #6
  %149 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %148)
          to label %150 unwind label %139

150:                                              ; preds = %147
  %151 = load i32, ptr %149, align 4, !tbaa !5
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 1) #6
  store i32 %151, ptr %152, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %150, %143
  br label %154

154:                                              ; preds = %153, %136
  br label %241

155:                                              ; preds = %100
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = load i32, ptr %12, align 4, !tbaa !5
  %158 = icmp eq i32 %156, %157
  br i1 %158, label %159, label %181

159:                                              ; preds = %155
  %160 = load i32, ptr %9, align 4, !tbaa !5
  %161 = load i32, ptr %11, align 4, !tbaa !5
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %163, label %169

163:                                              ; preds = %159
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 2) #6
  %165 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %164)
          to label %166 unwind label %139

166:                                              ; preds = %163
  %167 = load i32, ptr %165, align 4, !tbaa !5
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 2) #6
  store i32 %167, ptr %168, align 4, !tbaa !5
  br label %180

169:                                              ; preds = %159
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = icmp sgt i32 %170, %171
  br i1 %172, label %173, label %179

173:                                              ; preds = %169
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 3) #6
  %175 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %174)
          to label %176 unwind label %139

176:                                              ; preds = %173
  %177 = load i32, ptr %175, align 4, !tbaa !5
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 3) #6
  store i32 %177, ptr %178, align 4, !tbaa !5
  br label %179

179:                                              ; preds = %176, %169
  br label %180

180:                                              ; preds = %179, %166
  br label %240

181:                                              ; preds = %155
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = call i32 @llvm.abs.i32(i32 %182, i1 true)
  %184 = load i32, ptr %14, align 4, !tbaa !5
  %185 = call i32 @llvm.abs.i32(i32 %184, i1 true)
  %186 = icmp eq i32 %183, %185
  br i1 %186, label %187, label %239

187:                                              ; preds = %181
  %188 = load i32, ptr %13, align 4, !tbaa !5
  %189 = icmp sgt i32 %188, 0
  br i1 %189, label %190, label %199

190:                                              ; preds = %187
  %191 = load i32, ptr %14, align 4, !tbaa !5
  %192 = icmp sgt i32 %191, 0
  br i1 %192, label %193, label %199

193:                                              ; preds = %190
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 4) #6
  %195 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %194)
          to label %196 unwind label %139

196:                                              ; preds = %193
  %197 = load i32, ptr %195, align 4, !tbaa !5
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 4) #6
  store i32 %197, ptr %198, align 4, !tbaa !5
  br label %238

199:                                              ; preds = %190, %187
  %200 = load i32, ptr %13, align 4, !tbaa !5
  %201 = icmp sgt i32 %200, 0
  br i1 %201, label %202, label %211

202:                                              ; preds = %199
  %203 = load i32, ptr %14, align 4, !tbaa !5
  %204 = icmp slt i32 %203, 0
  br i1 %204, label %205, label %211

205:                                              ; preds = %202
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 5) #6
  %207 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %206)
          to label %208 unwind label %139

208:                                              ; preds = %205
  %209 = load i32, ptr %207, align 4, !tbaa !5
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 5) #6
  store i32 %209, ptr %210, align 4, !tbaa !5
  br label %237

211:                                              ; preds = %202, %199
  %212 = load i32, ptr %13, align 4, !tbaa !5
  %213 = icmp slt i32 %212, 0
  br i1 %213, label %214, label %223

214:                                              ; preds = %211
  %215 = load i32, ptr %14, align 4, !tbaa !5
  %216 = icmp sgt i32 %215, 0
  br i1 %216, label %217, label %223

217:                                              ; preds = %214
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 6) #6
  %219 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %218)
          to label %220 unwind label %139

220:                                              ; preds = %217
  %221 = load i32, ptr %219, align 4, !tbaa !5
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 6) #6
  store i32 %221, ptr %222, align 4, !tbaa !5
  br label %236

223:                                              ; preds = %214, %211
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = icmp slt i32 %224, 0
  br i1 %225, label %226, label %235

226:                                              ; preds = %223
  %227 = load i32, ptr %14, align 4, !tbaa !5
  %228 = icmp slt i32 %227, 0
  br i1 %228, label %229, label %235

229:                                              ; preds = %226
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 7) #6
  %231 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %230)
          to label %232 unwind label %139

232:                                              ; preds = %229
  %233 = load i32, ptr %231, align 4, !tbaa !5
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 7) #6
  store i32 %233, ptr %234, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %232, %226, %223
  br label %236

236:                                              ; preds = %235, %220
  br label %237

237:                                              ; preds = %236, %208
  br label %238

238:                                              ; preds = %237, %196
  br label %239

239:                                              ; preds = %238, %181
  br label %240

240:                                              ; preds = %239, %180
  br label %241

241:                                              ; preds = %240, %154
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %30, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %30, align 4, !tbaa !5
  br label %91, !llvm.loop !18

245:                                              ; preds = %95
  %246 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %247 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %246, ptr %247, align 8
  %248 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %249 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %248, ptr %249, align 8
  %250 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8
  %252 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8
  %254 = invoke noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET0_T_S8_S7_(ptr %251, ptr %253, i32 noundef 0)
          to label %255 unwind label %256

255:                                              ; preds = %245
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret i32 %254

256:                                              ; preds = %245
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %28, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %29, align 4
  br label %260

260:                                              ; preds = %256, %139
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %261

261:                                              ; preds = %260, %96
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %262

262:                                              ; preds = %261
  %263 = load ptr, ptr %28, align 8
  %264 = load i32, ptr %29, align 4
  %265 = insertvalue { ptr, i32 } poison, ptr %263, 0
  %266 = insertvalue { ptr, i32 } %265, i32 %264, 1
  resume { ptr, i32 } %266
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET0_T_S8_S7_(ptr, ptr, i32 noundef) #4

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 4}
!12 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"_ZTSSt16initializer_listIiE", !10, i64 0, !16, i64 8}
!16 = !{!"long", !7, i64 0}
!17 = !{!15, !16, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z12get_distanceSt4pairIiiES0_(i64, i64) 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 speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2

; 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
define dso_local noundef i32 @_Z12queensAttackiiSt4pairIiiERSt6vectorIS0_SaIS0_EE(i32 noundef %0, i32 noundef %1, i64 %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca [8 x i32], align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::allocator", align 1
  %.sroa.065.0.extract.trunc = trunc i64 %2 to i32
  %.sroa.3.0.extract.shift = lshr i64 %2, 32
  %.sroa.3.0.extract.trunc = trunc nuw i64 %.sroa.3.0.extract.shift to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %17 = sub nsw i32 %0, %.sroa.065.0.extract.trunc
  store i32 %17, ptr %7, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %7, i64 4
  %19 = add nsw i32 %.sroa.065.0.extract.trunc, -1
  store i32 %19, ptr %18, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %7, i64 8
  %21 = sub nsw i32 %0, %.sroa.3.0.extract.trunc
  store i32 %21, ptr %20, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %7, i64 12
  %23 = add nsw i32 %.sroa.3.0.extract.trunc, -1
  store i32 %23, ptr %22, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %7, i64 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 %21, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 %17, ptr %9, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr %24, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %7, i64 20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store i32 %21, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  store i32 %19, ptr %11, align 4, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %29 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %29, ptr %27, align 4, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %7, i64 24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store i32 %23, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  store i32 %17, ptr %13, align 4, !tbaa !5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %32 = load i32, ptr %31, align 4, !tbaa !5
  store i32 %32, ptr %30, align 4, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %7, i64 28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  store i32 %23, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #5
  store i32 %19, ptr %15, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  store i32 %35, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr nonnull %7, i64 8, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %36 unwind label %41

36:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  %37 = icmp sgt i32 %1, 0
  br i1 %37, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %36
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %79, %36
  %38 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %39 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %40 = call noundef i32 @_ZSt10accumulateIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEiET0_T_S8_S7_(ptr %38, ptr %39, i32 noundef 0)
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  ret i32 %40

41:                                               ; preds = %4
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  resume { ptr, i32 } %42

.lr.ph:                                           ; preds = %.lr.ph.preheader, %79
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %79 ]
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #5
  %44 = getelementptr inbounds i8, ptr %43, i64 4
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #5
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = sub nsw i32 %45, %.sroa.3.0.extract.trunc
  %49 = sub nsw i32 %47, %.sroa.065.0.extract.trunc
  %50 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #5
  %.sroa.09.0.copyload = load i64, ptr %50, align 4
  %51 = call noundef i32 @_Z12get_distanceSt4pairIiiES0_(i64 %2, i64 %.sroa.09.0.copyload)
  store i32 %51, ptr %5, align 4, !tbaa !5
  %52 = icmp eq i32 %45, %.sroa.3.0.extract.trunc
  br i1 %52, label %53, label %57

53:                                               ; preds = %.lr.ph
  %54 = icmp sgt i32 %47, %.sroa.065.0.extract.trunc
  br i1 %54, label %.sink.split, label %55

55:                                               ; preds = %53
  %56 = icmp slt i32 %47, %.sroa.065.0.extract.trunc
  br i1 %56, label %.sink.split, label %79

57:                                               ; preds = %.lr.ph
  %58 = icmp eq i32 %47, %.sroa.065.0.extract.trunc
  br i1 %58, label %59, label %63

59:                                               ; preds = %57
  %60 = icmp sgt i32 %45, %.sroa.3.0.extract.trunc
  br i1 %60, label %.sink.split, label %61

61:                                               ; preds = %59
  %62 = icmp slt i32 %45, %.sroa.3.0.extract.trunc
  br i1 %62, label %.sink.split, label %79

63:                                               ; preds = %57
  %64 = call i32 @llvm.abs.i32(i32 %48, i1 true)
  %65 = call i32 @llvm.abs.i32(i32 %49, i1 true)
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = icmp sgt i32 %48, 0
  %69 = icmp sgt i32 %49, 0
  %or.cond = select i1 %68, i1 %69, i1 false
  br i1 %or.cond, label %.sink.split, label %70

70:                                               ; preds = %67
  %71 = icmp slt i32 %49, 0
  %or.cond3 = select i1 %68, i1 %71, i1 false
  br i1 %or.cond3, label %.sink.split, label %72

72:                                               ; preds = %70
  %73 = icmp slt i32 %48, 0
  %or.cond5 = select i1 %73, i1 %69, i1 false
  br i1 %or.cond5, label %.sink.split, label %74

74:                                               ; preds = %72
  %or.cond7 = select i1 %73, i1 %71, i1 false
  br i1 %or.cond7, label %.sink.split, label %79

.sink.split:                                      ; preds = %74, %72, %70, %67, %61, %59, %55, %53
  %.sink73 = phi i64 [ 0, %53 ], [ 1, %55 ], [ 2, %59 ], [ 3, %61 ], [ 4, %67 ], [ 5, %70 ], [ 6, %72 ], [ 7, %74 ]
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.sink73) #5
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %75)
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.sink73) #5
  store i32 %77, ptr %78, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %.sink.split, %55, %63, %74, %61
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!11 = !{!10, !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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