; LLVM IR from abeaumont/competitive-programming :: codechef/july18a (wartaran)

; 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::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 }
%"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" }
%"struct.std::greater" = type { i8 }

@m = external dso_local global [1000 x [1000 x i32]], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global [1000 x i32], align 16
@d = external dso_local global [1000 x i32], align 16
@e = external dso_local global i32, align 4
@f = external dso_local global i32, align 4
@h = external dso_local global i32, align 4
@p = external dso_local global [1000 x %"class.std::tuple"], align 16
@q = external dso_local global [1000 x %"class.std::tuple"], 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 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::tuple", align 4
  %9 = alloca %"class.std::tuple", align 4
  %10 = alloca %"struct.std::greater", align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @t)
  br label %22

22:                                               ; preds = %327, %0
  %23 = load i32, ptr @t, align 4, !tbaa !5
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr @t, align 4, !tbaa !5
  %25 = icmp ne i32 %23, 0
  br i1 %25, label %26, label %328

26:                                               ; preds = %22
  %27 = 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)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %30 = load i32, ptr @a, align 4, !tbaa !5
  %31 = load i32, ptr @b, align 4, !tbaa !5
  %32 = add nsw i32 %30, %31
  store i32 %32, ptr @h, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %56, %26
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

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

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

39:                                               ; preds = %52, %38
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %46
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [1000 x i32], ptr %47, i64 0, i64 %49
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %50)
  br label %52

52:                                               ; preds = %44
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %4, align 4, !tbaa !5
  br label %39, !llvm.loop !9

55:                                               ; preds = %43
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %2, align 4, !tbaa !5
  br label %33, !llvm.loop !11

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

60:                                               ; preds = %96, %59
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

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

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

66:                                               ; preds = %84, %65
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = load i32, ptr @n, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %87

71:                                               ; preds = %66
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %73
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1000 x i32], ptr %74, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %83

80:                                               ; preds = %71
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %6, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %80, %71
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %7, align 4, !tbaa !5
  br label %66, !llvm.loop !12

87:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %5) #6
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @p, i64 0, i64 %89
  %91 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5tupleIJiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %90, ptr noundef nonnull align 4 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %5) #6
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @q, i64 0, i64 %93
  %95 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5tupleIJiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %96

96:                                               ; preds = %87
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %5, align 4, !tbaa !5
  br label %60, !llvm.loop !13

99:                                               ; preds = %64
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %"class.std::tuple", ptr @p, i64 %101
  call void @_ZSt4sortIPSt5tupleIJiiEEEvT_S3_(ptr noundef @p, ptr noundef %102)
  %103 = load i32, ptr @n, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %"class.std::tuple", ptr @q, i64 %104
  call void @_ZSt4sortIPSt5tupleIJiiEESt7greaterIS1_EEvT_S5_T0_(ptr noundef @q, ptr noundef %105)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %115, %99
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = load i32, ptr @n, align 4, !tbaa !5
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

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

111:                                              ; preds = %106
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %113
  store i32 1, ptr %114, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %111
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %11, align 4, !tbaa !5
  br label %106, !llvm.loop !14

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

119:                                              ; preds = %137, %118
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %140

124:                                              ; preds = %119
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %128)
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = load i32, ptr @n, align 4, !tbaa !5
  %132 = sub nsw i32 %131, 1
  %133 = icmp ne i32 %130, %132
  br i1 %133, label %134, label %136

134:                                              ; preds = %124
  %135 = 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 %136

136:                                              ; preds = %134, %124
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %12, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !5
  br label %119, !llvm.loop !15

140:                                              ; preds = %123
  %141 = 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_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %152, %140
  %143 = load i32, ptr %13, align 4, !tbaa !5
  %144 = load i32, ptr @n, align 4, !tbaa !5
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %155

147:                                              ; preds = %142
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %149
  %151 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %150)
  br label %152

152:                                              ; preds = %147
  %153 = load i32, ptr %13, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %13, align 4, !tbaa !5
  br label %142, !llvm.loop !16

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

