; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ/1983.ll (Z3dfsi)

; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl" }
%"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl" = type { %"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl_data" }
%"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.node = type { i32, i32, i32, i32, [90 x i32], [90 x i32] }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@sx = external dso_local global i32, align 4
@sy = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@time = external dso_local global i32, align 4
@map = external dso_local global [10 x [10 x i8]], align 16
@v = external dso_local global [10 x [10 x [2 x i32]]], align 16
@yi = external dso_local global [4 x [2 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsi(i32 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::queue", align 8
  %4 = alloca %struct.node, align 4
  %5 = alloca %struct.node, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %3) #6
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  call void @llvm.lifetime.start.p0(i64 736, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 736, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 -1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @ans, align 4, !tbaa !5
  %15 = icmp sgt i32 %13, %14
  br i1 %15, label %16, label %17

16:                                               ; preds = %1
  store i32 1, ptr %9, align 4
  br label %306

17:                                               ; preds = %1
  %18 = load i32, ptr @sx, align 4, !tbaa !5
  %19 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  store i32 %18, ptr %19, align 4, !tbaa !9
  %20 = load i32, ptr @sy, align 4, !tbaa !5
  %21 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  store i32 %20, ptr %21, align 4, !tbaa !11
  %22 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 2
  store i32 0, ptr %22, align 4, !tbaa !12
  %23 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 3
  store i32 0, ptr %23, align 4, !tbaa !13
  call void @llvm.memset.p0.i64(ptr align 16 @v, i8 0, i64 800, i1 false)
  %24 = load i32, ptr @sx, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %25
  %27 = load i32, ptr @sy, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10 x [2 x i32]], ptr %26, i64 0, i64 %28
  %30 = getelementptr inbounds [2 x i32], ptr %29, i64 0, i64 0
  store i32 1, ptr %30, align 8, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(736) %4)
          to label %31 unwind label %45

31:                                               ; preds = %17
  br label %32

32:                                               ; preds = %221, %44, %31
  %33 = invoke noundef zeroext i1 @_ZNKSt5queueI4nodeSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %34 unwind label %45

34:                                               ; preds = %32
  %35 = xor i1 %33, true
  br i1 %35, label %36, label %222

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 4 dereferenceable(736) ptr @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %38 unwind label %45

38:                                               ; preds = %36
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %37, i64 736, i1 false), !tbaa.struct !14
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
          to label %39 unwind label %45

39:                                               ; preds = %38
  %40 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 2
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = load i32, ptr @time, align 4, !tbaa !5
  %43 = icmp sgt i32 %41, %42
  br i1 %43, label %44, label %49

44:                                               ; preds = %39
  br label %32, !llvm.loop !16

45:                                               ; preds = %201, %38, %36, %32, %17
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %10, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %11, align 4
  br label %309

49:                                               ; preds = %39
  %50 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 0
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %52
  %54 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !11
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [10 x i8], ptr %53, i64 0, i64 %56
  %58 = load i8, ptr %57, align 1, !tbaa !15
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 69
  br i1 %60, label %61, label %68

61:                                               ; preds = %49
  %62 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 3
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %61
  %66 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !12
  store i32 %67, ptr %6, align 4, !tbaa !5
  br label %222

68:                                               ; preds = %61, %49
  %69 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 2
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = add nsw i32 %70, 1
  %72 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 2
  store i32 %71, ptr %72, align 4, !tbaa !12
  %73 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 3
  %74 = load i32, ptr %73, align 4, !tbaa !13
  %75 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 3
  store i32 %74, ptr %75, align 4, !tbaa !13
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %218, %68
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 4
  br i1 %78, label %79, label %221

79:                                               ; preds = %76
  %80 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [4 x [2 x i32]], ptr @yi, i64 0, i64 %83
  %85 = getelementptr inbounds [2 x i32], ptr %84, i64 0, i64 0
  %86 = load i32, ptr %85, align 8, !tbaa !5
  %87 = add nsw i32 %81, %86
  %88 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  store i32 %87, ptr %88, align 4, !tbaa !9
  %89 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 1
  %90 = load i32, ptr %89, align 4, !tbaa !11
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [4 x [2 x i32]], ptr @yi, i64 0, i64 %92
  %94 = getelementptr inbounds [2 x i32], ptr %93, i64 0, i64 1
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %90, %95
  %97 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  store i32 %96, ptr %97, align 4, !tbaa !11
  %98 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = icmp sge i32 %99, 0
  br i1 %100, label %101, label %217

101:                                              ; preds = %79
  %102 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %106, label %217

106:                                              ; preds = %101
  %107 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !11
  %109 = icmp sge i32 %108, 0
  br i1 %109, label %110, label %217

110:                                              ; preds = %106
  %111 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !11
  %113 = load i32, ptr @m, align 4, !tbaa !5
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %115, label %217

115:                                              ; preds = %110
  %116 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %118
  %120 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !11
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [10 x i8], ptr %119, i64 0, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !15
  %125 = sext i8 %124 to i32
  %126 = icmp ne i32 %125, 35
  br i1 %126, label %127, label %217

127:                                              ; preds = %115
  %128 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %130
  %132 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !11
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [10 x i8], ptr %131, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !15
  %137 = sext i8 %136 to i32
  %138 = icmp eq i32 %137, 74
  br i1 %138, label %139, label %141

139:                                              ; preds = %127
  %140 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 3
  store i32 1, ptr %140, align 4, !tbaa !13
  br label %145

141:                                              ; preds = %127
  %142 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 3
  %143 = load i32, ptr %142, align 4, !tbaa !13
  %144 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 3
  store i32 %143, ptr %144, align 4, !tbaa !13
  br label %145

145:                                              ; preds = %141, %139
  %146 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %148
  %150 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !11
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [10 x [2 x i32]], ptr %149, i64 0, i64 %152
  %154 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 3
  %155 = load i32, ptr %154, align 4, !tbaa !13
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [2 x i32], ptr %153, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %161

