; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2016-17/Dec 2016/Silver (16 Dec S3)

; 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.0" = type { %"struct.std::pair", i32 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@adj = external dso_local global [200 x [200 x i8]], align 16
@cows = external dso_local global [200 x %"struct.std::pair.0"], align 16
@cin = external dso_local global %"class.std::basic_ifstream", align 8
@cout = external dso_local global %"class.std::basic_ofstream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4distSt4pairIiiES0_(i64, i64) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %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 i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca i32, align 4
  %11 = alloca [200 x i32], align 16
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::queue", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %44, %0
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %47

26:                                               ; preds = %21
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %28
  %30 = getelementptr inbounds %"struct.std::pair.0", ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds %"struct.std::pair", ptr %30, i32 0, i32 0
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %34
  %36 = getelementptr inbounds %"struct.std::pair.0", ptr %35, i32 0, i32 0
  %37 = getelementptr inbounds %"struct.std::pair", ptr %36, i32 0, i32 1
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %40
  %42 = getelementptr inbounds %"struct.std::pair.0", ptr %41, i32 0, i32 1
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %42)
  br label %44

44:                                               ; preds = %26
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !9

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

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

52:                                               ; preds = %48
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %102

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

54:                                               ; preds = %95, %53
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %98

59:                                               ; preds = %54
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = icmp ne i32 %60, %61
  br i1 %62, label %63, label %94

63:                                               ; preds = %59
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %65
  %67 = getelementptr inbounds %"struct.std::pair.0", ptr %66, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %67, i64 8, i1 false)
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %69
  %71 = getelementptr inbounds %"struct.std::pair.0", ptr %70, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %71, i64 8, i1 false)
  %72 = load i64, ptr %8, align 4
  %73 = load i64, ptr %9, align 4
  %74 = call noundef i32 @_Z4distSt4pairIiiES0_(i64 %72, i64 %73)
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %76
  %78 = getelementptr inbounds %"struct.std::pair.0", ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !11
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %81
  %83 = getelementptr inbounds %"struct.std::pair.0", ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !11
  %85 = mul nsw i32 %79, %84
  %86 = icmp sle i32 %74, %85
  br i1 %86, label %87, label %94

87:                                               ; preds = %63
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [200 x [200 x i8]], ptr @adj, i64 0, i64 %89
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [200 x i8], ptr %90, i64 0, i64 %92
  store i8 1, ptr %93, align 1, !tbaa !14
  br label %94

94:                                               ; preds = %87, %63, %59
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %7, align 4, !tbaa !5
  br label %54, !llvm.loop !16

98:                                               ; preds = %58
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !17

102:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %201, %102
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %209

108:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 800, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %118, %108
  %110 = load i32, ptr %12, align 4, !tbaa !5
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %121

114:                                              ; preds = %109
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [200 x i32], ptr %11, i64 0, i64 %116
  store i32 0, ptr %117, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %114
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %12, align 4, !tbaa !5
  br label %109, !llvm.loop !18

121:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #7
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %122 unwind label %140

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %176, %122
  %124 = invoke noundef i64 @_ZNKSt5queueIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %125 unwind label %140

125:                                              ; preds = %123
  %126 = icmp ne i64 %124, 0
  br i1 %126, label %127, label %178

127:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %128 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %129 unwind label %144

129:                                              ; preds = %127
  %130 = load i32, ptr %128, align 4, !tbaa !5
  store i32 %130, ptr %16, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
          to label %131 unwind label %144

131:                                              ; preds = %129
  %132 = load i32, ptr %16, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [200 x i32], ptr %11, i64 0, i64 %133
  store i32 1, ptr %134, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %173, %131
  %136 = load i32, ptr %17, align 4, !tbaa !5
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %148, label %139

139:                                              ; preds = %135
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %176

140:                                              ; preds = %123, %121
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %14, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %15, align 4
  br label %208

144:                                              ; preds = %129, %127
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %14, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %15, align 4
  br label %177

148:                                              ; preds = %135
  %149 = load i32, ptr %16, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [200 x [200 x i8]], ptr @adj, i64 0, i64 %150
  %152 = load i32, ptr %17, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [200 x i8], ptr %151, i64 0, i64 %153
  %155 = load i8, ptr %154, align 1, !tbaa !14, !range !19, !noundef !20
  %156 = trunc i8 %155 to i1
  br i1 %156, label %157, label %172

