; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #777 (Div. 2)/B. Madoka and the Elegant Gift.ll (Z5solvev)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::initializer_list" = type { ptr, i64 }

@dx = external dso_local global [12 x i64], align 16
@dy = external dso_local global [12 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.std::initializer_list", align 8
  %20 = alloca [3 x i64], align 8
  %21 = alloca i64, align 8
  %22 = alloca %"class.std::initializer_list", align 8
  %23 = alloca [3 x i64], align 8
  %24 = alloca i64, align 8
  %25 = alloca %"class.std::initializer_list", align 8
  %26 = alloca [3 x i64], align 8
  %27 = alloca i64, align 8
  %28 = alloca %"class.std::initializer_list", align 8
  %29 = alloca [3 x i64], align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  %32 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %32, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %33 unwind label %39

33:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %48, %33
  %35 = load i64, ptr %7, align 8, !tbaa !5
  %36 = load i64, ptr %1, align 8, !tbaa !5
  %37 = icmp slt i64 %35, %36
  br i1 %37, label %43, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %55

39:                                               ; preds = %0
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  br label %278

43:                                               ; preds = %34
  %44 = load i64, ptr %7, align 8, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %44) #5
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %45)
          to label %47 unwind label %51

47:                                               ; preds = %43
  br label %48

48:                                               ; preds = %47
  %49 = load i64, ptr %7, align 8, !tbaa !5
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %7, align 8, !tbaa !5
  br label %34, !llvm.loop !9

51:                                               ; preds = %43
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %5, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %277

55:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %260, %55
  %57 = load i64, ptr %8, align 8, !tbaa !5
  %58 = load i64, ptr %1, align 8, !tbaa !5
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 5, ptr %9, align 4
  br label %263

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %253, %61
  %63 = load i64, ptr %10, align 8, !tbaa !5
  %64 = load i64, ptr %2, align 8, !tbaa !5
  %65 = icmp slt i64 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 8, ptr %9, align 4
  br label %256

67:                                               ; preds = %62
  %68 = load i64, ptr %8, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %68) #5
  %70 = load i64, ptr %10, align 8, !tbaa !5
  %71 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %69, i64 noundef %70)
          to label %72 unwind label %81

72:                                               ; preds = %67
  %73 = load i8, ptr %71, align 1, !tbaa !11
  %74 = sext i8 %73 to i32
  %75 = icmp eq i32 %74, 48
  br i1 %75, label %76, label %252

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %242, %76
  %78 = load i64, ptr %11, align 8, !tbaa !5
  %79 = icmp slt i64 %78, 12
  br i1 %79, label %85, label %80

80:                                               ; preds = %77
  store i32 11, ptr %9, align 4
  br label %249

81:                                               ; preds = %67
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %5, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %6, align 4
  br label %258

85:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %86 = load i64, ptr %8, align 8, !tbaa !5
  %87 = load i64, ptr %11, align 8, !tbaa !5
  %88 = getelementptr inbounds [12 x i64], ptr @dx, i64 0, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = add nsw i64 %86, %89
  store i64 %90, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %91 = load i64, ptr %11, align 8, !tbaa !5
  %92 = getelementptr inbounds [12 x i64], ptr @dy, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !5
  %94 = load i64, ptr %10, align 8, !tbaa !5
  %95 = add nsw i64 %93, %94
  store i64 %95, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %96 = load i64, ptr %8, align 8, !tbaa !5
  %97 = load i64, ptr %11, align 8, !tbaa !5
  %98 = add nsw i64 %97, 1
  %99 = getelementptr inbounds [12 x i64], ptr @dx, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !5
  %101 = add nsw i64 %96, %100
  store i64 %101, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %102 = load i64, ptr %11, align 8, !tbaa !5
  %103 = add nsw i64 %102, 1
  %104 = getelementptr inbounds [12 x i64], ptr @dy, i64 0, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = load i64, ptr %10, align 8, !tbaa !5
  %107 = add nsw i64 %105, %106
  store i64 %107, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %108 = load i64, ptr %8, align 8, !tbaa !5
  %109 = load i64, ptr %11, align 8, !tbaa !5
  %110 = add nsw i64 %109, 2
  %111 = getelementptr inbounds [12 x i64], ptr @dx, i64 0, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !5
  %113 = add nsw i64 %108, %112
  store i64 %113, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %114 = load i64, ptr %11, align 8, !tbaa !5
  %115 = add nsw i64 %114, 2
  %116 = getelementptr inbounds [12 x i64], ptr @dy, i64 0, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = load i64, ptr %10, align 8, !tbaa !5
  %119 = add nsw i64 %117, %118
  store i64 %119, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %120 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %120, ptr %20, align 8, !tbaa !5
  %121 = getelementptr inbounds i64, ptr %20, i64 1
  %122 = load i64, ptr %14, align 8, !tbaa !5
  store i64 %122, ptr %121, align 8, !tbaa !5
  %123 = getelementptr inbounds i64, ptr %20, i64 2
  %124 = load i64, ptr %16, align 8, !tbaa !5
  store i64 %124, ptr %123, align 8, !tbaa !5
  %125 = getelementptr inbounds %"class.std::initializer_list", ptr %19, i32 0, i32 0
  store ptr %20, ptr %125, align 8, !tbaa !12
  %126 = getelementptr inbounds %"class.std::initializer_list", ptr %19, i32 0, i32 1
  store i64 3, ptr %126, align 8, !tbaa !15
  %127 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8
  %129 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %130 = load i64, ptr %129, align 8
  %131 = invoke noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr %128, i64 %130)
          to label %132 unwind label %217

132:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  store i64 %131, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  %133 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %133, ptr %23, align 8, !tbaa !5
  %134 = getelementptr inbounds i64, ptr %23, i64 1
  %135 = load i64, ptr %15, align 8, !tbaa !5
  store i64 %135, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds i64, ptr %23, i64 2
  %137 = load i64, ptr %17, align 8, !tbaa !5
  store i64 %137, ptr %136, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.std::initializer_list", ptr %22, i32 0, i32 0
  store ptr %23, ptr %138, align 8, !tbaa !12
  %139 = getelementptr inbounds %"class.std::initializer_list", ptr %22, i32 0, i32 1
  store i64 3, ptr %139, align 8, !tbaa !15
  %140 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %143 = load i64, ptr %142, align 8
  %144 = invoke noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr %141, i64 %143)
          to label %145 unwind label %221

145:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  store i64 %144, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #5
  %146 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %146, ptr %26, align 8, !tbaa !5
  %147 = getelementptr inbounds i64, ptr %26, i64 1
  %148 = load i64, ptr %14, align 8, !tbaa !5
  store i64 %148, ptr %147, align 8, !tbaa !5
  %149 = getelementptr inbounds i64, ptr %26, i64 2
  %150 = load i64, ptr %16, align 8, !tbaa !5
  store i64 %150, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds %"class.std::initializer_list", ptr %25, i32 0, i32 0
  store ptr %26, ptr %151, align 8, !tbaa !12
  %152 = getelementptr inbounds %"class.std::initializer_list", ptr %25, i32 0, i32 1
  store i64 3, ptr %152, align 8, !tbaa !15
  %153 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %154 = load ptr, ptr %153, align 8
  %155 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %156 = load i64, ptr %155, align 8
  %157 = invoke noundef i64 @_ZSt3minIlET_St16initializer_listIS0_E(ptr %154, i64 %156)
          to label %158 unwind label %225

158:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  store i64 %157, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #5
  %159 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %159, ptr %29, align 8, !tbaa !5
  %160 = getelementptr inbounds i64, ptr %29, i64 1
  %161 = load i64, ptr %15, align 8, !tbaa !5
  store i64 %161, ptr %160, align 8, !tbaa !5
  %162 = getelementptr inbounds i64, ptr %29, i64 2
  %163 = load i64, ptr %17, align 8, !tbaa !5
  store i64 %163, ptr %162, align 8, !tbaa !5
  %164 = getelementptr inbounds %"class.std::initializer_list", ptr %28, i32 0, i32 0
  store ptr %29, ptr %164, align 8, !tbaa !12
  %165 = getelementptr inbounds %"class.std::initializer_list", ptr %28, i32 0, i32 1
  store i64 3, ptr %165, align 8, !tbaa !15
  %166 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8
  %168 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 1
  %169 = load i64, ptr %168, align 8
  %170 = invoke noundef i64 @_ZSt3minIlET_St16initializer_listIS0_E(ptr %167, i64 %169)
          to label %171 unwind label %229

171:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #5
  store i64 %170, ptr %27, align 8, !tbaa !5
  %172 = load i64, ptr %18, align 8, !tbaa !5
  %173 = load i64, ptr %1, align 8, !tbaa !5
  %174 = icmp slt i64 %172, %173
  br i1 %174, label %175, label %238

175:                                              ; preds = %171
  %176 = load i64, ptr %24, align 8, !tbaa !5
  %177 = icmp sge i64 %176, 0
  br i1 %177, label %178, label %238

178:                                              ; preds = %175
  %179 = load i64, ptr %21, align 8, !tbaa !5
  %180 = load i64, ptr %2, align 8, !tbaa !5
  %181 = icmp slt i64 %179, %180
  br i1 %181, label %182, label %238

182:                                              ; preds = %178
  %183 = load i64, ptr %27, align 8, !tbaa !5
  %184 = icmp sge i64 %183, 0
  br i1 %184, label %185, label %238

185:                                              ; preds = %182
  %186 = load i64, ptr %12, align 8, !tbaa !5
  %187 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %186) #5
  %188 = load i64, ptr %13, align 8, !tbaa !5
  %189 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %187, i64 noundef %188)
          to label %190 unwind label %233

190:                                              ; preds = %185
  %191 = load i8, ptr %189, align 1, !tbaa !11
  %192 = sext i8 %191 to i32
  %193 = icmp eq i32 %192, 49
  br i1 %193, label %194, label %237

194:                                              ; preds = %190
  %195 = load i64, ptr %14, align 8, !tbaa !5
  %196 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %195) #5
  %197 = load i64, ptr %15, align 8, !tbaa !5
  %198 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %196, i64 noundef %197)
          to label %199 unwind label %233

199:                                              ; preds = %194
  %200 = load i8, ptr %198, align 1, !tbaa !11
  %201 = sext i8 %200 to i32
  %202 = icmp eq i32 %201, 49
  br i1 %202, label %203, label %237

203:                                              ; preds = %199
  %204 = load i64, ptr %16, align 8, !tbaa !5
  %205 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %204) #5
  %206 = load i64, ptr %17, align 8, !tbaa !5
  %207 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %205, i64 noundef %206)
          to label %208 unwind label %233

208:                                              ; preds = %203
  %209 = load i8, ptr %207, align 1, !tbaa !11
  %210 = sext i8 %209 to i32
  %211 = icmp eq i32 %210, 49
  br i1 %211, label %212, label %237

212:                                              ; preds = %208
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %214 unwind label %233

214:                                              ; preds = %212
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef @.str.1)
          to label %216 unwind label %233

216:                                              ; preds = %214
  store i32 1, ptr %9, align 4
  br label %239

217:                                              ; preds = %85
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %5, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  br label %248

221:                                              ; preds = %132
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %5, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  br label %247

225:                                              ; preds = %145
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %5, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  br label %246

229:                                              ; preds = %158
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %5, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #5
  br label %245

233:                                              ; preds = %214, %212, %203, %194, %185
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %5, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %6, align 4
  br label %245

237:                                              ; preds = %208, %199, %190
  br label %238

238:                                              ; preds = %237, %182, %178, %175, %171
  store i32 0, ptr %9, align 4
  br label %239