160:                                              ; preds = %145
  br label %218

161:                                              ; preds = %145
  %162 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %163 = load i32, ptr %162, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %164
  %166 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [10 x [2 x i32]], ptr %165, i64 0, i64 %168
  %170 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 3
  %171 = load i32, ptr %170, align 4, !tbaa !13
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [2 x i32], ptr %169, i64 0, i64 %172
  store i32 1, ptr %173, align 4, !tbaa !5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %198, %161
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 2
  %177 = load i32, ptr %176, align 4, !tbaa !12
  %178 = icmp sle i32 %175, %177
  br i1 %178, label %179, label %201

179:                                              ; preds = %174
  %180 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 4
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [90 x i32], ptr %180, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 4
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [90 x i32], ptr %185, i64 0, i64 %187
  store i32 %184, ptr %188, align 4, !tbaa !5
  %189 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 5
  %190 = load i32, ptr %8, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [90 x i32], ptr %189, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 5
  %195 = load i32, ptr %8, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [90 x i32], ptr %194, i64 0, i64 %196
  store i32 %193, ptr %197, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %179
  %199 = load i32, ptr %8, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %8, align 4, !tbaa !5
  br label %174, !llvm.loop !18

201:                                              ; preds = %174
  %202 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 0
  %203 = load i32, ptr %202, align 4, !tbaa !9
  %204 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 4
  %205 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 2
  %206 = load i32, ptr %205, align 4, !tbaa !12
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [90 x i32], ptr %204, i64 0, i64 %207
  store i32 %203, ptr %208, align 4, !tbaa !5
  %209 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 1
  %210 = load i32, ptr %209, align 4, !tbaa !11
  %211 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 5
  %212 = getelementptr inbounds %struct.node, ptr %4, i32 0, i32 2
  %213 = load i32, ptr %212, align 4, !tbaa !12
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [90 x i32], ptr %211, i64 0, i64 %214
  store i32 %210, ptr %215, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 4 dereferenceable(736) %4)
          to label %216 unwind label %45

216:                                              ; preds = %201
  br label %217

217:                                              ; preds = %216, %115, %110, %106, %101, %79
  br label %218

218:                                              ; preds = %217, %160
  %219 = load i32, ptr %7, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %7, align 4, !tbaa !5
  br label %76, !llvm.loop !19

221:                                              ; preds = %76
  br label %32, !llvm.loop !16

222:                                              ; preds = %65, %34
  %223 = load i32, ptr %6, align 4, !tbaa !5
  %224 = icmp eq i32 %223, -1
  br i1 %224, label %225, label %232

225:                                              ; preds = %222
  %226 = load i32, ptr @ans, align 4, !tbaa !5
  %227 = load i32, ptr %2, align 4, !tbaa !5
  %228 = icmp sgt i32 %226, %227
  br i1 %228, label %229, label %231

229:                                              ; preds = %225
  %230 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %230, ptr @ans, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %229, %225
  store i32 1, ptr %9, align 4
  br label %306

232:                                              ; preds = %222
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %298, %232
  %234 = load i32, ptr %7, align 4, !tbaa !5
  %235 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 2
  %236 = load i32, ptr %235, align 4, !tbaa !12
  %237 = icmp sle i32 %234, %236
  br i1 %237, label %238, label %305

238:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  %239 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 4
  %240 = load i32, ptr %7, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [90 x i32], ptr %239, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %244
  %246 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 5
  %247 = load i32, ptr %7, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [90 x i32], ptr %246, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [10 x i8], ptr %245, i64 0, i64 %251
  %253 = load i8, ptr %252, align 1, !tbaa !15
  store i8 %253, ptr %12, align 1, !tbaa !15
  %254 = load i8, ptr %12, align 1, !tbaa !15
  %255 = sext i8 %254 to i32
  %256 = icmp eq i32 %255, 83
  br i1 %256, label %261, label %257

257:                                              ; preds = %238
  %258 = load i8, ptr %12, align 1, !tbaa !15
  %259 = sext i8 %258 to i32
  %260 = icmp eq i32 %259, 69
  br i1 %260, label %261, label %262

261:                                              ; preds = %257, %238
  store i32 12, ptr %9, align 4
  br label %295

262:                                              ; preds = %257
  %263 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 4
  %264 = load i32, ptr %7, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [90 x i32], ptr %263, i64 0, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %268
  %270 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 5
  %271 = load i32, ptr %7, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [90 x i32], ptr %270, i64 0, i64 %272
  %274 = load i32, ptr %273, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [10 x i8], ptr %269, i64 0, i64 %275
  store i8 35, ptr %276, align 1, !tbaa !15
  %277 = load i32, ptr %2, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  invoke void @_Z3dfsi(i32 noundef %278)
          to label %279 unwind label %301

279:                                              ; preds = %262
  %280 = load i8, ptr %12, align 1, !tbaa !15
  %281 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 4
  %282 = load i32, ptr %7, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [90 x i32], ptr %281, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %286
  %288 = getelementptr inbounds %struct.node, ptr %5, i32 0, i32 5
  %289 = load i32, ptr %7, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [90 x i32], ptr %288, i64 0, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [10 x i8], ptr %287, i64 0, i64 %293
  store i8 %280, ptr %294, align 1, !tbaa !15
  store i32 0, ptr %9, align 4
  br label %295

295:                                              ; preds = %279, %261
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  %296 = load i32, ptr %9, align 4
  switch i32 %296, label %315 [
    i32 0, label %297
    i32 12, label %298
  ]

297:                                              ; preds = %295
  br label %298

298:                                              ; preds = %297, %295
  %299 = load i32, ptr %7, align 4, !tbaa !5
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %7, align 4, !tbaa !5
  br label %233, !llvm.loop !20

301:                                              ; preds = %262
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %10, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %309

