; LLVM IR from MarekKowalski/MazeSolver :: source/main.ll (Z18getPathThroughMazePhS_iiiiiib)

; 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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18getPathThroughMazePhS_iiiiiib(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i1 noundef zeroext %8) #1 personality ptr @__gxx_personality_v0 {
  %10 = alloca ptr, align 8
  %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 i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::queue", align 8
  %22 = alloca %"struct.std::pair", align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i8, align 1
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::pair", align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca %"struct.std::pair", align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca double, align 8
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i32 %5, ptr %15, align 4, !tbaa !9
  store i32 %6, ptr %16, align 4, !tbaa !9
  store i32 %7, ptr %17, align 4, !tbaa !9
  %52 = zext i1 %8 to i8
  store i8 %52, ptr %18, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = mul nsw i32 %53, %54
  %56 = sext i32 %55 to i64
  %57 = call noalias ptr @calloc(i64 noundef %56, i64 noundef 1) #8
  store ptr %57, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %13, align 4, !tbaa !9
  %60 = mul nsw i32 %58, %59
  %61 = sext i32 %60 to i64
  %62 = call noalias ptr @calloc(i64 noundef %61, i64 noundef 4) #8
  store ptr %62, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %21) #7
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %63 unwind label %109

63:                                               ; preds = %9
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %21, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %64 unwind label %109

64:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  %65 = load ptr, ptr %20, align 8, !tbaa !5
  %66 = load i32, ptr %14, align 4, !tbaa !9
  %67 = load i32, ptr %15, align 4, !tbaa !9
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = mul nsw i32 %67, %68
  %70 = add nsw i32 %66, %69
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %65, i64 %71
  store i32 1, ptr %72, align 4, !tbaa !9
  %73 = load ptr, ptr %19, align 8, !tbaa !5
  %74 = load i32, ptr %14, align 4, !tbaa !9
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = mul nsw i32 %75, %76
  %78 = add nsw i32 %74, %77
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %73, i64 %79
  store i8 1, ptr %80, align 1, !tbaa !13
  %81 = invoke i32 (ptr, ...) @printf(ptr noundef @.str)
          to label %82 unwind label %113

82:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #7
  store i8 0, ptr %25, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %247, %82
  %84 = invoke noundef i64 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %21)
          to label %85 unwind label %117

85:                                               ; preds = %83
  %86 = icmp ugt i64 %84, 0
  br i1 %86, label %87, label %249

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %88 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %21)
          to label %89 unwind label %121

89:                                               ; preds = %87
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %88, i64 8, i1 false)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %21)
          to label %90 unwind label %121

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %91 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 0
  %92 = load i32, ptr %91, align 4, !tbaa !14
  store i32 %92, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %93 = getelementptr inbounds %"struct.std::pair", ptr %27, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !16
  store i32 %94, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %95 = load ptr, ptr %20, align 8, !tbaa !5
  %96 = load i32, ptr %28, align 4, !tbaa !9
  %97 = load i32, ptr %29, align 4, !tbaa !9
  %98 = load i32, ptr %12, align 4, !tbaa !9
  %99 = mul nsw i32 %97, %98
  %100 = add nsw i32 %96, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %95, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  store i32 %103, ptr %30, align 4, !tbaa !9
  %104 = load i32, ptr %30, align 4, !tbaa !9
  %105 = load i32, ptr %26, align 4, !tbaa !9
  %106 = icmp ugt i32 %104, %105
  br i1 %106, label %107, label %125

107:                                              ; preds = %90
  %108 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %108, ptr %26, align 4, !tbaa !9
  br label %125

109:                                              ; preds = %63, %9
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %23, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %534

113:                                              ; preds = %64
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %23, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %24, align 4
  br label %534

117:                                              ; preds = %369, %313, %83
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %23, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %24, align 4
  br label %533

121:                                              ; preds = %89, %87
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %23, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %24, align 4
  br label %248

125:                                              ; preds = %107, %90
  %126 = load i32, ptr %28, align 4, !tbaa !9
  %127 = load i32, ptr %16, align 4, !tbaa !9
  %128 = icmp eq i32 %126, %127
  br i1 %128, label %129, label %134

129:                                              ; preds = %125
  %130 = load i32, ptr %29, align 4, !tbaa !9
  %131 = load i32, ptr %17, align 4, !tbaa !9
  %132 = icmp eq i32 %130, %131
  br i1 %132, label %133, label %134

133:                                              ; preds = %129
  store i8 1, ptr %25, align 1, !tbaa !11
  store i32 3, ptr %31, align 4
  br label %245

134:                                              ; preds = %129, %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 -1, ptr %32, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %241, %134
  %136 = load i32, ptr %32, align 4, !tbaa !9
  %137 = icmp slt i32 %136, 2
  br i1 %137, label %139, label %138

138:                                              ; preds = %135
  store i32 4, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %244

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  store i32 -1, ptr %33, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %237, %139
  %141 = load i32, ptr %33, align 4, !tbaa !9
  %142 = icmp slt i32 %141, 2
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  store i32 7, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  br label %240

144:                                              ; preds = %140
  %145 = load i32, ptr %28, align 4, !tbaa !9
  %146 = load i32, ptr %33, align 4, !tbaa !9
  %147 = add nsw i32 %145, %146
  %148 = icmp slt i32 %147, 0
  br i1 %148, label %166, label %149

149:                                              ; preds = %144
  %150 = load i32, ptr %29, align 4, !tbaa !9
  %151 = load i32, ptr %32, align 4, !tbaa !9
  %152 = add nsw i32 %150, %151
  %153 = icmp slt i32 %152, 0
  br i1 %153, label %166, label %154

154:                                              ; preds = %149
  %155 = load i32, ptr %28, align 4, !tbaa !9
  %156 = load i32, ptr %33, align 4, !tbaa !9
  %157 = add nsw i32 %155, %156
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = icmp sge i32 %157, %158
  br i1 %159, label %166, label %160

160:                                              ; preds = %154
  %161 = load i32, ptr %29, align 4, !tbaa !9
  %162 = load i32, ptr %32, align 4, !tbaa !9
  %163 = add nsw i32 %161, %162
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = icmp sge i32 %163, %164
  br i1 %165, label %166, label %167

166:                                              ; preds = %160, %154, %149, %144
  br label %237

167:                                              ; preds = %160
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = load i32, ptr %28, align 4, !tbaa !9
  %170 = load i32, ptr %33, align 4, !tbaa !9
  %171 = add nsw i32 %169, %170
  %172 = load i32, ptr %29, align 4, !tbaa !9
  %173 = load i32, ptr %32, align 4, !tbaa !9
  %174 = add nsw i32 %172, %173
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = mul nsw i32 %174, %175
  %177 = add nsw i32 %171, %176
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i8, ptr %168, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !13
  %181 = icmp ne i8 %180, 0
  br i1 %181, label %182, label %236

182:                                              ; preds = %167
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = load i32, ptr %28, align 4, !tbaa !9
  %185 = load i32, ptr %33, align 4, !tbaa !9
  %186 = add nsw i32 %184, %185
  %187 = load i32, ptr %29, align 4, !tbaa !9
  %188 = load i32, ptr %32, align 4, !tbaa !9
  %189 = add nsw i32 %187, %188
  %190 = load i32, ptr %12, align 4, !tbaa !9
  %191 = mul nsw i32 %189, %190
  %192 = add nsw i32 %186, %191
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i8, ptr %183, i64 %193
  %195 = load i8, ptr %194, align 1, !tbaa !13
  %196 = icmp ne i8 %195, 0
  br i1 %196, label %236, label %197

