; LLVM IR from abeaumont/competitive-programming :: codechef/april09 (b5)

; 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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<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 }
%"class.std::tuple.2" = type { %"struct.std::_Tuple_impl.3" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"struct.std::_Head_base.6" = type { ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@m = external dso_local global [1001 x [1001 x i32]], align 16
@x = external dso_local global [1001 x [1001 x i32]], align 16
@y = external dso_local global [1001 x [1001 x i32]], 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 [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::deque", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::tuple.2", align 8
  %11 = alloca %"class.std::tuple", align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::tuple.2", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::tuple.2", align 8
  %21 = alloca %"class.std::tuple", align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::deque", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::tuple.2", align 8
  %29 = alloca %"class.std::tuple", align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca %"class.std::tuple.2", align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.std::tuple.2", align 8
  %37 = alloca %"class.std::tuple", align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %66, %0
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %69

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

49:                                               ; preds = %62, %48
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = load i32, ptr @n, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %65

54:                                               ; preds = %49
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %56
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [1001 x i32], ptr %57, i64 0, i64 %59
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %60)
  br label %62

62:                                               ; preds = %54
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %4, align 4, !tbaa !5
  br label %49, !llvm.loop !9

65:                                               ; preds = %53
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %2, align 4, !tbaa !5
  br label %43, !llvm.loop !11

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

70:                                               ; preds = %194, %69
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %198

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #6
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %110, %75
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = load i32, ptr @k, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %117

81:                                               ; preds = %76
  br label %82

82:                                               ; preds = %101, %81
  %83 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  %84 = xor i1 %83, true
  br i1 %84, label %85, label %102

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %86 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %10, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9) #6
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(8) %86) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %90
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1001 x i32], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp slt i32 %88, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %85
  store i32 15, ptr %3, align 4
  br label %99

98:                                               ; preds = %85
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  store i32 0, ptr %3, align 4
  br label %99

99:                                               ; preds = %98, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %100 = load i32, ptr %3, align 4
  switch i32 %100, label %380 [
    i32 0, label %101
    i32 15, label %102
  ]

101:                                              ; preds = %99
  br label %82, !llvm.loop !12

102:                                              ; preds = %99, %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %104
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1001 x i32], ptr %105, i64 0, i64 %107
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %108) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %109 unwind label %113

109:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %7, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !5
  br label %76, !llvm.loop !13

113:                                              ; preds = %102
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %12, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %197

117:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %175, %117
  %119 = load i32, ptr %14, align 4, !tbaa !5
  %120 = load i32, ptr @n, align 4, !tbaa !5
  %121 = load i32, ptr @k, align 4, !tbaa !5
  %122 = sub nsw i32 %120, %121
  %123 = icmp slt i32 %119, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %118
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %182

125:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %126 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %17, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16) #6
  %127 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(8) %126) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  %128 = load i32, ptr %16, align 4, !tbaa !5
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %130
  %132 = load i32, ptr %14, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [1001 x i32], ptr %131, i64 0, i64 %133
  store i32 %128, ptr %134, align 4, !tbaa !5
  %135 = load i32, ptr %15, align 4, !tbaa !5
  %136 = load i32, ptr %14, align 4, !tbaa !5
  %137 = icmp sle i32 %135, %136
  br i1 %137, label %138, label %139

138:                                              ; preds = %125
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  br label %139

139:                                              ; preds = %138, %125
  br label %140

140:                                              ; preds = %161, %139
  %141 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  %142 = xor i1 %141, true
  br i1 %142, label %143, label %162

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %144 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %20, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19) #6
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(8) %144) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  %146 = load i32, ptr %19, align 4, !tbaa !5
  %147 = load i32, ptr %5, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %148
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = load i32, ptr @k, align 4, !tbaa !5
  %152 = add nsw i32 %150, %151
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [1001 x i32], ptr %149, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = icmp slt i32 %146, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %143
  store i32 20, ptr %3, align 4
  br label %159

158:                                              ; preds = %143
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  store i32 0, ptr %3, align 4
  br label %159

159:                                              ; preds = %158, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %160 = load i32, ptr %3, align 4
  switch i32 %160, label %380 [
    i32 0, label %161
    i32 20, label %162
  ]

161:                                              ; preds = %159
  br label %140, !llvm.loop !14

