; LLVM IR from abeaumont/competitive-programming :: kattis (openpitmining)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::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 }

@n = external dso_local global i32, align 4
@l = external dso_local global [202 x i32], align 16
@g = external dso_local global [202 x [202 x i32]], align 16
@c = external dso_local global [202 x [202 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsii(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: mustprogress uwtable
declare dso_local void @_Z4dfs2i(i32 noundef) #0

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

26:                                               ; preds = %92, %0
  %27 = load i32, ptr %7, align 4, !tbaa !8
  %28 = load i32, ptr @n, align 4, !tbaa !8
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %26
  %32 = 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)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %35 = load i32, ptr %3, align 4, !tbaa !8
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = sub nsw i32 %36, %35
  store i32 %37, ptr %2, align 4, !tbaa !8
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %40, label %51

40:                                               ; preds = %31
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = load i32, ptr %7, align 4, !tbaa !8
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [202 x i32], ptr @g, i64 0, i64 %43
  store i32 %41, ptr %44, align 4, !tbaa !8
  %45 = load i32, ptr %7, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [202 x i32], ptr @c, i64 0, i64 %46
  store i32 %41, ptr %47, align 4, !tbaa !8
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = load i32, ptr %6, align 4, !tbaa !8
  %50 = add nsw i32 %49, %48
  store i32 %50, ptr %6, align 4, !tbaa !8
  br label %72

51:                                               ; preds = %31
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %71

54:                                               ; preds = %51
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = sub nsw i32 0, %55
  %57 = load i32, ptr %7, align 4, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %58
  %60 = load i32, ptr @n, align 4, !tbaa !8
  %61 = add nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [202 x i32], ptr %59, i64 0, i64 %62
  store i32 %56, ptr %63, align 4, !tbaa !8
  %64 = load i32, ptr %7, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [202 x [202 x i32]], ptr @c, i64 0, i64 %65
  %67 = load i32, ptr @n, align 4, !tbaa !8
  %68 = add nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [202 x i32], ptr %66, i64 0, i64 %69
  store i32 %56, ptr %70, align 4, !tbaa !8
  br label %71

71:                                               ; preds = %54, %51
  br label %72

72:                                               ; preds = %71, %40
  br label %73

73:                                               ; preds = %77, %72
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr %4, align 4, !tbaa !8
  %76 = icmp ne i32 %74, 0
  br i1 %76, label %77, label %91

77:                                               ; preds = %73
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %79 = load i32, ptr %5, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %80
  %82 = load i32, ptr %7, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [202 x i32], ptr %81, i64 0, i64 %83
  store i32 40804, ptr %84, align 4, !tbaa !8
  %85 = load i32, ptr %5, align 4, !tbaa !8
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [202 x [202 x i32]], ptr @c, i64 0, i64 %86
  %88 = load i32, ptr %7, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [202 x i32], ptr %87, i64 0, i64 %89
  store i32 40804, ptr %90, align 4, !tbaa !8
  br label %73, !llvm.loop !11

91:                                               ; preds = %73
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %7, align 4, !tbaa !8
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !8
  br label %26, !llvm.loop !13

95:                                               ; preds = %30
  br label %96

96:                                               ; preds = %178, %95
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr @n, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr @l, i64 %99
  %101 = getelementptr inbounds i32, ptr %100, i64 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 -1, ptr %8, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @l, ptr noundef %101, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr %9) #7
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %102 unwind label %116

102:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  store i32 0, ptr @l, align 16, !tbaa !8
  br label %103

103:                                              ; preds = %165, %102
  %104 = invoke noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %105 unwind label %120

105:                                              ; preds = %103
  %106 = xor i1 %104, true
  br i1 %106, label %107, label %166

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %109 unwind label %120

109:                                              ; preds = %107
  %110 = load i32, ptr %108, align 4, !tbaa !8
  store i32 %110, ptr %5, align 4, !tbaa !8
  %111 = load i32, ptr %5, align 4, !tbaa !8
  %112 = load i32, ptr @n, align 4, !tbaa !8
  %113 = add nsw i32 %112, 1
  %114 = icmp eq i32 %111, %113
  br i1 %114, label %115, label %124

115:                                              ; preds = %109
  br label %166

116:                                              ; preds = %97
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %179

120:                                              ; preds = %171, %166, %124, %107, %103
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  br label %179

124:                                              ; preds = %109
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %125 unwind label %120

125:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %126

126:                                              ; preds = %162, %125
  %127 = load i32, ptr %13, align 4, !tbaa !8
  %128 = load i32, ptr @n, align 4, !tbaa !8
  %129 = add nsw i32 %128, 1
  %130 = icmp sle i32 %127, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %165

132:                                              ; preds = %126
  %133 = load i32, ptr %13, align 4, !tbaa !8
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !8
  %137 = icmp slt i32 %136, 0
  br i1 %137, label %138, label %161

138:                                              ; preds = %132
  %139 = load i32, ptr %5, align 4, !tbaa !8
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [202 x [202 x i32]], ptr @c, i64 0, i64 %140
  %142 = load i32, ptr %13, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [202 x i32], ptr %141, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !8
  %146 = icmp sgt i32 %145, 0
  br i1 %146, label %147, label %161

147:                                              ; preds = %138
  %148 = load i32, ptr %5, align 4, !tbaa !8
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !8
  %152 = add nsw i32 %151, 1
  %153 = load i32, ptr %13, align 4, !tbaa !8
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %154
  store i32 %152, ptr %155, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %9, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %156 unwind label %157

156:                                              ; preds = %147
  br label %161

157:                                              ; preds = %147
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %11, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %179

161:                                              ; preds = %156, %138, %132
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %13, align 4, !tbaa !8
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %13, align 4, !tbaa !8
  br label %126, !llvm.loop !14

165:                                              ; preds = %131
  br label %103, !llvm.loop !15

166:                                              ; preds = %115, %105
  %167 = invoke noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %9)
          to label %168 unwind label %120