305:                                              ; preds = %233
  store i32 0, ptr %9, align 4
  br label %306

306:                                              ; preds = %305, %231, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 736, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 736, ptr %4) #6
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #6
  %307 = load i32, ptr %9, align 4
  switch i32 %307, label %315 [
    i32 0, label %308
    i32 1, label %308
  ]

308:                                              ; preds = %306, %306
  ret void

309:                                              ; preds = %301, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 736, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 736, ptr %4) #6
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %3) #6
  br label %310

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

315:                                              ; preds = %306, %295
  unreachable
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueI4nodeSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

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

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

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

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

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

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


; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl" }
%"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl" = type { %"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl_data" }
%"struct.std::_Deque_base<node, std::allocator<node>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%struct.node = type { i32, i32, i32, i32, [90 x i32], [90 x i32] }

@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@sx = external dso_local local_unnamed_addr global i32, align 4
@sy = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@time = external dso_local local_unnamed_addr global i32, align 4
@map = external dso_local local_unnamed_addr global [10 x [10 x i8]], align 16
@v = external dso_local local_unnamed_addr global [10 x [10 x [2 x i32]]], align 16
@yi = external dso_local local_unnamed_addr global [4 x [2 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsi(i32 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::queue", align 8
  %3 = alloca %struct.node, align 4
  %4 = alloca %struct.node, align 4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %2) #6
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.lifetime.start.p0(i64 736, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 736, ptr nonnull %4) #6
  %5 = load i32, ptr @ans, align 4, !tbaa !5
  %6 = icmp slt i32 %5, %0
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %1
  %8 = load i32, ptr @sx, align 4, !tbaa !5
  store i32 %8, ptr %3, align 4, !tbaa !9
  %9 = load i32, ptr @sy, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 %9, ptr %10, align 4, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 0, ptr %11, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 0, ptr %12, align 4, !tbaa !13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800) @v, i8 0, i64 800, i1 false)
  %13 = sext i32 %8 to i64
  %14 = sext i32 %9 to i64
  %15 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %13, i64 %14
  store i32 1, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.preheader52 unwind label %.loopexit.split-lp

.preheader52:                                     ; preds = %7
  %16 = call noundef zeroext i1 @_ZNKSt5queueI4nodeSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br i1 %16, label %.critedge, label %.lr.ph57

.lr.ph57:                                         ; preds = %.preheader52
  %17 = getelementptr inbounds i8, ptr %4, i64 8
  %18 = getelementptr inbounds i8, ptr %4, i64 4
  %19 = getelementptr inbounds i8, ptr %4, i64 12
  %20 = getelementptr inbounds i8, ptr %4, i64 16
  %21 = getelementptr inbounds i8, ptr %3, i64 16
  %22 = getelementptr inbounds i8, ptr %4, i64 376
  %23 = getelementptr inbounds i8, ptr %3, i64 376
  br label %24

24:                                               ; preds = %.lr.ph57, %.backedge
  %25 = call noundef nonnull align 4 dereferenceable(736) ptr @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(736) %4, ptr noundef nonnull align 4 dereferenceable(736) %25, i64 736, i1 false), !tbaa.struct !14
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  %26 = load i32, ptr %17, align 4, !tbaa !12
  %.fr = freeze i32 %26
  %27 = load i32, ptr @time, align 4, !tbaa !5
  %28 = icmp sgt i32 %.fr, %27
  br i1 %28, label %.backedge, label %30

.backedge:                                        ; preds = %.split.3, %280, %286, %292, %._crit_edge.3, %.split.us.3, %137, %143, %149, %153, %24
  %29 = call noundef zeroext i1 @_ZNKSt5queueI4nodeSt5dequeIS0_SaIS0_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
  br i1 %29, label %.critedge, label %24, !llvm.loop !16

.loopexit51.split:                                ; preds = %._crit_edge.3, %._crit_edge.2, %._crit_edge.1, %._crit_edge
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit51

.loopexit.split-lp:                               ; preds = %7
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit51

30:                                               ; preds = %24
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = load i32, ptr %18, align 4, !tbaa !11
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %32, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !15
  %37 = icmp eq i8 %36, 69
  %38 = load i32, ptr %19, align 4
  %39 = icmp ne i32 %38, 0
  %or.cond = select i1 %37, i1 %39, i1 false
  br i1 %or.cond, label %40, label %44

40:                                               ; preds = %30
  %41 = icmp eq i32 %.fr, -1
  br i1 %41, label %.critedge, label %.preheader

.preheader:                                       ; preds = %40
  %.not4658 = icmp slt i32 %.fr, 1
  br i1 %.not4658, label %.loopexit, label %.lr.ph60

.lr.ph60:                                         ; preds = %.preheader
  %42 = add nsw i32 %0, 1
  %43 = add nuw i32 %.fr, 1
  %wide.trip.count77 = zext i32 %43 to i64
  br label %318

44:                                               ; preds = %30
  %45 = add i32 %.fr, 1
  store i32 %45, ptr %11, align 4, !tbaa !12
  store i32 %38, ptr %12, align 4, !tbaa !13
  %.not4554 = icmp slt i32 %.fr, 1
  %46 = load i32, ptr @yi, align 16, !tbaa !5
  %47 = add nsw i32 %46, %31
  store i32 %47, ptr %3, align 4, !tbaa !9
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 4), align 4, !tbaa !5
  %49 = add nsw i32 %48, %33
  store i32 %49, ptr %10, align 4, !tbaa !11
  %50 = icmp sgt i32 %47, -1
  br i1 %.not4554, label %.split.us.preheader, label %.split.preheader

.split.preheader:                                 ; preds = %44
  br i1 %50, label %161, label %.split.1

.split.us.preheader:                              ; preds = %44
  br i1 %50, label %51, label %.split.us.1

