; LLVM IR from bqi343/cp-notebook :: Contests/USACO Training/Ch 3/3.3 camelot (bad) (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@king = external dso_local global %"struct.std::pair", align 4
@knight = external dso_local global %"class.std::vector", align 8
@C = external dso_local global i32, align 4
@R = external dso_local global i32, align 4
@dist = external dso_local global [26 x [30 x [26 x [30 x i32]]]], 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4fillii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: 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) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"struct.std::pair", align 4
  %28 = alloca ptr, align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"struct.std::pair", align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i64, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %83, %0
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 26
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %86

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %79, %43
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 30
  br i1 %46, label %48, label %47

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

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %75, %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = icmp slt i32 %50, 26
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %71, %53
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 30
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %74

58:                                               ; preds = %54
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %60
  %62 = load i32, ptr %4, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %61, i64 0, i64 %63
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [26 x [30 x i32]], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [30 x i32], ptr %67, i64 0, i64 %69
  store i32 1000000007, ptr %70, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %58
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %6, align 4, !tbaa !5
  br label %54, !llvm.loop !9

74:                                               ; preds = %57
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %5, align 4, !tbaa !5
  br label %49, !llvm.loop !11

78:                                               ; preds = %52
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %4, align 4, !tbaa !5
  br label %44, !llvm.loop !12

82:                                               ; preds = %47
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %2, align 4, !tbaa !5
  br label %39, !llvm.loop !13

86:                                               ; preds = %42
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @R)
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 4 dereferenceable(4) @C)
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %7)
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %89, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %91 = load i8, ptr %7, align 1, !tbaa !14
  %92 = sext i8 %91 to i32
  %93 = sub nsw i32 %92, 65
  store i32 %93, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !5
  %96 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i64 %96, ptr %9, align 4
  %97 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @king, ptr noundef nonnull align 4 dereferenceable(8) %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  br label %98

98:                                               ; preds = %105, %86
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %7)
  %100 = load ptr, ptr %99, align 8, !tbaa !15
  %101 = getelementptr i8, ptr %100, i64 -24
  %102 = load i64, ptr %101, align 8
  %103 = getelementptr inbounds i8, ptr %99, i64 %102
  %104 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %103)
  br i1 %104, label %105, label %113

105:                                              ; preds = %98
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %107 = load i8, ptr %7, align 1, !tbaa !14
  %108 = sext i8 %107 to i32
  %109 = sub nsw i32 %108, 65
  store i32 %109, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = sub nsw i32 %110, 1
  store i32 %111, ptr %14, align 4, !tbaa !5
  %112 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i64 %112, ptr %12, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @knight, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %98, !llvm.loop !17

113:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %132, %113
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = load i32, ptr @C, align 4, !tbaa !5
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %135

119:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %128, %119
  %121 = load i32, ptr %16, align 4, !tbaa !5
  %122 = load i32, ptr @R, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %131

125:                                              ; preds = %120
  %126 = load i32, ptr %15, align 4, !tbaa !5
  %127 = load i32, ptr %16, align 4, !tbaa !5
  call void @_Z4fillii(i32 noundef %126, i32 noundef %127)
  br label %128

128:                                              ; preds = %125
  %129 = load i32, ptr %16, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %16, align 4, !tbaa !5
  br label %120, !llvm.loop !18

131:                                              ; preds = %124
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %15, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %15, align 4, !tbaa !5
  br label %114, !llvm.loop !19

135:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  store i64 1000000007, ptr %17, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %307, %135
  %137 = load i32, ptr %18, align 4, !tbaa !5
  %138 = load i32, ptr @C, align 4, !tbaa !5
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %310

141:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %303, %141
  %143 = load i32, ptr %19, align 4, !tbaa !5
  %144 = load i32, ptr @R, align 4, !tbaa !5
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %306

147:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  store i64 0, ptr %20, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %148 = load i32, ptr %18, align 4, !tbaa !5
  %149 = load i32, ptr @king, align 4, !tbaa !22
  %150 = sub nsw i32 %148, %149
  %151 = call i32 @llvm.abs.i32(i32 %150, i1 true)
  store i32 %151, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %152 = load i32, ptr %19, align 4, !tbaa !5
  %153 = load i32, ptr getelementptr inbounds (%"struct.std::pair", ptr @king, i32 0, i32 1), align 4, !tbaa !24
  %154 = sub nsw i32 %152, %153
  %155 = call i32 @llvm.abs.i32(i32 %154, i1 true)
  store i32 %155, ptr %23, align 4, !tbaa !5
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  store i64 %158, ptr %21, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store ptr @knight, ptr %24, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %159 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #9
  %160 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %159, ptr %160, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %161 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #9
  %162 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %161, ptr %162, align 8
  br label %163

