; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2020.02 (swap)

; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 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 %"class.std::basic_ifstream", align 8
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %2, ptr noundef @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.1, i32 noundef 16)
          to label %27 unwind label %46

27:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %29 unwind label %50

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %31 unwind label %50

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %33 unwind label %50

33:                                               ; preds = %31
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = zext i32 %34 to i64
  %36 = call ptr @llvm.stacksave.p0()
  store ptr %36, ptr %9, align 8
  %37 = alloca i32, i64 %35, align 16
  store i64 %35, ptr %10, align 8
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = zext i32 %38 to i64
  %40 = alloca i32, i64 %39, align 16
  store i64 %39, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %65, %33
  %42 = load i32, ptr %12, align 4, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %54, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %72

46:                                               ; preds = %0
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %4, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %5, align 4
  br label %239

50:                                               ; preds = %31, %29, %27
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %4, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %5, align 4
  br label %238

54:                                               ; preds = %41
  %55 = load i32, ptr %12, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %37, i64 %56
  %58 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %57)
          to label %59 unwind label %68

59:                                               ; preds = %54
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %40, i64 %61
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %58, ptr noundef nonnull align 4 dereferenceable(4) %62)
          to label %64 unwind label %68

64:                                               ; preds = %59
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %12, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %12, align 4, !tbaa !5
  br label %41, !llvm.loop !9

68:                                               ; preds = %59, %54
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %4, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %238

72:                                               ; preds = %45
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  %75 = alloca i32, i64 %74, align 16
  store i64 %74, ptr %13, align 8
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = zext i32 %76 to i64
  %78 = alloca i32, i64 %77, align 16
  store i64 %77, ptr %14, align 8
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = zext i32 %79 to i64
  %81 = alloca i32, i64 %80, align 16
  store i64 %80, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %92, %72
  %83 = load i32, ptr %16, align 4, !tbaa !5
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %95

87:                                               ; preds = %82
  %88 = load i32, ptr %16, align 4, !tbaa !5
  %89 = load i32, ptr %16, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %75, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %87
  %93 = load i32, ptr %16, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %16, align 4, !tbaa !5
  br label %82, !llvm.loop !11

95:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %116, %95
  %97 = load i32, ptr %17, align 4, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %123

101:                                              ; preds = %96
  %102 = load i32, ptr %17, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %37, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %75, i64 %106
  %108 = getelementptr inbounds i32, ptr %107, i64 -1
  %109 = load i32, ptr %17, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i32, ptr %40, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %75, i64 %113
  invoke void @_ZSt7reverseIPiEvT_S1_(ptr noundef %108, ptr noundef %114)
          to label %115 unwind label %119

115:                                              ; preds = %101
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %17, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %17, align 4, !tbaa !5
  br label %96, !llvm.loop !12

119:                                              ; preds = %101
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %4, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %238

123:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %137, %123
  %125 = load i32, ptr %18, align 4, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %140

129:                                              ; preds = %124
  %130 = load i32, ptr %18, align 4, !tbaa !5
  %131 = load i32, ptr %18, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %75, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %78, i64 %135
  store i32 %130, ptr %136, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %129
  %138 = load i32, ptr %18, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %18, align 4, !tbaa !5
  br label %124, !llvm.loop !13

140:                                              ; preds = %128
  %141 = load i32, ptr %6, align 4, !tbaa !5
  %142 = zext i32 %141 to i64
  %143 = alloca i8, i64 %142, align 16
  store i64 %142, ptr %19, align 8
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %143, i64 %145
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  store i8 0, ptr %20, align 1, !tbaa !14
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %143, ptr noundef %146, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %147 unwind label %153

147:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %210, %147
  %149 = load i32, ptr %21, align 4, !tbaa !5
  %150 = load i32, ptr %6, align 4, !tbaa !5
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %157, label %152

152:                                              ; preds = %148
  store i32 14, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %213

153:                                              ; preds = %140
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %4, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  br label %238

157:                                              ; preds = %148
  %158 = load i32, ptr %21, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds i8, ptr %143, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !14, !range !16, !noundef !17
  %162 = trunc i8 %161 to i1
  br i1 %162, label %163, label %164

163:                                              ; preds = %157
  br label %210

164:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %165 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %165, ptr %24, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %175, %164
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %167 unwind label %186

167:                                              ; preds = %166
  %168 = load i32, ptr %24, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i8, ptr %143, i64 %169
  store i8 1, ptr %170, align 1, !tbaa !14
  %171 = load i32, ptr %24, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %78, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  store i32 %174, ptr %24, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %167
  %176 = load i32, ptr %24, align 4, !tbaa !5
  %177 = load i32, ptr %21, align 4, !tbaa !5
  %178 = icmp ne i32 %176, %177
  br i1 %178, label %166, label %179, !llvm.loop !18

179:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %206, %179
  %181 = load i32, ptr %25, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  %184 = icmp ult i64 %182, %183
  br i1 %184, label %190, label %185

185:                                              ; preds = %180
  store i32 19, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %209

186:                                              ; preds = %166
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %4, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %238

190:                                              ; preds = %180
  %191 = load i32, ptr %25, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %192) #7
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  %196 = load i32, ptr %25, align 4, !tbaa !5
  %197 = load i32, ptr %8, align 4, !tbaa !5
  %198 = add nsw i32 %196, %197
  %199 = sext i32 %198 to i64
  %200 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  %201 = urem i64 %199, %200
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %201) #7
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds i32, ptr %81, i64 %204
  store i32 %195, ptr %205, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %190
  %207 = load i32, ptr %25, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %25, align 4, !tbaa !5
  br label %180, !llvm.loop !19

209:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #7
  br label %210

210:                                              ; preds = %209, %163
  %211 = load i32, ptr %21, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %21, align 4, !tbaa !5
  br label %148, !llvm.loop !20

213:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %214

214:                                              ; preds = %228, %213
  %215 = load i32, ptr %26, align 4, !tbaa !5
  %216 = load i32, ptr %6, align 4, !tbaa !5
  %217 = icmp slt i32 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 22, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %235

219:                                              ; preds = %214
  %220 = load i32, ptr %26, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds i32, ptr %81, i64 %221
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %223)
          to label %225 unwind label %231

225:                                              ; preds = %219
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %224, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %227 unwind label %231

227:                                              ; preds = %225
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %26, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %26, align 4, !tbaa !5
  br label %214, !llvm.loop !21

231:                                              ; preds = %225, %219
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %4, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %238

235:                                              ; preds = %218
  store i32 0, ptr %1, align 4
  store i32 1, ptr %22, align 4
  %236 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %236)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #7
  %237 = load i32, ptr %1, align 4
  ret i32 %237

238:                                              ; preds = %231, %186, %153, %119, %68, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #7
  br label %239

239:                                              ; preds = %238, %46
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #7
  br label %240

240:                                              ; preds = %239
  %241 = load ptr, ptr %4, align 8
  %242 = load i32, ptr %5, align 4
  %243 = insertvalue { ptr, i32 } poison, ptr %241, 0
  %244 = insertvalue { ptr, i32 } %243, i32 %242, 1
  resume { ptr, i32 } %244
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6 align 2

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

!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 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 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::basic_ifstream", align 8
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.1, i32 noundef 16)
          to label %9 unwind label %35

9:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %10 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %11 unwind label %37

11:                                               ; preds = %9
  %12 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %13 unwind label %37

13:                                               ; preds = %11
  %14 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %15 unwind label %37

15:                                               ; preds = %13
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = zext i32 %16 to i64
  %18 = call ptr @llvm.stacksave.p0()
  %19 = alloca i32, i64 %17, align 16
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = zext i32 %20 to i64
  %22 = alloca i32, i64 %21, align 16
  %23 = icmp sgt i32 %20, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %44
  %24 = icmp sgt i32 %45, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %15
  %25 = phi i1 [ %24, %._crit_edge.loopexit ], [ false, %15 ]
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = alloca i32, i64 %27, align 16
  %29 = alloca i32, i64 %27, align 16
  %30 = alloca i32, i64 %27, align 16
  %31 = icmp sgt i32 %26, 0
  br i1 %31, label %.lr.ph50.preheader, label %.preheader46

.lr.ph50.preheader:                               ; preds = %._crit_edge
  %min.iters.check = icmp ult i32 %26, 8
  br i1 %min.iters.check, label %.lr.ph50.preheader92, label %vector.ph

.lr.ph50.preheader92:                             ; preds = %middle.block, %.lr.ph50.preheader
  %indvars.iv67.ph = phi i64 [ 0, %.lr.ph50.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph50

vector.ph:                                        ; preds = %.lr.ph50.preheader
  %n.vec = and i64 %27, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %32 = getelementptr inbounds i32, ptr %28, i64 %index
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store <4 x i32> %vec.ind, ptr %32, align 16, !tbaa !5
  store <4 x i32> %step.add, ptr %33, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %27
  br i1 %cmp.n, label %.preheader46, label %.lr.ph50.preheader92

35:                                               ; preds = %0
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %150

37:                                               ; preds = %13, %11, %9
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %149

.lr.ph:                                           ; preds = %15, %44
  %indvars.iv = phi i64 [ %indvars.iv.next, %44 ], [ 0, %15 ]
  %39 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv
  %40 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %41 unwind label %48

41:                                               ; preds = %.lr.ph
  %42 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %42)
          to label %44 unwind label %48

44:                                               ; preds = %41
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next, %46
  br i1 %47, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !13