162:                                              ; preds = %159, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = load i32, ptr @k, align 4, !tbaa !5
  %165 = add nsw i32 %163, %164
  store i32 %165, ptr %22, align 4, !tbaa !5
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %167
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = load i32, ptr @k, align 4, !tbaa !5
  %171 = add nsw i32 %169, %170
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [1001 x i32], ptr %168, i64 0, i64 %172
  call void @_ZNSt5tupleIJiiEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %173) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %174 unwind label %178

174:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %14, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %14, align 4, !tbaa !5
  br label %118, !llvm.loop !15

178:                                              ; preds = %162
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %12, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %197

182:                                              ; preds = %124
  %183 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %183) #6
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = load i32, ptr %5, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %187
  %189 = load i32, ptr @n, align 4, !tbaa !5
  %190 = load i32, ptr @k, align 4, !tbaa !5
  %191 = sub nsw i32 %189, %190
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [1001 x i32], ptr %188, i64 0, i64 %192
  store i32 %185, ptr %193, align 4, !tbaa !5
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #6
  br label %194

194:                                              ; preds = %182
  %195 = load i32, ptr %5, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %5, align 4, !tbaa !5
  br label %70, !llvm.loop !16

197:                                              ; preds = %178, %113
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %375

198:                                              ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %326, %198
  %200 = load i32, ptr %23, align 4, !tbaa !5
  %201 = load i32, ptr @n, align 4, !tbaa !5
  %202 = load i32, ptr @k, align 4, !tbaa !5
  %203 = sub nsw i32 %201, %202
  %204 = add nsw i32 %203, 1
  %205 = icmp slt i32 %200, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %199
  store i32 21, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %330

207:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 80, ptr %24) #6
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %242, %207
  %209 = load i32, ptr %25, align 4, !tbaa !5
  %210 = load i32, ptr @k, align 4, !tbaa !5
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 24, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %249

213:                                              ; preds = %208
  br label %214

214:                                              ; preds = %233, %213
  %215 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  %216 = xor i1 %215, true
  br i1 %216, label %217, label %234

217:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %218 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %28, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27) #6
  %219 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(8) %218) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  %220 = load i32, ptr %27, align 4, !tbaa !5
  %221 = load i32, ptr %25, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %222
  %224 = load i32, ptr %23, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [1001 x i32], ptr %223, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = icmp slt i32 %220, %227
  br i1 %228, label %229, label %230

229:                                              ; preds = %217
  store i32 28, ptr %3, align 4
  br label %231

230:                                              ; preds = %217
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  store i32 0, ptr %3, align 4
  br label %231

231:                                              ; preds = %230, %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  %232 = load i32, ptr %3, align 4
  switch i32 %232, label %380 [
    i32 0, label %233
    i32 28, label %234
  ]

233:                                              ; preds = %231
  br label %214, !llvm.loop !17

234:                                              ; preds = %231, %214
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %235 = load i32, ptr %25, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %236
  %238 = load i32, ptr %23, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [1001 x i32], ptr %237, i64 0, i64 %239
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %240) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %241 unwind label %245

241:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %25, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %25, align 4, !tbaa !5
  br label %208, !llvm.loop !18

245:                                              ; preds = %234
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %12, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %329

249:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %250

250:                                              ; preds = %307, %249
  %251 = load i32, ptr %30, align 4, !tbaa !5
  %252 = load i32, ptr @n, align 4, !tbaa !5
  %253 = load i32, ptr @k, align 4, !tbaa !5
  %254 = sub nsw i32 %252, %253
  %255 = icmp slt i32 %251, %254
  br i1 %255, label %257, label %256

256:                                              ; preds = %250
  store i32 29, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %314

257:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %258 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %33, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32) #6
  %259 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(8) %258) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  %260 = load i32, ptr %32, align 4, !tbaa !5
  %261 = load i32, ptr %30, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1001 x [1001 x i32]], ptr @y, i64 0, i64 %262
  %264 = load i32, ptr %23, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [1001 x i32], ptr %263, i64 0, i64 %265
  store i32 %260, ptr %266, align 4, !tbaa !5
  %267 = load i32, ptr %31, align 4, !tbaa !5
  %268 = load i32, ptr %30, align 4, !tbaa !5
  %269 = icmp sle i32 %267, %268
  br i1 %269, label %270, label %271

270:                                              ; preds = %257
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  br label %271

271:                                              ; preds = %270, %257
  br label %272