156:                                              ; preds = %324, %155
  %157 = load i32, ptr %14, align 4, !tbaa !5
  %158 = load i32, ptr @n, align 4, !tbaa !5
  %159 = load i32, ptr @h, align 4, !tbaa !5
  %160 = sdiv i32 %158, %159
  %161 = icmp slt i32 %157, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %156
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %327

163:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %296, %163
  %165 = load i32, ptr %17, align 4, !tbaa !5
  %166 = load i32, ptr @a, align 4, !tbaa !5
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %299

169:                                              ; preds = %164
  br label %170

170:                                              ; preds = %249, %247, %169
  %171 = load i32, ptr %15, align 4, !tbaa !5
  %172 = load i32, ptr @n, align 4, !tbaa !5
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %174, label %250

174:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %175 = load i32, ptr %15, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @p, i64 0, i64 %176
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %177) #6
  %179 = load i32, ptr %178, align 4, !tbaa !5
  store i32 %179, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %180 = load i32, ptr %16, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @q, i64 0, i64 %181
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %182) #6
  %184 = load i32, ptr %183, align 4, !tbaa !5
  store i32 %184, ptr %19, align 4, !tbaa !5
  %185 = load i32, ptr %18, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %193, label %190

190:                                              ; preds = %174
  %191 = load i32, ptr %15, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %15, align 4, !tbaa !5
  store i32 31, ptr %3, align 4
  br label %247, !llvm.loop !17

193:                                              ; preds = %174
  %194 = load i32, ptr %19, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %209, label %199

199:                                              ; preds = %193
  %200 = load i32, ptr %16, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %16, align 4, !tbaa !5
  %202 = load i32, ptr %16, align 4, !tbaa !5
  %203 = load i32, ptr @n, align 4, !tbaa !5
  %204 = icmp eq i32 %202, %203
  br i1 %204, label %205, label %208

205:                                              ; preds = %199
  store i32 0, ptr %16, align 4, !tbaa !5
  %206 = load i32, ptr %15, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %15, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %205, %199
  store i32 31, ptr %3, align 4
  br label %247, !llvm.loop !17

209:                                              ; preds = %193
  %210 = load i32, ptr %18, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %211
  %213 = load i32, ptr %19, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [1000 x i32], ptr %212, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %218, label %237

218:                                              ; preds = %209
  %219 = load i32, ptr %18, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %220)
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef @.str)
  %223 = load i32, ptr %19, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %222, i32 noundef %224)
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %227 = load i32, ptr %18, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = add nsw i32 %230, -1
  store i32 %231, ptr %229, align 4, !tbaa !5
  %232 = load i32, ptr %19, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !5
  %236 = add nsw i32 %235, -1
  store i32 %236, ptr %234, align 4, !tbaa !5
  store i32 32, ptr %3, align 4
  br label %247

237:                                              ; preds = %209
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %16, align 4, !tbaa !5
  %240 = load i32, ptr %16, align 4, !tbaa !5
  %241 = load i32, ptr @n, align 4, !tbaa !5
  %242 = icmp eq i32 %240, %241
  br i1 %242, label %243, label %246

243:                                              ; preds = %237
  store i32 0, ptr %16, align 4, !tbaa !5
  %244 = load i32, ptr %15, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %15, align 4, !tbaa !5
  br label %246

246:                                              ; preds = %243, %237
  store i32 0, ptr %3, align 4
  br label %247

247:                                              ; preds = %246, %218, %208, %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %248 = load i32, ptr %3, align 4
  switch i32 %248, label %330 [
    i32 0, label %249
    i32 31, label %170
    i32 32, label %250
  ]

249:                                              ; preds = %247
  br label %170, !llvm.loop !17

250:                                              ; preds = %247, %170
  %251 = load i32, ptr %15, align 4, !tbaa !5
  %252 = load i32, ptr @n, align 4, !tbaa !5
  %253 = icmp eq i32 %251, %252
  br i1 %253, label %254, label %295