239:                                              ; preds = %238, %216
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %240 = load i32, ptr %9, align 4
  switch i32 %240, label %249 [
    i32 0, label %241
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241
  %243 = load i64, ptr %11, align 8, !tbaa !5
  %244 = add nsw i64 %243, 3
  store i64 %244, ptr %11, align 8, !tbaa !5
  br label %77, !llvm.loop !16

245:                                              ; preds = %233, %229
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %246

246:                                              ; preds = %245, %225
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %247

247:                                              ; preds = %246, %221
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %248

248:                                              ; preds = %247, %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %258

249:                                              ; preds = %239, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %250 = load i32, ptr %9, align 4
  switch i32 %250, label %256 [
    i32 11, label %251
  ]

251:                                              ; preds = %249
  br label %252

252:                                              ; preds = %251, %72
  br label %253

253:                                              ; preds = %252
  %254 = load i64, ptr %10, align 8, !tbaa !5
  %255 = add nsw i64 %254, 1
  store i64 %255, ptr %10, align 8, !tbaa !5
  br label %62, !llvm.loop !17

256:                                              ; preds = %249, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %257 = load i32, ptr %9, align 4
  switch i32 %257, label %263 [
    i32 8, label %259
  ]

258:                                              ; preds = %248, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %277

259:                                              ; preds = %256
  br label %260

260:                                              ; preds = %259
  %261 = load i64, ptr %8, align 8, !tbaa !5
  %262 = add nsw i64 %261, 1
  store i64 %262, ptr %8, align 8, !tbaa !5
  br label %56, !llvm.loop !18

263:                                              ; preds = %256, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %264 = load i32, ptr %9, align 4
  switch i32 %264, label %270 [
    i32 5, label %265
  ]

265:                                              ; preds = %263
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %267 unwind label %273

267:                                              ; preds = %265
  %268 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %266, ptr noundef @.str.1)
          to label %269 unwind label %273

269:                                              ; preds = %267
  store i32 0, ptr %9, align 4
  br label %270

270:                                              ; preds = %269, %263
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  %271 = load i32, ptr %9, align 4
  switch i32 %271, label %284 [
    i32 0, label %272
    i32 1, label %272
  ]

272:                                              ; preds = %270, %270
  ret void

273:                                              ; preds = %267, %265
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %5, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %6, align 4
  br label %277

277:                                              ; preds = %273, %258, %51
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %278

278:                                              ; preds = %277, %39
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %5, align 8
  %281 = load i32, ptr %6, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283

284:                                              ; preds = %270
  unreachable
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr, i64) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3minIlET_St16initializer_listIS0_E(ptr, i64) #4

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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@dx = external dso_local local_unnamed_addr global [12 x i64], align 16
@dy = external dso_local local_unnamed_addr global [12 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca [3 x i64], align 8
  %6 = alloca [3 x i64], align 8
  %7 = alloca [3 x i64], align 8
  %8 = alloca [3 x i64], align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %11 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %11, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %12 unwind label %25

12:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph, label %.critedge90

.preheader92:                                     ; preds = %29
  %.not98 = icmp sgt i64 %31, 0
  br i1 %.not98, label %.preheader91.lr.ph, label %.critedge90

.preheader91.lr.ph:                               ; preds = %.preheader92
  %15 = getelementptr inbounds i8, ptr %5, i64 8
  %16 = getelementptr inbounds i8, ptr %5, i64 16
  %17 = getelementptr inbounds i8, ptr %6, i64 8
  %18 = getelementptr inbounds i8, ptr %6, i64 16
  %19 = getelementptr inbounds i8, ptr %7, i64 8
  %20 = getelementptr inbounds i8, ptr %7, i64 16
  %21 = getelementptr inbounds i8, ptr %8, i64 8
  %22 = getelementptr inbounds i8, ptr %8, i64 16
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = icmp sgt i64 %23, 0
  br i1 %24, label %.preheader91, label %.critedge90

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  br label %123

.lr.ph:                                           ; preds = %12, %29
  %.06993 = phi i64 [ %30, %29 ], [ 0, %12 ]
  %27 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.06993) #5
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %29 unwind label %33