272:                                              ; preds = %293, %271
  %273 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  %274 = xor i1 %273, true
  br i1 %274, label %275, label %294

275:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %276 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple.2") align 8 %36, ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %35) #6
  %277 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(8) %276) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #6
  %278 = load i32, ptr %35, align 4, !tbaa !5
  %279 = load i32, ptr %30, align 4, !tbaa !5
  %280 = load i32, ptr @k, align 4, !tbaa !5
  %281 = add nsw i32 %279, %280
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %282
  %284 = load i32, ptr %23, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [1001 x i32], ptr %283, i64 0, i64 %285
  %287 = load i32, ptr %286, align 4, !tbaa !5
  %288 = icmp slt i32 %278, %287
  br i1 %288, label %289, label %290

289:                                              ; preds = %275
  store i32 33, ptr %3, align 4
  br label %291

290:                                              ; preds = %275
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  store i32 0, ptr %3, align 4
  br label %291

291:                                              ; preds = %290, %289
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  %292 = load i32, ptr %3, align 4
  switch i32 %292, label %380 [
    i32 0, label %293
    i32 33, label %294
  ]

293:                                              ; preds = %291
  br label %272, !llvm.loop !19

294:                                              ; preds = %291, %272
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  %295 = load i32, ptr %30, align 4, !tbaa !5
  %296 = load i32, ptr @k, align 4, !tbaa !5
  %297 = add nsw i32 %295, %296
  store i32 %297, ptr %38, align 4, !tbaa !5
  %298 = load i32, ptr %30, align 4, !tbaa !5
  %299 = load i32, ptr @k, align 4, !tbaa !5
  %300 = add nsw i32 %298, %299
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %301
  %303 = load i32, ptr %23, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [1001 x i32], ptr %302, i64 0, i64 %304
  call void @_ZNSt5tupleIJiiEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %37, ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %305) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %24, ptr noundef nonnull align 4 dereferenceable(8) %37)
          to label %306 unwind label %310

306:                                              ; preds = %294
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %307

307:                                              ; preds = %306
  %308 = load i32, ptr %30, align 4, !tbaa !5
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %30, align 4, !tbaa !5
  br label %250, !llvm.loop !20

310:                                              ; preds = %294
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %12, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %329

314:                                              ; preds = %256
  %315 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  %316 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %315) #6
  %317 = load i32, ptr %316, align 4, !tbaa !5
  %318 = load i32, ptr @n, align 4, !tbaa !5
  %319 = load i32, ptr @k, align 4, !tbaa !5
  %320 = sub nsw i32 %318, %319
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [1001 x [1001 x i32]], ptr @y, i64 0, i64 %321
  %323 = load i32, ptr %23, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [1001 x i32], ptr %322, i64 0, i64 %324
  store i32 %317, ptr %325, align 4, !tbaa !5
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #6
  br label %326

326:                                              ; preds = %314
  %327 = load i32, ptr %23, align 4, !tbaa !5
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %23, align 4, !tbaa !5
  br label %199, !llvm.loop !21

329:                                              ; preds = %310, %245
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %24) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %375

330:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  store i32 0, ptr %39, align 4, !tbaa !5
  br label %331

331:                                              ; preds = %370, %330
  %332 = load i32, ptr %39, align 4, !tbaa !5
  %333 = load i32, ptr @n, align 4, !tbaa !5
  %334 = load i32, ptr @k, align 4, !tbaa !5
  %335 = sub nsw i32 %333, %334
  %336 = add nsw i32 %335, 1
  %337 = icmp slt i32 %332, %336
  br i1 %337, label %339, label %338

338:                                              ; preds = %331
  store i32 34, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %373

339:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %340

340:                                              ; preds = %365, %339
  %341 = load i32, ptr %40, align 4, !tbaa !5
  %342 = load i32, ptr @n, align 4, !tbaa !5
  %343 = load i32, ptr @k, align 4, !tbaa !5
  %344 = sub nsw i32 %342, %343
  %345 = add nsw i32 %344, 1
  %346 = icmp slt i32 %341, %345
  br i1 %346, label %348, label %347

347:                                              ; preds = %340
  store i32 37, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  br label %368

