; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1660_D.ll (Z5solvev)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@a = external dso_local global [200010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #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 i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  %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) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %32, %0
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %35

27:                                               ; preds = %22
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %30)
  br label %32

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !9

35:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %36 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %36, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %240, %35
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %243

42:                                               ; preds = %37
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %49

48:                                               ; preds = %42
  br label %240

49:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %50, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %51 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %51, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 0
  %57 = zext i1 %56 to i32
  store i32 %57, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %11, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %90, %49
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  %64 = icmp sle i32 %61, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %60
  store i32 8, ptr %7, align 4
  br label %93

66:                                               ; preds = %60
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %77, label %72

72:                                               ; preds = %66
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  %76 = icmp eq i32 %73, %75
  br i1 %76, label %77, label %79

77:                                               ; preds = %72, %66
  %78 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %78, ptr %6, align 4, !tbaa !5
  store i32 8, ptr %7, align 4
  br label %93

79:                                               ; preds = %72
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 0
  %85 = zext i1 %84 to i32
  %86 = load i32, ptr %10, align 4, !tbaa !5
  %87 = xor i32 %86, %85
  store i32 %87, ptr %10, align 4, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %9, align 4, !tbaa !5
  br label %90

90:                                               ; preds = %79
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !5
  br label %60, !llvm.loop !11

93:                                               ; preds = %77, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %130, label %97

97:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %98 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %98, ptr %13, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %115, %97
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = icmp sle i32 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %118

104:                                              ; preds = %99
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = call i32 @llvm.abs.i32(i32 %108, i1 true)
  %110 = icmp eq i32 %109, 2
  br i1 %110, label %111, label %114

111:                                              ; preds = %104
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %12, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %111, %104
  br label %115

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

118:                                              ; preds = %103
  %119 = load i32, ptr %12, align 4, !tbaa !5
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = icmp sgt i32 %119, %120
  br i1 %121, label %122, label %129

122:                                              ; preds = %118
  %123 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %123, ptr %3, align 4, !tbaa !5
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = sub nsw i32 %124, 1
  store i32 %125, ptr %4, align 4, !tbaa !5
  %126 = load i32, ptr %1, align 4, !tbaa !5
  %127 = load i32, ptr %9, align 4, !tbaa !5
  %128 = sub nsw i32 %126, %127
  store i32 %128, ptr %5, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %122, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %239

130:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %131 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %131, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %132 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %132, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %133 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %133, ptr %16, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %148, %130
  %135 = load i32, ptr %16, align 4, !tbaa !5
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = icmp sle i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 14, ptr %7, align 4
  br label %151

139:                                              ; preds = %134
  %140 = load i32, ptr %16, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = icmp slt i32 %143, 0
  br i1 %144, label %145, label %147

145:                                              ; preds = %139
  %146 = load i32, ptr %16, align 4, !tbaa !5
  store i32 %146, ptr %14, align 4, !tbaa !5
  store i32 14, ptr %7, align 4
  br label %151

147:                                              ; preds = %139
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %16, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %16, align 4, !tbaa !5
  br label %134, !llvm.loop !13

151:                                              ; preds = %145, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %152

152:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %153 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %153, ptr %17, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %168, %152
  %155 = load i32, ptr %17, align 4, !tbaa !5
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = icmp sge i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 17, ptr %7, align 4
  br label %171

159:                                              ; preds = %154
  %160 = load i32, ptr %17, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = icmp slt i32 %163, 0
  br i1 %164, label %165, label %167

165:                                              ; preds = %159
  %166 = load i32, ptr %17, align 4, !tbaa !5
  store i32 %166, ptr %15, align 4, !tbaa !5
  store i32 17, ptr %7, align 4
  br label %171

167:                                              ; preds = %159
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %17, align 4, !tbaa !5
  %170 = add nsw i32 %169, -1
  store i32 %170, ptr %17, align 4, !tbaa !5
  br label %154, !llvm.loop !14

171:                                              ; preds = %165, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %172

172:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %173 = load i32, ptr %14, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %19, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %191, %172
  %176 = load i32, ptr %19, align 4, !tbaa !5
  %177 = load i32, ptr %9, align 4, !tbaa !5
  %178 = icmp sle i32 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %194