51:                                               ; preds = %.split.us.preheader
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = icmp slt i32 %47, %52
  %54 = icmp sgt i32 %49, -1
  %or.cond5.us = select i1 %53, i1 %54, i1 false
  %55 = load i32, ptr @m, align 4
  %56 = icmp slt i32 %49, %55
  %or.cond49.us = select i1 %or.cond5.us, i1 %56, i1 false
  br i1 %or.cond49.us, label %57, label %.split.us.1

57:                                               ; preds = %51
  %58 = zext nneg i32 %47 to i64
  %59 = zext nneg i32 %49 to i64
  %60 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %58, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !15
  switch i8 %61, label %62 [
    i8 35, label %.split.us.1
    i8 74, label %63
  ]

62:                                               ; preds = %57
  br label %63

63:                                               ; preds = %62, %57
  %storemerge.us = phi i32 [ %38, %62 ], [ 1, %57 ]
  store i32 %storemerge.us, ptr %12, align 4, !tbaa !13
  %64 = sext i32 %storemerge.us to i64
  %65 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %58, i64 %59, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %.not44.us = icmp eq i32 %66, 0
  br i1 %.not44.us, label %67, label %.split.us.1

67:                                               ; preds = %63
  store i32 1, ptr %65, align 4, !tbaa !5
  %68 = sext i32 %45 to i64
  %69 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %68
  store i32 %47, ptr %69, align 4, !tbaa !5
  %70 = load i32, ptr %10, align 4, !tbaa !11
  %71 = load i32, ptr %11, align 4, !tbaa !12
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %72
  store i32 %70, ptr %73, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.split.us.1 unwind label %.loopexit51.split.us

.split.us.1:                                      ; preds = %67, %63, %57, %51, %.split.us.preheader
  %74 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 8), align 8, !tbaa !5
  %75 = add nsw i32 %74, %31
  store i32 %75, ptr %3, align 4, !tbaa !9
  %76 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 12), align 4, !tbaa !5
  %77 = add nsw i32 %76, %33
  store i32 %77, ptr %10, align 4, !tbaa !11
  %78 = icmp sgt i32 %75, -1
  br i1 %78, label %79, label %.split.us.2

79:                                               ; preds = %.split.us.1
  %80 = load i32, ptr @n, align 4, !tbaa !5
  %81 = icmp slt i32 %75, %80
  %82 = icmp sgt i32 %77, -1
  %or.cond5.us.1 = select i1 %81, i1 %82, i1 false
  %83 = load i32, ptr @m, align 4
  %84 = icmp slt i32 %77, %83
  %or.cond49.us.1 = select i1 %or.cond5.us.1, i1 %84, i1 false
  br i1 %or.cond49.us.1, label %85, label %.split.us.2

85:                                               ; preds = %79
  %86 = zext nneg i32 %75 to i64
  %87 = zext nneg i32 %77 to i64
  %88 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %86, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !15
  switch i8 %89, label %90 [
    i8 35, label %.split.us.2
    i8 74, label %91
  ]

90:                                               ; preds = %85
  br label %91

91:                                               ; preds = %90, %85
  %storemerge.us.1 = phi i32 [ %38, %90 ], [ 1, %85 ]
  store i32 %storemerge.us.1, ptr %12, align 4, !tbaa !13
  %92 = sext i32 %storemerge.us.1 to i64
  %93 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %86, i64 %87, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %.not44.us.1 = icmp eq i32 %94, 0
  br i1 %.not44.us.1, label %95, label %.split.us.2

95:                                               ; preds = %91
  store i32 1, ptr %93, align 4, !tbaa !5
  %96 = load i32, ptr %11, align 4, !tbaa !12
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %97
  store i32 %75, ptr %98, align 4, !tbaa !5
  %99 = load i32, ptr %10, align 4, !tbaa !11
  %100 = load i32, ptr %11, align 4, !tbaa !12
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %101
  store i32 %99, ptr %102, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.split.us.2 unwind label %.loopexit51.split.us

.split.us.2:                                      ; preds = %95, %91, %85, %79, %.split.us.1
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 16), align 16, !tbaa !5
  %104 = add nsw i32 %103, %31
  store i32 %104, ptr %3, align 4, !tbaa !9
  %105 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 20), align 4, !tbaa !5
  %106 = add nsw i32 %105, %33
  store i32 %106, ptr %10, align 4, !tbaa !11
  %107 = icmp sgt i32 %104, -1
  br i1 %107, label %108, label %.split.us.3

108:                                              ; preds = %.split.us.2
  %109 = load i32, ptr @n, align 4, !tbaa !5
  %110 = icmp slt i32 %104, %109
  %111 = icmp sgt i32 %106, -1
  %or.cond5.us.2 = select i1 %110, i1 %111, i1 false
  %112 = load i32, ptr @m, align 4
  %113 = icmp slt i32 %106, %112
  %or.cond49.us.2 = select i1 %or.cond5.us.2, i1 %113, i1 false
  br i1 %or.cond49.us.2, label %114, label %.split.us.3

114:                                              ; preds = %108
  %115 = zext nneg i32 %104 to i64
  %116 = zext nneg i32 %106 to i64
  %117 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %115, i64 %116
  %118 = load i8, ptr %117, align 1, !tbaa !15
  switch i8 %118, label %119 [
    i8 35, label %.split.us.3
    i8 74, label %120
  ]

119:                                              ; preds = %114
  br label %120

120:                                              ; preds = %119, %114
  %storemerge.us.2 = phi i32 [ %38, %119 ], [ 1, %114 ]
  store i32 %storemerge.us.2, ptr %12, align 4, !tbaa !13
  %121 = sext i32 %storemerge.us.2 to i64
  %122 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %115, i64 %116, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %.not44.us.2 = icmp eq i32 %123, 0
  br i1 %.not44.us.2, label %124, label %.split.us.3