254:                                              ; preds = %250
  store i32 0, ptr %15, align 4, !tbaa !5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %255

255:                                              ; preds = %262, %254
  %256 = load i32, ptr %15, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %257
  %259 = load i32, ptr %258, align 4, !tbaa !5
  %260 = icmp ne i32 %259, 0
  %261 = xor i1 %260, true
  br i1 %261, label %262, label %265

262:                                              ; preds = %255
  %263 = load i32, ptr %15, align 4, !tbaa !5
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %15, align 4, !tbaa !5
  br label %255, !llvm.loop !18

265:                                              ; preds = %255
  br label %266

266:                                              ; preds = %273, %265
  %267 = load i32, ptr %16, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = icmp ne i32 %270, 0
  %272 = xor i1 %271, true
  br i1 %272, label %273, label %276

273:                                              ; preds = %266
  %274 = load i32, ptr %16, align 4, !tbaa !5
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr %16, align 4, !tbaa !5
  br label %266, !llvm.loop !19

276:                                              ; preds = %266
  %277 = load i32, ptr %15, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  %279 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %278)
  %280 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %279, ptr noundef @.str)
  %281 = load i32, ptr %16, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %280, i32 noundef %282)
  %284 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %283, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %285 = load i32, ptr %15, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = add nsw i32 %288, -1
  store i32 %289, ptr %287, align 4, !tbaa !5
  %290 = load i32, ptr %16, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = add nsw i32 %293, -1
  store i32 %294, ptr %292, align 4, !tbaa !5
  br label %295

295:                                              ; preds = %276, %250
  br label %296

296:                                              ; preds = %295
  %297 = load i32, ptr %17, align 4, !tbaa !5
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %17, align 4, !tbaa !5
  br label %164, !llvm.loop !20

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

300:                                              ; preds = %320, %299
  %301 = load i32, ptr %20, align 4, !tbaa !5
  %302 = load i32, ptr @b, align 4, !tbaa !5
  %303 = icmp slt i32 %301, %302
  br i1 %303, label %305, label %304

304:                                              ; preds = %300
  store i32 37, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %323

305:                                              ; preds = %300
  %306 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @e)
  %307 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %306, ptr noundef nonnull align 4 dereferenceable(4) @f)
  %308 = load i32, ptr @e, align 4, !tbaa !5
  %309 = sub nsw i32 %308, 1
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %310
  %312 = load i32, ptr %311, align 4, !tbaa !5
  %313 = add nsw i32 %312, -1
  store i32 %313, ptr %311, align 4, !tbaa !5
  %314 = load i32, ptr @f, align 4, !tbaa !5
  %315 = sub nsw i32 %314, 1
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %316
  %318 = load i32, ptr %317, align 4, !tbaa !5
  %319 = add nsw i32 %318, -1
  store i32 %319, ptr %317, align 4, !tbaa !5
  br label %320

320:                                              ; preds = %305
  %321 = load i32, ptr %20, align 4, !tbaa !5
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %20, align 4, !tbaa !5
  br label %300, !llvm.loop !21

323:                                              ; preds = %304
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %324

324:                                              ; preds = %323
  %325 = load i32, ptr %14, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %14, align 4, !tbaa !5
  br label %156, !llvm.loop !22

327:                                              ; preds = %162
  br label %22, !llvm.loop !23

328:                                              ; preds = %22
  %329 = load i32, ptr %1, align 4
  ret i32 %329

330:                                              ; preds = %247
  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 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 #3 align 2

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

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

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

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

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

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

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

@m = external dso_local global [1000 x [1000 x i32]], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local local_unnamed_addr global [1000 x i32], align 16
@d = external dso_local global [1000 x i32], align 16
@e = external dso_local global i32, align 4
@f = external dso_local global i32, align 4
@h = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local global [1000 x %"class.std::tuple"], align 16
@q = external dso_local global [1000 x %"class.std::tuple"], 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 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::tuple", align 4
  %4 = alloca %"class.std::tuple", align 4
  %5 = 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) @t)
  %6 = load i32, ptr @t, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @t, align 4, !tbaa !5
  %.not143 = icmp eq i32 %6, 0
  br i1 %.not143, label %._crit_edge146, label %.lr.ph145