29:                                               ; preds = %.lr.ph
  %30 = add nuw nsw i64 %.06993, 1
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %32 = icmp slt i64 %30, %31
  br i1 %32, label %.lr.ph, label %.preheader92, !llvm.loop !9

33:                                               ; preds = %.lr.ph
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %122

.preheader91:                                     ; preds = %.preheader91.lr.ph, %.critedge88
  %35 = phi i64 [ %114, %.critedge88 ], [ %31, %.preheader91.lr.ph ]
  %36 = phi i64 [ %115, %.critedge88 ], [ %23, %.preheader91.lr.ph ]
  %.07099 = phi i64 [ %116, %.critedge88 ], [ 0, %.preheader91.lr.ph ]
  %.not8295 = icmp sgt i64 %36, 0
  br i1 %.not8295, label %.lr.ph97, label %.critedge88

.lr.ph97:                                         ; preds = %.preheader91, %.critedge86
  %.07596 = phi i64 [ %112, %.critedge86 ], [ 0, %.preheader91 ]
  %37 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.07099) #5
  %38 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %37, i64 noundef %.07596)
          to label %39 unwind label %42

39:                                               ; preds = %.lr.ph97
  %40 = load i8, ptr %38, align 1, !tbaa !11
  %41 = icmp eq i8 %40, 48
  br i1 %41, label %.preheader, label %.critedge86

42:                                               ; preds = %.lr.ph97
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %122

.preheader:                                       ; preds = %39, %109
  %.07694 = phi i64 [ %110, %109 ], [ 0, %39 ]
  %44 = getelementptr inbounds [12 x i64], ptr @dx, i64 0, i64 %.07694
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = add nsw i64 %45, %.07099
  %47 = getelementptr inbounds [12 x i64], ptr @dy, i64 0, i64 %.07694
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = add nsw i64 %48, %.07596
  %50 = add nuw nsw i64 %.07694, 1
  %51 = getelementptr inbounds [12 x i64], ptr @dx, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = add nsw i64 %52, %.07099
  %54 = getelementptr inbounds [12 x i64], ptr @dy, i64 0, i64 %50
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = add nsw i64 %55, %.07596
  %57 = add nuw nsw i64 %.07694, 2
  %58 = getelementptr inbounds [12 x i64], ptr @dx, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !5
  %60 = add nsw i64 %59, %.07099
  %61 = getelementptr inbounds [12 x i64], ptr @dy, i64 0, i64 %57
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = add nsw i64 %62, %.07596
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  store i64 %46, ptr %5, align 8, !tbaa !5
  store i64 %53, ptr %15, align 8, !tbaa !5
  store i64 %60, ptr %16, align 8, !tbaa !5
  %64 = invoke noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr nonnull %5, i64 3)
          to label %65 unwind label %101

65:                                               ; preds = %.preheader
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  store i64 %49, ptr %6, align 8, !tbaa !5
  store i64 %56, ptr %17, align 8, !tbaa !5
  store i64 %63, ptr %18, align 8, !tbaa !5
  %66 = invoke noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr nonnull %6, i64 3)
          to label %67 unwind label %103

67:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  store i64 %46, ptr %7, align 8, !tbaa !5
  store i64 %53, ptr %19, align 8, !tbaa !5
  store i64 %60, ptr %20, align 8, !tbaa !5
  %68 = invoke noundef i64 @_ZSt3minIlET_St16initializer_listIS0_E(ptr nonnull %7, i64 3)
          to label %69 unwind label %105

69:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  store i64 %49, ptr %8, align 8, !tbaa !5
  store i64 %56, ptr %21, align 8, !tbaa !5
  store i64 %63, ptr %22, align 8, !tbaa !5
  %70 = invoke noundef i64 @_ZSt3minIlET_St16initializer_listIS0_E(ptr nonnull %8, i64 3)
          to label %71 unwind label %107

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  %72 = load i64, ptr %1, align 8, !tbaa !5
  %73 = icmp slt i64 %64, %72
  %74 = icmp sgt i64 %68, -1
  %or.cond = and i1 %74, %73
  br i1 %or.cond, label %75, label %109