197:                                              ; preds = %182
  %198 = load i32, ptr %30, align 4, !tbaa !9
  %199 = add i32 %198, 1
  %200 = load ptr, ptr %20, align 8, !tbaa !5
  %201 = load i32, ptr %28, align 4, !tbaa !9
  %202 = load i32, ptr %33, align 4, !tbaa !9
  %203 = add nsw i32 %201, %202
  %204 = load i32, ptr %29, align 4, !tbaa !9
  %205 = load i32, ptr %32, align 4, !tbaa !9
  %206 = add nsw i32 %204, %205
  %207 = load i32, ptr %12, align 4, !tbaa !9
  %208 = mul nsw i32 %206, %207
  %209 = add nsw i32 %203, %208
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds i32, ptr %200, i64 %210
  store i32 %199, ptr %211, align 4, !tbaa !9
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = load i32, ptr %28, align 4, !tbaa !9
  %214 = load i32, ptr %33, align 4, !tbaa !9
  %215 = add nsw i32 %213, %214
  %216 = load i32, ptr %29, align 4, !tbaa !9
  %217 = load i32, ptr %32, align 4, !tbaa !9
  %218 = add nsw i32 %216, %217
  %219 = load i32, ptr %12, align 4, !tbaa !9
  %220 = mul nsw i32 %218, %219
  %221 = add nsw i32 %215, %220
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i8, ptr %212, i64 %222
  store i8 1, ptr %223, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %224 = load i32, ptr %28, align 4, !tbaa !9
  %225 = load i32, ptr %33, align 4, !tbaa !9
  %226 = add nsw i32 %224, %225
  store i32 %226, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %227 = load i32, ptr %29, align 4, !tbaa !9
  %228 = load i32, ptr %32, align 4, !tbaa !9
  %229 = add nsw i32 %227, %228
  store i32 %229, ptr %36, align 4, !tbaa !9
  invoke void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %230 unwind label %232

230:                                              ; preds = %197
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %21, ptr noundef nonnull align 4 dereferenceable(8) %34)
          to label %231 unwind label %232

231:                                              ; preds = %230
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %236

232:                                              ; preds = %230, %197
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %23, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %248

236:                                              ; preds = %231, %182, %167
  br label %237

237:                                              ; preds = %236, %166
  %238 = load i32, ptr %33, align 4, !tbaa !9
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %33, align 4, !tbaa !9
  br label %140, !llvm.loop !17

240:                                              ; preds = %143
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %32, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %32, align 4, !tbaa !9
  br label %135, !llvm.loop !19

244:                                              ; preds = %138
  store i32 0, ptr %31, align 4
  br label %245

245:                                              ; preds = %244, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  %246 = load i32, ptr %31, align 4
  switch i32 %246, label %540 [
    i32 0, label %247
    i32 3, label %249
  ]

247:                                              ; preds = %245
  br label %83, !llvm.loop !20

248:                                              ; preds = %232, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %533

249:                                              ; preds = %245, %85
  %250 = load i8, ptr %18, align 1, !tbaa !11, !range !21, !noundef !22
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %310

252:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %253 = load i32, ptr %26, align 4, !tbaa !9
  %254 = uitofp i32 %253 to double
  %255 = fdiv double 1.000000e+00, %254
  store double %255, ptr %37, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  store i32 0, ptr %38, align 4, !tbaa !9
  br label %256

256:                                              ; preds = %306, %252
  %257 = load i32, ptr %38, align 4, !tbaa !9
  %258 = load i32, ptr %12, align 4, !tbaa !9
  %259 = icmp slt i32 %257, %258
  br i1 %259, label %261, label %260

260:                                              ; preds = %256
  store i32 10, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  br label %309

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

262:                                              ; preds = %302, %261
  %263 = load i32, ptr %39, align 4, !tbaa !9
  %264 = load i32, ptr %13, align 4, !tbaa !9
  %265 = icmp slt i32 %263, %264
  br i1 %265, label %267, label %266

266:                                              ; preds = %262
  store i32 13, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  br label %305

267:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store i32 0, ptr %40, align 4, !tbaa !9
  br label %268

268:                                              ; preds = %298, %267
  %269 = load i32, ptr %40, align 4, !tbaa !9
  %270 = icmp slt i32 %269, 3
  br i1 %270, label %272, label %271

271:                                              ; preds = %268
  store i32 16, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  br label %301

272:                                              ; preds = %268
  %273 = load double, ptr %37, align 8, !tbaa !23
  %274 = fmul double 2.550000e+02, %273
  %275 = load ptr, ptr %20, align 8, !tbaa !5
  %276 = load i32, ptr %38, align 4, !tbaa !9
  %277 = load i32, ptr %39, align 4, !tbaa !9
  %278 = load i32, ptr %12, align 4, !tbaa !9
  %279 = mul nsw i32 %277, %278
  %280 = add nsw i32 %276, %279
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds i32, ptr %275, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !9
  %284 = uitofp i32 %283 to double
  %285 = fmul double %274, %284
  %286 = fptoui double %285 to i8
  %287 = load ptr, ptr %10, align 8, !tbaa !5
  %288 = load i32, ptr %38, align 4, !tbaa !9
  %289 = load i32, ptr %39, align 4, !tbaa !9
  %290 = load i32, ptr %12, align 4, !tbaa !9
  %291 = mul nsw i32 %289, %290
  %292 = add nsw i32 %288, %291
  %293 = mul nsw i32 3, %292
  %294 = load i32, ptr %40, align 4, !tbaa !9
  %295 = add nsw i32 %293, %294
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds i8, ptr %287, i64 %296
  store i8 %286, ptr %297, align 1, !tbaa !13
  br label %298

298:                                              ; preds = %272
  %299 = load i32, ptr %40, align 4, !tbaa !9
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %40, align 4, !tbaa !9
  br label %268, !llvm.loop !25

301:                                              ; preds = %271
  br label %302

302:                                              ; preds = %301
  %303 = load i32, ptr %39, align 4, !tbaa !9
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %39, align 4, !tbaa !9
  br label %262, !llvm.loop !26

305:                                              ; preds = %266
  br label %306

306:                                              ; preds = %305
  %307 = load i32, ptr %38, align 4, !tbaa !9
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %38, align 4, !tbaa !9
  br label %256, !llvm.loop !27

309:                                              ; preds = %260
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  br label %530

310:                                              ; preds = %249
  %311 = load i8, ptr %25, align 1, !tbaa !11, !range !21, !noundef !22
  %312 = trunc i8 %311 to i1
  br i1 %312, label %316, label %313

313:                                              ; preds = %310
  %314 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1)
          to label %315 unwind label %117

315:                                              ; preds = %313
  store i32 1, ptr %31, align 4
  br label %530

316:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  store i32 0, ptr %41, align 4, !tbaa !9
  br label %317

317:                                              ; preds = %366, %316
  %318 = load i32, ptr %41, align 4, !tbaa !9
  %319 = load i32, ptr %12, align 4, !tbaa !9
  %320 = icmp slt i32 %318, %319
  br i1 %320, label %322, label %321

321:                                              ; preds = %317
  store i32 19, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  br label %369

322:                                              ; preds = %317
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !9
  br label %323

323:                                              ; preds = %362, %322
  %324 = load i32, ptr %42, align 4, !tbaa !9
  %325 = load i32, ptr %13, align 4, !tbaa !9
  %326 = icmp slt i32 %324, %325
  br i1 %326, label %328, label %327

327:                                              ; preds = %323
  store i32 22, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %365

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

329:                                              ; preds = %358, %328
  %330 = load i32, ptr %43, align 4, !tbaa !9
  %331 = icmp slt i32 %330, 3
  br i1 %331, label %333, label %332

332:                                              ; preds = %329
  store i32 25, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  br label %361

333:                                              ; preds = %329
  %334 = load ptr, ptr %11, align 8, !tbaa !5
  %335 = load i32, ptr %41, align 4, !tbaa !9
  %336 = load i32, ptr %42, align 4, !tbaa !9
  %337 = load i32, ptr %12, align 4, !tbaa !9
  %338 = mul nsw i32 %336, %337
  %339 = add nsw i32 %335, %338
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds i8, ptr %334, i64 %340
  %342 = load i8, ptr %341, align 1, !tbaa !13
  %343 = zext i8 %342 to i32
  %344 = icmp eq i32 %343, 255
  br i1 %344, label %345, label %357

345:                                              ; preds = %333
  %346 = load ptr, ptr %10, align 8, !tbaa !5
  %347 = load i32, ptr %41, align 4, !tbaa !9
  %348 = load i32, ptr %42, align 4, !tbaa !9
  %349 = load i32, ptr %12, align 4, !tbaa !9
  %350 = mul nsw i32 %348, %349
  %351 = add nsw i32 %347, %350
  %352 = mul nsw i32 3, %351
  %353 = load i32, ptr %43, align 4, !tbaa !9
  %354 = add nsw i32 %352, %353
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds i8, ptr %346, i64 %355
  store i8 -128, ptr %356, align 1, !tbaa !13
  br label %357

357:                                              ; preds = %345, %333
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %43, align 4, !tbaa !9
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %43, align 4, !tbaa !9
  br label %329, !llvm.loop !28

361:                                              ; preds = %332
  br label %362

362:                                              ; preds = %361
  %363 = load i32, ptr %42, align 4, !tbaa !9
  %364 = add nsw i32 %363, 1
  store i32 %364, ptr %42, align 4, !tbaa !9
  br label %323, !llvm.loop !29