168:                                              ; preds = %166
  br i1 %167, label %169, label %170

169:                                              ; preds = %168
  store i32 8, ptr %14, align 4
  br label %176

170:                                              ; preds = %168
  br label %171

171:                                              ; preds = %174, %170
  %172 = invoke noundef zeroext i1 @_Z3dfsii(i32 noundef 0, i32 noundef 40804)
          to label %173 unwind label %120

173:                                              ; preds = %171
  br i1 %172, label %174, label %175

174:                                              ; preds = %173
  br label %171, !llvm.loop !16

175:                                              ; preds = %173
  store i32 0, ptr %14, align 4
  br label %176

176:                                              ; preds = %175, %169
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #7
  %177 = load i32, ptr %14, align 4
  switch i32 %177, label %240 [
    i32 0, label %178
    i32 8, label %180
  ]

178:                                              ; preds = %176
  br label %96, !llvm.loop !17

179:                                              ; preds = %157, %120, %116
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %9) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #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 %235

180:                                              ; preds = %176
  %181 = load i32, ptr @n, align 4, !tbaa !8
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i32, ptr @l, i64 %182
  %184 = getelementptr inbounds i32, ptr %183, i64 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @l, ptr noundef %184, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @_Z4dfs2i(i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %185

185:                                              ; preds = %225, %180
  %186 = load i32, ptr %17, align 4, !tbaa !8
  %187 = load i32, ptr @n, align 4, !tbaa !8
  %188 = add nsw i32 %187, 1
  %189 = icmp sle i32 %186, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %185
  store i32 16, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %228

191:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %192

192:                                              ; preds = %221, %191
  %193 = load i32, ptr %18, align 4, !tbaa !8
  %194 = load i32, ptr @n, align 4, !tbaa !8
  %195 = add nsw i32 %194, 1
  %196 = icmp sle i32 %193, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %192
  store i32 19, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %224

198:                                              ; preds = %192
  %199 = load i32, ptr %17, align 4, !tbaa !8
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !8
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %220

204:                                              ; preds = %198
  %205 = load i32, ptr %18, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !8
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %220, label %210

210:                                              ; preds = %204
  %211 = load i32, ptr %17, align 4, !tbaa !8
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %212
  %214 = load i32, ptr %18, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [202 x i32], ptr %213, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !8
  %218 = load i32, ptr %16, align 4, !tbaa !8
  %219 = add nsw i32 %218, %217
  store i32 %219, ptr %16, align 4, !tbaa !8
  br label %220

220:                                              ; preds = %210, %204, %198
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %18, align 4, !tbaa !8
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %18, align 4, !tbaa !8
  br label %192, !llvm.loop !18

224:                                              ; preds = %197
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %17, align 4, !tbaa !8
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %17, align 4, !tbaa !8
  br label %185, !llvm.loop !19

228:                                              ; preds = %190
  %229 = load i32, ptr %6, align 4, !tbaa !8
  %230 = load i32, ptr %16, align 4, !tbaa !8
  %231 = sub nsw i32 %229, %230
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %231)
  %233 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %232, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %234 = load i32, ptr %1, align 4
  ret i32 %234