348:                                              ; preds = %340
  %349 = load i32, ptr %39, align 4, !tbaa !5
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [1001 x [1001 x i32]], ptr @y, i64 0, i64 %350
  %352 = load i32, ptr %40, align 4, !tbaa !5
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [1001 x i32], ptr %351, i64 0, i64 %353
  %355 = load i32, ptr %354, align 4, !tbaa !5
  %356 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %355)
  %357 = load i32, ptr %40, align 4, !tbaa !5
  %358 = load i32, ptr @n, align 4, !tbaa !5
  %359 = load i32, ptr @k, align 4, !tbaa !5
  %360 = sub nsw i32 %358, %359
  %361 = icmp slt i32 %357, %360
  br i1 %361, label %362, label %364

362:                                              ; preds = %348
  %363 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %364

364:                                              ; preds = %362, %348
  br label %365

365:                                              ; preds = %364
  %366 = load i32, ptr %40, align 4, !tbaa !5
  %367 = add nsw i32 %366, 1
  store i32 %367, ptr %40, align 4, !tbaa !5
  br label %340, !llvm.loop !22

368:                                              ; preds = %347
  %369 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %370

370:                                              ; preds = %368
  %371 = load i32, ptr %39, align 4, !tbaa !5
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %39, align 4, !tbaa !5
  br label %331, !llvm.loop !23

373:                                              ; preds = %338
  %374 = load i32, ptr %1, align 4
  ret i32 %374

375:                                              ; preds = %329, %197
  %376 = load ptr, ptr %12, align 8
  %377 = load i32, ptr %13, align 4
  %378 = insertvalue { ptr, i32 } poison, ptr %376, 0
  %379 = insertvalue { ptr, i32 } %378, i32 %377, 1
  resume { ptr, i32 } %379

380:                                              ; preds = %291, %231, %159, %99
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.2") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_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 #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_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 #4 align 2

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

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

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

; 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) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<int, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::tuple<int, int>, std::allocator<std::tuple<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 }
%"class.std::tuple.2" = type { %"struct.std::_Tuple_impl.3" }
%"struct.std::_Tuple_impl.3" = type { %"struct.std::_Tuple_impl.4", %"struct.std::_Head_base.6" }
%"struct.std::_Tuple_impl.4" = type { %"struct.std::_Head_base.5" }
%"struct.std::_Head_base.5" = type { ptr }
%"struct.std::_Head_base.6" = type { ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.1" = type { i32 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@m = external dso_local global [1001 x [1001 x i32]], align 16
@x = external dso_local global [1001 x [1001 x i32]], align 16
@y = external dso_local local_unnamed_addr global [1001 x [1001 x i32]], 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 [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::deque", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::tuple.2", align 8
  %6 = alloca %"class.std::tuple", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::tuple.2", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::tuple.2", align 8
  %13 = alloca %"class.std::tuple", align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::deque", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::tuple.2", align 8
  %20 = alloca %"class.std::tuple", align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::tuple.2", align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::tuple.2", align 8
  %27 = alloca %"class.std::tuple", align 4
  %28 = alloca i32, align 4
  %29 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.preheader97, label %.preheader92

.preheader97:                                     ; preds = %0, %._crit_edge
  %33 = phi i32 [ %36, %._crit_edge ], [ %31, %0 ]
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %._crit_edge ], [ 0, %0 ]
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %.preheader97.._crit_edge_crit_edge

.preheader97.._crit_edge_crit_edge:               ; preds = %.preheader97
  %.pre157 = sext i32 %33 to i64
  br label %._crit_edge

.preheader96:                                     ; preds = %._crit_edge
  %35 = icmp sgt i32 %36, 0
  br i1 %35, label %.lr.ph110, label %.preheader92

._crit_edge:                                      ; preds = %.lr.ph, %.preheader97.._crit_edge_crit_edge
  %.pre-phi158 = phi i64 [ %.pre157, %.preheader97.._crit_edge_crit_edge ], [ %41, %.lr.ph ]
  %36 = phi i32 [ %33, %.preheader97.._crit_edge_crit_edge ], [ %40, %.lr.ph ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %37 = icmp slt i64 %indvars.iv.next133, %.pre-phi158
  br i1 %37, label %.preheader97, label %.preheader96, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader97, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader97 ]
  %38 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %indvars.iv132, i64 %indvars.iv
  %39 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !12

.preheader92:                                     ; preds = %._crit_edge108, %0, %.preheader96
  %43 = phi i32 [ %36, %.preheader96 ], [ %31, %0 ], [ %79, %._crit_edge108 ]
  %44 = load i32, ptr @k, align 4, !tbaa !5
  %.not120 = icmp slt i32 %43, %44
  br i1 %.not120, label %.preheader89, label %.lr.ph122

.lr.ph110:                                        ; preds = %.preheader96, %._crit_edge108
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %._crit_edge108 ], [ 0, %.preheader96 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %1) #6
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %45 = load i32, ptr @k, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.preheader94, label %._crit_edge101