365:                                              ; preds = %327
  br label %366

366:                                              ; preds = %365
  %367 = load i32, ptr %41, align 4, !tbaa !9
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %41, align 4, !tbaa !9
  br label %317, !llvm.loop !30

369:                                              ; preds = %321
  %370 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %371 unwind label %117

371:                                              ; preds = %369
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  %372 = load ptr, ptr %20, align 8, !tbaa !5
  %373 = load i32, ptr %16, align 4, !tbaa !9
  %374 = load i32, ptr %17, align 4, !tbaa !9
  %375 = load i32, ptr %12, align 4, !tbaa !9
  %376 = mul nsw i32 %374, %375
  %377 = add nsw i32 %373, %376
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds i32, ptr %372, i64 %378
  %380 = load i32, ptr %379, align 4, !tbaa !9
  store i32 %380, ptr %44, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  %381 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %381, ptr %45, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  %382 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %382, ptr %46, align 4, !tbaa !9
  br label %383

383:                                              ; preds = %517, %371
  %384 = load i32, ptr %44, align 4, !tbaa !9
  %385 = icmp ne i32 %384, 1
  br i1 %385, label %386, label %529

386:                                              ; preds = %383
  %387 = load ptr, ptr %10, align 8, !tbaa !5
  %388 = load i32, ptr %45, align 4, !tbaa !9
  %389 = load i32, ptr %46, align 4, !tbaa !9
  %390 = load i32, ptr %12, align 4, !tbaa !9
  %391 = mul nsw i32 %389, %390
  %392 = add nsw i32 %388, %391
  %393 = mul nsw i32 3, %392
  %394 = add nsw i32 %393, 0
  %395 = sext i32 %394 to i64
  %396 = getelementptr inbounds i8, ptr %387, i64 %395
  store i8 0, ptr %396, align 1, !tbaa !13
  %397 = load ptr, ptr %10, align 8, !tbaa !5
  %398 = load i32, ptr %45, align 4, !tbaa !9
  %399 = load i32, ptr %46, align 4, !tbaa !9
  %400 = load i32, ptr %12, align 4, !tbaa !9
  %401 = mul nsw i32 %399, %400
  %402 = add nsw i32 %398, %401
  %403 = mul nsw i32 3, %402
  %404 = add nsw i32 %403, 1
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds i8, ptr %397, i64 %405
  store i8 -1, ptr %406, align 1, !tbaa !13
  %407 = load ptr, ptr %10, align 8, !tbaa !5
  %408 = load i32, ptr %45, align 4, !tbaa !9
  %409 = load i32, ptr %46, align 4, !tbaa !9
  %410 = load i32, ptr %12, align 4, !tbaa !9
  %411 = mul nsw i32 %409, %410
  %412 = add nsw i32 %408, %411
  %413 = mul nsw i32 3, %412
  %414 = add nsw i32 %413, 2
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds i8, ptr %407, i64 %415
  store i8 0, ptr %416, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  store i32 0, ptr %47, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  store i32 0, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  %417 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %417, ptr %49, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #7
  store i32 -1, ptr %50, align 4, !tbaa !9
  br label %418

418:                                              ; preds = %514, %386
  %419 = load i32, ptr %50, align 4, !tbaa !9
  %420 = icmp slt i32 %419, 2
  br i1 %420, label %422, label %421

421:                                              ; preds = %418
  store i32 30, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  br label %517

422:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  store i32 -1, ptr %51, align 4, !tbaa !9
  br label %423

423:                                              ; preds = %510, %422
  %424 = load i32, ptr %51, align 4, !tbaa !9
  %425 = icmp slt i32 %424, 2
  br i1 %425, label %427, label %426

426:                                              ; preds = %423
  store i32 33, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  br label %513

427:                                              ; preds = %423
  %428 = load i32, ptr %50, align 4, !tbaa !9
  %429 = icmp eq i32 %428, 0
  br i1 %429, label %430, label %434

430:                                              ; preds = %427
  %431 = load i32, ptr %51, align 4, !tbaa !9
  %432 = icmp eq i32 %431, 0
  br i1 %432, label %433, label %434

433:                                              ; preds = %430
  br label %510

434:                                              ; preds = %430, %427
  %435 = load i32, ptr %45, align 4, !tbaa !9
  %436 = load i32, ptr %51, align 4, !tbaa !9
  %437 = add nsw i32 %435, %436
  %438 = icmp slt i32 %437, 0
  br i1 %438, label %456, label %439

439:                                              ; preds = %434
  %440 = load i32, ptr %46, align 4, !tbaa !9
  %441 = load i32, ptr %50, align 4, !tbaa !9
  %442 = add nsw i32 %440, %441
  %443 = icmp slt i32 %442, 0
  br i1 %443, label %456, label %444

444:                                              ; preds = %439
  %445 = load i32, ptr %45, align 4, !tbaa !9
  %446 = load i32, ptr %51, align 4, !tbaa !9
  %447 = add nsw i32 %445, %446
  %448 = load i32, ptr %12, align 4, !tbaa !9
  %449 = icmp sge i32 %447, %448
  br i1 %449, label %456, label %450

450:                                              ; preds = %444
  %451 = load i32, ptr %46, align 4, !tbaa !9
  %452 = load i32, ptr %50, align 4, !tbaa !9
  %453 = add nsw i32 %451, %452
  %454 = load i32, ptr %13, align 4, !tbaa !9
  %455 = icmp sge i32 %453, %454
  br i1 %455, label %456, label %457

456:                                              ; preds = %450, %444, %439, %434
  br label %510

457:                                              ; preds = %450
  %458 = load ptr, ptr %20, align 8, !tbaa !5
  %459 = load i32, ptr %45, align 4, !tbaa !9
  %460 = load i32, ptr %51, align 4, !tbaa !9
  %461 = add nsw i32 %459, %460
  %462 = load i32, ptr %46, align 4, !tbaa !9
  %463 = load i32, ptr %50, align 4, !tbaa !9
  %464 = add nsw i32 %462, %463
  %465 = load i32, ptr %12, align 4, !tbaa !9
  %466 = mul nsw i32 %464, %465
  %467 = add nsw i32 %461, %466
  %468 = sext i32 %467 to i64
  %469 = getelementptr inbounds i32, ptr %458, i64 %468
  %470 = load i32, ptr %469, align 4, !tbaa !9
  %471 = icmp eq i32 %470, 0
  br i1 %471, label %472, label %473

472:                                              ; preds = %457
  br label %510

473:                                              ; preds = %457
  %474 = load ptr, ptr %20, align 8, !tbaa !5
  %475 = load i32, ptr %45, align 4, !tbaa !9
  %476 = load i32, ptr %51, align 4, !tbaa !9
  %477 = add nsw i32 %475, %476
  %478 = load i32, ptr %46, align 4, !tbaa !9
  %479 = load i32, ptr %50, align 4, !tbaa !9
  %480 = add nsw i32 %478, %479
  %481 = load i32, ptr %12, align 4, !tbaa !9
  %482 = mul nsw i32 %480, %481
  %483 = add nsw i32 %477, %482
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds i32, ptr %474, i64 %484
  %486 = load i32, ptr %485, align 4, !tbaa !9
  %487 = load i32, ptr %49, align 4, !tbaa !9
  %488 = icmp ult i32 %486, %487
  br i1 %488, label %489, label %509

489:                                              ; preds = %473
  %490 = load ptr, ptr %20, align 8, !tbaa !5
  %491 = load i32, ptr %45, align 4, !tbaa !9
  %492 = load i32, ptr %51, align 4, !tbaa !9
  %493 = add nsw i32 %491, %492
  %494 = load i32, ptr %46, align 4, !tbaa !9
  %495 = load i32, ptr %50, align 4, !tbaa !9
  %496 = add nsw i32 %494, %495
  %497 = load i32, ptr %12, align 4, !tbaa !9
  %498 = mul nsw i32 %496, %497
  %499 = add nsw i32 %493, %498
  %500 = sext i32 %499 to i64
  %501 = getelementptr inbounds i32, ptr %490, i64 %500
  %502 = load i32, ptr %501, align 4, !tbaa !9
  store i32 %502, ptr %49, align 4, !tbaa !9
  %503 = load i32, ptr %45, align 4, !tbaa !9
  %504 = load i32, ptr %51, align 4, !tbaa !9
  %505 = add nsw i32 %503, %504
  store i32 %505, ptr %47, align 4, !tbaa !9
  %506 = load i32, ptr %46, align 4, !tbaa !9
  %507 = load i32, ptr %50, align 4, !tbaa !9
  %508 = add nsw i32 %506, %507
  store i32 %508, ptr %48, align 4, !tbaa !9
  br label %509