163:                                              ; preds = %186, %147
  %164 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #9
  br i1 %164, label %166, label %165

165:                                              ; preds = %163
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %188

166:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %167 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %167, i64 8, i1 false)
  %168 = load i32, ptr %18, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %169
  %171 = load i32, ptr %19, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %170, i64 0, i64 %172
  %174 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 0
  %175 = load i32, ptr %174, align 4, !tbaa !22
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [26 x [30 x i32]], ptr %173, i64 0, i64 %176
  %178 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 1
  %179 = load i32, ptr %178, align 4, !tbaa !24
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [30 x i32], ptr %177, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = load i64, ptr %20, align 8, !tbaa !20
  %185 = add nsw i64 %184, %183
  store i64 %185, ptr %20, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %186

186:                                              ; preds = %166
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #9
  br label %163

188:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  store ptr @knight, ptr %28, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %189 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #9
  %190 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %189, ptr %190, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %191 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #9
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  br label %193

193:                                              ; preds = %295, %188
  %194 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #9
  br i1 %194, label %196, label %195

195:                                              ; preds = %193
  store i32 30, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %297

196:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %197 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %197, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  store i32 -2, ptr %32, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %291, %196
  %199 = load i32, ptr %32, align 4, !tbaa !5
  %200 = icmp slt i32 %199, 3
  br i1 %200, label %202, label %201

201:                                              ; preds = %198
  store i32 32, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %294

202:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 -2, ptr %33, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %287, %202
  %204 = load i32, ptr %33, align 4, !tbaa !5
  %205 = icmp slt i32 %204, 3
  br i1 %205, label %207, label %206

206:                                              ; preds = %203
  store i32 35, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %290

207:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  %208 = load i32, ptr @king, align 4, !tbaa !22
  %209 = load i32, ptr %32, align 4, !tbaa !5
  %210 = add nsw i32 %208, %209
  store i32 %210, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  %211 = load i32, ptr getelementptr inbounds (%"struct.std::pair", ptr @king, i32 0, i32 1), align 4, !tbaa !24
  %212 = load i32, ptr %33, align 4, !tbaa !5
  %213 = add nsw i32 %211, %212
  store i32 %213, ptr %35, align 4, !tbaa !5
  %214 = load i32, ptr %34, align 4, !tbaa !5
  %215 = icmp slt i32 %214, 0
  br i1 %215, label %227, label %216

216:                                              ; preds = %207
  %217 = load i32, ptr %34, align 4, !tbaa !5
  %218 = load i32, ptr @C, align 4, !tbaa !5
  %219 = icmp sge i32 %217, %218
  br i1 %219, label %227, label %220

220:                                              ; preds = %216
  %221 = load i32, ptr %35, align 4, !tbaa !5
  %222 = icmp slt i32 %221, 0
  br i1 %222, label %227, label %223

223:                                              ; preds = %220
  %224 = load i32, ptr %35, align 4, !tbaa !5
  %225 = load i32, ptr @R, align 4, !tbaa !5
  %226 = icmp sge i32 %224, %225
  br i1 %226, label %227, label %228

227:                                              ; preds = %223, %220, %216, %207
  store i32 37, ptr %3, align 4
  br label %284

228:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  %229 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 0
  %230 = load i32, ptr %229, align 4, !tbaa !22
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %231
  %233 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %234 = load i32, ptr %233, align 4, !tbaa !24
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %232, i64 0, i64 %235
  %237 = load i32, ptr %34, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [26 x [30 x i32]], ptr %236, i64 0, i64 %238
  %240 = load i32, ptr %35, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [30 x i32], ptr %239, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !5
  %244 = load i32, ptr %18, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %245
  %247 = load i32, ptr %19, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %246, i64 0, i64 %248
  %250 = load i32, ptr %34, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [26 x [30 x i32]], ptr %249, i64 0, i64 %251
  %253 = load i32, ptr %35, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [30 x i32], ptr %252, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = add nsw i32 %243, %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  %258 = load i32, ptr %32, align 4, !tbaa !5
  %259 = call i32 @llvm.abs.i32(i32 %258, i1 true)
  store i32 %259, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  %260 = load i32, ptr %33, align 4, !tbaa !5
  %261 = call i32 @llvm.abs.i32(i32 %260, i1 true)
  store i32 %261, ptr %38, align 4, !tbaa !5
  %262 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %263 = load i32, ptr %262, align 4, !tbaa !5
  %264 = add nsw i32 %257, %263
  %265 = load i32, ptr %18, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %266
  %268 = load i32, ptr %19, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [30 x [26 x [30 x i32]]], ptr %267, i64 0, i64 %269
  %271 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 0
  %272 = load i32, ptr %271, align 4, !tbaa !22
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [26 x [30 x i32]], ptr %270, i64 0, i64 %273
  %275 = getelementptr inbounds %"struct.std::pair", ptr %31, i32 0, i32 1
  %276 = load i32, ptr %275, align 4, !tbaa !24
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [30 x i32], ptr %274, i64 0, i64 %277
  %279 = load i32, ptr %278, align 4, !tbaa !5
  %280 = sub nsw i32 %264, %279
  %281 = sext i32 %280 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  store i64 %281, ptr %36, align 8, !tbaa !20
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %36)
  %283 = load i64, ptr %282, align 8, !tbaa !20
  store i64 %283, ptr %21, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  store i32 0, ptr %3, align 4
  br label %284

284:                                              ; preds = %228, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  %285 = load i32, ptr %3, align 4
  switch i32 %285, label %319 [
    i32 0, label %286
    i32 37, label %287
  ]

286:                                              ; preds = %284
  br label %287

287:                                              ; preds = %286, %284
  %288 = load i32, ptr %33, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %33, align 4, !tbaa !5
  br label %203, !llvm.loop !27

290:                                              ; preds = %206
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %32, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %32, align 4, !tbaa !5
  br label %198, !llvm.loop !28

294:                                              ; preds = %201
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %295

295:                                              ; preds = %294
  %296 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  br label %193

297:                                              ; preds = %195
  %298 = load i64, ptr %21, align 8, !tbaa !20
  %299 = load i64, ptr %20, align 8, !tbaa !20
  %300 = add nsw i64 %299, %298
  store i64 %300, ptr %20, align 8, !tbaa !20
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %302 = load i64, ptr %301, align 8, !tbaa !20
  store i64 %302, ptr %17, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %303

303:                                              ; preds = %297
  %304 = load i32, ptr %19, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %19, align 4, !tbaa !5
  br label %142, !llvm.loop !29

306:                                              ; preds = %146
  br label %307

307:                                              ; preds = %306
  %308 = load i32, ptr %18, align 4, !tbaa !5
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %18, align 4, !tbaa !5
  br label %136, !llvm.loop !30

310:                                              ; preds = %140
  %311 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #9
  %312 = icmp eq i64 %311, 0
  br i1 %312, label %313, label %314

313:                                              ; preds = %310
  store i64 0, ptr %17, align 8, !tbaa !20
  br label %314

314:                                              ; preds = %313, %310
  %315 = load i64, ptr %17, align 8, !tbaa !20
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %315)
  %317 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %316, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  %318 = load i32, ptr %1, align 4
  ret i32 %318

319:                                              ; preds = %284
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #4

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

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #0 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #7

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { nounwind }

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

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


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

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

@king = external dso_local global %"struct.std::pair", align 4
@knight = external dso_local global %"class.std::vector", align 8
@C = external dso_local global i32, align 4
@R = external dso_local global i32, align 4
@dist = external dso_local local_unnamed_addr global [26 x [30 x [26 x [30 x i32]]]], 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4fillii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i8, align 1
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  br label %.preheader71

.preheader71:                                     ; preds = %0, %39
  %indvars.iv101 = phi i64 [ 0, %0 ], [ %indvars.iv.next102, %39 ]
  br label %.preheader70

21:                                               ; preds = %39
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @R)
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) @C)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %1)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %26 = load i8, ptr %1, align 1, !tbaa !5
  %27 = sext i8 %26 to i32
  %28 = add nsw i32 %27, -65
  store i32 %28, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = add nsw i32 %29, -1
  store i32 %30, ptr %5, align 4, !tbaa !8
  %31 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %31, ptr %3, align 8
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @king, ptr noundef nonnull align 4 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %1)
  %34 = load ptr, ptr %33, align 8, !tbaa !10
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr %33, i64 %36
  %38 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %37)
  br i1 %38, label %.lr.ph, label %.preheader68