75:                                               ; preds = %71
  %76 = load i64, ptr %2, align 8, !tbaa !5
  %77 = icmp slt i64 %66, %76
  %78 = icmp sgt i64 %70, -1
  %or.cond6 = and i1 %78, %77
  br i1 %or.cond6, label %79, label %109

79:                                               ; preds = %75
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %46) #5
  %81 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %80, i64 noundef %49)
          to label %82 unwind label %.loopexit

82:                                               ; preds = %79
  %83 = load i8, ptr %81, align 1, !tbaa !11
  %84 = icmp eq i8 %83, 49
  br i1 %84, label %85, label %109

85:                                               ; preds = %82
  %86 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #5
  %87 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %86, i64 noundef %56)
          to label %88 unwind label %.loopexit

88:                                               ; preds = %85
  %89 = load i8, ptr %87, align 1, !tbaa !11
  %90 = icmp eq i8 %89, 49
  br i1 %90, label %91, label %109

91:                                               ; preds = %88
  %92 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %60) #5
  %93 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %92, i64 noundef %63)
          to label %94 unwind label %.loopexit

94:                                               ; preds = %91
  %95 = load i8, ptr %93, align 1, !tbaa !11
  %96 = icmp eq i8 %95, 49
  br i1 %96, label %97, label %109

97:                                               ; preds = %94
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %99 unwind label %.loopexit.split-lp

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @.str.1)
          to label %.critedge unwind label %.loopexit.split-lp

101:                                              ; preds = %.preheader
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %122

103:                                              ; preds = %65
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %122

105:                                              ; preds = %67
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %122

107:                                              ; preds = %69
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %122

.loopexit:                                        ; preds = %79, %85, %91
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %122

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

109:                                              ; preds = %82, %88, %94, %75, %71
  %110 = add nuw nsw i64 %.07694, 3
  %111 = icmp ugt i64 %.07694, 8
  br i1 %111, label %.critedge86, label %.preheader, !llvm.loop !12

.critedge86:                                      ; preds = %109, %39
  %112 = add nuw nsw i64 %.07596, 1
  %113 = load i64, ptr %2, align 8, !tbaa !5
  %.not82 = icmp slt i64 %112, %113
  br i1 %.not82, label %.lr.ph97, label %.critedge88.loopexit, !llvm.loop !13

.critedge88.loopexit:                             ; preds = %.critedge86
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %.critedge88

.critedge88:                                      ; preds = %.critedge88.loopexit, %.preheader91
  %114 = phi i64 [ %.pre, %.critedge88.loopexit ], [ %35, %.preheader91 ]
  %115 = phi i64 [ %113, %.critedge88.loopexit ], [ %36, %.preheader91 ]
  %116 = add nuw nsw i64 %.07099, 1
  %.not = icmp slt i64 %116, %114
  br i1 %.not, label %.preheader91, label %.critedge90, !llvm.loop !14

.critedge90:                                      ; preds = %.critedge88, %12, %.preheader91.lr.ph, %.preheader92
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %118 unwind label %120

118:                                              ; preds = %.critedge90
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @.str.1)
          to label %.critedge unwind label %120

.critedge:                                        ; preds = %99, %118
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

120:                                              ; preds = %118, %.critedge90
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %122

122:                                              ; preds = %.loopexit, %.loopexit.split-lp, %42, %103, %107, %105, %101, %120, %33
  %.pn83 = phi { ptr, i32 } [ %34, %33 ], [ %121, %120 ], [ %43, %42 ], [ %102, %101 ], [ %104, %103 ], [ %106, %105 ], [ %108, %107 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br label %123

123:                                              ; preds = %122, %25
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %122 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn83.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3minIlET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #4

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

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

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

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


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