509:                                              ; preds = %489, %473
  br label %510

510:                                              ; preds = %509, %472, %456, %433
  %511 = load i32, ptr %51, align 4, !tbaa !9
  %512 = add nsw i32 %511, 1
  store i32 %512, ptr %51, align 4, !tbaa !9
  br label %423, !llvm.loop !31

513:                                              ; preds = %426
  br label %514

514:                                              ; preds = %513
  %515 = load i32, ptr %50, align 4, !tbaa !9
  %516 = add nsw i32 %515, 1
  store i32 %516, ptr %50, align 4, !tbaa !9
  br label %418, !llvm.loop !32

517:                                              ; preds = %421
  %518 = load i32, ptr %47, align 4, !tbaa !9
  store i32 %518, ptr %45, align 4, !tbaa !9
  %519 = load i32, ptr %48, align 4, !tbaa !9
  store i32 %519, ptr %46, align 4, !tbaa !9
  %520 = load ptr, ptr %20, align 8, !tbaa !5
  %521 = load i32, ptr %45, align 4, !tbaa !9
  %522 = load i32, ptr %46, align 4, !tbaa !9
  %523 = load i32, ptr %12, align 4, !tbaa !9
  %524 = mul nsw i32 %522, %523
  %525 = add nsw i32 %521, %524
  %526 = sext i32 %525 to i64
  %527 = getelementptr inbounds i32, ptr %520, i64 %526
  %528 = load i32, ptr %527, align 4, !tbaa !9
  store i32 %528, ptr %44, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  br label %383, !llvm.loop !33

529:                                              ; preds = %383
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  store i32 0, ptr %31, align 4
  br label %530

530:                                              ; preds = %529, %315, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %21) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %531 = load i32, ptr %31, align 4
  switch i32 %531, label %540 [
    i32 0, label %532
    i32 1, label %532
  ]

532:                                              ; preds = %530, %530
  ret void

533:                                              ; preds = %248, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  br label %534

534:                                              ; preds = %533, %113, %109
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %21) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %535

535:                                              ; preds = %534
  %536 = load ptr, ptr %23, align 8
  %537 = load i32, ptr %24, align 4
  %538 = insertvalue { ptr, i32 } poison, ptr %536, 0
  %539 = insertvalue { ptr, i32 } %538, i32 %537, 1
  resume { ptr, i32 } %539

540:                                              ; preds = %530, %245
  unreachable
}

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

declare i32 @printf(ptr noundef, ...) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind allocsize(0,1) "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #8 = { nounwind allocsize(0,1) }

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!16 = !{!15, !10, i64 4}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!24, !24, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = distinct !{!25, !18}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !18}
!28 = distinct !{!28, !18}
!29 = distinct !{!29, !18}
!30 = distinct !{!30, !18}
!31 = distinct !{!31, !18}
!32 = distinct !{!32, !18}
!33 = distinct !{!33, !18}


; 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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18getPathThroughMazePhS_iiiiiib(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, i1 noundef zeroext %8) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::queue", align 8
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 %4, ptr %10, align 4, !tbaa !5
  store i32 %5, ptr %11, align 4, !tbaa !5
  %17 = mul nsw i32 %3, %2
  %18 = sext i32 %17 to i64
  %19 = tail call noalias ptr @calloc(i64 noundef %18, i64 noundef 1) #8
  %20 = tail call noalias ptr @calloc(i64 noundef %18, i64 noundef 4) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %12) #9
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %21 unwind label %44

21:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  %22 = load i32, ptr %10, align 4, !tbaa !5
  %23 = load i32, ptr %11, align 4, !tbaa !5
  %24 = mul nsw i32 %23, %2
  %25 = add nsw i32 %24, %22
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i32, ptr %20, i64 %26
  store i32 1, ptr %27, align 4, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %19, i64 %26
  store i8 1, ptr %28, align 1, !tbaa !9
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %30 = call noundef i64 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  %.not.not235 = icmp eq i64 %30, 0
  br i1 %.not.not235, label %.thread.thread, label %.lr.ph

.lr.ph:                                           ; preds = %21, %.split.us.2
  %.0193236 = phi i32 [ %spec.select, %.split.us.2 ], [ 0, %21 ]
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  %.sroa.0.0.copyload = load i32, ptr %31, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %31, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  %.sroa.5.0.copyload.fr = freeze i32 %.sroa.5.0.copyload
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  %32 = mul nsw i32 %.sroa.5.0.copyload.fr, %2
  %33 = add nsw i32 %32, %.sroa.0.0.copyload
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %20, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %spec.select = call i32 @llvm.umax.i32(i32 %36, i32 %.0193236)
  %37 = icmp ne i32 %.sroa.0.0.copyload, %6
  %38 = icmp ne i32 %.sroa.5.0.copyload.fr, %7
  %or.cond214.not = or i1 %37, %38
  br i1 %or.cond214.not, label %.preheader230, label %.thread

.preheader230:                                    ; preds = %.lr.ph
  %39 = add i32 %36, 1
  %40 = add i32 %.sroa.5.0.copyload.fr, -1
  %41 = icmp sgt i32 %40, -1
  %.not206 = icmp slt i32 %40, %3
  %42 = mul nsw i32 %40, %2
  %43 = and i1 %.not206, %41
  br i1 %43, label %.preheader229.split.preheader, label %.split.us

44:                                               ; preds = %9
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br label %316

.preheader229.split.preheader:                    ; preds = %.preheader230
  %46 = add nsw i32 %.sroa.0.0.copyload, -1
  %47 = icmp sgt i32 %.sroa.0.0.copyload, 0
  %.not205 = icmp sle i32 %.sroa.0.0.copyload, %2
  %or.cond275 = and i1 %47, %.not205
  br i1 %or.cond275, label %132, label %.preheader229.split.1

.split.us:                                        ; preds = %.preheader229.split.2, %159, %164, %169, %.preheader230
  %48 = icmp sgt i32 %.sroa.5.0.copyload.fr, -1
  %.not206.1 = icmp slt i32 %.sroa.5.0.copyload.fr, %3
  %49 = mul nsw i32 %.sroa.5.0.copyload.fr, %2
  %50 = and i1 %.not206.1, %48
  br i1 %50, label %.preheader229.split.preheader.1, label %.split.us.1

.preheader229.split.preheader.1:                  ; preds = %.split.us
  %51 = add nsw i32 %.sroa.0.0.copyload, -1
  %52 = icmp sgt i32 %.sroa.0.0.copyload, 0
  %.not205.1287 = icmp sle i32 %.sroa.0.0.copyload, %2
  %or.cond275.1288 = and i1 %52, %.not205.1287
  br i1 %or.cond275.1288, label %53, label %.preheader229.split.1.1

53:                                               ; preds = %.preheader229.split.preheader.1
  %54 = add nuw nsw i32 %51, %49
  %55 = zext nneg i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %1, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !9
  %.not207.1290 = icmp eq i8 %57, 0
  br i1 %.not207.1290, label %.preheader229.split.1.1, label %58

58:                                               ; preds = %53
  %59 = getelementptr inbounds i8, ptr %19, i64 %55
  %60 = load i8, ptr %59, align 1, !tbaa !9
  %.not208.1291 = icmp eq i8 %60, 0
  br i1 %.not208.1291, label %61, label %.preheader229.split.1.1

61:                                               ; preds = %58
  %62 = getelementptr inbounds i32, ptr %20, i64 %55
  store i32 %39, ptr %62, align 4, !tbaa !5
  store i8 1, ptr %59, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %51, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %.sroa.5.0.copyload.fr, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %63 unwind label %143

63:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.preheader229.split.1.1

.preheader229.split.1.1:                          ; preds = %63, %58, %53, %.preheader229.split.preheader.1
  %64 = icmp sgt i32 %.sroa.0.0.copyload, -1
  %.not205.1.1 = icmp slt i32 %.sroa.0.0.copyload, %2
  %or.cond275.1.1 = and i1 %64, %.not205.1.1
  br i1 %or.cond275.1.1, label %65, label %.preheader229.split.2.1

65:                                               ; preds = %.preheader229.split.1.1
  %66 = add nuw nsw i32 %.sroa.0.0.copyload, %49
  %67 = zext nneg i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %1, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !9
  %.not207.1.1 = icmp eq i8 %69, 0
  br i1 %.not207.1.1, label %.preheader229.split.2.1, label %70