.preheader70:                                     ; preds = %.preheader71, %49
  %indvars.iv97 = phi i64 [ 0, %.preheader71 ], [ %indvars.iv.next98, %49 ]
  br label %.preheader69

39:                                               ; preds = %49
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next102, 26
  br i1 %exitcond104.not, label %21, label %.preheader71, !llvm.loop !12

.preheader69:                                     ; preds = %.preheader70, %.preheader69
  %indvars.iv = phi i64 [ 0, %.preheader70 ], [ %indvars.iv.next, %.preheader69 ]
  %40 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 0
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %40, align 8, !tbaa !8
  %41 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 4
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %41, align 8, !tbaa !8
  %42 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 8
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %42, align 8, !tbaa !8
  %43 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 12
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %43, align 8, !tbaa !8
  %44 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 16
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %44, align 8, !tbaa !8
  %45 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 20
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %45, align 8, !tbaa !8
  %46 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 24
  store <4 x i32> <i32 1000000007, i32 1000000007, i32 1000000007, i32 1000000007>, ptr %46, align 8, !tbaa !8
  %47 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 28
  store i32 1000000007, ptr %47, align 8, !tbaa !8
  %48 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv101, i64 %indvars.iv97, i64 %indvars.iv, i64 29
  store i32 1000000007, ptr %48, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 26
  br i1 %exitcond.not, label %49, label %.preheader69, !llvm.loop !14

49:                                               ; preds = %.preheader69
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %exitcond100.not = icmp eq i64 %indvars.iv.next98, 30
  br i1 %exitcond100.not, label %39, label %.preheader70, !llvm.loop !15

.preheader68:                                     ; preds = %.lr.ph, %21
  %50 = load i32, ptr @C, align 4, !tbaa !8
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.preheader67.lr.ph, label %._crit_edge79.thread134

._crit_edge79.thread134:                          ; preds = %.preheader68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  store i64 1000000007, ptr %9, align 8, !tbaa !16
  br label %._crit_edge92

.preheader67.lr.ph:                               ; preds = %.preheader68
  %52 = load i32, ptr @R, align 4, !tbaa !8
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.preheader67, label %.preheader66.lr.ph.thread

.preheader66.lr.ph.thread:                        ; preds = %.preheader67.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  store i64 1000000007, ptr %9, align 8, !tbaa !16
  br label %._crit_edge92

.lr.ph:                                           ; preds = %21, %.lr.ph
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %55 = load i8, ptr %1, align 1, !tbaa !5
  %56 = sext i8 %55 to i32
  %57 = add nsw i32 %56, -65
  store i32 %57, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %58 = load i32, ptr %2, align 4, !tbaa !8
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %8, align 4, !tbaa !8
  %60 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %60, ptr %6, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @knight, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %1)
  %62 = load ptr, ptr %61, align 8, !tbaa !10
  %63 = getelementptr i8, ptr %62, i64 -24
  %64 = load i64, ptr %63, align 8
  %65 = getelementptr inbounds i8, ptr %61, i64 %64
  %66 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %65)
  br i1 %66, label %.lr.ph, label %.preheader68, !llvm.loop !18

.preheader67:                                     ; preds = %.preheader67.lr.ph, %._crit_edge
  %67 = phi i32 [ %72, %._crit_edge ], [ %50, %.preheader67.lr.ph ]
  %68 = phi i32 [ %73, %._crit_edge ], [ %52, %.preheader67.lr.ph ]
  %.05678 = phi i32 [ %74, %._crit_edge ], [ 0, %.preheader67.lr.ph ]
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph77, label %._crit_edge

._crit_edge79:                                    ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  store i64 1000000007, ptr %9, align 8, !tbaa !16
  %70 = icmp sgt i32 %72, 0
  %.pr = load i32, ptr @R, align 4
  %71 = icmp sgt i32 %.pr, 0
  %or.cond = select i1 %70, i1 %71, i1 false
  br i1 %or.cond, label %.preheader66, label %._crit_edge92