.preheader94:                                     ; preds = %.lr.ph110, %64
  %47 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  br i1 %47, label %.loopexit95, label %.lr.ph100

._crit_edge101:                                   ; preds = %64, %.lr.ph110
  %48 = phi i32 [ %45, %.lr.ph110 ], [ %67, %64 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = icmp sgt i32 %49, %48
  br i1 %50, label %.lr.ph107, label %._crit_edge108

.lr.ph100:                                        ; preds = %.preheader94, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %51 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %5, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #6
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(8) %51) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %indvars.iv138, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp slt i32 %53, %57
  br i1 %58, label %.thread, label %59

.thread:                                          ; preds = %.lr.ph100
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %.loopexit95

59:                                               ; preds = %.lr.ph100
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %60 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  br i1 %60, label %.loopexit95, label %.lr.ph100

.loopexit95:                                      ; preds = %59, %.preheader94, %.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %indvars.iv138, i64 %62
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %63) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %64 unwind label %69

64:                                               ; preds = %.loopexit95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %2, align 4, !tbaa !5
  %67 = load i32, ptr @k, align 4, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %.preheader94, label %._crit_edge101, !llvm.loop !13

69:                                               ; preds = %.loopexit95
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %114

._crit_edge108:                                   ; preds = %106, %._crit_edge101
  %71 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %71) #6
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = load i32, ptr @k, align 4, !tbaa !5
  %76 = sub nsw i32 %74, %75
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %indvars.iv138, i64 %77
  store i32 %73, ptr %78, align 4, !tbaa !5
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #6
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = icmp slt i64 %indvars.iv.next139, %80
  br i1 %81, label %.lr.ph110, label %.preheader92, !llvm.loop !14

.lr.ph107:                                        ; preds = %._crit_edge101, %106
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %106 ], [ 0, %._crit_edge101 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %82 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %9, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(8) %82) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %indvars.iv138, i64 %indvars.iv135
  store i32 %84, ptr %85, align 4, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %.not68 = icmp slt i64 %indvars.iv135, %87
  br i1 %.not68, label %89, label %88

88:                                               ; preds = %.lr.ph107
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  br label %89

89:                                               ; preds = %88, %.lr.ph107
  %90 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  %.pre159 = trunc nuw nsw i64 %indvars.iv135 to i32
  br i1 %90, label %.loopexit93, label %.lr.ph103

.lr.ph103:                                        ; preds = %89, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %91 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11) #6
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) %91) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = load i32, ptr @k, align 4, !tbaa !5
  %95 = add nsw i32 %94, %.pre159
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %indvars.iv138, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = icmp slt i32 %93, %98
  br i1 %99, label %.thread80, label %100

.thread80:                                        ; preds = %.lr.ph103
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %.loopexit93

100:                                              ; preds = %.lr.ph103
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  %101 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  br i1 %101, label %.loopexit93, label %.lr.ph103

.loopexit93:                                      ; preds = %100, %89, %.thread80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  %102 = load i32, ptr @k, align 4, !tbaa !5
  %103 = add nsw i32 %102, %.pre159
  store i32 %103, ptr %14, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1001 x [1001 x i32]], ptr @m, i64 0, i64 %indvars.iv138, i64 %104
  call void @_ZNSt5tupleIJiiEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %105) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %106 unwind label %112

106:                                              ; preds = %.loopexit93
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %107 = load i32, ptr @n, align 4, !tbaa !5
  %108 = load i32, ptr @k, align 4, !tbaa !5
  %109 = sub nsw i32 %107, %108
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next136, %110
  br i1 %111, label %.lr.ph107, label %._crit_edge108, !llvm.loop !15

112:                                              ; preds = %.loopexit93
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %114

114:                                              ; preds = %112, %69
  %.pn69 = phi { ptr, i32 } [ %70, %69 ], [ %113, %112 ]
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %1) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %1) #6
  br label %206