70:                                               ; preds = %65
  %71 = getelementptr inbounds i8, ptr %19, i64 %67
  %72 = load i8, ptr %71, align 1, !tbaa !9
  %.not208.1.1 = icmp eq i8 %72, 0
  br i1 %.not208.1.1, label %73, label %.preheader229.split.2.1

73:                                               ; preds = %70
  %74 = getelementptr inbounds i32, ptr %20, i64 %67
  store i32 %39, ptr %74, align 4, !tbaa !5
  store i8 1, ptr %71, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %.sroa.0.0.copyload, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %.sroa.5.0.copyload.fr, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %75 unwind label %143

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.preheader229.split.2.1

.preheader229.split.2.1:                          ; preds = %75, %70, %65, %.preheader229.split.1.1
  %76 = add nsw i32 %.sroa.0.0.copyload, 1
  %77 = icmp sgt i32 %.sroa.0.0.copyload, -2
  %.not205.2.1 = icmp slt i32 %76, %2
  %or.cond275.2.1 = and i1 %77, %.not205.2.1
  br i1 %or.cond275.2.1, label %78, label %.split.us.1

78:                                               ; preds = %.preheader229.split.2.1
  %79 = add nuw nsw i32 %76, %49
  %80 = zext nneg i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %1, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !9
  %.not207.2.1 = icmp eq i8 %82, 0
  br i1 %.not207.2.1, label %.split.us.1, label %83

83:                                               ; preds = %78
  %84 = getelementptr inbounds i8, ptr %19, i64 %80
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %.not208.2.1 = icmp eq i8 %85, 0
  br i1 %.not208.2.1, label %86, label %.split.us.1

86:                                               ; preds = %83
  %87 = getelementptr inbounds i32, ptr %20, i64 %80
  store i32 %39, ptr %87, align 4, !tbaa !5
  store i8 1, ptr %84, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %76, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %.sroa.5.0.copyload.fr, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %88 unwind label %143

88:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.split.us.1

.split.us.1:                                      ; preds = %.preheader229.split.2.1, %78, %83, %88, %.split.us
  %89 = add i32 %.sroa.5.0.copyload.fr, 1
  %90 = icmp sgt i32 %89, -1
  %.not206.2 = icmp slt i32 %89, %3
  %91 = mul nsw i32 %89, %2
  %92 = and i1 %.not206.2, %90
  br i1 %92, label %.preheader229.split.preheader.2, label %.split.us.2

.preheader229.split.preheader.2:                  ; preds = %.split.us.1
  %93 = add nsw i32 %.sroa.0.0.copyload, -1
  %94 = icmp sgt i32 %.sroa.0.0.copyload, 0
  %.not205.2292 = icmp sle i32 %.sroa.0.0.copyload, %2
  %or.cond275.2293 = and i1 %94, %.not205.2292
  br i1 %or.cond275.2293, label %95, label %.preheader229.split.1.2

95:                                               ; preds = %.preheader229.split.preheader.2
  %96 = add nuw nsw i32 %93, %91
  %97 = zext nneg i32 %96 to i64
  %98 = getelementptr inbounds i8, ptr %1, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !9
  %.not207.2295 = icmp eq i8 %99, 0
  br i1 %.not207.2295, label %.preheader229.split.1.2, label %100

100:                                              ; preds = %95
  %101 = getelementptr inbounds i8, ptr %19, i64 %97
  %102 = load i8, ptr %101, align 1, !tbaa !9
  %.not208.2296 = icmp eq i8 %102, 0
  br i1 %.not208.2296, label %103, label %.preheader229.split.1.2

103:                                              ; preds = %100
  %104 = getelementptr inbounds i32, ptr %20, i64 %97
  store i32 %39, ptr %104, align 4, !tbaa !5
  store i8 1, ptr %101, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %93, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %89, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %105 unwind label %143

105:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.preheader229.split.1.2

.preheader229.split.1.2:                          ; preds = %105, %100, %95, %.preheader229.split.preheader.2
  %106 = icmp sgt i32 %.sroa.0.0.copyload, -1
  %.not205.1.2 = icmp slt i32 %.sroa.0.0.copyload, %2
  %or.cond275.1.2 = and i1 %106, %.not205.1.2
  br i1 %or.cond275.1.2, label %107, label %.preheader229.split.2.2

107:                                              ; preds = %.preheader229.split.1.2
  %108 = add nuw nsw i32 %.sroa.0.0.copyload, %91
  %109 = zext nneg i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %1, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !9
  %.not207.1.2 = icmp eq i8 %111, 0
  br i1 %.not207.1.2, label %.preheader229.split.2.2, label %112

112:                                              ; preds = %107
  %113 = getelementptr inbounds i8, ptr %19, i64 %109
  %114 = load i8, ptr %113, align 1, !tbaa !9
  %.not208.1.2 = icmp eq i8 %114, 0
  br i1 %.not208.1.2, label %115, label %.preheader229.split.2.2

115:                                              ; preds = %112
  %116 = getelementptr inbounds i32, ptr %20, i64 %109
  store i32 %39, ptr %116, align 4, !tbaa !5
  store i8 1, ptr %113, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %.sroa.0.0.copyload, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %89, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %117 unwind label %143

117:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.preheader229.split.2.2

.preheader229.split.2.2:                          ; preds = %117, %112, %107, %.preheader229.split.1.2
  %118 = add nsw i32 %.sroa.0.0.copyload, 1
  %119 = icmp sgt i32 %.sroa.0.0.copyload, -2
  %.not205.2.2 = icmp slt i32 %118, %2
  %or.cond275.2.2 = and i1 %119, %.not205.2.2
  br i1 %or.cond275.2.2, label %120, label %.split.us.2

120:                                              ; preds = %.preheader229.split.2.2
  %121 = add nuw nsw i32 %118, %91
  %122 = zext nneg i32 %121 to i64
  %123 = getelementptr inbounds i8, ptr %1, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !9
  %.not207.2.2 = icmp eq i8 %124, 0
  br i1 %.not207.2.2, label %.split.us.2, label %125

125:                                              ; preds = %120
  %126 = getelementptr inbounds i8, ptr %19, i64 %122
  %127 = load i8, ptr %126, align 1, !tbaa !9
  %.not208.2.2 = icmp eq i8 %127, 0
  br i1 %.not208.2.2, label %128, label %.split.us.2

128:                                              ; preds = %125
  %129 = getelementptr inbounds i32, ptr %20, i64 %122
  store i32 %39, ptr %129, align 4, !tbaa !5
  store i8 1, ptr %126, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %118, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %89, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %130 unwind label %143

130:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.split.us.2

.split.us.2:                                      ; preds = %.preheader229.split.2.2, %120, %125, %130, %.split.us.1
  %131 = call noundef i64 @_ZNKSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(80) %12)
  %.not.not = icmp eq i64 %131, 0
  br i1 %.not.not, label %.thread, label %.lr.ph

132:                                              ; preds = %.preheader229.split.preheader
  %133 = add nuw nsw i32 %46, %42
  %134 = zext nneg i32 %133 to i64
  %135 = getelementptr inbounds i8, ptr %1, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !9
  %.not207 = icmp eq i8 %136, 0
  br i1 %.not207, label %.preheader229.split.1, label %137

137:                                              ; preds = %132
  %138 = getelementptr inbounds i8, ptr %19, i64 %134
  %139 = load i8, ptr %138, align 1, !tbaa !9
  %.not208 = icmp eq i8 %139, 0
  br i1 %.not208, label %140, label %.preheader229.split.1

140:                                              ; preds = %137
  %141 = getelementptr inbounds i32, ptr %20, i64 %134
  store i32 %39, ptr %141, align 4, !tbaa !5
  store i8 1, ptr %138, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %46, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %40, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %142 unwind label %143

142:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.preheader229.split.1

143:                                              ; preds = %128, %115, %103, %86, %73, %61, %167, %154, %140
  %144 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %316

.preheader229.split.1:                            ; preds = %132, %137, %142, %.preheader229.split.preheader
  %145 = icmp sgt i32 %.sroa.0.0.copyload, -1
  %.not205.1 = icmp slt i32 %.sroa.0.0.copyload, %2
  %or.cond275.1 = and i1 %145, %.not205.1
  br i1 %or.cond275.1, label %146, label %.preheader229.split.2