._crit_edge.loopexit:                             ; preds = %.lr.ph77
  %.pre = load i32, ptr @C, align 4, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader67
  %72 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %67, %.preheader67 ]
  %73 = phi i32 [ %77, %._crit_edge.loopexit ], [ %68, %.preheader67 ]
  %74 = add nuw nsw i32 %.05678, 1
  %75 = icmp slt i32 %74, %72
  br i1 %75, label %.preheader67, label %._crit_edge79, !llvm.loop !19

.lr.ph77:                                         ; preds = %.preheader67, %.lr.ph77
  %.05776 = phi i32 [ %76, %.lr.ph77 ], [ 0, %.preheader67 ]
  call void @_Z4fillii(i32 noundef %.05678, i32 noundef %.05776)
  %76 = add nuw nsw i32 %.05776, 1
  %77 = load i32, ptr @R, align 4, !tbaa !8
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %.lr.ph77, label %._crit_edge.loopexit, !llvm.loop !21

.preheader66:                                     ; preds = %._crit_edge79, %._crit_edge90
  %79 = phi i32 [ %85, %._crit_edge90 ], [ %72, %._crit_edge79 ]
  %80 = phi i32 [ %86, %._crit_edge90 ], [ %.pr, %._crit_edge79 ]
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %._crit_edge90 ], [ 0, %._crit_edge79 ]
  %81 = icmp sgt i32 %80, 0
  br i1 %81, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %.preheader66
  %82 = trunc nuw nsw i64 %indvars.iv110 to i32
  br label %89

._crit_edge92:                                    ; preds = %._crit_edge90, %.preheader66.lr.ph.thread, %._crit_edge79.thread134, %._crit_edge79
  %83 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #8
  %84 = icmp eq i64 %83, 0
  br i1 %84, label %256, label %._crit_edge92._crit_edge

._crit_edge92._crit_edge:                         ; preds = %._crit_edge92
  %.pre126 = load i64, ptr %9, align 8, !tbaa !16
  br label %257

._crit_edge90.loopexit:                           ; preds = %._crit_edge87
  %.pre125 = load i32, ptr @C, align 4, !tbaa !8
  br label %._crit_edge90

._crit_edge90:                                    ; preds = %._crit_edge90.loopexit, %.preheader66
  %85 = phi i32 [ %.pre125, %._crit_edge90.loopexit ], [ %79, %.preheader66 ]
  %86 = phi i32 [ %121, %._crit_edge90.loopexit ], [ %80, %.preheader66 ]
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %87 = sext i32 %85 to i64
  %88 = icmp slt i64 %indvars.iv.next111, %87
  br i1 %88, label %.preheader66, label %._crit_edge92, !llvm.loop !22

89:                                               ; preds = %.lr.ph89, %._crit_edge87
  %indvars.iv107 = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next108, %._crit_edge87 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %90 = load i32, ptr @king, align 4, !tbaa !23
  %91 = sub nsw i32 %82, %90
  %92 = call i32 @llvm.abs.i32(i32 %91, i1 true)
  store i32 %92, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  %94 = trunc nuw nsw i64 %indvars.iv107 to i32
  %95 = sub nsw i32 %94, %93
  %96 = call i32 @llvm.abs.i32(i32 %95, i1 true)
  store i32 %96, ptr %13, align 4, !tbaa !8
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %98 = load i32, ptr %97, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  store i64 %99, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %100 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #8
  store ptr %100, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %101 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #8
  store ptr %101, ptr %15, align 8
  %102 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br i1 %102, label %.lr.ph81, label %._crit_edge82

._crit_edge82:                                    ; preds = %.lr.ph81, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %103 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #8
  store ptr %103, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %104 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @knight) #8
  store ptr %104, ptr %17, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %105, label %.lr.ph86, label %._crit_edge87

.lr.ph81:                                         ; preds = %89, %.lr.ph81
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %.sroa.019.0.copyload = load i32, ptr %106, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %106, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4
  %107 = sext i32 %.sroa.019.0.copyload to i64
  %108 = sext i32 %.sroa.4.0.copyload to i64
  %109 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %107, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = load i64, ptr %10, align 8, !tbaa !16
  %113 = add nsw i64 %112, %111
  store i64 %113, ptr %10, align 8, !tbaa !16
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  %115 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br i1 %115, label %.lr.ph81, label %._crit_edge82