180:                                              ; preds = %175
  %181 = load i32, ptr %19, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = call i32 @llvm.abs.i32(i32 %184, i1 true)
  %186 = icmp eq i32 %185, 2
  br i1 %186, label %187, label %190

187:                                              ; preds = %180
  %188 = load i32, ptr %18, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %18, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %187, %180
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %19, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %19, align 4, !tbaa !5
  br label %175, !llvm.loop !15

194:                                              ; preds = %179
  %195 = load i32, ptr %18, align 4, !tbaa !5
  %196 = load i32, ptr %3, align 4, !tbaa !5
  %197 = icmp sgt i32 %195, %196
  br i1 %197, label %198, label %204

198:                                              ; preds = %194
  %199 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %199, ptr %3, align 4, !tbaa !5
  %200 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %200, ptr %4, align 4, !tbaa !5
  %201 = load i32, ptr %1, align 4, !tbaa !5
  %202 = load i32, ptr %9, align 4, !tbaa !5
  %203 = sub nsw i32 %201, %202
  store i32 %203, ptr %5, align 4, !tbaa !5
  br label %204

204:                                              ; preds = %198, %194
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %205 = load i32, ptr %15, align 4, !tbaa !5
  %206 = sub nsw i32 %205, 1
  store i32 %206, ptr %20, align 4, !tbaa !5
  br label %207

207:                                              ; preds = %223, %204
  %208 = load i32, ptr %20, align 4, !tbaa !5
  %209 = load i32, ptr %8, align 4, !tbaa !5
  %210 = icmp sge i32 %208, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %207
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %226

212:                                              ; preds = %207
  %213 = load i32, ptr %20, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = call i32 @llvm.abs.i32(i32 %216, i1 true)
  %218 = icmp eq i32 %217, 2
  br i1 %218, label %219, label %222

219:                                              ; preds = %212
  %220 = load i32, ptr %18, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %18, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %219, %212
  br label %223

223:                                              ; preds = %222
  %224 = load i32, ptr %20, align 4, !tbaa !5
  %225 = add nsw i32 %224, -1
  store i32 %225, ptr %20, align 4, !tbaa !5
  br label %207, !llvm.loop !16

226:                                              ; preds = %211
  %227 = load i32, ptr %18, align 4, !tbaa !5
  %228 = load i32, ptr %3, align 4, !tbaa !5
  %229 = icmp sgt i32 %227, %228
  br i1 %229, label %230, label %238

230:                                              ; preds = %226
  %231 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %231, ptr %3, align 4, !tbaa !5
  %232 = load i32, ptr %8, align 4, !tbaa !5
  %233 = sub nsw i32 %232, 1
  store i32 %233, ptr %4, align 4, !tbaa !5
  %234 = load i32, ptr %1, align 4, !tbaa !5
  %235 = load i32, ptr %15, align 4, !tbaa !5
  %236 = sub nsw i32 %235, 1
  %237 = sub nsw i32 %234, %236
  store i32 %237, ptr %5, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %230, %226
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %239

239:                                              ; preds = %238, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %240

240:                                              ; preds = %239, %48
  %241 = load i32, ptr %6, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %6, align 4, !tbaa !5
  br label %37, !llvm.loop !17