.preheader89:                                     ; preds = %._crit_edge119, %.preheader92
  %115 = phi i32 [ %44, %.preheader92 ], [ %152, %._crit_edge119 ]
  %116 = phi i32 [ %43, %.preheader92 ], [ %151, %._crit_edge119 ]
  %.not63127 = icmp slt i32 %116, %115
  br i1 %.not63127, label %._crit_edge129, label %.preheader

.lr.ph122:                                        ; preds = %.preheader92, %._crit_edge119
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %._crit_edge119 ], [ 0, %.preheader92 ]
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %15) #6
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  %117 = load i32, ptr @k, align 4, !tbaa !5
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %.preheader90, label %._crit_edge112

.preheader90:                                     ; preds = %.lr.ph122, %136
  %119 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  br i1 %119, label %.loopexit91, label %.lr.ph111

._crit_edge112:                                   ; preds = %136, %.lr.ph122
  %120 = phi i32 [ %117, %.lr.ph122 ], [ %139, %136 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = icmp sgt i32 %121, %120
  br i1 %122, label %.lr.ph118, label %._crit_edge119

.lr.ph111:                                        ; preds = %.preheader90, %131
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  %123 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %19, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18) #6
  %124 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(8) %123) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  %125 = load i32, ptr %18, align 4, !tbaa !5
  %126 = load i32, ptr %16, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %127, i64 %indvars.iv144
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp slt i32 %125, %129
  br i1 %130, label %.thread83, label %131

.thread83:                                        ; preds = %.lr.ph111
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  br label %.loopexit91

131:                                              ; preds = %.lr.ph111
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  %132 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  br i1 %132, label %.loopexit91, label %.lr.ph111

.loopexit91:                                      ; preds = %131, %.preheader90, %.thread83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %133 = load i32, ptr %16, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %134, i64 %indvars.iv144
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %135) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %15, ptr noundef nonnull align 4 dereferenceable(8) %20)
          to label %136 unwind label %141

136:                                              ; preds = %.loopexit91
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  %137 = load i32, ptr %16, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %16, align 4, !tbaa !5
  %139 = load i32, ptr @k, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %.preheader90, label %._crit_edge112, !llvm.loop !16

141:                                              ; preds = %.loopexit91
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  br label %187

._crit_edge119:                                   ; preds = %179, %._crit_edge112
  %143 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %143) #6
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = load i32, ptr @k, align 4, !tbaa !5
  %148 = sub nsw i32 %146, %147
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1001 x [1001 x i32]], ptr @y, i64 0, i64 %149, i64 %indvars.iv144
  store i32 %145, ptr %150, align 4, !tbaa !5
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %15) #6
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %151 = load i32, ptr @n, align 4, !tbaa !5
  %152 = load i32, ptr @k, align 4, !tbaa !5
  %153 = sub nsw i32 %151, %152
  %154 = sext i32 %153 to i64
  %.not.not = icmp slt i64 %indvars.iv144, %154
  br i1 %.not.not, label %.lr.ph122, label %.preheader89, !llvm.loop !17

.lr.ph118:                                        ; preds = %._crit_edge112, %179
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %179 ], [ 0, %._crit_edge112 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #6
  %155 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %23, ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22) #6
  %156 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(8) %155) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #6
  %157 = load i32, ptr %22, align 4, !tbaa !5
  %158 = getelementptr inbounds [1001 x [1001 x i32]], ptr @y, i64 0, i64 %indvars.iv141, i64 %indvars.iv144
  store i32 %157, ptr %158, align 4, !tbaa !5
  %159 = load i32, ptr %21, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %.not65 = icmp slt i64 %indvars.iv141, %160
  br i1 %.not65, label %162, label %161

161:                                              ; preds = %.lr.ph118
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  br label %162

162:                                              ; preds = %161, %.lr.ph118
  %163 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  %.pre161 = trunc nuw nsw i64 %indvars.iv141 to i32
  br i1 %163, label %.loopexit, label %.lr.ph114

.lr.ph114:                                        ; preds = %162, %173
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #6
  %164 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #6
  call void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.2") align 8 %26, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25) #6
  %165 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(8) %164) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #6
  %166 = load i32, ptr %25, align 4, !tbaa !5
  %167 = load i32, ptr @k, align 4, !tbaa !5
  %168 = add nsw i32 %167, %.pre161
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %169, i64 %indvars.iv144
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = icmp slt i32 %166, %171
  br i1 %172, label %.thread86, label %173