235:                                              ; preds = %179
  %236 = load ptr, ptr %11, align 8
  %237 = load i32, ptr %12, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239

240:                                              ; preds = %176
  unreachable
}

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 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)) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::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 }

@n = external dso_local global i32, align 4
@l = external dso_local global [202 x i32], align 16
@g = external dso_local local_unnamed_addr global [202 x [202 x i32]], align 16
@c = external dso_local local_unnamed_addr global [202 x [202 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3dfsii(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 uwtable
declare dso_local void @_Z4dfs2i(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca 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 %"class.std::queue", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = 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) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %17 = load i32, ptr @n, align 4, !tbaa !8
  %.not46 = icmp slt i32 %17, 1
  br i1 %.not46, label %.preheader44, label %.lr.ph50

.preheader44:                                     ; preds = %._crit_edge, %0
  %18 = phi i32 [ %17, %0 ], [ %49, %._crit_edge ]
  %.029.lcssa = phi i32 [ 0, %0 ], [ %.130, %._crit_edge ]
  br label %51

.lr.ph50:                                         ; preds = %0, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 1, %0 ]
  %.02947 = phi i32 [ %.130, %._crit_edge ], [ 0, %0 ]
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = load i32, ptr %1, align 4, !tbaa !8
  %24 = sub nsw i32 %23, %22
  store i32 %24, ptr %1, align 4, !tbaa !8
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %30

26:                                               ; preds = %.lr.ph50
  %27 = getelementptr inbounds [202 x i32], ptr @g, i64 0, i64 %indvars.iv
  store i32 %24, ptr %27, align 4, !tbaa !8
  %28 = getelementptr inbounds [202 x i32], ptr @c, i64 0, i64 %indvars.iv
  store i32 %24, ptr %28, align 4, !tbaa !8
  %29 = add nsw i32 %24, %.02947
  br label %39

30:                                               ; preds = %.lr.ph50
  %31 = icmp slt i32 %24, 0
  br i1 %31, label %32, label %39

32:                                               ; preds = %30
  %33 = sub nsw i32 0, %24
  %34 = load i32, ptr @n, align 4, !tbaa !8
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %indvars.iv, i64 %36
  store i32 %33, ptr %37, align 4, !tbaa !8
  %38 = getelementptr inbounds [202 x [202 x i32]], ptr @c, i64 0, i64 %indvars.iv, i64 %36
  store i32 %33, ptr %38, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %30, %32, %26
  %.130 = phi i32 [ %29, %26 ], [ %.02947, %32 ], [ %.02947, %30 ]
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr %3, align 4, !tbaa !8
  %.not4045 = icmp eq i32 %40, 0
  br i1 %.not4045, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %39, %.lr.ph
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %43 = load i32, ptr %4, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %44, i64 %indvars.iv
  store i32 40804, ptr %45, align 4, !tbaa !8
  %46 = getelementptr inbounds [202 x [202 x i32]], ptr @c, i64 0, i64 %44, i64 %indvars.iv
  store i32 40804, ptr %46, align 4, !tbaa !8
  %47 = load i32, ptr %3, align 4, !tbaa !8
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr %3, align 4, !tbaa !8
  %.not40 = icmp eq i32 %47, 0
  br i1 %.not40, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %39
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = load i32, ptr @n, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %.not.not = icmp slt i64 %indvars.iv, %50
  br i1 %.not.not, label %.lr.ph50, label %.preheader44, !llvm.loop !13

51:                                               ; preds = %.preheader44, %92
  %52 = phi i32 [ %18, %.preheader44 ], [ %.pre, %92 ]
  %53 = sext i32 %52 to i64
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @l, i64 8), i64 %53
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @l, ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #7
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushEOi(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %54 unwind label %61

54:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  store i32 0, ptr @l, align 16, !tbaa !8
  %55 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %55, label %._crit_edge58, label %.lr.ph57

.lr.ph57:                                         ; preds = %54, %._crit_edge55
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5queueIiSt5dequeIiSaIiEEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %57 = load i32, ptr %56, align 4, !tbaa !8
  store i32 %57, ptr %4, align 4, !tbaa !8
  %58 = load i32, ptr @n, align 4, !tbaa !8
  %59 = add nsw i32 %58, 1
  %60 = icmp eq i32 %57, %59
  br i1 %60, label %._crit_edge58, label %65

61:                                               ; preds = %51
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %93

63:                                               ; preds = %.preheader43
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %93

65:                                               ; preds = %.lr.ph57
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  %66 = load i32, ptr @n, align 4, !tbaa !8
  %.not3451 = icmp slt i32 %66, -1
  br i1 %.not3451, label %._crit_edge55, label %.lr.ph54

._crit_edge55:                                    ; preds = %85, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %67 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %67, label %._crit_edge58, label %.lr.ph57, !llvm.loop !14

.lr.ph54:                                         ; preds = %65, %85
  %68 = phi i32 [ %86, %85 ], [ %66, %65 ]
  %storemerge52 = phi i32 [ %88, %85 ], [ 0, %65 ]
  %69 = sext i32 %storemerge52 to i64
  %70 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !8
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %85

73:                                               ; preds = %.lr.ph54
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [202 x [202 x i32]], ptr @c, i64 0, i64 %75, i64 %69
  %77 = load i32, ptr %76, align 4, !tbaa !8
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %85

79:                                               ; preds = %73
  %80 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %75
  %81 = load i32, ptr %80, align 4, !tbaa !8
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %70, align 4, !tbaa !8
  invoke void @_ZNSt5queueIiSt5dequeIiSaIiEEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %._crit_edge82 unwind label %83

._crit_edge82:                                    ; preds = %79
  %.pre83 = load i32, ptr %8, align 4, !tbaa !8
  %.pre84 = load i32, ptr @n, align 4, !tbaa !8
  br label %85

83:                                               ; preds = %79
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %93

85:                                               ; preds = %._crit_edge82, %.lr.ph54, %73
  %86 = phi i32 [ %.pre84, %._crit_edge82 ], [ %68, %.lr.ph54 ], [ %68, %73 ]
  %87 = phi i32 [ %.pre83, %._crit_edge82 ], [ %storemerge52, %.lr.ph54 ], [ %storemerge52, %73 ]
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !8
  %.not34 = icmp sgt i32 %87, %86
  br i1 %.not34, label %._crit_edge55, label %.lr.ph54, !llvm.loop !15

._crit_edge58:                                    ; preds = %._crit_edge55, %.lr.ph57, %54
  %89 = call noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %89, label %94, label %.preheader43

.preheader43:                                     ; preds = %._crit_edge58, %91
  %90 = invoke noundef zeroext i1 @_Z3dfsii(i32 noundef 0, i32 noundef 40804)
          to label %91 unwind label %63

91:                                               ; preds = %.preheader43
  br i1 %90, label %.preheader43, label %92, !llvm.loop !16

92:                                               ; preds = %91
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #7
  %.pre = load i32, ptr @n, align 4, !tbaa !8
  br label %51

93:                                               ; preds = %83, %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %84, %83 ], [ %62, %61 ]
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, 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

94:                                               ; preds = %._crit_edge58
  call void @_ZNSt5queueIiSt5dequeIiSaIiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #7
  %95 = load i32, ptr @n, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr @l, i64 %96
  %98 = getelementptr inbounds i8, ptr %97, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @l, ptr noundef nonnull %98, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @_Z4dfs2i(i32 noundef 0)
  %99 = load i32, ptr @n, align 4, !tbaa !8
  %.not3666 = icmp slt i32 %99, -1
  br i1 %.not3666, label %._crit_edge69, label %.preheader.preheader

.preheader.preheader:                             ; preds = %94
  %100 = add i32 %99, 2
  %wide.trip.count80 = zext i32 %100 to i64
  %xtraiter = and i64 %wide.trip.count80, 1
  %101 = icmp eq i32 %100, 1
  %unroll_iter = and i64 %wide.trip.count80, 4294967294
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge64
  %indvars.iv77 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next78, %._crit_edge64 ]
  %.02467 = phi i32 [ 0, %.preheader.preheader ], [ %.us-phi, %._crit_edge64 ]
  %102 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %indvars.iv77
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %.not38 = icmp eq i32 %103, 0
  br i1 %.not38, label %._crit_edge64, label %.lr.ph63.split.preheader