243:                                              ; preds = %41
  %244 = load i32, ptr %4, align 4, !tbaa !5
  %245 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %244)
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %245, i8 noundef signext 32)
  %247 = load i32, ptr %5, align 4, !tbaa !5
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %246, i32 noundef %247)
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %248, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@a = external dso_local global [200010 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %2 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %3 = load i32, ptr %1, align 4
  %.not117 = icmp slt i32 %3, 1
  br i1 %.not117, label %._crit_edge174, label %.lr.ph

.preheader116:                                    ; preds = %.lr.ph
  %.not104168 = icmp slt i32 %7, 1
  br i1 %.not104168, label %._crit_edge174, label %.lr.ph173.preheader

.lr.ph173.preheader:                              ; preds = %.preheader116
  %4 = add nuw i32 %7, 1
  %sext = zext nneg i32 %7 to i64
  br label %.lr.ph173

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %5 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %7 = load i32, ptr %1, align 4
  %8 = sext i32 %7 to i64
  %.not.not = icmp slt i64 %indvars.iv, %8
  br i1 %.not.not, label %.lr.ph, label %.preheader116, !llvm.loop !5

._crit_edge174:                                   ; preds = %109, %0, %.preheader116
  %.088.lcssa = phi i32 [ %7, %.preheader116 ], [ %3, %0 ], [ %.593, %109 ]
  %.084.lcssa = phi i32 [ 0, %.preheader116 ], [ 0, %0 ], [ %.5, %109 ]
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.088.lcssa)
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %9, i8 noundef signext 32)
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef %.084.lcssa)
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %11, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph173:                                        ; preds = %.lr.ph173.preheader, %109
  %.081172 = phi i32 [ %110, %109 ], [ 1, %.lr.ph173.preheader ]
  %.084171 = phi i32 [ %.5, %109 ], [ 0, %.lr.ph173.preheader ]
  %.088170 = phi i32 [ %.593, %109 ], [ %7, %.lr.ph173.preheader ]
  %.094169 = phi i32 [ %.599, %109 ], [ 0, %.lr.ph173.preheader ]
  %13 = sext i32 %.081172 to i64
  %14 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !7
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %109, label %17

17:                                               ; preds = %.lr.ph173
  %.lobit = lshr i32 %15, 31
  %.not105120 = icmp sgt i32 %.081172, %7
  br i1 %.not105120, label %._crit_edge, label %.lr.ph125

.lr.ph125:                                        ; preds = %17, %23
  %indvars.iv179 = phi i64 [ %indvars.iv.next180, %23 ], [ %13, %17 ]
  %.078122 = phi i32 [ %24, %23 ], [ %.lobit, %17 ]
  %indvars.iv.next180 = add nsw i64 %indvars.iv179, 1
  %18 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv.next180
  %19 = load i32, ptr %18, align 4, !tbaa !7
  %20 = icmp eq i32 %19, 0
  %21 = icmp eq i64 %indvars.iv179, %sext
  %or.cond = or i1 %21, %20
  %22 = trunc i64 %indvars.iv.next180 to i32
  br i1 %or.cond, label %._crit_edge.loopexit.split.loop.exit, label %23

23:                                               ; preds = %.lr.ph125
  %.lobit106 = lshr i32 %19, 31
  %24 = xor i32 %.lobit106, %.078122
  %exitcond.not = icmp eq i32 %4, %22
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph125, !llvm.loop !11

._crit_edge.loopexit.split.loop.exit:             ; preds = %.lr.ph125
  %indvars183.le = trunc i64 %indvars.iv179 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %23, %._crit_edge.loopexit.split.loop.exit, %17
  %.079.lcssa = phi i32 [ %.081172, %17 ], [ %indvars183.le, %._crit_edge.loopexit.split.loop.exit ], [ %4, %23 ]
  %.078.lcssa = phi i32 [ %.lobit, %17 ], [ %.078122, %._crit_edge.loopexit.split.loop.exit ], [ %24, %23 ]
  %.182 = phi i32 [ %.081172, %17 ], [ %22, %._crit_edge.loopexit.split.loop.exit ], [ %.081172, %23 ]
  %.not107 = icmp eq i32 %.078.lcssa, 0
  %.not108162 = icmp sgt i32 %.081172, %.079.lcssa
  br i1 %.not107, label %.preheader, label %.preheader115

.preheader115:                                    ; preds = %._crit_edge
  br i1 %.not108162, label %._crit_edge144, label %.lr.ph135.preheader

.lr.ph135.preheader:                              ; preds = %.preheader115
  %25 = add i32 %.079.lcssa, 1
  br label %.lr.ph135

.preheader:                                       ; preds = %._crit_edge
  br i1 %.not108162, label %._crit_edge166, label %.lr.ph165.preheader

.lr.ph165.preheader:                              ; preds = %.preheader
  %26 = add i32 %.079.lcssa, 1
  %27 = sub i32 %.079.lcssa, %.081172
  %28 = zext i32 %27 to i64
  %29 = add nuw nsw i64 %28, 1
  %min.iters.check = icmp ult i32 %27, 7
  br i1 %min.iters.check, label %.lr.ph165.preheader264, label %vector.ph