.loopexit95:                                      ; preds = %._crit_edge141, %.preheader94
  %8 = load i32, ptr @t, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %._crit_edge146, label %.lr.ph145, !llvm.loop !9

.lr.ph145:                                        ; preds = %0, %.loopexit95
  %10 = 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)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) @a)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) @b)
  %13 = load i32, ptr @a, align 4, !tbaa !5
  %14 = load i32, ptr @b, align 4, !tbaa !5
  %15 = add nsw i32 %14, %13
  store i32 %15, ptr @h, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader93, label %._crit_edge109.thread

._crit_edge109.thread:                            ; preds = %.lr.ph145
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  br label %._crit_edge117

.preheader93:                                     ; preds = %.lr.ph145, %._crit_edge
  %18 = phi i32 [ %21, %._crit_edge ], [ %16, %.lr.ph145 ]
  %indvars.iv161 = phi i64 [ %indvars.iv.next162, %._crit_edge ], [ 0, %.lr.ph145 ]
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %.preheader93.._crit_edge_crit_edge

.preheader93.._crit_edge_crit_edge:               ; preds = %.preheader93
  %.pre195 = sext i32 %18 to i64
  br label %._crit_edge

._crit_edge109:                                   ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  %20 = icmp sgt i32 %21, 0
  br i1 %20, label %.lr.ph116, label %._crit_edge117