124:                                              ; preds = %120
  store i32 1, ptr %122, align 4, !tbaa !5
  %125 = load i32, ptr %11, align 4, !tbaa !12
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %126
  store i32 %104, ptr %127, align 4, !tbaa !5
  %128 = load i32, ptr %10, align 4, !tbaa !11
  %129 = load i32, ptr %11, align 4, !tbaa !12
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %130
  store i32 %128, ptr %131, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.split.us.3 unwind label %.loopexit51.split.us

.split.us.3:                                      ; preds = %124, %120, %114, %108, %.split.us.2
  %132 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 24), align 8, !tbaa !5
  %133 = add nsw i32 %132, %31
  store i32 %133, ptr %3, align 4, !tbaa !9
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 28), align 4, !tbaa !5
  %135 = add nsw i32 %134, %33
  store i32 %135, ptr %10, align 4, !tbaa !11
  %136 = icmp sgt i32 %133, -1
  br i1 %136, label %137, label %.backedge

137:                                              ; preds = %.split.us.3
  %138 = load i32, ptr @n, align 4, !tbaa !5
  %139 = icmp slt i32 %133, %138
  %140 = icmp sgt i32 %135, -1
  %or.cond5.us.3 = select i1 %139, i1 %140, i1 false
  %141 = load i32, ptr @m, align 4
  %142 = icmp slt i32 %135, %141
  %or.cond49.us.3 = select i1 %or.cond5.us.3, i1 %142, i1 false
  br i1 %or.cond49.us.3, label %143, label %.backedge

143:                                              ; preds = %137
  %144 = zext nneg i32 %133 to i64
  %145 = zext nneg i32 %135 to i64
  %146 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %144, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !15
  switch i8 %147, label %148 [
    i8 35, label %.backedge
    i8 74, label %149
  ]

148:                                              ; preds = %143
  br label %149

149:                                              ; preds = %148, %143
  %storemerge.us.3 = phi i32 [ %38, %148 ], [ 1, %143 ]
  store i32 %storemerge.us.3, ptr %12, align 4, !tbaa !13
  %150 = sext i32 %storemerge.us.3 to i64
  %151 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %144, i64 %145, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %.not44.us.3 = icmp eq i32 %152, 0
  br i1 %.not44.us.3, label %153, label %.backedge

153:                                              ; preds = %149
  store i32 1, ptr %151, align 4, !tbaa !5
  %154 = load i32, ptr %11, align 4, !tbaa !12
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %155
  store i32 %133, ptr %156, align 4, !tbaa !5
  %157 = load i32, ptr %10, align 4, !tbaa !11
  %158 = load i32, ptr %11, align 4, !tbaa !12
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %159
  store i32 %157, ptr %160, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.backedge unwind label %.loopexit51.split.us

.loopexit51.split.us:                             ; preds = %153, %124, %95, %67
  %lpad.loopexit.us = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit51

161:                                              ; preds = %.split.preheader
  %162 = load i32, ptr @n, align 4, !tbaa !5
  %163 = icmp slt i32 %47, %162
  %164 = icmp sgt i32 %49, -1
  %or.cond5 = select i1 %163, i1 %164, i1 false
  %165 = load i32, ptr @m, align 4
  %166 = icmp slt i32 %49, %165
  %or.cond49 = select i1 %or.cond5, i1 %166, i1 false
  br i1 %or.cond49, label %167, label %.split.1

167:                                              ; preds = %161
  %168 = zext nneg i32 %47 to i64
  %169 = zext nneg i32 %49 to i64
  %170 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %168, i64 %169
  %171 = load i8, ptr %170, align 1, !tbaa !15
  switch i8 %171, label %172 [
    i8 35, label %.split.1
    i8 74, label %173
  ]

172:                                              ; preds = %167
  br label %173

173:                                              ; preds = %167, %172
  %storemerge = phi i32 [ %38, %172 ], [ 1, %167 ]
  store i32 %storemerge, ptr %12, align 4, !tbaa !13
  %174 = sext i32 %storemerge to i64
  %175 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %168, i64 %169, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %.not44 = icmp eq i32 %176, 0
  br i1 %.not44, label %.lr.ph, label %.split.1

.lr.ph:                                           ; preds = %173
  store i32 1, ptr %175, align 4, !tbaa !5
  %wide.trip.count = zext i32 %45 to i64
  %177 = add nsw i64 %wide.trip.count, -1
  %min.iters.check118 = icmp ult i32 %45, 5
  br i1 %min.iters.check118, label %scalar.ph117.preheader, label %vector.ph119

vector.ph119:                                     ; preds = %.lr.ph
  %n.vec121 = and i64 %177, -4
  %ind.end122 = or disjoint i64 %n.vec121, 1
  br label %vector.body124

vector.body124:                                   ; preds = %vector.body124, %vector.ph119
  %index125 = phi i64 [ 0, %vector.ph119 ], [ %index.next129, %vector.body124 ]
  %offset.idx126 = or disjoint i64 %index125, 1
  %178 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %offset.idx126
  %wide.load127 = load <4 x i32>, ptr %178, align 4, !tbaa !5
  %179 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %offset.idx126
  store <4 x i32> %wide.load127, ptr %179, align 4, !tbaa !5
  %180 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %offset.idx126
  %wide.load128 = load <4 x i32>, ptr %180, align 4, !tbaa !5
  %181 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %offset.idx126
  store <4 x i32> %wide.load128, ptr %181, align 4, !tbaa !5
  %index.next129 = add nuw i64 %index125, 4
  %182 = icmp eq i64 %index.next129, %n.vec121
  br i1 %182, label %middle.block116, label %vector.body124, !llvm.loop !18

middle.block116:                                  ; preds = %vector.body124
  %cmp.n130 = icmp eq i64 %177, %n.vec121
  br i1 %cmp.n130, label %._crit_edge, label %scalar.ph117.preheader

scalar.ph117.preheader:                           ; preds = %middle.block116, %.lr.ph
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph ], [ %ind.end122, %middle.block116 ]
  br label %scalar.ph117