146:                                              ; preds = %.preheader229.split.1
  %147 = add nuw nsw i32 %.sroa.0.0.copyload, %42
  %148 = zext nneg i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %1, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !9
  %.not207.1 = icmp eq i8 %150, 0
  br i1 %.not207.1, label %.preheader229.split.2, label %151

151:                                              ; preds = %146
  %152 = getelementptr inbounds i8, ptr %19, i64 %148
  %153 = load i8, ptr %152, align 1, !tbaa !9
  %.not208.1 = icmp eq i8 %153, 0
  br i1 %.not208.1, label %154, label %.preheader229.split.2

154:                                              ; preds = %151
  %155 = getelementptr inbounds i32, ptr %20, i64 %148
  store i32 %39, ptr %155, align 4, !tbaa !5
  store i8 1, ptr %152, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %.sroa.0.0.copyload, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %40, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %156 unwind label %143

156:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.preheader229.split.2

.preheader229.split.2:                            ; preds = %156, %151, %146, %.preheader229.split.1
  %157 = add nsw i32 %.sroa.0.0.copyload, 1
  %158 = icmp sgt i32 %.sroa.0.0.copyload, -2
  %.not205.2 = icmp slt i32 %157, %2
  %or.cond275.2 = and i1 %158, %.not205.2
  br i1 %or.cond275.2, label %159, label %.split.us

159:                                              ; preds = %.preheader229.split.2
  %160 = add nuw nsw i32 %157, %42
  %161 = zext nneg i32 %160 to i64
  %162 = getelementptr inbounds i8, ptr %1, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !9
  %.not207.2 = icmp eq i8 %163, 0
  br i1 %.not207.2, label %.split.us, label %164

164:                                              ; preds = %159
  %165 = getelementptr inbounds i8, ptr %19, i64 %161
  %166 = load i8, ptr %165, align 1, !tbaa !9
  %.not208.2 = icmp eq i8 %166, 0
  br i1 %.not208.2, label %167, label %.split.us

167:                                              ; preds = %164
  %168 = getelementptr inbounds i32, ptr %20, i64 %161
  store i32 %39, ptr %168, align 4, !tbaa !5
  store i8 1, ptr %165, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  store i32 %157, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 %40, ptr %16, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  invoke void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %12, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %169 unwind label %143

169:                                              ; preds = %167
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  br label %.split.us

.thread:                                          ; preds = %.split.us.2, %.lr.ph
  br i1 %8, label %170, label %201

.thread.thread:                                   ; preds = %21
  br i1 %8, label %170, label %.thread339

170:                                              ; preds = %.thread.thread, %.thread
  %.2195337 = phi i32 [ 0, %.thread.thread ], [ %spec.select, %.thread ]
  %171 = icmp sgt i32 %2, 0
  br i1 %171, label %.preheader223.lr.ph, label %.loopexit

.preheader223.lr.ph:                              ; preds = %170
  %172 = uitofp i32 %.2195337 to double
  %173 = fdiv double 1.000000e+00, %172
  %174 = icmp sgt i32 %3, 0
  %175 = fmul double %173, 2.550000e+02
  br i1 %174, label %.preheader223.us.preheader, label %.loopexit

.preheader223.us.preheader:                       ; preds = %.preheader223.lr.ph
  %176 = mul i32 %2, 3
  %177 = zext i32 %176 to i64
  %178 = zext nneg i32 %2 to i64
  %wide.trip.count324 = zext nneg i32 %3 to i64
  %xtraiter = and i64 %wide.trip.count324, 1
  %179 = icmp eq i32 %3, 1
  %unroll_iter = and i64 %wide.trip.count324, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader223.us

.preheader223.us:                                 ; preds = %.preheader223.us.preheader, %._crit_edge.us274
  %indvars.iv326 = phi i64 [ 0, %.preheader223.us.preheader ], [ %indvars.iv.next327, %._crit_edge.us274 ]
  %180 = mul i64 %indvars.iv326, 3
  %181 = and i64 %180, 4294967295
  %182 = getelementptr i8, ptr %0, i64 %181
  %invariant.gep347 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv326
  br i1 %179, label %._crit_edge.us274.unr-lcssa, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader223.us, %.preheader.us
  %indvar = phi i64 [ %indvar.next.1, %.preheader.us ], [ 0, %.preheader223.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us ], [ 0, %.preheader223.us ]
  %183 = mul nuw nsw i64 %indvar, %177
  %scevgep = getelementptr i8, ptr %182, i64 %183
  %184 = mul nuw nsw i64 %indvar, %178
  %gep348 = getelementptr inbounds i32, ptr %invariant.gep347, i64 %184
  %185 = load i32, ptr %gep348, align 4, !tbaa !5
  %186 = uitofp i32 %185 to double
  %187 = fmul double %175, %186
  %188 = fptoui double %187 to i8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %scevgep, i8 %188, i64 3, i1 false), !tbaa !9
  %indvar.next = or disjoint i64 %indvar, 1
  %189 = mul nuw nsw i64 %indvar.next, %177
  %scevgep.1 = getelementptr i8, ptr %182, i64 %189
  %190 = mul nuw nsw i64 %indvar.next, %178
  %gep348.1 = getelementptr inbounds i32, ptr %invariant.gep347, i64 %190
  %191 = load i32, ptr %gep348.1, align 4, !tbaa !5
  %192 = uitofp i32 %191 to double
  %193 = fmul double %175, %192
  %194 = fptoui double %193 to i8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %scevgep.1, i8 %194, i64 3, i1 false), !tbaa !9
  %indvar.next.1 = add nuw nsw i64 %indvar, 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_edge.us274.unr-lcssa, label %.preheader.us, !llvm.loop !10

._crit_edge.us274.unr-lcssa:                      ; preds = %.preheader.us, %.preheader223.us
  %indvar.unr = phi i64 [ 0, %.preheader223.us ], [ %indvar.next.1, %.preheader.us ]
  br i1 %lcmp.mod.not, label %._crit_edge.us274, label %.preheader.us.epil

.preheader.us.epil:                               ; preds = %._crit_edge.us274.unr-lcssa
  %195 = mul nuw nsw i64 %indvar.unr, %177
  %scevgep.epil = getelementptr i8, ptr %182, i64 %195
  %196 = mul nuw nsw i64 %indvar.unr, %178
  %gep348.epil = getelementptr inbounds i32, ptr %invariant.gep347, i64 %196
  %197 = load i32, ptr %gep348.epil, align 4, !tbaa !5
  %198 = uitofp i32 %197 to double
  %199 = fmul double %175, %198
  %200 = fptoui double %199 to i8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %scevgep.epil, i8 %200, i64 3, i1 false), !tbaa !9
  br label %._crit_edge.us274

._crit_edge.us274:                                ; preds = %._crit_edge.us274.unr-lcssa, %.preheader.us.epil
  %indvars.iv.next327 = add nuw nsw i64 %indvars.iv326, 1
  %exitcond330.not = icmp eq i64 %indvars.iv.next327, %178
  br i1 %exitcond330.not, label %.loopexit, label %.preheader223.us, !llvm.loop !12

201:                                              ; preds = %.thread
  br i1 %or.cond214.not, label %.thread339, label %.preheader228

.preheader228:                                    ; preds = %201
  %202 = icmp sgt i32 %2, 0
  %203 = icmp sgt i32 %3, 0
  %or.cond = and i1 %202, %203
  br i1 %or.cond, label %.preheader227.us.preheader, label %._crit_edge247

.preheader227.us.preheader:                       ; preds = %.preheader228
  %204 = zext nneg i32 %2 to i64
  %wide.trip.count = zext nneg i32 %3 to i64
  %invariant.gep = getelementptr inbounds i8, ptr %0, i64 1
  %invariant.gep345 = getelementptr inbounds i8, ptr %0, i64 2
  br label %.preheader227.us

.preheader227.us:                                 ; preds = %.preheader227.us.preheader, %._crit_edge.us
  %indvars.iv299 = phi i64 [ 0, %.preheader227.us.preheader ], [ %indvars.iv.next300, %._crit_edge.us ]
  br label %.preheader226.us

.preheader226.split.us250.1:                      ; preds = %.preheader226.us
  %205 = getelementptr inbounds i8, ptr %0, i64 %212
  store i8 -128, ptr %205, align 1, !tbaa !9
  %.pre = load i8, ptr %211, align 1, !tbaa !9
  %206 = icmp eq i8 %.pre, -1
  br i1 %206, label %.preheader226.split.us250.2, label %.split244.us248