.lr.ph63.split.preheader:                         ; preds = %.preheader
  br i1 %101, label %._crit_edge64.loopexit.unr-lcssa, label %.lr.ph63.split

._crit_edge69:                                    ; preds = %._crit_edge64, %94
  %.024.lcssa = phi i32 [ 0, %94 ], [ %.us-phi, %._crit_edge64 ]
  %104 = sub nsw i32 %.029.lcssa, %.024.lcssa
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %105, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret i32 0

._crit_edge64.loopexit.unr-lcssa:                 ; preds = %125, %.lr.ph63.split.preheader
  %.2.lcssa.ph = phi i32 [ poison, %.lr.ph63.split.preheader ], [ %.2.1, %125 ]
  %indvars.iv74.unr = phi i64 [ 0, %.lr.ph63.split.preheader ], [ %indvars.iv.next75.1, %125 ]
  %.161.unr = phi i32 [ %.02467, %.lr.ph63.split.preheader ], [ %.2.1, %125 ]
  br i1 %lcmp.mod.not, label %._crit_edge64, label %.lr.ph63.split.epil

.lr.ph63.split.epil:                              ; preds = %._crit_edge64.loopexit.unr-lcssa
  %107 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %indvars.iv74.unr
  %108 = load i32, ptr %107, align 4, !tbaa !8
  %.not39.epil = icmp eq i32 %108, 0
  br i1 %.not39.epil, label %109, label %._crit_edge64