157:                                              ; preds = %148
  %158 = load i32, ptr %17, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [200 x i32], ptr %11, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = icmp eq i32 %161, 0
  br i1 %162, label %163, label %172

163:                                              ; preds = %157
  %164 = load i32, ptr %17, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [200 x i32], ptr %11, i64 0, i64 %165
  store i32 -1, ptr %166, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %13, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %167 unwind label %168

167:                                              ; preds = %163
  br label %172

168:                                              ; preds = %163
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %14, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %177

172:                                              ; preds = %167, %157, %148
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %17, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %17, align 4, !tbaa !5
  br label %135, !llvm.loop !21

176:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %123, !llvm.loop !22

177:                                              ; preds = %168, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %208

178:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %179

179:                                              ; preds = %194, %178
  %180 = load i32, ptr %19, align 4, !tbaa !5
  %181 = load i32, ptr %2, align 4, !tbaa !5
  %182 = icmp slt i32 %180, %181
  br i1 %182, label %184, label %183

183:                                              ; preds = %179
  store i32 22, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %197

184:                                              ; preds = %179
  %185 = load i32, ptr %19, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [200 x i32], ptr %11, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp eq i32 %188, 1
  br i1 %189, label %190, label %193

190:                                              ; preds = %184
  %191 = load i32, ptr %18, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %18, align 4, !tbaa !5
  br label %193

193:                                              ; preds = %190, %184
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %19, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %19, align 4, !tbaa !5
  br label %179, !llvm.loop !23

197:                                              ; preds = %183
  %198 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %199 unwind label %204

199:                                              ; preds = %197
  %200 = load i32, ptr %198, align 4, !tbaa !5
  store i32 %200, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 800, ptr %11) #7
  br label %201

201:                                              ; preds = %199
  %202 = load i32, ptr %10, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %10, align 4, !tbaa !5
  br label %103, !llvm.loop !24

204:                                              ; preds = %197
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %14, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %208

208:                                              ; preds = %204, %177, %140
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %13) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 800, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %213

209:                                              ; preds = %107
  %210 = load i32, ptr %3, align 4, !tbaa !5
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @cout, i32 noundef %210)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %212 = load i32, ptr %1, align 4
  ret i32 %212

213:                                              ; preds = %208
  %214 = load ptr, ptr %14, align 8
  %215 = load i32, ptr %15, align 4
  %216 = insertvalue { ptr, i32 } poison, ptr %214, 0
  %217 = insertvalue { ptr, i32 } %216, i32 %215, 1
  resume { ptr, i32 } %217
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSSt4pairIS_IiiEiE", !13, i64 0, !6, i64 8}
!13 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !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.0" = type { %"struct.std::pair", i32 }
%"struct.std::pair" = type { i32, i32 }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@adj = external dso_local local_unnamed_addr global [200 x [200 x i8]], align 16
@cows = external dso_local global [200 x %"struct.std::pair.0"], align 16
@cin = external dso_local global %"class.std::basic_ifstream", align 8
@cout = external dso_local global %"class.std::basic_ofstream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z4distSt4pairIiiES0_(i64, i64) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [200 x i32], align 16
  %5 = alloca %"class.std::queue", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge45.thread

.preheader40:                                     ; preds = %.lr.ph
  %11 = icmp sgt i32 %18, 0
  br i1 %11, label %.preheader39, label %._crit_edge45.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %12 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %indvars.iv
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %14 = getelementptr inbounds i8, ptr %12, i64 4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %16 = getelementptr inbounds i8, ptr %12, i64 8
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %.preheader40, !llvm.loop !9

.preheader39:                                     ; preds = %.preheader40, %._crit_edge
  %21 = phi i32 [ %26, %._crit_edge ], [ %18, %.preheader40 ]
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %._crit_edge ], [ 0, %.preheader40 ]
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph43, label %.preheader39.._crit_edge_crit_edge

.preheader39.._crit_edge_crit_edge:               ; preds = %.preheader39
  %.pre81 = sext i32 %21 to i64
  br label %._crit_edge

.lr.ph43:                                         ; preds = %.preheader39
  %23 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %indvars.iv69
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  br label %28

._crit_edge45.thread:                             ; preds = %.preheader40, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  br label %._crit_edge63

._crit_edge45:                                    ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  %25 = icmp sgt i32 %26, 0
  br i1 %25, label %.lr.ph62, label %._crit_edge63