.lr.ph165.preheader264:                           ; preds = %middle.block, %.lr.ph165.preheader
  %indvars.iv199.ph = phi i64 [ %13, %.lr.ph165.preheader ], [ %ind.end, %middle.block ]
  %.075163.ph = phi i32 [ 0, %.lr.ph165.preheader ], [ %41, %middle.block ]
  br label %.lr.ph165

vector.ph:                                        ; preds = %.lr.ph165.preheader
  %n.vec = and i64 %29, 8589934584
  %ind.end = add nsw i64 %n.vec, %13
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %38, %vector.body ]
  %vec.phi223 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %39, %vector.body ]
  %offset.idx = add i64 %index, %13
  %30 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %offset.idx
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load = load <4 x i32>, ptr %30, align 4, !tbaa !7
  %wide.load224 = load <4 x i32>, ptr %31, align 4, !tbaa !7
  %32 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %wide.load, i1 true)
  %33 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %wide.load224, i1 true)
  %34 = icmp eq <4 x i32> %32, <i32 2, i32 2, i32 2, i32 2>
  %35 = icmp eq <4 x i32> %33, <i32 2, i32 2, i32 2, i32 2>
  %36 = zext <4 x i1> %34 to <4 x i32>
  %37 = zext <4 x i1> %35 to <4 x i32>
  %38 = add <4 x i32> %vec.phi, %36
  %39 = add <4 x i32> %vec.phi223, %37
  %index.next = add nuw i64 %index, 8
  %40 = icmp eq i64 %index.next, %n.vec
  br i1 %40, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %39, %38
  %41 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %29, %n.vec
  br i1 %cmp.n, label %._crit_edge166, label %.lr.ph165.preheader264

._crit_edge166:                                   ; preds = %.lr.ph165, %middle.block, %.preheader
  %.075.lcssa = phi i32 [ 0, %.preheader ], [ %41, %middle.block ], [ %spec.select, %.lr.ph165 ]
  %42 = icmp sgt i32 %.075.lcssa, %.094169
  %43 = add nsw i32 %.081172, -1
  %44 = sub nsw i32 %7, %.079.lcssa
  %.195 = call i32 @llvm.smax.i32(i32 %.075.lcssa, i32 %.094169)
  %.189 = select i1 %42, i32 %43, i32 %.088170
  %.185 = select i1 %42, i32 %44, i32 %.084171
  br label %109

.lr.ph165:                                        ; preds = %.lr.ph165.preheader264, %.lr.ph165
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %.lr.ph165 ], [ %indvars.iv199.ph, %.lr.ph165.preheader264 ]
  %.075163 = phi i32 [ %spec.select, %.lr.ph165 ], [ %.075163.ph, %.lr.ph165.preheader264 ]
  %45 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv199
  %46 = load i32, ptr %45, align 4, !tbaa !7
  %47 = call i32 @llvm.abs.i32(i32 %46, i1 true)
  %48 = icmp eq i32 %47, 2
  %49 = zext i1 %48 to i32
  %spec.select = add nuw nsw i32 %.075163, %49
  %indvars.iv.next200 = add nsw i64 %indvars.iv199, 1
  %lftr.wideiv202 = trunc i64 %indvars.iv.next200 to i32
  %exitcond203.not = icmp eq i32 %26, %lftr.wideiv202
  br i1 %exitcond203.not, label %._crit_edge166, label %.lr.ph165, !llvm.loop !15

.lr.ph135:                                        ; preds = %.lr.ph135.preheader, %53
  %indvars.iv184 = phi i64 [ %13, %.lr.ph135.preheader ], [ %indvars.iv.next185, %53 ]
  %50 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv184
  %51 = load i32, ptr %50, align 4, !tbaa !7
  %52 = icmp slt i32 %51, 0
  br i1 %52, label %._crit_edge136.split.loop.exit212, label %53

53:                                               ; preds = %.lr.ph135
  %indvars.iv.next185 = add nsw i64 %indvars.iv184, 1
  %lftr.wideiv187 = trunc i64 %indvars.iv.next185 to i32
  %exitcond188.not = icmp eq i32 %25, %lftr.wideiv187
  br i1 %exitcond188.not, label %._crit_edge136, label %.lr.ph135, !llvm.loop !16

._crit_edge136.split.loop.exit212:                ; preds = %.lr.ph135
  %54 = trunc nsw i64 %indvars.iv184 to i32
  br label %._crit_edge136