._crit_edge:                                      ; preds = %.lr.ph, %.preheader93.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre195, %.preheader93.._crit_edge_crit_edge ], [ %26, %.lr.ph ]
  %21 = phi i32 [ %18, %.preheader93.._crit_edge_crit_edge ], [ %25, %.lr.ph ]
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %22 = icmp slt i64 %indvars.iv.next162, %.pre-phi
  br i1 %22, label %.preheader93, label %._crit_edge109, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader93, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader93 ]
  %23 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %indvars.iv161, i64 %indvars.iv
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge117:                                   ; preds = %._crit_edge113, %._crit_edge109.thread, %._crit_edge109
  %.lcssa = phi i32 [ %21, %._crit_edge109 ], [ %16, %._crit_edge109.thread ], [ %56, %._crit_edge113 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %28 = sext i32 %.lcssa to i64
  %29 = getelementptr inbounds %"class.std::tuple", ptr @p, i64 %28
  call void @_ZSt4sortIPSt5tupleIJiiEEEvT_S3_(ptr noundef nonnull @p, ptr noundef nonnull %29)
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %"class.std::tuple", ptr @q, i64 %31
  call void @_ZSt4sortIPSt5tupleIJiiEESt7greaterIS1_EEvT_S5_T0_(ptr noundef nonnull @q, ptr noundef nonnull %32)
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph120.preheader, label %._crit_edge123

.lr.ph120.preheader:                              ; preds = %._crit_edge117
  %wide.trip.count170 = zext nneg i32 %33 to i64
  %min.iters.check = icmp ult i32 %33, 8
  br i1 %min.iters.check, label %.lr.ph120.preheader234, label %vector.ph

.lr.ph120.preheader234:                           ; preds = %middle.block, %.lr.ph120.preheader
  %indvars.iv167.ph = phi i64 [ 0, %.lr.ph120.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph120

vector.ph:                                        ; preds = %.lr.ph120.preheader
  %n.vec = and i64 %wide.trip.count170, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %35 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %index
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %35, align 16, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %36, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count170
  br i1 %cmp.n, label %.preheader96, label %.lr.ph120.preheader234

.lr.ph116:                                        ; preds = %._crit_edge109, %._crit_edge113
  %38 = phi i32 [ %56, %._crit_edge113 ], [ %21, %._crit_edge109 ]
  %storemerge114 = phi i32 [ %55, %._crit_edge113 ], [ 0, %._crit_edge109 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph112, label %._crit_edge113

.lr.ph112:                                        ; preds = %.lr.ph116
  %40 = sext i32 %storemerge114 to i64
  %wide.trip.count = zext nneg i32 %38 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %41 = icmp eq i32 %38, 1
  br i1 %41, label %._crit_edge113.loopexit.unr-lcssa, label %.lr.ph112.new

.lr.ph112.new:                                    ; preds = %.lr.ph112
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %58

._crit_edge113.loopexit.unr-lcssa:                ; preds = %70, %.lr.ph112
  %indvars.iv164.unr = phi i64 [ 0, %.lr.ph112 ], [ %indvars.iv.next165.1, %70 ]
  %.unr = phi i32 [ 0, %.lr.ph112 ], [ %71, %70 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge113, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge113.loopexit.unr-lcssa
  %42 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %40, i64 %indvars.iv164.unr
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %.not80.epil = icmp eq i32 %43, 0
  br i1 %.not80.epil, label %._crit_edge113, label %44

44:                                               ; preds = %.epil.preheader
  %45 = add nsw i32 %.unr, 1
  store i32 %45, ptr %2, align 4, !tbaa !5
  br label %._crit_edge113

._crit_edge113:                                   ; preds = %._crit_edge113.loopexit.unr-lcssa, %44, %.epil.preheader, %.lr.ph116
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %1) #6
  %46 = load i32, ptr %1, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @p, i64 0, i64 %47
  %49 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5tupleIJiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %48, ptr noundef nonnull align 4 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt5tupleIJiiEEC2IRiS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %1) #6
  %50 = load i32, ptr %1, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @q, i64 0, i64 %51
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5tupleIJiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %52, ptr noundef nonnull align 4 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %1, align 4, !tbaa !5
  %56 = load i32, ptr @n, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %.lr.ph116, label %._crit_edge117, !llvm.loop !17

58:                                               ; preds = %70, %.lr.ph112.new
  %indvars.iv164 = phi i64 [ 0, %.lr.ph112.new ], [ %indvars.iv.next165.1, %70 ]
  %59 = phi i32 [ 0, %.lr.ph112.new ], [ %71, %70 ]
  %niter = phi i64 [ 0, %.lr.ph112.new ], [ %niter.next.1, %70 ]
  %60 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %40, i64 %indvars.iv164
  %61 = load i32, ptr %60, align 8, !tbaa !5
  %.not80 = icmp eq i32 %61, 0
  br i1 %.not80, label %64, label %62

62:                                               ; preds = %58
  %63 = add nsw i32 %59, 1
  store i32 %63, ptr %2, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %58, %62
  %65 = phi i32 [ %59, %58 ], [ %63, %62 ]
  %indvars.iv.next165 = or disjoint i64 %indvars.iv164, 1
  %66 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %40, i64 %indvars.iv.next165
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %.not80.1 = icmp eq i32 %67, 0
  br i1 %.not80.1, label %70, label %68

68:                                               ; preds = %64
  %69 = add nsw i32 %65, 1
  store i32 %69, ptr %2, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %68, %64
  %71 = phi i32 [ %65, %64 ], [ %69, %68 ]
  %indvars.iv.next165.1 = add nuw nsw i64 %indvars.iv164, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge113.loopexit.unr-lcssa, label %58, !llvm.loop !18

.preheader96:                                     ; preds = %.lr.ph120, %middle.block
  br i1 %34, label %.lr.ph122, label %._crit_edge123

.lr.ph120:                                        ; preds = %.lr.ph120.preheader234, %.lr.ph120
  %indvars.iv167 = phi i64 [ %indvars.iv.next168, %.lr.ph120 ], [ %indvars.iv167.ph, %.lr.ph120.preheader234 ]
  %72 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv167
  store i32 1, ptr %72, align 4, !tbaa !5
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond171.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count170
  br i1 %exitcond171.not, label %.preheader96, label %.lr.ph120, !llvm.loop !19

._crit_edge123:                                   ; preds = %84, %._crit_edge117, %.preheader96
  %73 = 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_)
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 0
  br i1 %75, label %.lr.ph126, label %.preheader94

.lr.ph122:                                        ; preds = %.preheader96, %84
  %indvars.iv172 = phi i64 [ %indvars.iv.next173, %84 ], [ 0, %.preheader96 ]
  %76 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv172
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %77)
  %79 = load i32, ptr @n, align 4, !tbaa !5
  %80 = add nsw i32 %79, -1
  %81 = zext i32 %80 to i64
  %.not79 = icmp eq i64 %indvars.iv172, %81
  br i1 %.not79, label %84, label %82