.preheader226.split.us250.2:                      ; preds = %.preheader226.split.us250.1
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %212
  store i8 -128, ptr %gep, align 1, !tbaa !9
  %.pre331 = load i8, ptr %211, align 1, !tbaa !9
  %207 = icmp eq i8 %.pre331, -1
  br i1 %207, label %208, label %.split244.us248

208:                                              ; preds = %.preheader226.split.us250.2
  %gep346 = getelementptr inbounds i8, ptr %invariant.gep345, i64 %212
  store i8 -128, ptr %gep346, align 1, !tbaa !9
  br label %.split244.us248

.preheader226.us:                                 ; preds = %.preheader227.us, %.split244.us248
  %indvars.iv = phi i64 [ 0, %.preheader227.us ], [ %indvars.iv.next, %.split244.us248 ]
  %209 = mul nuw nsw i64 %indvars.iv, %204
  %210 = add nuw nsw i64 %209, %indvars.iv299
  %211 = getelementptr inbounds i8, ptr %1, i64 %210
  %212 = mul nuw nsw i64 %210, 3
  %213 = load i8, ptr %211, align 1, !tbaa !9
  %214 = icmp eq i8 %213, -1
  br i1 %214, label %.preheader226.split.us250.1, label %.split244.us248

.split244.us248:                                  ; preds = %.preheader226.split.us250.1, %.preheader226.us, %.preheader226.split.us250.2, %208
  %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.us, label %.preheader226.us, !llvm.loop !13

._crit_edge.us:                                   ; preds = %.split244.us248
  %indvars.iv.next300 = add nuw nsw i64 %indvars.iv299, 1
  %exitcond303.not = icmp eq i64 %indvars.iv.next300, %204
  br i1 %exitcond303.not, label %._crit_edge247, label %.preheader227.us, !llvm.loop !14

.thread339:                                       ; preds = %.thread.thread, %201
  %215 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %.loopexit

._crit_edge247:                                   ; preds = %._crit_edge.us, %.preheader228
  %216 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %217 = mul nsw i32 %7, %2
  %218 = add nsw i32 %217, %6
  %.pn210264 = sext i32 %218 to i64
  %.0178.in265 = getelementptr inbounds i32, ptr %20, i64 %.pn210264
  %.0178266 = load i32, ptr %.0178.in265, align 4, !tbaa !5
  %.not211267 = icmp eq i32 %.0178266, 1
  br i1 %.not211267, label %.loopexit, label %.lr.ph270

.lr.ph270:                                        ; preds = %._crit_edge247, %.split256.us.2
  %.0176269 = phi i32 [ %.us-phi257.2, %.split256.us.2 ], [ %7, %._crit_edge247 ]
  %.0177268 = phi i32 [ %.us-phi.2, %.split256.us.2 ], [ %6, %._crit_edge247 ]
  %219 = mul nsw i32 %.0176269, %2
  %220 = add nsw i32 %219, %.0177268
  %221 = mul nsw i32 %220, 3
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i8, ptr %0, i64 %222
  store i8 0, ptr %223, align 1, !tbaa !9
  %224 = getelementptr i8, ptr %223, i64 1
  store i8 -1, ptr %224, align 1, !tbaa !9
  %225 = getelementptr i8, ptr %223, i64 2
  store i8 0, ptr %225, align 1, !tbaa !9
  %226 = add i32 %.0176269, -1
  %227 = icmp sgt i32 %226, -1
  %.not213 = icmp slt i32 %226, %3
  %228 = mul nsw i32 %226, %2
  %229 = and i1 %.not213, %227
  br i1 %229, label %.preheader224.split.preheader, label %.split256.us

.split256.us:                                     ; preds = %.preheader224.split.2, %308, %315, %.lr.ph270
  %.us-phi = phi i32 [ 0, %.lr.ph270 ], [ %.2175.1, %.preheader224.split.2 ], [ %.2175.1, %308 ], [ %306, %315 ]
  %.us-phi257 = phi i32 [ 0, %.lr.ph270 ], [ %.2172.1, %.preheader224.split.2 ], [ %.2172.1, %308 ], [ %226, %315 ]
  %.us-phi258 = phi i32 [ %spec.select, %.lr.ph270 ], [ %.2.1, %.preheader224.split.2 ], [ %.2.1, %308 ], [ %312, %315 ]
  %230 = icmp sgt i32 %.0176269, -1
  %.not213.1 = icmp slt i32 %.0176269, %3
  %231 = mul nsw i32 %.0176269, %2
  %232 = and i1 %.not213.1, %230
  br i1 %232, label %.preheader224.split.preheader.1, label %.split256.us.1

.preheader224.split.preheader.1:                  ; preds = %.split256.us
  %233 = add nsw i32 %.0177268, -1
  %234 = icmp sgt i32 %.0177268, 0
  %.not212.1307 = icmp sle i32 %.0177268, %2
  %or.cond278.1308 = and i1 %234, %.not212.1307
  br i1 %or.cond278.1308, label %235, label %.preheader224.split.2.1

235:                                              ; preds = %.preheader224.split.preheader.1
  %236 = add nuw nsw i32 %233, %231
  %237 = zext nneg i32 %236 to i64
  %238 = getelementptr inbounds i32, ptr %20, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = icmp ne i32 %239, 0
  %241 = icmp ult i32 %239, %.us-phi258
  %or.cond219.1309 = select i1 %240, i1 %241, i1 false
  br i1 %or.cond219.1309, label %242, label %.preheader224.split.2.1

242:                                              ; preds = %235
  br label %.preheader224.split.2.1

.preheader224.split.2.1:                          ; preds = %242, %235, %.preheader224.split.preheader.1
  %.2175.1310 = phi i32 [ %.us-phi, %.preheader224.split.preheader.1 ], [ %.us-phi, %235 ], [ %233, %242 ]
  %.2172.1311 = phi i32 [ %.us-phi257, %.preheader224.split.preheader.1 ], [ %.us-phi257, %235 ], [ %.0176269, %242 ]
  %.2.1312 = phi i32 [ %.us-phi258, %.preheader224.split.preheader.1 ], [ %.us-phi258, %235 ], [ %239, %242 ]
  %243 = add nsw i32 %.0177268, 1
  %244 = icmp sgt i32 %.0177268, -2
  %.not212.2.1 = icmp slt i32 %243, %2
  %or.cond278.2.1 = and i1 %244, %.not212.2.1
  br i1 %or.cond278.2.1, label %245, label %.split256.us.1

245:                                              ; preds = %.preheader224.split.2.1
  %246 = add nuw nsw i32 %243, %231
  %247 = zext nneg i32 %246 to i64
  %248 = getelementptr inbounds i32, ptr %20, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !5
  %250 = icmp ne i32 %249, 0
  %251 = icmp ult i32 %249, %.2.1312
  %or.cond219.2.1 = select i1 %250, i1 %251, i1 false
  br i1 %or.cond219.2.1, label %252, label %.split256.us.1

252:                                              ; preds = %245
  br label %.split256.us.1

.split256.us.1:                                   ; preds = %.preheader224.split.2.1, %245, %252, %.split256.us
  %.us-phi.1 = phi i32 [ %.us-phi, %.split256.us ], [ %.2175.1310, %.preheader224.split.2.1 ], [ %.2175.1310, %245 ], [ %243, %252 ]
  %.us-phi257.1 = phi i32 [ %.us-phi257, %.split256.us ], [ %.2172.1311, %.preheader224.split.2.1 ], [ %.2172.1311, %245 ], [ %.0176269, %252 ]
  %.us-phi258.1 = phi i32 [ %.us-phi258, %.split256.us ], [ %.2.1312, %.preheader224.split.2.1 ], [ %.2.1312, %245 ], [ %249, %252 ]
  %253 = add i32 %.0176269, 1
  %254 = icmp sgt i32 %253, -1
  %.not213.2 = icmp slt i32 %253, %3
  %255 = mul nsw i32 %253, %2
  %256 = and i1 %.not213.2, %254
  br i1 %256, label %.preheader224.split.preheader.2, label %.split256.us.2

.preheader224.split.preheader.2:                  ; preds = %.split256.us.1
  %257 = add nsw i32 %.0177268, -1
  %258 = icmp sgt i32 %.0177268, 0
  %.not212.2314 = icmp sle i32 %.0177268, %2
  %or.cond278.2315 = and i1 %258, %.not212.2314
  br i1 %or.cond278.2315, label %259, label %.preheader224.split.1.2