scalar.ph117:                                     ; preds = %scalar.ph117.preheader, %scalar.ph117
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph117 ], [ %indvars.iv.ph, %scalar.ph117.preheader ]
  %183 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %indvars.iv
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %indvars.iv
  store i32 %184, ptr %185, align 4, !tbaa !5
  %186 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %indvars.iv
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %indvars.iv
  store i32 %187, ptr %188, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph117, !llvm.loop !21

._crit_edge:                                      ; preds = %scalar.ph117, %middle.block116
  %189 = sext i32 %45 to i64
  %190 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %189
  store i32 %47, ptr %190, align 4, !tbaa !5
  %191 = load i32, ptr %10, align 4, !tbaa !11
  %192 = load i32, ptr %11, align 4, !tbaa !12
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %193
  store i32 %191, ptr %194, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.split.1 unwind label %.loopexit51.split

.split.1:                                         ; preds = %167, %.split.preheader, %161, %._crit_edge, %173
  %195 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 8), align 8, !tbaa !5
  %196 = add nsw i32 %195, %31
  store i32 %196, ptr %3, align 4, !tbaa !9
  %197 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 12), align 4, !tbaa !5
  %198 = add nsw i32 %197, %33
  store i32 %198, ptr %10, align 4, !tbaa !11
  %199 = icmp sgt i32 %196, -1
  br i1 %199, label %200, label %.split.2

200:                                              ; preds = %.split.1
  %201 = load i32, ptr @n, align 4, !tbaa !5
  %202 = icmp slt i32 %196, %201
  %203 = icmp sgt i32 %198, -1
  %or.cond5.1 = select i1 %202, i1 %203, i1 false
  %204 = load i32, ptr @m, align 4
  %205 = icmp slt i32 %198, %204
  %or.cond49.1 = select i1 %or.cond5.1, i1 %205, i1 false
  br i1 %or.cond49.1, label %206, label %.split.2

206:                                              ; preds = %200
  %207 = zext nneg i32 %196 to i64
  %208 = zext nneg i32 %198 to i64
  %209 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %207, i64 %208
  %210 = load i8, ptr %209, align 1, !tbaa !15
  switch i8 %210, label %211 [
    i8 35, label %.split.2
    i8 74, label %212
  ]

211:                                              ; preds = %206
  br label %212

212:                                              ; preds = %211, %206
  %storemerge.1 = phi i32 [ %38, %211 ], [ 1, %206 ]
  store i32 %storemerge.1, ptr %12, align 4, !tbaa !13
  %213 = sext i32 %storemerge.1 to i64
  %214 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %207, i64 %208, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %.not44.1 = icmp eq i32 %215, 0
  br i1 %.not44.1, label %.lr.ph.1, label %.split.2

.lr.ph.1:                                         ; preds = %212
  store i32 1, ptr %214, align 4, !tbaa !5
  %wide.trip.count.1 = zext i32 %45 to i64
  %216 = add nsw i64 %wide.trip.count.1, -1
  %min.iters.check103 = icmp ult i32 %45, 5
  br i1 %min.iters.check103, label %scalar.ph102.preheader, label %vector.ph104

vector.ph104:                                     ; preds = %.lr.ph.1
  %n.vec106 = and i64 %216, -4
  %ind.end107 = or disjoint i64 %n.vec106, 1
  br label %vector.body109

vector.body109:                                   ; preds = %vector.body109, %vector.ph104
  %index110 = phi i64 [ 0, %vector.ph104 ], [ %index.next114, %vector.body109 ]
  %offset.idx111 = or disjoint i64 %index110, 1
  %217 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %offset.idx111
  %wide.load112 = load <4 x i32>, ptr %217, align 4, !tbaa !5
  %218 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %offset.idx111
  store <4 x i32> %wide.load112, ptr %218, align 4, !tbaa !5
  %219 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %offset.idx111
  %wide.load113 = load <4 x i32>, ptr %219, align 4, !tbaa !5
  %220 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %offset.idx111
  store <4 x i32> %wide.load113, ptr %220, align 4, !tbaa !5
  %index.next114 = add nuw i64 %index110, 4
  %221 = icmp eq i64 %index.next114, %n.vec106
  br i1 %221, label %middle.block101, label %vector.body109, !llvm.loop !22

middle.block101:                                  ; preds = %vector.body109
  %cmp.n115 = icmp eq i64 %216, %n.vec106
  br i1 %cmp.n115, label %._crit_edge.1, label %scalar.ph102.preheader

scalar.ph102.preheader:                           ; preds = %middle.block101, %.lr.ph.1
  %indvars.iv.1.ph = phi i64 [ 1, %.lr.ph.1 ], [ %ind.end107, %middle.block101 ]
  br label %scalar.ph102

scalar.ph102:                                     ; preds = %scalar.ph102.preheader, %scalar.ph102
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %scalar.ph102 ], [ %indvars.iv.1.ph, %scalar.ph102.preheader ]
  %222 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %indvars.iv.1
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %indvars.iv.1
  store i32 %223, ptr %224, align 4, !tbaa !5
  %225 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %indvars.iv.1
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %indvars.iv.1
  store i32 %226, ptr %227, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1
  %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %wide.trip.count.1
  br i1 %exitcond.1.not, label %._crit_edge.1, label %scalar.ph102, !llvm.loop !23

._crit_edge.1:                                    ; preds = %scalar.ph102, %middle.block101
  %228 = load i32, ptr %11, align 4, !tbaa !12
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %229
  store i32 %196, ptr %230, align 4, !tbaa !5
  %231 = load i32, ptr %10, align 4, !tbaa !11
  %232 = load i32, ptr %11, align 4, !tbaa !12
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %233
  store i32 %231, ptr %234, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.split.2 unwind label %.loopexit51.split