._crit_edge:                                      ; preds = %36, %.preheader39.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre81, %.preheader39.._crit_edge_crit_edge ], [ %38, %36 ]
  %26 = phi i32 [ %21, %.preheader39.._crit_edge_crit_edge ], [ %37, %36 ]
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %27 = icmp slt i64 %indvars.iv.next70, %.pre-phi
  br i1 %27, label %.preheader39, label %._crit_edge45, !llvm.loop !11

28:                                               ; preds = %.lr.ph43, %36
  %indvars.iv66 = phi i64 [ 0, %.lr.ph43 ], [ %indvars.iv.next67, %36 ]
  %.not37 = icmp eq i64 %indvars.iv69, %indvars.iv66
  br i1 %.not37, label %36, label %29

29:                                               ; preds = %28
  %.sroa.09.0.copyload = load i64, ptr %23, align 4
  %30 = getelementptr inbounds [200 x %"struct.std::pair.0"], ptr @cows, i64 0, i64 %indvars.iv66
  %.sroa.0.0.copyload = load i64, ptr %30, align 4
  %31 = call noundef i32 @_Z4distSt4pairIiiES0_(i64 %.sroa.09.0.copyload, i64 %.sroa.0.0.copyload)
  %32 = load i32, ptr %24, align 4, !tbaa !13
  %33 = mul nsw i32 %32, %32
  %.not38 = icmp sgt i32 %31, %33
  br i1 %.not38, label %36, label %34

34:                                               ; preds = %29
  %35 = getelementptr inbounds [200 x [200 x i8]], ptr @adj, i64 0, i64 %indvars.iv69, i64 %indvars.iv66
  store i8 1, ptr %35, align 1, !tbaa !16
  br label %36

36:                                               ; preds = %28, %29, %34
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %37 = load i32, ptr %1, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv.next67, %38
  br i1 %39, label %28, label %._crit_edge, !llvm.loop !18

._crit_edge63.loopexit:                           ; preds = %._crit_edge60
  %.pre80 = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge63

._crit_edge63:                                    ; preds = %._crit_edge45.thread, %._crit_edge63.loopexit, %._crit_edge45
  %40 = phi i32 [ %.pre80, %._crit_edge63.loopexit ], [ 0, %._crit_edge45 ], [ 0, %._crit_edge45.thread ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @cout, i32 noundef %40)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph62:                                         ; preds = %._crit_edge45, %._crit_edge60
  %42 = phi i32 [ %85, %._crit_edge60 ], [ %26, %._crit_edge45 ]
  call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %4) #7
  %43 = icmp sgt i32 %42, 0
  br i1 %43, label %.lr.ph48.preheader, label %._crit_edge49

.lr.ph48.preheader:                               ; preds = %.lr.ph62
  %44 = zext nneg i32 %42 to i64
  %45 = shl nuw nsw i64 %44, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %4, i8 0, i64 %45, i1 false), !tbaa !5
  br label %._crit_edge49

._crit_edge49:                                    ; preds = %.lr.ph48.preheader, %.lr.ph62
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #7
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %.preheader unwind label %54

.preheader:                                       ; preds = %._crit_edge49
  %46 = call noundef i64 @_ZNKSt5queueIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %.not54 = icmp eq i64 %46, 0
  br i1 %.not54, label %._crit_edge56, label %.lr.ph55

.lr.ph55:                                         ; preds = %.preheader, %._crit_edge53
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [200 x i32], ptr %4, i64 0, i64 %49
  store i32 1, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.lr.ph52, label %._crit_edge53

._crit_edge53:                                    ; preds = %68, %.lr.ph55
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %53 = call noundef i64 @_ZNKSt5queueIiSt5dequeIiSaIiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  %.not = icmp eq i64 %53, 0
  br i1 %.not, label %._crit_edge56, label %.lr.ph55, !llvm.loop !19

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

.lr.ph52:                                         ; preds = %.lr.ph55, %68
  %56 = phi i32 [ %69, %68 ], [ %51, %.lr.ph55 ]
  %storemerge3550 = phi i32 [ %71, %68 ], [ 0, %.lr.ph55 ]
  %57 = sext i32 %storemerge3550 to i64
  %58 = getelementptr inbounds [200 x [200 x i8]], ptr @adj, i64 0, i64 %49, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !16, !range !20, !noundef !21
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %61, label %68

61:                                               ; preds = %.lr.ph52
  %62 = getelementptr inbounds [200 x i32], ptr %4, i64 0, i64 %57
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %61
  store i32 -1, ptr %62, align 4, !tbaa !5
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %._crit_edge78 unwind label %66