109:                                              ; preds = %.lr.ph63.split.epil
  %110 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %indvars.iv77, i64 %indvars.iv74.unr
  %111 = load i32, ptr %110, align 4, !tbaa !8
  %112 = add nsw i32 %111, %.161.unr
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %._crit_edge64.loopexit.unr-lcssa, %109, %.lr.ph63.split.epil, %.preheader
  %.us-phi = phi i32 [ %.02467, %.preheader ], [ %.2.lcssa.ph, %._crit_edge64.loopexit.unr-lcssa ], [ %.161.unr, %.lr.ph63.split.epil ], [ %112, %109 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %exitcond81 = icmp eq i64 %indvars.iv.next78, %wide.trip.count80
  br i1 %exitcond81, label %._crit_edge69, label %.preheader, !llvm.loop !17

.lr.ph63.split:                                   ; preds = %.lr.ph63.split.preheader, %125
  %indvars.iv74 = phi i64 [ %indvars.iv.next75.1, %125 ], [ 0, %.lr.ph63.split.preheader ]
  %.161 = phi i32 [ %.2.1, %125 ], [ %.02467, %.lr.ph63.split.preheader ]
  %niter = phi i64 [ %niter.next.1, %125 ], [ 0, %.lr.ph63.split.preheader ]
  %113 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %indvars.iv74
  %114 = load i32, ptr %113, align 8, !tbaa !8
  %.not39 = icmp eq i32 %114, 0
  br i1 %.not39, label %115, label %.lr.ph63.split.1

115:                                              ; preds = %.lr.ph63.split
  %116 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %indvars.iv77, i64 %indvars.iv74
  %117 = load i32, ptr %116, align 8, !tbaa !8
  %118 = add nsw i32 %117, %.161
  br label %.lr.ph63.split.1

.lr.ph63.split.1:                                 ; preds = %.lr.ph63.split, %115
  %.2 = phi i32 [ %.161, %.lr.ph63.split ], [ %118, %115 ]
  %indvars.iv.next75 = or disjoint i64 %indvars.iv74, 1
  %119 = getelementptr inbounds [202 x i32], ptr @l, i64 0, i64 %indvars.iv.next75
  %120 = load i32, ptr %119, align 4, !tbaa !8
  %.not39.1 = icmp eq i32 %120, 0
  br i1 %.not39.1, label %121, label %125

121:                                              ; preds = %.lr.ph63.split.1
  %122 = getelementptr inbounds [202 x [202 x i32]], ptr @g, i64 0, i64 %indvars.iv77, i64 %indvars.iv.next75
  %123 = load i32, ptr %122, align 4, !tbaa !8
  %124 = add nsw i32 %123, %.2
  br label %125

125:                                              ; preds = %121, %.lr.ph63.split.1
  %.2.1 = phi i32 [ %.2, %.lr.ph63.split.1 ], [ %124, %121 ]
  %indvars.iv.next75.1 = add nuw nsw i64 %indvars.iv74, 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_edge64.loopexit.unr-lcssa, label %.lr.ph63.split, !llvm.loop !18
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

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 #4

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIiSt5dequeIiSaIiEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 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 #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

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

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

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

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


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