.split.2:                                         ; preds = %._crit_edge.1, %212, %206, %200, %.split.1
  %235 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 16), align 16, !tbaa !5
  %236 = add nsw i32 %235, %31
  store i32 %236, ptr %3, align 4, !tbaa !9
  %237 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 20), align 4, !tbaa !5
  %238 = add nsw i32 %237, %33
  store i32 %238, ptr %10, align 4, !tbaa !11
  %239 = icmp sgt i32 %236, -1
  br i1 %239, label %240, label %.split.3

240:                                              ; preds = %.split.2
  %241 = load i32, ptr @n, align 4, !tbaa !5
  %242 = icmp slt i32 %236, %241
  %243 = icmp sgt i32 %238, -1
  %or.cond5.2 = select i1 %242, i1 %243, i1 false
  %244 = load i32, ptr @m, align 4
  %245 = icmp slt i32 %238, %244
  %or.cond49.2 = select i1 %or.cond5.2, i1 %245, i1 false
  br i1 %or.cond49.2, label %246, label %.split.3

246:                                              ; preds = %240
  %247 = zext nneg i32 %236 to i64
  %248 = zext nneg i32 %238 to i64
  %249 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %247, i64 %248
  %250 = load i8, ptr %249, align 1, !tbaa !15
  switch i8 %250, label %251 [
    i8 35, label %.split.3
    i8 74, label %252
  ]

251:                                              ; preds = %246
  br label %252

252:                                              ; preds = %251, %246
  %storemerge.2 = phi i32 [ %38, %251 ], [ 1, %246 ]
  store i32 %storemerge.2, ptr %12, align 4, !tbaa !13
  %253 = sext i32 %storemerge.2 to i64
  %254 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %247, i64 %248, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %.not44.2 = icmp eq i32 %255, 0
  br i1 %.not44.2, label %.lr.ph.2, label %.split.3

.lr.ph.2:                                         ; preds = %252
  store i32 1, ptr %254, align 4, !tbaa !5
  %wide.trip.count.2 = zext i32 %45 to i64
  %256 = add nsw i64 %wide.trip.count.2, -1
  %min.iters.check88 = icmp ult i32 %45, 5
  br i1 %min.iters.check88, label %scalar.ph87.preheader, label %vector.ph89

vector.ph89:                                      ; preds = %.lr.ph.2
  %n.vec91 = and i64 %256, -4
  %ind.end92 = or disjoint i64 %n.vec91, 1
  br label %vector.body94

vector.body94:                                    ; preds = %vector.body94, %vector.ph89
  %index95 = phi i64 [ 0, %vector.ph89 ], [ %index.next99, %vector.body94 ]
  %offset.idx96 = or disjoint i64 %index95, 1
  %257 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %offset.idx96
  %wide.load97 = load <4 x i32>, ptr %257, align 4, !tbaa !5
  %258 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %offset.idx96
  store <4 x i32> %wide.load97, ptr %258, align 4, !tbaa !5
  %259 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %offset.idx96
  %wide.load98 = load <4 x i32>, ptr %259, align 4, !tbaa !5
  %260 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %offset.idx96
  store <4 x i32> %wide.load98, ptr %260, align 4, !tbaa !5
  %index.next99 = add nuw i64 %index95, 4
  %261 = icmp eq i64 %index.next99, %n.vec91
  br i1 %261, label %middle.block86, label %vector.body94, !llvm.loop !24

middle.block86:                                   ; preds = %vector.body94
  %cmp.n100 = icmp eq i64 %256, %n.vec91
  br i1 %cmp.n100, label %._crit_edge.2, label %scalar.ph87.preheader

scalar.ph87.preheader:                            ; preds = %middle.block86, %.lr.ph.2
  %indvars.iv.2.ph = phi i64 [ 1, %.lr.ph.2 ], [ %ind.end92, %middle.block86 ]
  br label %scalar.ph87

scalar.ph87:                                      ; preds = %scalar.ph87.preheader, %scalar.ph87
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %scalar.ph87 ], [ %indvars.iv.2.ph, %scalar.ph87.preheader ]
  %262 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %indvars.iv.2
  %263 = load i32, ptr %262, align 4, !tbaa !5
  %264 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %indvars.iv.2
  store i32 %263, ptr %264, align 4, !tbaa !5
  %265 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %indvars.iv.2
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %indvars.iv.2
  store i32 %266, ptr %267, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1
  %exitcond.2.not = icmp eq i64 %indvars.iv.next.2, %wide.trip.count.2
  br i1 %exitcond.2.not, label %._crit_edge.2, label %scalar.ph87, !llvm.loop !25

._crit_edge.2:                                    ; preds = %scalar.ph87, %middle.block86
  %268 = load i32, ptr %11, align 4, !tbaa !12
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %269
  store i32 %236, ptr %270, align 4, !tbaa !5
  %271 = load i32, ptr %10, align 4, !tbaa !11
  %272 = load i32, ptr %11, align 4, !tbaa !12
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %273
  store i32 %271, ptr %274, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.split.3 unwind label %.loopexit51.split

.split.3:                                         ; preds = %._crit_edge.2, %252, %246, %240, %.split.2
  %275 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 24), align 8, !tbaa !5
  %276 = add nsw i32 %275, %31
  store i32 %276, ptr %3, align 4, !tbaa !9
  %277 = load i32, ptr getelementptr inbounds (i8, ptr @yi, i64 28), align 4, !tbaa !5
  %278 = add nsw i32 %277, %33
  store i32 %278, ptr %10, align 4, !tbaa !11
  %279 = icmp sgt i32 %276, -1
  br i1 %279, label %280, label %.backedge

280:                                              ; preds = %.split.3
  %281 = load i32, ptr @n, align 4, !tbaa !5
  %282 = icmp slt i32 %276, %281
  %283 = icmp sgt i32 %278, -1
  %or.cond5.3 = select i1 %282, i1 %283, i1 false
  %284 = load i32, ptr @m, align 4
  %285 = icmp slt i32 %278, %284
  %or.cond49.3 = select i1 %or.cond5.3, i1 %285, i1 false
  br i1 %or.cond49.3, label %286, label %.backedge