82:                                               ; preds = %.lr.ph122
  %83 = 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
  br label %84

84:                                               ; preds = %.lr.ph122, %82
  %85 = phi i32 [ %79, %.lr.ph122 ], [ %.pre, %82 ]
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %86 = sext i32 %85 to i64
  %87 = icmp slt i64 %indvars.iv.next173, %86
  br i1 %87, label %.lr.ph122, label %._crit_edge123, !llvm.loop !20

.preheader94:                                     ; preds = %.lr.ph126, %._crit_edge123
  %88 = phi i32 [ %74, %._crit_edge123 ], [ %94, %.lr.ph126 ]
  %89 = load i32, ptr @h, align 4, !tbaa !5
  %90 = sdiv i32 %88, %89
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.preheader92, label %.loopexit95

.lr.ph126:                                        ; preds = %._crit_edge123, %.lr.ph126
  %indvars.iv175 = phi i64 [ %indvars.iv.next176, %.lr.ph126 ], [ 0, %._crit_edge123 ]
  %92 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %indvars.iv175
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %92)
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %94 = load i32, ptr @n, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = icmp slt i64 %indvars.iv.next176, %95
  br i1 %96, label %.lr.ph126, label %.preheader94, !llvm.loop !21

.preheader92:                                     ; preds = %.preheader94, %._crit_edge141
  %.pre185 = phi i32 [ %.pre185189, %._crit_edge141 ], [ %88, %.preheader94 ]
  %97 = phi i32 [ %173, %._crit_edge141 ], [ %88, %.preheader94 ]
  %.066142 = phi i32 [ %174, %._crit_edge141 ], [ 0, %.preheader94 ]
  %98 = load i32, ptr @a, align 4, !tbaa !5
  %99 = icmp sgt i32 %98, 0
  br i1 %99, label %.preheader90, label %.preheader91

.preheader91:                                     ; preds = %168, %.preheader92
  %.pre185190 = phi i32 [ %.pre185, %.preheader92 ], [ %.pre185191, %168 ]
  %100 = phi i32 [ %97, %.preheader92 ], [ %169, %168 ]
  %101 = load i32, ptr @b, align 4, !tbaa !5
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %.lr.ph140, label %._crit_edge141

.preheader90:                                     ; preds = %.preheader92, %168
  %.pre185193 = phi i32 [ %.pre185191, %168 ], [ %.pre185, %.preheader92 ]
  %103 = phi i32 [ %169, %168 ], [ %.pre185, %.preheader92 ]
  %.056138 = phi i32 [ %170, %168 ], [ 0, %.preheader92 ]
  %.057137 = phi i32 [ %.7, %168 ], [ 0, %.preheader92 ]
  %.058136 = phi i32 [ %.765, %168 ], [ 0, %.preheader92 ]
  %104 = icmp slt i32 %.058136, %103
  br i1 %104, label %.lr.ph131, label %.loopexit