._crit_edge78:                                    ; preds = %65
  %.pre = load i32, ptr %6, align 4, !tbaa !5
  %.pre79 = load i32, ptr %1, align 4, !tbaa !5
  br label %68

66:                                               ; preds = %65
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %101

68:                                               ; preds = %._crit_edge78, %.lr.ph52, %61
  %69 = phi i32 [ %.pre79, %._crit_edge78 ], [ %56, %.lr.ph52 ], [ %56, %61 ]
  %70 = phi i32 [ %.pre, %._crit_edge78 ], [ %storemerge3550, %.lr.ph52 ], [ %storemerge3550, %61 ]
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %6, align 4, !tbaa !5
  %72 = icmp slt i32 %71, %69
  br i1 %72, label %.lr.ph52, label %._crit_edge53, !llvm.loop !22

._crit_edge56:                                    ; preds = %._crit_edge53, %.preheader
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  %73 = load i32, ptr %1, align 4, !tbaa !5
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %.lr.ph59.preheader, label %._crit_edge60

.lr.ph59.preheader:                               ; preds = %._crit_edge56
  %wide.trip.count = zext nneg i32 %73 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %75 = icmp eq i32 %73, 1
  br i1 %75, label %._crit_edge60.loopexit.unr-lcssa, label %.lr.ph59.preheader.new

.lr.ph59.preheader.new:                           ; preds = %.lr.ph59.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph59

._crit_edge60.loopexit.unr-lcssa:                 ; preds = %99, %.lr.ph59.preheader
  %indvars.iv75.unr = phi i64 [ 0, %.lr.ph59.preheader ], [ %indvars.iv.next76.1, %99 ]
  %.unr = phi i32 [ 0, %.lr.ph59.preheader ], [ %100, %99 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge60, label %.lr.ph59.epil

.lr.ph59.epil:                                    ; preds = %._crit_edge60.loopexit.unr-lcssa
  %76 = getelementptr inbounds [200 x i32], ptr %4, i64 0, i64 %indvars.iv75.unr
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp eq i32 %77, 1
  br i1 %78, label %79, label %._crit_edge60

79:                                               ; preds = %.lr.ph59.epil
  %80 = add nsw i32 %.unr, 1
  store i32 %80, ptr %7, align 4, !tbaa !5
  br label %._crit_edge60

._crit_edge60:                                    ; preds = %._crit_edge60.loopexit.unr-lcssa, %79, %.lr.ph59.epil, %._crit_edge56
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %82 = load i32, ptr %81, align 4, !tbaa !5
  store i32 %82, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %4) #7
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %3, align 4, !tbaa !5
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %.lr.ph62, label %._crit_edge63.loopexit, !llvm.loop !23

.lr.ph59:                                         ; preds = %99, %.lr.ph59.preheader.new
  %indvars.iv75 = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %indvars.iv.next76.1, %99 ]
  %87 = phi i32 [ 0, %.lr.ph59.preheader.new ], [ %100, %99 ]
  %niter = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %niter.next.1, %99 ]
  %88 = getelementptr inbounds [200 x i32], ptr %4, i64 0, i64 %indvars.iv75
  %89 = load i32, ptr %88, align 8, !tbaa !5
  %90 = icmp eq i32 %89, 1
  br i1 %90, label %91, label %.lr.ph59.1

91:                                               ; preds = %.lr.ph59
  %92 = add nsw i32 %87, 1
  store i32 %92, ptr %7, align 4, !tbaa !5
  br label %.lr.ph59.1

.lr.ph59.1:                                       ; preds = %.lr.ph59, %91
  %93 = phi i32 [ %87, %.lr.ph59 ], [ %92, %91 ]
  %indvars.iv.next76 = or disjoint i64 %indvars.iv75, 1
  %94 = getelementptr inbounds [200 x i32], ptr %4, i64 0, i64 %indvars.iv.next76
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp eq i32 %95, 1
  br i1 %96, label %97, label %99

97:                                               ; preds = %.lr.ph59.1
  %98 = add nsw i32 %93, 1
  store i32 %98, ptr %7, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %97, %.lr.ph59.1
  %100 = phi i32 [ %93, %.lr.ph59.1 ], [ %98, %97 ]
  %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge60.loopexit.unr-lcssa, label %.lr.ph59, !llvm.loop !24

101:                                              ; preds = %66, %54
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %55, %54 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #5 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSSt4pairIS_IiiEiE", !15, i64 0, !6, i64 8}
!15 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


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