._crit_edge87:                                    ; preds = %134, %._crit_edge82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  %116 = load i64, ptr %11, align 8, !tbaa !16
  %117 = load i64, ptr %10, align 8, !tbaa !16
  %118 = add nsw i64 %117, %116
  store i64 %118, ptr %10, align 8, !tbaa !16
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %120 = load i64, ptr %119, align 8, !tbaa !16
  store i64 %120, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %121 = load i32, ptr @R, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = icmp slt i64 %indvars.iv.next108, %122
  br i1 %123, label %89, label %._crit_edge90.loopexit, !llvm.loop !26

.lr.ph86:                                         ; preds = %._crit_edge82, %134
  %124 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %.sroa.0.0.copyload = load i32, ptr %124, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %124, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  %125 = sext i32 %.sroa.0.0.copyload to i64
  %126 = sext i32 %.sroa.5.0.copyload to i64
  %127 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %125, i64 %126
  %.pre114 = load i32, ptr @king, align 4, !tbaa !23
  %.pre116 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph86, %.thread156
  %128 = phi i32 [ %.pre116, %.lr.ph86 ], [ %253, %.thread156 ]
  %129 = phi i32 [ %.pre114, %.lr.ph86 ], [ %254, %.thread156 ]
  %.05284 = phi i32 [ -2, %.lr.ph86 ], [ %255, %.thread156 ]
  %130 = call i32 @llvm.abs.i32(i32 %.05284, i1 true)
  %131 = add nsw i32 %129, %.05284
  %132 = add nsw i32 %128, -2
  %133 = icmp slt i32 %131, 0
  br i1 %133, label %.thread156, label %137

134:                                              ; preds = %.thread156
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %136 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br i1 %136, label %.lr.ph86, label %._crit_edge87

137:                                              ; preds = %.preheader
  %138 = load i32, ptr @C, align 4, !tbaa !8
  %139 = icmp slt i32 %131, %138
  %140 = icmp sgt i32 %128, 1
  %or.cond.not65 = select i1 %139, i1 %140, i1 false
  %141 = load i32, ptr @R, align 4
  %.not = icmp slt i32 %132, %141
  %or.cond62 = select i1 %or.cond.not65, i1 %.not, i1 false
  br i1 %or.cond62, label %142, label %.thread136

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %143 = zext nneg i32 %131 to i64
  %144 = zext nneg i32 %132 to i64
  %145 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %125, i64 %126, i64 %143, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !8
  %147 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %143, i64 %144
  %148 = load i32, ptr %147, align 4, !tbaa !8
  %149 = add nsw i32 %148, %146
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  store i32 %130, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  store i32 2, ptr %20, align 4, !tbaa !8
  %150 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %151 = load i32, ptr %150, align 4, !tbaa !8
  %152 = add nsw i32 %149, %151
  %153 = load i32, ptr %127, align 4, !tbaa !8
  %154 = sub i32 %152, %153
  %155 = sext i32 %154 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  store i64 %155, ptr %18, align 8, !tbaa !16
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %157 = load i64, ptr %156, align 8, !tbaa !16
  store i64 %157, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %.pre117 = load i32, ptr @king, align 4, !tbaa !23
  %.pre118 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  %.pre127 = add nsw i32 %.pre117, %.05284
  %158 = icmp slt i32 %.pre127, 0
  br i1 %158, label %.thread156, label %.thread136

.thread136:                                       ; preds = %137, %142
  %159 = phi i32 [ %.pre117, %142 ], [ %129, %137 ]
  %160 = phi i32 [ %.pre118, %142 ], [ %128, %137 ]
  %.pre-phi138 = phi i32 [ %.pre127, %142 ], [ %131, %137 ]
  %161 = load i32, ptr @C, align 4, !tbaa !8
  %162 = icmp slt i32 %.pre-phi138, %161
  %163 = icmp sgt i32 %160, 0
  %or.cond.not65.1 = select i1 %162, i1 %163, i1 false
  %164 = load i32, ptr @R, align 4
  %.not.1 = icmp sle i32 %160, %164
  %or.cond62.1 = select i1 %or.cond.not65.1, i1 %.not.1, i1 false
  br i1 %or.cond62.1, label %165, label %.thread142