259:                                              ; preds = %.preheader224.split.preheader.2
  %260 = add nuw nsw i32 %257, %255
  %261 = zext nneg i32 %260 to i64
  %262 = getelementptr inbounds i32, ptr %20, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !5
  %264 = icmp ne i32 %263, 0
  %265 = icmp ult i32 %263, %.us-phi258.1
  %or.cond219.2316 = select i1 %264, i1 %265, i1 false
  br i1 %or.cond219.2316, label %266, label %.preheader224.split.1.2

266:                                              ; preds = %259
  br label %.preheader224.split.1.2

.preheader224.split.1.2:                          ; preds = %.preheader224.split.preheader.2, %259, %266
  %.2175.2317 = phi i32 [ %.us-phi.1, %.preheader224.split.preheader.2 ], [ %.us-phi.1, %259 ], [ %257, %266 ]
  %.2172.2318 = phi i32 [ %.us-phi257.1, %.preheader224.split.preheader.2 ], [ %.us-phi257.1, %259 ], [ %253, %266 ]
  %.2.2319 = phi i32 [ %.us-phi258.1, %.preheader224.split.preheader.2 ], [ %.us-phi258.1, %259 ], [ %263, %266 ]
  %267 = icmp sgt i32 %.0177268, -1
  %.not212.1.2 = icmp slt i32 %.0177268, %2
  %or.cond278.1.2 = and i1 %267, %.not212.1.2
  br i1 %or.cond278.1.2, label %268, label %.preheader224.split.2.2

268:                                              ; preds = %.preheader224.split.1.2
  %269 = add nuw nsw i32 %.0177268, %255
  %270 = zext nneg i32 %269 to i64
  %271 = getelementptr inbounds i32, ptr %20, i64 %270
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = icmp ne i32 %272, 0
  %274 = icmp ult i32 %272, %.2.2319
  %or.cond219.1.2 = select i1 %273, i1 %274, i1 false
  br i1 %or.cond219.1.2, label %275, label %.preheader224.split.2.2

275:                                              ; preds = %268
  br label %.preheader224.split.2.2

.preheader224.split.2.2:                          ; preds = %.preheader224.split.1.2, %268, %275
  %.2175.1.2 = phi i32 [ %.2175.2317, %.preheader224.split.1.2 ], [ %.2175.2317, %268 ], [ %.0177268, %275 ]
  %.2172.1.2 = phi i32 [ %.2172.2318, %.preheader224.split.1.2 ], [ %.2172.2318, %268 ], [ %253, %275 ]
  %.2.1.2 = phi i32 [ %.2.2319, %.preheader224.split.1.2 ], [ %.2.2319, %268 ], [ %272, %275 ]
  %276 = add nsw i32 %.0177268, 1
  %277 = icmp sgt i32 %.0177268, -2
  %.not212.2.2 = icmp slt i32 %276, %2
  %or.cond278.2.2 = and i1 %277, %.not212.2.2
  br i1 %or.cond278.2.2, label %278, label %.split256.us.2

278:                                              ; preds = %.preheader224.split.2.2
  %279 = add nuw nsw i32 %276, %255
  %280 = zext nneg i32 %279 to i64
  %281 = getelementptr inbounds i32, ptr %20, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = icmp ne i32 %282, 0
  %284 = icmp ult i32 %282, %.2.1.2
  %or.cond219.2.2 = select i1 %283, i1 %284, i1 false
  %spec.select349 = select i1 %or.cond219.2.2, i32 %276, i32 %.2175.1.2
  %spec.select350 = select i1 %or.cond219.2.2, i32 %253, i32 %.2172.1.2
  br label %.split256.us.2

.split256.us.2:                                   ; preds = %278, %.preheader224.split.2.2, %.split256.us.1
  %.us-phi.2 = phi i32 [ %.us-phi.1, %.split256.us.1 ], [ %.2175.1.2, %.preheader224.split.2.2 ], [ %spec.select349, %278 ]
  %.us-phi257.2 = phi i32 [ %.us-phi257.1, %.split256.us.1 ], [ %.2172.1.2, %.preheader224.split.2.2 ], [ %spec.select350, %278 ]
  %285 = mul nsw i32 %.us-phi257.2, %2
  %286 = add nsw i32 %285, %.us-phi.2
  %.pn210 = sext i32 %286 to i64
  %.0178.in = getelementptr inbounds i32, ptr %20, i64 %.pn210
  %.0178 = load i32, ptr %.0178.in, align 4, !tbaa !5
  %.not211 = icmp eq i32 %.0178, 1
  br i1 %.not211, label %.loopexit, label %.lr.ph270, !llvm.loop !15

.preheader224.split.preheader:                    ; preds = %.lr.ph270
  %287 = add nsw i32 %.0177268, -1
  %288 = icmp sgt i32 %.0177268, 0
  %.not212 = icmp sle i32 %.0177268, %2
  %or.cond278 = and i1 %288, %.not212
  br i1 %or.cond278, label %289, label %.preheader224.split.1

289:                                              ; preds = %.preheader224.split.preheader
  %290 = add nuw nsw i32 %287, %228
  %291 = zext nneg i32 %290 to i64
  %292 = getelementptr inbounds i32, ptr %20, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = icmp ne i32 %293, 0
  %295 = icmp ult i32 %293, %spec.select
  %or.cond219 = select i1 %294, i1 %295, i1 false
  br i1 %or.cond219, label %296, label %.preheader224.split.1

296:                                              ; preds = %289
  br label %.preheader224.split.1

.preheader224.split.1:                            ; preds = %.preheader224.split.preheader, %289, %296
  %.2175 = phi i32 [ 0, %.preheader224.split.preheader ], [ 0, %289 ], [ %287, %296 ]
  %.2172 = phi i32 [ 0, %.preheader224.split.preheader ], [ 0, %289 ], [ %226, %296 ]
  %.2 = phi i32 [ %spec.select, %.preheader224.split.preheader ], [ %spec.select, %289 ], [ %293, %296 ]
  %297 = icmp sgt i32 %.0177268, -1
  %.not212.1 = icmp slt i32 %.0177268, %2
  %or.cond278.1 = and i1 %297, %.not212.1
  br i1 %or.cond278.1, label %298, label %.preheader224.split.2

298:                                              ; preds = %.preheader224.split.1
  %299 = add nuw nsw i32 %.0177268, %228
  %300 = zext nneg i32 %299 to i64
  %301 = getelementptr inbounds i32, ptr %20, i64 %300
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = icmp ne i32 %302, 0
  %304 = icmp ult i32 %302, %.2
  %or.cond219.1 = select i1 %303, i1 %304, i1 false
  br i1 %or.cond219.1, label %305, label %.preheader224.split.2

305:                                              ; preds = %298
  br label %.preheader224.split.2

.preheader224.split.2:                            ; preds = %.preheader224.split.1, %298, %305
  %.2175.1 = phi i32 [ %.2175, %.preheader224.split.1 ], [ %.2175, %298 ], [ %.0177268, %305 ]
  %.2172.1 = phi i32 [ %.2172, %.preheader224.split.1 ], [ %.2172, %298 ], [ %226, %305 ]
  %.2.1 = phi i32 [ %.2, %.preheader224.split.1 ], [ %.2, %298 ], [ %302, %305 ]
  %306 = add nsw i32 %.0177268, 1
  %307 = icmp sgt i32 %.0177268, -2
  %.not212.2 = icmp slt i32 %306, %2
  %or.cond278.2 = and i1 %307, %.not212.2
  br i1 %or.cond278.2, label %308, label %.split256.us

308:                                              ; preds = %.preheader224.split.2
  %309 = add nuw nsw i32 %306, %228
  %310 = zext nneg i32 %309 to i64
  %311 = getelementptr inbounds i32, ptr %20, i64 %310
  %312 = load i32, ptr %311, align 4, !tbaa !5
  %313 = icmp ne i32 %312, 0
  %314 = icmp ult i32 %312, %.2.1
  %or.cond219.2 = select i1 %313, i1 %314, i1 false
  br i1 %or.cond219.2, label %315, label %.split256.us

315:                                              ; preds = %308
  br label %.split256.us

.loopexit:                                        ; preds = %.split256.us.2, %._crit_edge.us274, %.preheader223.lr.ph, %._crit_edge247, %170, %.thread339
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %12) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #9
  ret void

316:                                              ; preds = %143, %44
  %.pn = phi { ptr, i32 } [ %144, %143 ], [ %45, %44 ]
  call void @_ZNSt5queueISt4pairIiiESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %12) #9
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %12) #9
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

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

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

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

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

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

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


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