._crit_edge136:                                   ; preds = %53, %._crit_edge136.split.loop.exit212
  %.073 = phi i32 [ %54, %._crit_edge136.split.loop.exit212 ], [ %.081172, %53 ]
  br i1 %.not108162, label %._crit_edge144, label %.lr.ph143.preheader

.lr.ph143.preheader:                              ; preds = %._crit_edge136
  %55 = sext i32 %.079.lcssa to i64
  br label %.lr.ph143

.lr.ph143:                                        ; preds = %.lr.ph143.preheader, %59
  %indvars.iv189 = phi i64 [ %55, %.lr.ph143.preheader ], [ %indvars.iv.next190, %59 ]
  %56 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv189
  %57 = load i32, ptr %56, align 4, !tbaa !7
  %58 = icmp slt i32 %57, 0
  br i1 %58, label %._crit_edge144.loopexit.split.loop.exit, label %59

59:                                               ; preds = %.lr.ph143
  %indvars.iv.next190 = add nsw i64 %indvars.iv189, -1
  %.not110.not = icmp sgt i64 %indvars.iv189, %13
  br i1 %.not110.not, label %.lr.ph143, label %._crit_edge144, !llvm.loop !17

._crit_edge144.loopexit.split.loop.exit:          ; preds = %.lr.ph143
  %60 = trunc nsw i64 %indvars.iv189 to i32
  br label %._crit_edge144

._crit_edge144:                                   ; preds = %59, %._crit_edge144.loopexit.split.loop.exit, %.preheader115, %._crit_edge136
  %.073207 = phi i32 [ %.073, %._crit_edge136 ], [ %.081172, %.preheader115 ], [ %.073, %._crit_edge144.loopexit.split.loop.exit ], [ %.073, %59 ]
  %.072 = phi i32 [ %.079.lcssa, %._crit_edge136 ], [ %.079.lcssa, %.preheader115 ], [ %60, %._crit_edge144.loopexit.split.loop.exit ], [ %.079.lcssa, %59 ]
  %.not111.not148 = icmp slt i32 %.073207, %.079.lcssa
  br i1 %.not111.not148, label %.lr.ph152.preheader, label %._crit_edge153

.lr.ph152.preheader:                              ; preds = %._crit_edge144
  %61 = sext i32 %.073207 to i64
  %wide.trip.count = sext i32 %.079.lcssa to i64
  %62 = sub nsw i64 %wide.trip.count, %61
  %min.iters.check247 = icmp ult i64 %62, 8
  br i1 %min.iters.check247, label %.lr.ph152.preheader266, label %vector.ph248

.lr.ph152.preheader266:                           ; preds = %middle.block245, %.lr.ph152.preheader
  %indvars.iv192.ph = phi i64 [ %61, %.lr.ph152.preheader ], [ %ind.end251, %middle.block245 ]
  %.069149.ph = phi i32 [ 0, %.lr.ph152.preheader ], [ %75, %middle.block245 ]
  br label %.lr.ph152

vector.ph248:                                     ; preds = %.lr.ph152.preheader
  %n.vec250 = and i64 %62, -8
  %ind.end251 = add nsw i64 %n.vec250, %61
  br label %vector.body253

vector.body253:                                   ; preds = %vector.body253, %vector.ph248
  %index254 = phi i64 [ 0, %vector.ph248 ], [ %index.next260, %vector.body253 ]
  %vec.phi255 = phi <4 x i32> [ zeroinitializer, %vector.ph248 ], [ %72, %vector.body253 ]
  %vec.phi256 = phi <4 x i32> [ zeroinitializer, %vector.ph248 ], [ %73, %vector.body253 ]
  %offset.idx257 = add i64 %index254, %61
  %63 = add nsw i64 %offset.idx257, 1
  %64 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %63
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %wide.load258 = load <4 x i32>, ptr %64, align 4, !tbaa !7
  %wide.load259 = load <4 x i32>, ptr %65, align 4, !tbaa !7
  %66 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %wide.load258, i1 true)
  %67 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %wide.load259, i1 true)
  %68 = icmp eq <4 x i32> %66, <i32 2, i32 2, i32 2, i32 2>
  %69 = icmp eq <4 x i32> %67, <i32 2, i32 2, i32 2, i32 2>
  %70 = zext <4 x i1> %68 to <4 x i32>
  %71 = zext <4 x i1> %69 to <4 x i32>
  %72 = add <4 x i32> %vec.phi255, %70
  %73 = add <4 x i32> %vec.phi256, %71
  %index.next260 = add nuw i64 %index254, 8
  %74 = icmp eq i64 %index.next260, %n.vec250
  br i1 %74, label %middle.block245, label %vector.body253, !llvm.loop !18