165:                                              ; preds = %.thread136
  %166 = add nsw i32 %160, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %167 = zext nneg i32 %.pre-phi138 to i64
  %168 = zext nneg i32 %166 to i64
  %169 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %125, i64 %126, i64 %167, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !8
  %171 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %167, i64 %168
  %172 = load i32, ptr %171, align 4, !tbaa !8
  %173 = add nsw i32 %172, %170
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  store i32 %130, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  store i32 1, ptr %20, align 4, !tbaa !8
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %175 = load i32, ptr %174, align 4, !tbaa !8
  %176 = add nsw i32 %173, %175
  %177 = load i32, ptr %127, align 4, !tbaa !8
  %178 = sub i32 %176, %177
  %179 = sext i32 %178 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  store i64 %179, ptr %18, align 8, !tbaa !16
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %181 = load i64, ptr %180, align 8, !tbaa !16
  store i64 %181, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %.pre119 = load i32, ptr @king, align 4, !tbaa !23
  %.pre120 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  %.pre128 = add nsw i32 %.pre119, %.05284
  %182 = icmp slt i32 %.pre128, 0
  br i1 %182, label %.thread156, label %.thread142

.thread142:                                       ; preds = %.thread136, %165
  %183 = phi i32 [ %.pre119, %165 ], [ %159, %.thread136 ]
  %184 = phi i32 [ %.pre120, %165 ], [ %160, %.thread136 ]
  %.pre-phi129144 = phi i32 [ %.pre128, %165 ], [ %.pre-phi138, %.thread136 ]
  %185 = load i32, ptr @C, align 4, !tbaa !8
  %186 = icmp slt i32 %.pre-phi129144, %185
  %187 = icmp sgt i32 %184, -1
  %or.cond.not65.2 = select i1 %186, i1 %187, i1 false
  %188 = load i32, ptr @R, align 4
  %.not.2 = icmp slt i32 %184, %188
  %or.cond62.2 = select i1 %or.cond.not65.2, i1 %.not.2, i1 false
  br i1 %or.cond62.2, label %189, label %.thread150

189:                                              ; preds = %.thread142
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %190 = zext nneg i32 %.pre-phi129144 to i64
  %191 = zext nneg i32 %184 to i64
  %192 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %125, i64 %126, i64 %190, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !8
  %194 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %190, i64 %191
  %195 = load i32, ptr %194, align 4, !tbaa !8
  %196 = add nsw i32 %195, %193
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  store i32 %130, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  store i32 0, ptr %20, align 4, !tbaa !8
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %198 = load i32, ptr %197, align 4, !tbaa !8
  %199 = add nsw i32 %196, %198
  %200 = load i32, ptr %127, align 4, !tbaa !8
  %201 = sub i32 %199, %200
  %202 = sext i32 %201 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  store i64 %202, ptr %18, align 8, !tbaa !16
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %204 = load i64, ptr %203, align 8, !tbaa !16
  store i64 %204, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %.pre121 = load i32, ptr @king, align 4, !tbaa !23
  %.pre122 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  %.pre130 = add nsw i32 %.pre121, %.05284
  %205 = icmp slt i32 %.pre130, 0
  br i1 %205, label %.thread156, label %.thread150

.thread150:                                       ; preds = %.thread142, %189
  %206 = phi i32 [ %.pre121, %189 ], [ %183, %.thread142 ]
  %207 = phi i32 [ %.pre122, %189 ], [ %184, %.thread142 ]
  %.pre-phi131152 = phi i32 [ %.pre130, %189 ], [ %.pre-phi129144, %.thread142 ]
  %208 = add nsw i32 %207, 1
  %209 = load i32, ptr @C, align 4, !tbaa !8
  %210 = icmp slt i32 %.pre-phi131152, %209
  %211 = icmp sgt i32 %207, -2
  %or.cond.not65.3 = select i1 %210, i1 %211, i1 false
  %212 = load i32, ptr @R, align 4
  %.not.3 = icmp slt i32 %208, %212
  %or.cond62.3 = select i1 %or.cond.not65.3, i1 %.not.3, i1 false
  br i1 %or.cond62.3, label %213, label %.thread158

213:                                              ; preds = %.thread150
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %214 = zext nneg i32 %.pre-phi131152 to i64
  %215 = zext nneg i32 %208 to i64
  %216 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %125, i64 %126, i64 %214, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !8
  %218 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %214, i64 %215
  %219 = load i32, ptr %218, align 4, !tbaa !8
  %220 = add nsw i32 %219, %217
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  store i32 %130, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  store i32 1, ptr %20, align 4, !tbaa !8
  %221 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %222 = load i32, ptr %221, align 4, !tbaa !8
  %223 = add nsw i32 %220, %222
  %224 = load i32, ptr %127, align 4, !tbaa !8
  %225 = sub i32 %223, %224
  %226 = sext i32 %225 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  store i64 %226, ptr %18, align 8, !tbaa !16
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %228 = load i64, ptr %227, align 8, !tbaa !16
  store i64 %228, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %.pre123 = load i32, ptr @king, align 4, !tbaa !23
  %.pre124 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  %.pre132 = add nsw i32 %.pre123, %.05284
  %229 = icmp slt i32 %.pre132, 0
  br i1 %229, label %.thread156, label %.thread158