48:                                               ; preds = %41, %.lr.ph
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %149

.preheader46:                                     ; preds = %.lr.ph50, %middle.block, %._crit_edge
  %invariant.gep = getelementptr i8, ptr %28, i64 -4
  br i1 %25, label %.lr.ph52, label %.preheader45

.lr.ph50:                                         ; preds = %.lr.ph50.preheader92, %.lr.ph50
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.lr.ph50 ], [ %indvars.iv67.ph, %.lr.ph50.preheader92 ]
  %50 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv67
  %51 = trunc nuw nsw i64 %indvars.iv67 to i32
  store i32 %51, ptr %50, align 4, !tbaa !5
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next68, %27
  br i1 %exitcond.not, label %.preheader46, label %.lr.ph50, !llvm.loop !14

.preheader45.loopexit:                            ; preds = %62
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %.preheader45

.preheader45:                                     ; preds = %.preheader45.loopexit, %.preheader46
  %52 = phi i32 [ %.pre, %.preheader45.loopexit ], [ %26, %.preheader46 ]
  %53 = icmp sgt i32 %52, 0
  %wide.trip.count76 = zext i32 %52 to i64
  br i1 %53, label %.lr.ph54.preheader, label %._crit_edge55

.lr.ph54.preheader:                               ; preds = %.preheader45
  %xtraiter = and i64 %wide.trip.count76, 3
  %54 = icmp ult i32 %52, 4
  br i1 %54, label %._crit_edge55.loopexit.unr-lcssa, label %.lr.ph54.preheader.new

.lr.ph54.preheader.new:                           ; preds = %.lr.ph54.preheader
  %unroll_iter = and i64 %wide.trip.count76, 2147483644
  br label %.lr.ph54

.lr.ph52:                                         ; preds = %.preheader46, %62
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %62 ], [ 0, %.preheader46 ]
  %55 = getelementptr inbounds i32, ptr %19, i64 %indvars.iv70
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %gep = getelementptr i32, ptr %invariant.gep, i64 %57
  %58 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv70
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i32, ptr %28, i64 %60
  invoke void @_ZSt7reverseIPiEvT_S1_(ptr noundef nonnull %gep, ptr noundef nonnull %61)
          to label %62 unwind label %66

62:                                               ; preds = %.lr.ph52
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next71, %64
  br i1 %65, label %.lr.ph52, label %.preheader45.loopexit, !llvm.loop !15

66:                                               ; preds = %.lr.ph52
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %149