middle.block245:                                  ; preds = %vector.body253
  %bin.rdx261 = add <4 x i32> %73, %72
  %75 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx261)
  %cmp.n262 = icmp eq i64 %62, %n.vec250
  br i1 %cmp.n262, label %._crit_edge153, label %.lr.ph152.preheader266

._crit_edge153:                                   ; preds = %.lr.ph152, %middle.block245, %._crit_edge144
  %.069.lcssa = phi i32 [ 0, %._crit_edge144 ], [ %75, %middle.block245 ], [ %spec.select113, %.lr.ph152 ]
  %76 = icmp sgt i32 %.069.lcssa, %.094169
  %77 = sub nsw i32 %7, %.079.lcssa
  %.296 = call i32 @llvm.smax.i32(i32 %.069.lcssa, i32 %.094169)
  %.290 = select i1 %76, i32 %.073207, i32 %.088170
  %.286 = select i1 %76, i32 %77, i32 %.084171
  %78 = add nsw i32 %.072, -1
  %.not112155.not = icmp sgt i32 %.072, %.081172
  br i1 %.not112155.not, label %.lr.ph159.preheader, label %._crit_edge160

.lr.ph159.preheader:                              ; preds = %._crit_edge153
  %79 = sext i32 %.072 to i64
  %80 = sub nsw i64 %79, %13
  %min.iters.check227 = icmp ult i64 %80, 8
  br i1 %min.iters.check227, label %.lr.ph159.preheader265, label %vector.ph228

.lr.ph159.preheader265:                           ; preds = %middle.block225, %.lr.ph159.preheader
  %indvars.iv196.in.ph = phi i64 [ %79, %.lr.ph159.preheader ], [ %ind.end231, %middle.block225 ]
  %.2156.ph = phi i32 [ 0, %.lr.ph159.preheader ], [ %95, %middle.block225 ]
  br label %.lr.ph159

vector.ph228:                                     ; preds = %.lr.ph159.preheader
  %n.vec230 = and i64 %80, -8
  %ind.end231 = sub nsw i64 %79, %n.vec230
  br label %vector.body233

vector.body233:                                   ; preds = %vector.body233, %vector.ph228
  %index234 = phi i64 [ 0, %vector.ph228 ], [ %index.next241, %vector.body233 ]
  %vec.phi235 = phi <4 x i32> [ zeroinitializer, %vector.ph228 ], [ %92, %vector.body233 ]
  %vec.phi236 = phi <4 x i32> [ zeroinitializer, %vector.ph228 ], [ %93, %vector.body233 ]
  %81 = xor i64 %index234, -1
  %82 = add i64 %81, %79
  %83 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %82
  %84 = getelementptr inbounds i8, ptr %83, i64 -12
  %85 = getelementptr inbounds i8, ptr %83, i64 -28
  %wide.load238 = load <4 x i32>, ptr %84, align 4, !tbaa !7
  %reverse = shufflevector <4 x i32> %wide.load238, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load239 = load <4 x i32>, ptr %85, align 4, !tbaa !7
  %reverse240 = shufflevector <4 x i32> %wide.load239, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %86 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %reverse, i1 true)
  %87 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %reverse240, i1 true)
  %88 = icmp eq <4 x i32> %86, <i32 2, i32 2, i32 2, i32 2>
  %89 = icmp eq <4 x i32> %87, <i32 2, i32 2, i32 2, i32 2>
  %90 = zext <4 x i1> %88 to <4 x i32>
  %91 = zext <4 x i1> %89 to <4 x i32>
  %92 = add <4 x i32> %vec.phi235, %90
  %93 = add <4 x i32> %vec.phi236, %91
  %index.next241 = add nuw i64 %index234, 8
  %94 = icmp eq i64 %index.next241, %n.vec230
  br i1 %94, label %middle.block225, label %vector.body233, !llvm.loop !19