286:                                              ; preds = %280
  %287 = zext nneg i32 %276 to i64
  %288 = zext nneg i32 %278 to i64
  %289 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %287, i64 %288
  %290 = load i8, ptr %289, align 1, !tbaa !15
  switch i8 %290, label %291 [
    i8 35, label %.backedge
    i8 74, label %292
  ]

291:                                              ; preds = %286
  br label %292

292:                                              ; preds = %291, %286
  %storemerge.3 = phi i32 [ %38, %291 ], [ 1, %286 ]
  store i32 %storemerge.3, ptr %12, align 4, !tbaa !13
  %293 = sext i32 %storemerge.3 to i64
  %294 = getelementptr inbounds [10 x [10 x [2 x i32]]], ptr @v, i64 0, i64 %287, i64 %288, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !5
  %.not44.3 = icmp eq i32 %295, 0
  br i1 %.not44.3, label %.lr.ph.3, label %.backedge

.lr.ph.3:                                         ; preds = %292
  store i32 1, ptr %294, align 4, !tbaa !5
  %wide.trip.count.3 = zext i32 %45 to i64
  %296 = add nsw i64 %wide.trip.count.3, -1
  %min.iters.check = icmp ult i32 %45, 5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.3
  %n.vec = and i64 %296, -4
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %297 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %offset.idx
  %wide.load = load <4 x i32>, ptr %297, align 4, !tbaa !5
  %298 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %offset.idx
  store <4 x i32> %wide.load, ptr %298, align 4, !tbaa !5
  %299 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %offset.idx
  %wide.load85 = load <4 x i32>, ptr %299, align 4, !tbaa !5
  %300 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %offset.idx
  store <4 x i32> %wide.load85, ptr %300, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %301 = icmp eq i64 %index.next, %n.vec
  br i1 %301, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %296, %n.vec
  br i1 %cmp.n, label %._crit_edge.3, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph.3
  %indvars.iv.3.ph = phi i64 [ 1, %.lr.ph.3 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.3.ph, %scalar.ph.preheader ]
  %302 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %indvars.iv.3
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %indvars.iv.3
  store i32 %303, ptr %304, align 4, !tbaa !5
  %305 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %indvars.iv.3
  %306 = load i32, ptr %305, align 4, !tbaa !5
  %307 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %indvars.iv.3
  store i32 %306, ptr %307, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1
  %exitcond.3.not = icmp eq i64 %indvars.iv.next.3, %wide.trip.count.3
  br i1 %exitcond.3.not, label %._crit_edge.3, label %scalar.ph, !llvm.loop !27

._crit_edge.3:                                    ; preds = %scalar.ph, %middle.block
  %308 = load i32, ptr %11, align 4, !tbaa !12
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [90 x i32], ptr %21, i64 0, i64 %309
  store i32 %276, ptr %310, align 4, !tbaa !5
  %311 = load i32, ptr %10, align 4, !tbaa !11
  %312 = load i32, ptr %11, align 4, !tbaa !12
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [90 x i32], ptr %23, i64 0, i64 %313
  store i32 %311, ptr %314, align 4, !tbaa !5
  invoke void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEE4pushERKS0_(ptr noundef nonnull align 8 dereferenceable(80) %2, ptr noundef nonnull align 4 dereferenceable(736) %3)
          to label %.backedge unwind label %.loopexit51.split

.critedge:                                        ; preds = %.backedge, %.preheader52, %40
  %315 = load i32, ptr @ans, align 4, !tbaa !5
  %316 = icmp sgt i32 %315, %0
  br i1 %316, label %317, label %.loopexit

317:                                              ; preds = %.critedge
  store i32 %0, ptr @ans, align 4, !tbaa !5
  br label %.loopexit

318:                                              ; preds = %.lr.ph60, %329
  %indvars.iv74 = phi i64 [ 1, %.lr.ph60 ], [ %indvars.iv.next75, %329 ]
  %319 = getelementptr inbounds [90 x i32], ptr %20, i64 0, i64 %indvars.iv74
  %320 = load i32, ptr %319, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [90 x i32], ptr %22, i64 0, i64 %indvars.iv74
  %323 = load i32, ptr %322, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [10 x [10 x i8]], ptr @map, i64 0, i64 %321, i64 %324
  %326 = load i8, ptr %325, align 1, !tbaa !15
  switch i8 %326, label %327 [
    i8 83, label %329
    i8 69, label %329
  ]

327:                                              ; preds = %318
  store i8 35, ptr %325, align 1, !tbaa !15
  invoke void @_Z3dfsi(i32 noundef %42)
          to label %328 unwind label %330

328:                                              ; preds = %327
  store i8 %326, ptr %325, align 1, !tbaa !15
  br label %329

329:                                              ; preds = %318, %318, %328
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count77
  br i1 %exitcond78.not, label %.loopexit, label %318, !llvm.loop !28

330:                                              ; preds = %327
  %331 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit51

.loopexit:                                        ; preds = %329, %.preheader, %.critedge, %317, %1
  call void @llvm.lifetime.end.p0(i64 736, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 736, ptr nonnull %3) #6
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #6
  ret void

.loopexit51:                                      ; preds = %.loopexit.split-lp, %.loopexit51.split.us, %.loopexit51.split, %330
  %.pn = phi { ptr, i32 } [ %331, %330 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit, %.loopexit51.split ], [ %lpad.loopexit.us, %.loopexit51.split.us ]
  call void @llvm.lifetime.end.p0(i64 736, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 736, ptr nonnull %3) #6
  call void @_ZNSt5queueI4nodeSt5dequeIS0_SaIS0_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %2) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %2) #6
  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) #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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


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