.lr.ph131:                                        ; preds = %.preheader90, %143
  %.1130 = phi i32 [ %.4, %143 ], [ %.057137, %.preheader90 ]
  %.159129 = phi i32 [ %.462, %143 ], [ %.058136, %.preheader90 ]
  %105 = sext i32 %.159129 to i64
  %106 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @p, i64 0, i64 %105
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %106) #6
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sext i32 %.1130 to i64
  %110 = getelementptr inbounds [1000 x %"class.std::tuple"], ptr @q, i64 0, i64 %109
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %110) #6
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %108 to i64
  %114 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %.not74 = icmp eq i32 %115, 0
  br i1 %.not74, label %.lr.ph131._crit_edge, label %116, !llvm.loop !22

.lr.ph131._crit_edge:                             ; preds = %.lr.ph131
  %.pre186 = load i32, ptr @n, align 4, !tbaa !5
  br label %143

116:                                              ; preds = %.lr.ph131
  %117 = sext i32 %112 to i64
  %118 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %.not75 = icmp eq i32 %119, 0
  br i1 %.not75, label %120, label %124

120:                                              ; preds = %116
  %121 = add nsw i32 %.1130, 1
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = icmp eq i32 %121, %122
  %spec.select81 = select i1 %123, i32 0, i32 %121
  br label %143, !llvm.loop !22

124:                                              ; preds = %116
  %125 = getelementptr inbounds [1000 x [1000 x i32]], ptr @m, i64 0, i64 %113, i64 %117
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %.not76 = icmp eq i32 %126, 0
  br i1 %.not76, label %139, label %.thread

.thread:                                          ; preds = %124
  %127 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %113
  %128 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %117
  %129 = add nsw i32 %108, 1
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %129)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @.str)
  %132 = add nsw i32 %112, 1
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %131, i32 noundef %132)
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %133, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %135 = load i32, ptr %127, align 4, !tbaa !5
  %136 = add nsw i32 %135, -1
  store i32 %136, ptr %127, align 4, !tbaa !5
  %137 = load i32, ptr %128, align 4, !tbaa !5
  %138 = add nsw i32 %137, -1
  store i32 %138, ptr %128, align 4, !tbaa !5
  %.pre187 = load i32, ptr @n, align 4, !tbaa !5
  br label %.loopexit

139:                                              ; preds = %124
  %140 = add nsw i32 %.1130, 1
  %141 = load i32, ptr @n, align 4, !tbaa !5
  %142 = icmp eq i32 %140, %141
  %spec.select83 = select i1 %142, i32 0, i32 %140
  br label %143

143:                                              ; preds = %.lr.ph131._crit_edge, %139, %120
  %144 = phi i32 [ %141, %139 ], [ %122, %120 ], [ %.pre186, %.lr.ph131._crit_edge ]
  %.pn.shrunk = phi i1 [ %142, %139 ], [ %123, %120 ], [ true, %.lr.ph131._crit_edge ]
  %.4 = phi i32 [ %spec.select83, %139 ], [ %spec.select81, %120 ], [ %.1130, %.lr.ph131._crit_edge ]
  %.pn = zext i1 %.pn.shrunk to i32
  %.462 = add nsw i32 %.159129, %.pn
  %145 = icmp slt i32 %.462, %144
  br i1 %145, label %.lr.ph131, label %.loopexit

.loopexit:                                        ; preds = %143, %.preheader90, %.thread
  %.pre185192 = phi i32 [ %.pre187, %.thread ], [ %.pre185193, %.preheader90 ], [ %144, %143 ]
  %146 = phi i32 [ %.pre187, %.thread ], [ %103, %.preheader90 ], [ %144, %143 ]
  %.159100 = phi i32 [ %.159129, %.thread ], [ %.058136, %.preheader90 ], [ %.462, %143 ]
  %.198 = phi i32 [ %.1130, %.thread ], [ %.057137, %.preheader90 ], [ %.4, %143 ]
  %147 = icmp eq i32 %.159100, %146
  br i1 %147, label %.preheader89, label %168

.preheader89:                                     ; preds = %.loopexit, %.preheader89
  %indvars.iv178 = phi i64 [ %indvars.iv.next179, %.preheader89 ], [ 0, %.loopexit ]
  %148 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv178
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %.not77 = icmp eq i32 %149, 0
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  br i1 %.not77, label %.preheader89, label %.preheader, !llvm.loop !23