middle.block225:                                  ; preds = %vector.body233
  %bin.rdx242 = add <4 x i32> %93, %92
  %95 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx242)
  %cmp.n243 = icmp eq i64 %80, %n.vec230
  br i1 %cmp.n243, label %._crit_edge160, label %.lr.ph159.preheader265

.lr.ph152:                                        ; preds = %.lr.ph152.preheader266, %.lr.ph152
  %indvars.iv192 = phi i64 [ %indvars.iv.next193, %.lr.ph152 ], [ %indvars.iv192.ph, %.lr.ph152.preheader266 ]
  %.069149 = phi i32 [ %spec.select113, %.lr.ph152 ], [ %.069149.ph, %.lr.ph152.preheader266 ]
  %indvars.iv.next193 = add nsw i64 %indvars.iv192, 1
  %96 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv.next193
  %97 = load i32, ptr %96, align 4, !tbaa !7
  %98 = call i32 @llvm.abs.i32(i32 %97, i1 true)
  %99 = icmp eq i32 %98, 2
  %100 = zext i1 %99 to i32
  %spec.select113 = add nuw nsw i32 %.069149, %100
  %exitcond195.not = icmp eq i64 %indvars.iv.next193, %wide.trip.count
  br i1 %exitcond195.not, label %._crit_edge153, label %.lr.ph152, !llvm.loop !20

._crit_edge160:                                   ; preds = %.lr.ph159, %middle.block225, %._crit_edge153
  %.2.lcssa = phi i32 [ 0, %._crit_edge153 ], [ %95, %middle.block225 ], [ %spec.select114, %.lr.ph159 ]
  %101 = icmp sgt i32 %.2.lcssa, %.296
  %102 = add nsw i32 %.081172, -1
  %103 = sub nsw i32 %7, %78
  %.397 = call i32 @llvm.smax.i32(i32 %.2.lcssa, i32 %.296)
  %.391 = select i1 %101, i32 %102, i32 %.290
  %.387 = select i1 %101, i32 %103, i32 %.286
  br label %109

.lr.ph159:                                        ; preds = %.lr.ph159.preheader265, %.lr.ph159
  %indvars.iv196.in = phi i64 [ %indvars.iv196, %.lr.ph159 ], [ %indvars.iv196.in.ph, %.lr.ph159.preheader265 ]
  %.2156 = phi i32 [ %spec.select114, %.lr.ph159 ], [ %.2156.ph, %.lr.ph159.preheader265 ]
  %indvars.iv196 = add nsw i64 %indvars.iv196.in, -1
  %104 = getelementptr inbounds [200010 x i32], ptr @a, i64 0, i64 %indvars.iv196
  %105 = load i32, ptr %104, align 4, !tbaa !7
  %106 = call i32 @llvm.abs.i32(i32 %105, i1 true)
  %107 = icmp eq i32 %106, 2
  %108 = zext i1 %107 to i32
  %spec.select114 = add nuw nsw i32 %.2156, %108
  %.not112.not = icmp sgt i64 %indvars.iv196, %13
  br i1 %.not112.not, label %.lr.ph159, label %._crit_edge160, !llvm.loop !21

109:                                              ; preds = %._crit_edge166, %._crit_edge160, %.lr.ph173
  %.599 = phi i32 [ %.094169, %.lr.ph173 ], [ %.397, %._crit_edge160 ], [ %.195, %._crit_edge166 ]
  %.593 = phi i32 [ %.088170, %.lr.ph173 ], [ %.391, %._crit_edge160 ], [ %.189, %._crit_edge166 ]
  %.5 = phi i32 [ %.084171, %.lr.ph173 ], [ %.387, %._crit_edge160 ], [ %.185, %._crit_edge166 ]
  %.283 = phi i32 [ %.081172, %.lr.ph173 ], [ %.182, %._crit_edge160 ], [ %.182, %._crit_edge166 ]
  %110 = add nsw i32 %.283, 1
  %.not104.not = icmp slt i32 %.283, %7
  br i1 %.not104.not, label %.lr.ph173, label %._crit_edge174, !llvm.loop !22
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.abs.v4i32(<4 x i32>, i1 immarg) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5

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


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