.thread158:                                       ; preds = %.thread150, %213
  %230 = phi i32 [ %.pre123, %213 ], [ %206, %.thread150 ]
  %231 = phi i32 [ %.pre124, %213 ], [ %207, %.thread150 ]
  %.pre-phi133160 = phi i32 [ %.pre132, %213 ], [ %.pre-phi131152, %.thread150 ]
  %232 = add nsw i32 %231, 2
  %233 = load i32, ptr @C, align 4, !tbaa !8
  %234 = icmp slt i32 %.pre-phi133160, %233
  %235 = icmp sgt i32 %231, -3
  %or.cond.not65.4 = select i1 %234, i1 %235, i1 false
  %236 = load i32, ptr @R, align 4
  %.not.4 = icmp slt i32 %232, %236
  %or.cond62.4 = select i1 %or.cond.not65.4, i1 %.not.4, i1 false
  br i1 %or.cond62.4, label %237, label %.thread156

237:                                              ; preds = %.thread158
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %238 = zext nneg i32 %.pre-phi133160 to i64
  %239 = zext nneg i32 %232 to i64
  %240 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %125, i64 %126, i64 %238, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !8
  %242 = getelementptr inbounds [26 x [30 x [26 x [30 x i32]]]], ptr @dist, i64 0, i64 %indvars.iv110, i64 %indvars.iv107, i64 %238, i64 %239
  %243 = load i32, ptr %242, align 4, !tbaa !8
  %244 = add nsw i32 %243, %241
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  store i32 %130, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  store i32 2, ptr %20, align 4, !tbaa !8
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %246 = load i32, ptr %245, align 4, !tbaa !8
  %247 = add nsw i32 %244, %246
  %248 = load i32, ptr %127, align 4, !tbaa !8
  %249 = sub i32 %247, %248
  %250 = sext i32 %249 to i64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  store i64 %250, ptr %18, align 8, !tbaa !16
  %251 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %252 = load i64, ptr %251, align 8, !tbaa !16
  store i64 %252, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  %.pre113 = load i32, ptr @king, align 4, !tbaa !23
  %.pre115 = load i32, ptr getelementptr inbounds (i8, ptr @king, i64 4), align 4, !tbaa !25
  br label %.thread156

.thread156:                                       ; preds = %.preheader, %142, %165, %189, %237, %.thread158, %213
  %253 = phi i32 [ %.pre115, %237 ], [ %231, %.thread158 ], [ %.pre124, %213 ], [ %.pre122, %189 ], [ %.pre120, %165 ], [ %.pre118, %142 ], [ %128, %.preheader ]
  %254 = phi i32 [ %.pre113, %237 ], [ %230, %.thread158 ], [ %.pre123, %213 ], [ %.pre121, %189 ], [ %.pre119, %165 ], [ %.pre117, %142 ], [ %129, %.preheader ]
  %255 = add nsw i32 %.05284, 1
  %exitcond106.not = icmp eq i32 %255, 3
  br i1 %exitcond106.not, label %134, label %.preheader, !llvm.loop !27

256:                                              ; preds = %._crit_edge92
  store i64 0, ptr %9, align 8, !tbaa !16
  br label %257

257:                                              ; preds = %._crit_edge92._crit_edge, %256
  %258 = phi i64 [ %.pre126, %._crit_edge92._crit_edge ], [ 0, %256 ]
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %258)
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef nonnull @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #8
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"vtable pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !6, i64 0}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13, !20}
!20 = !{!"llvm.loop.unswitch.partial.disable"}
!21 = distinct !{!21, !13}
!22 = distinct !{!22, !13, !20}
!23 = !{!24, !9, i64 0}
!24 = !{!"_ZTSSt4pairIiiE", !9, i64 0, !9, i64 4}
!25 = !{!24, !9, i64 4}
!26 = distinct !{!26, !13}
!27 = distinct !{!27, !13}


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