.preheader:                                       ; preds = %.preheader89
  %150 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %indvars.iv178
  %151 = trunc nuw nsw i64 %indvars.iv178 to i32
  br label %152

152:                                              ; preds = %152, %.preheader
  %indvars.iv181 = phi i64 [ %indvars.iv.next182, %152 ], [ 0, %.preheader ]
  %153 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %indvars.iv181
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %.not78 = icmp eq i32 %154, 0
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  br i1 %.not78, label %152, label %155, !llvm.loop !24

155:                                              ; preds = %152
  %156 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %indvars.iv181
  %157 = trunc nuw nsw i64 %indvars.iv181 to i32
  %158 = add nuw nsw i32 %151, 1
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %158)
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull @.str)
  %161 = add nuw nsw i32 %157, 1
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %160, i32 noundef %161)
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %164 = load i32, ptr %150, align 4, !tbaa !5
  %165 = add nsw i32 %164, -1
  store i32 %165, ptr %150, align 4, !tbaa !5
  %166 = load i32, ptr %156, align 4, !tbaa !5
  %167 = add nsw i32 %166, -1
  store i32 %167, ptr %156, align 4, !tbaa !5
  %.pre184 = load i32, ptr @n, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %.loopexit, %155
  %.pre185191 = phi i32 [ %.pre184, %155 ], [ %.pre185192, %.loopexit ]
  %169 = phi i32 [ %.pre184, %155 ], [ %146, %.loopexit ]
  %.765 = phi i32 [ %151, %155 ], [ %.159100, %.loopexit ]
  %.7 = phi i32 [ %157, %155 ], [ %.198, %.loopexit ]
  %170 = add nuw nsw i32 %.056138, 1
  %171 = load i32, ptr @a, align 4, !tbaa !5
  %172 = icmp slt i32 %170, %171
  br i1 %172, label %.preheader90, label %.preheader91, !llvm.loop !25

._crit_edge141.loopexit:                          ; preds = %.lr.ph140
  %.pre188 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge141

._crit_edge141:                                   ; preds = %._crit_edge141.loopexit, %.preheader91
  %.pre185189 = phi i32 [ %.pre188, %._crit_edge141.loopexit ], [ %.pre185190, %.preheader91 ]
  %173 = phi i32 [ %.pre188, %._crit_edge141.loopexit ], [ %100, %.preheader91 ]
  %174 = add nuw nsw i32 %.066142, 1
  %175 = load i32, ptr @h, align 4, !tbaa !5
  %176 = sdiv i32 %173, %175
  %177 = icmp slt i32 %174, %176
  br i1 %177, label %.preheader92, label %.loopexit95, !llvm.loop !26

.lr.ph140:                                        ; preds = %.preheader91, %.lr.ph140
  %.0139 = phi i32 [ %192, %.lr.ph140 ], [ 0, %.preheader91 ]
  %178 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @e)
  %179 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %178, ptr noundef nonnull align 4 dereferenceable(4) @f)
  %180 = load i32, ptr @e, align 4, !tbaa !5
  %181 = add nsw i32 %180, -1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1000 x i32], ptr @c, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = add nsw i32 %184, -1
  store i32 %185, ptr %183, align 4, !tbaa !5
  %186 = load i32, ptr @f, align 4, !tbaa !5
  %187 = add nsw i32 %186, -1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [1000 x i32], ptr @d, i64 0, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = add nsw i32 %190, -1
  store i32 %191, ptr %189, align 4, !tbaa !5
  %192 = add nuw nsw i32 %.0139, 1
  %193 = load i32, ptr @b, align 4, !tbaa !5
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %.lr.ph140, label %._crit_edge141.loopexit, !llvm.loop !27

._crit_edge146:                                   ; preds = %.loopexit95, %0
  ret i32 0
}

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 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 #3 align 2

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

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

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

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

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

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

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !16, !15}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}


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