._crit_edge55.loopexit.unr-lcssa:                 ; preds = %.lr.ph54, %.lr.ph54.preheader
  %indvars.iv73.unr = phi i64 [ 0, %.lr.ph54.preheader ], [ %indvars.iv.next74.3, %.lr.ph54 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge55, label %.lr.ph54.epil

.lr.ph54.epil:                                    ; preds = %._crit_edge55.loopexit.unr-lcssa, %.lr.ph54.epil
  %indvars.iv73.epil = phi i64 [ %indvars.iv.next74.epil, %.lr.ph54.epil ], [ %indvars.iv73.unr, %._crit_edge55.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph54.epil ], [ 0, %._crit_edge55.loopexit.unr-lcssa ]
  %68 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv73.epil
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %29, i64 %70
  %72 = trunc nuw nsw i64 %indvars.iv73.epil to i32
  store i32 %72, ptr %71, align 4, !tbaa !5
  %indvars.iv.next74.epil = add nuw nsw i64 %indvars.iv73.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge55, label %.lr.ph54.epil, !llvm.loop !16

._crit_edge55:                                    ; preds = %._crit_edge55.loopexit.unr-lcssa, %.lr.ph54.epil, %.preheader45
  %73 = alloca i8, i64 %wide.trip.count76, align 16
  %74 = sext i32 %52 to i64
  %75 = getelementptr inbounds i8, ptr %73, i64 %74
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  store i8 0, ptr %6, align 1, !tbaa !18
  invoke void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %73, ptr noundef nonnull %75, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %96 unwind label %100

.lr.ph54:                                         ; preds = %.lr.ph54, %.lr.ph54.preheader.new
  %indvars.iv73 = phi i64 [ 0, %.lr.ph54.preheader.new ], [ %indvars.iv.next74.3, %.lr.ph54 ]
  %niter = phi i64 [ 0, %.lr.ph54.preheader.new ], [ %niter.next.3, %.lr.ph54 ]
  %76 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv73
  %77 = load i32, ptr %76, align 16, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr %29, i64 %78
  %80 = trunc nuw nsw i64 %indvars.iv73 to i32
  store i32 %80, ptr %79, align 4, !tbaa !5
  %indvars.iv.next74 = or disjoint i64 %indvars.iv73, 1
  %81 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.next74
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i32, ptr %29, i64 %83
  %85 = trunc nuw nsw i64 %indvars.iv.next74 to i32
  store i32 %85, ptr %84, align 4, !tbaa !5
  %indvars.iv.next74.1 = or disjoint i64 %indvars.iv73, 2
  %86 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.next74.1
  %87 = load i32, ptr %86, align 8, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %29, i64 %88
  %90 = trunc nuw nsw i64 %indvars.iv.next74.1 to i32
  store i32 %90, ptr %89, align 4, !tbaa !5
  %indvars.iv.next74.2 = or disjoint i64 %indvars.iv73, 3
  %91 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.next74.2
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %29, i64 %93
  %95 = trunc nuw nsw i64 %indvars.iv.next74.2 to i32
  store i32 %95, ptr %94, align 4, !tbaa !5
  %indvars.iv.next74.3 = add nuw nsw i64 %indvars.iv73, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge55.loopexit.unr-lcssa, label %.lr.ph54, !llvm.loop !20

96:                                               ; preds = %._crit_edge55
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %.lr.ph61, label %._crit_edge64

.preheader:                                       ; preds = %134
  %99 = icmp sgt i32 %135, 0
  br i1 %99, label %.lr.ph63, label %._crit_edge64

100:                                              ; preds = %._crit_edge55
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  br label %149

.lr.ph61:                                         ; preds = %96, %134
  %102 = phi i32 [ %135, %134 ], [ %97, %96 ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %134 ], [ 0, %96 ]
  %103 = getelementptr inbounds i8, ptr %73, i64 %indvars.iv81
  %104 = load i8, ptr %103, align 1, !tbaa !18, !range !21, !noundef !22
  %105 = trunc nuw i8 %104 to i1
  br i1 %105, label %134, label %106

106:                                              ; preds = %.lr.ph61
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %107 = trunc nuw nsw i64 %indvars.iv81 to i32
  store i32 %107, ptr %8, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %109, %106
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %109 unwind label %117

109:                                              ; preds = %108
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %73, i64 %111
  store i8 1, ptr %112, align 1, !tbaa !18
  %113 = getelementptr inbounds i32, ptr %29, i64 %111
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr %8, align 4, !tbaa !5
  %115 = zext i32 %114 to i64
  %.not = icmp eq i64 %indvars.iv81, %115
  br i1 %.not, label %.preheader44, label %108, !llvm.loop !23

.preheader44:                                     ; preds = %109
  %116 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %.not65 = icmp eq i64 %116, 0
  br i1 %.not65, label %._crit_edge58, label %.lr.ph57

._crit_edge58:                                    ; preds = %.lr.ph57, %.preheader44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  %.pre87 = load i32, ptr %3, align 4, !tbaa !5
  br label %134

117:                                              ; preds = %108
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %149

.lr.ph57:                                         ; preds = %.preheader44, %.lr.ph57
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %.lr.ph57 ], [ 0, %.preheader44 ]
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv78) #7
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = trunc nuw nsw i64 %indvars.iv78 to i32
  %124 = add nsw i32 %122, %123
  %125 = sext i32 %124 to i64
  %126 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %127 = urem i64 %125, %126
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %127) #7
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %30, i64 %130
  store i32 %121, ptr %131, align 4, !tbaa !5
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %132 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %133 = icmp ugt i64 %132, %indvars.iv.next79
  br i1 %133, label %.lr.ph57, label %._crit_edge58, !llvm.loop !24

134:                                              ; preds = %.lr.ph61, %._crit_edge58
  %135 = phi i32 [ %102, %.lr.ph61 ], [ %.pre87, %._crit_edge58 ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %136 = sext i32 %135 to i64
  %137 = icmp slt i64 %indvars.iv.next82, %136
  br i1 %137, label %.lr.ph61, label %.preheader, !llvm.loop !25

._crit_edge64:                                    ; preds = %143, %96, %.preheader
  call void @llvm.stackrestore.p0(ptr %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #7
  ret i32 0

.lr.ph63:                                         ; preds = %.preheader, %143
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %143 ], [ 0, %.preheader ]
  %138 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv84
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %139)
          to label %141 unwind label %147

141:                                              ; preds = %.lr.ph63
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %140, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %143 unwind label %147

143:                                              ; preds = %141
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %144 = load i32, ptr %3, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = icmp slt i64 %indvars.iv.next85, %145
  br i1 %146, label %.lr.ph63, label %._crit_edge64, !llvm.loop !26

147:                                              ; preds = %141, %.lr.ph63
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %149

149:                                              ; preds = %147, %117, %100, %66, %48, %37
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %67, %66 ], [ %118, %117 ], [ %148, %147 ], [ %101, %100 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  br label %150

150:                                              ; preds = %149, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %149 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6 align 2

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

!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, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = distinct !{!20, !10}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


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