.thread86:                                        ; preds = %.lr.ph114
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #6
  br label %.loopexit

173:                                              ; preds = %.lr.ph114
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #6
  %174 = call noundef zeroext i1 @_ZNKSt5dequeISt5tupleIJiiEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  br i1 %174, label %.loopexit, label %.lr.ph114

.loopexit:                                        ; preds = %173, %162, %.thread86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #6
  %175 = load i32, ptr @k, align 4, !tbaa !5
  %176 = add nsw i32 %175, %.pre161
  store i32 %176, ptr %28, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [1001 x [1001 x i32]], ptr @x, i64 0, i64 %177, i64 %indvars.iv144
  call void @_ZNSt5tupleIJiiEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %178) #6
  invoke void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) %15, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %179 unwind label %185

179:                                              ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %180 = load i32, ptr @n, align 4, !tbaa !5
  %181 = load i32, ptr @k, align 4, !tbaa !5
  %182 = sub nsw i32 %180, %181
  %183 = sext i32 %182 to i64
  %184 = icmp slt i64 %indvars.iv.next142, %183
  br i1 %184, label %.lr.ph118, label %._crit_edge119, !llvm.loop !18

185:                                              ; preds = %.loopexit
  %186 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #6
  br label %187

187:                                              ; preds = %185, %141
  %.pn = phi { ptr, i32 } [ %142, %141 ], [ %186, %185 ]
  call void @_ZNSt5dequeISt5tupleIJiiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %15) #6
  br label %206

.preheader:                                       ; preds = %.preheader89, %._crit_edge126
  %188 = phi i32 [ %192, %._crit_edge126 ], [ %115, %.preheader89 ]
  %189 = phi i32 [ %191, %._crit_edge126 ], [ %116, %.preheader89 ]
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %._crit_edge126 ], [ 0, %.preheader89 ]
  %.not64123 = icmp slt i32 %189, %188
  br i1 %.not64123, label %._crit_edge126, label %.lr.ph125

._crit_edge129:                                   ; preds = %._crit_edge126, %.preheader89
  ret i32 0

._crit_edge126:                                   ; preds = %205, %.preheader
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %191 = load i32, ptr @n, align 4, !tbaa !5
  %192 = load i32, ptr @k, align 4, !tbaa !5
  %193 = sub nsw i32 %191, %192
  %194 = sext i32 %193 to i64
  %.not63.not = icmp slt i64 %indvars.iv150, %194
  br i1 %.not63.not, label %.preheader, label %._crit_edge129, !llvm.loop !19

.lr.ph125:                                        ; preds = %.preheader, %205
  %indvars.iv147 = phi i64 [ %indvars.iv.next148, %205 ], [ 0, %.preheader ]
  %195 = getelementptr inbounds [1001 x [1001 x i32]], ptr @y, i64 0, i64 %indvars.iv150, i64 %indvars.iv147
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %196)
  %198 = load i32, ptr @n, align 4, !tbaa !5
  %199 = load i32, ptr @k, align 4, !tbaa !5
  %200 = sub nsw i32 %198, %199
  %201 = sext i32 %200 to i64
  %202 = icmp slt i64 %indvars.iv147, %201
  br i1 %202, label %203, label %205

203:                                              ; preds = %.lr.ph125
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %.pre153 = load i32, ptr @k, align 4, !tbaa !5
  %.pre154 = sub nsw i32 %.pre, %.pre153
  %.pre155 = sext i32 %.pre154 to i64
  br label %205

205:                                              ; preds = %.lr.ph125, %203
  %.pre-phi156 = phi i64 [ %201, %.lr.ph125 ], [ %.pre155, %203 ]
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %.not64.not = icmp slt i64 %indvars.iv147, %.pre-phi156
  br i1 %.not64.not, label %.lr.ph125, label %._crit_edge126, !llvm.loop !20

206:                                              ; preds = %187, %114
  %.pn69.pn = phi { ptr, i32 } [ %.pn69, %114 ], [ %.pn, %187 ]
  resume { ptr, i32 } %.pn69.pn
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJiiEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.2") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRiS0_EEaSIiiEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKS_IJS4_S7_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_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 #4 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJiiEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_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 #4 align 2

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

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

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

; 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 #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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


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