; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/Neps Academy (LencolOBI2013)

; 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" }
%struct.Rect = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Rect, align 4
  %3 = alloca %struct.Rect, align 4
  %4 = alloca %struct.Rect, align 4
  %5 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 0, ptr %5, align 1, !tbaa !5
  %6 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %8 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %10 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %12 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %14 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %16 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %18 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %21 = load i32, ptr %20, align 4, !tbaa !12
  %22 = icmp sge i32 %19, %21
  br i1 %22, label %23, label %49

23:                                               ; preds = %0
  %24 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = icmp sge i32 %25, %27
  br i1 %28, label %29, label %49

29:                                               ; preds = %23
  %30 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %31 = load i32, ptr %30, align 4, !tbaa !9
  %32 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = add nsw i32 %31, %33
  %35 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = icmp sge i32 %34, %36
  br i1 %37, label %38, label %48

38:                                               ; preds = %29
  %39 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !12
  %41 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !12
  %43 = add nsw i32 %40, %42
  %44 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = icmp sge i32 %43, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %38
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %48

48:                                               ; preds = %47, %38, %29
  br label %49

49:                                               ; preds = %48, %23, %0
  %50 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp sge i32 %51, %53
  br i1 %54, label %55, label %61

55:                                               ; preds = %49
  %56 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !12
  %60 = icmp sge i32 %57, %59
  br i1 %60, label %97, label %61

61:                                               ; preds = %55, %49
  %62 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !12
  %64 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = icmp sge i32 %63, %65
  br i1 %66, label %67, label %73

67:                                               ; preds = %61
  %68 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !12
  %72 = icmp sge i32 %69, %71
  br i1 %72, label %97, label %73

73:                                               ; preds = %67, %61
  %74 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = icmp sge i32 %75, %77
  br i1 %78, label %79, label %85

79:                                               ; preds = %73
  %80 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !12
  %82 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %83 = load i32, ptr %82, align 4, !tbaa !12
  %84 = icmp sge i32 %81, %83
  br i1 %84, label %97, label %85

85:                                               ; preds = %79, %73
  %86 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !12
  %88 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp sge i32 %87, %89
  br i1 %90, label %91, label %98

91:                                               ; preds = %85
  %92 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !12
  %96 = icmp sge i32 %93, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %91, %79, %67, %55
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %283

98:                                               ; preds = %91, %85
  %99 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = icmp sge i32 %100, %102
  br i1 %103, label %104, label %150

104:                                              ; preds = %98
  %105 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp sge i32 %106, %108
  br i1 %109, label %110, label %150

110:                                              ; preds = %104
  %111 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = add nsw i32 %112, %114
  %116 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = icmp sge i32 %115, %117
  br i1 %118, label %119, label %129

119:                                              ; preds = %110
  %120 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !12
  %122 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %123 = load i32, ptr %122, align 4, !tbaa !12
  %124 = add nsw i32 %121, %123
  %125 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !12
  %127 = icmp sge i32 %124, %126
  br i1 %127, label %128, label %129

128:                                              ; preds = %119
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %149

129:                                              ; preds = %119, %110
  %130 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = add nsw i32 %131, %133
  %135 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !12
  %137 = icmp sge i32 %134, %136
  br i1 %137, label %138, label %148

138:                                              ; preds = %129
  %139 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %140 = load i32, ptr %139, align 4, !tbaa !12
  %141 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %142 = load i32, ptr %141, align 4, !tbaa !12
  %143 = add nsw i32 %140, %142
  %144 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %145 = load i32, ptr %144, align 4, !tbaa !9
  %146 = icmp sge i32 %143, %145
  br i1 %146, label %147, label %148

147:                                              ; preds = %138
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %148

148:                                              ; preds = %147, %138, %129
  br label %149

149:                                              ; preds = %148, %128
  br label %282

150:                                              ; preds = %104, %98
  %151 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %154 = load i32, ptr %153, align 4, !tbaa !9
  %155 = icmp sge i32 %152, %154
  br i1 %155, label %156, label %182

156:                                              ; preds = %150
  %157 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %158 = load i32, ptr %157, align 4, !tbaa !12
  %159 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = icmp sge i32 %158, %160
  br i1 %161, label %162, label %182

162:                                              ; preds = %156
  %163 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %166 = load i32, ptr %165, align 4, !tbaa !12
  %167 = add nsw i32 %164, %166
  %168 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %169 = load i32, ptr %168, align 4, !tbaa !9
  %170 = icmp sge i32 %167, %169
  br i1 %170, label %171, label %181

171:                                              ; preds = %162
  %172 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %173 = load i32, ptr %172, align 4, !tbaa !12
  %174 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %175 = load i32, ptr %174, align 4, !tbaa !9
  %176 = add nsw i32 %173, %175
  %177 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !12
  %179 = icmp sge i32 %176, %178
  br i1 %179, label %180, label %181

180:                                              ; preds = %171
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %181

181:                                              ; preds = %180, %171, %162
  br label %281

182:                                              ; preds = %156, %150
  %183 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %184 = load i32, ptr %183, align 4, !tbaa !12
  %185 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = icmp sge i32 %184, %186
  br i1 %187, label %188, label %214

188:                                              ; preds = %182
  %189 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !12
  %191 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %192 = load i32, ptr %191, align 4, !tbaa !9
  %193 = icmp sge i32 %190, %192
  br i1 %193, label %194, label %214

194:                                              ; preds = %188
  %195 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %196 = load i32, ptr %195, align 4, !tbaa !9
  %197 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %198 = load i32, ptr %197, align 4, !tbaa !9
  %199 = add nsw i32 %196, %198
  %200 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %201 = load i32, ptr %200, align 4, !tbaa !12
  %202 = icmp sge i32 %199, %201
  br i1 %202, label %203, label %213

203:                                              ; preds = %194
  %204 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %205 = load i32, ptr %204, align 4, !tbaa !12
  %206 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %207 = load i32, ptr %206, align 4, !tbaa !12
  %208 = add nsw i32 %205, %207
  %209 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %210 = load i32, ptr %209, align 4, !tbaa !9
  %211 = icmp sge i32 %208, %210
  br i1 %211, label %212, label %213

212:                                              ; preds = %203
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %213

213:                                              ; preds = %212, %203, %194
  br label %280

214:                                              ; preds = %188, %182
  %215 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %216 = load i32, ptr %215, align 4, !tbaa !12
  %217 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %218 = load i32, ptr %217, align 4, !tbaa !9
  %219 = icmp sge i32 %216, %218
  br i1 %219, label %220, label %246

220:                                              ; preds = %214
  %221 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %222 = load i32, ptr %221, align 4, !tbaa !12
  %223 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = icmp sge i32 %222, %224
  br i1 %225, label %226, label %246

226:                                              ; preds = %220
  %227 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %228 = load i32, ptr %227, align 4, !tbaa !12
  %229 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %230 = load i32, ptr %229, align 4, !tbaa !12
  %231 = add nsw i32 %228, %230
  %232 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %233 = load i32, ptr %232, align 4, !tbaa !9
  %234 = icmp sge i32 %231, %233
  br i1 %234, label %235, label %245

235:                                              ; preds = %226
  %236 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %237 = load i32, ptr %236, align 4, !tbaa !9
  %238 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %239 = load i32, ptr %238, align 4, !tbaa !9
  %240 = add nsw i32 %237, %239
  %241 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %242 = load i32, ptr %241, align 4, !tbaa !12
  %243 = icmp sge i32 %240, %242
  br i1 %243, label %244, label %245

244:                                              ; preds = %235
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %245

245:                                              ; preds = %244, %235, %226
  br label %279

246:                                              ; preds = %220, %214
  %247 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %248 = load i32, ptr %247, align 4, !tbaa !12
  %249 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %250 = load i32, ptr %249, align 4, !tbaa !9
  %251 = icmp sge i32 %248, %250
  br i1 %251, label %252, label %278

252:                                              ; preds = %246
  %253 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %254 = load i32, ptr %253, align 4, !tbaa !9
  %255 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %256 = load i32, ptr %255, align 4, !tbaa !9
  %257 = icmp sge i32 %254, %256
  br i1 %257, label %258, label %278

258:                                              ; preds = %252
  %259 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 1
  %260 = load i32, ptr %259, align 4, !tbaa !12
  %261 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 0
  %262 = load i32, ptr %261, align 4, !tbaa !9
  %263 = add nsw i32 %260, %262
  %264 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 0
  %265 = load i32, ptr %264, align 4, !tbaa !9
  %266 = icmp sge i32 %263, %265
  br i1 %266, label %267, label %277

267:                                              ; preds = %258
  %268 = getelementptr inbounds %struct.Rect, ptr %2, i32 0, i32 0
  %269 = load i32, ptr %268, align 4, !tbaa !9
  %270 = getelementptr inbounds %struct.Rect, ptr %3, i32 0, i32 1
  %271 = load i32, ptr %270, align 4, !tbaa !12
  %272 = add nsw i32 %269, %271
  %273 = getelementptr inbounds %struct.Rect, ptr %4, i32 0, i32 1
  %274 = load i32, ptr %273, align 4, !tbaa !12
  %275 = icmp sge i32 %272, %274
  br i1 %275, label %276, label %277

276:                                              ; preds = %267
  store i8 1, ptr %5, align 1, !tbaa !5
  br label %277

277:                                              ; preds = %276, %267, %258
  br label %278

278:                                              ; preds = %277, %252, %246
  br label %279

279:                                              ; preds = %278, %245
  br label %280

280:                                              ; preds = %279, %213
  br label %281

281:                                              ; preds = %280, %181
  br label %282

282:                                              ; preds = %281, %149
  br label %283

283:                                              ; preds = %282, %97
  %284 = load i8, ptr %5, align 1, !tbaa !5, !range !13, !noundef !14
  %285 = trunc i8 %284 to i1
  br i1 %285, label %286, label %288

286:                                              ; preds = %283
  %287 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %290

288:                                              ; preds = %283
  %289 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %290

290:                                              ; preds = %288, %286
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  ret i32 0
}

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

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 = { "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 = { 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 #4 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS4Rect", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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" }
%struct.Rect = type { i32, i32 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.Rect, align 4
  %2 = alloca %struct.Rect, align 4
  %3 = alloca %struct.Rect, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %4 = 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)
  %5 = getelementptr inbounds i8, ptr %1, i64 4
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = getelementptr inbounds i8, ptr %2, i64 4
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %11 = getelementptr inbounds i8, ptr %3, i64 4
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = load i32, ptr %11, align 4, !tbaa !10
  %.not = icmp slt i32 %13, %14
  br i1 %.not, label %._crit_edge, label %15

._crit_edge:                                      ; preds = %0
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  %.pre76 = load i32, ptr %5, align 4
  br label %21

15:                                               ; preds = %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %.not19 = icmp slt i32 %16, %14
  %17 = add nsw i32 %16, %13
  %.not20 = icmp slt i32 %17, %14
  %or.cond = select i1 %.not19, i1 true, i1 %.not20
  %.pre75 = load i32, ptr %3, align 4, !tbaa !5
  %.pre77 = load i32, ptr %5, align 4
  br i1 %or.cond, label %21, label %18

18:                                               ; preds = %15
  %19 = load i32, ptr %8, align 4, !tbaa !10
  %20 = add nsw i32 %.pre77, %19
  %.not21 = icmp sge i32 %20, %.pre75
  br label %21

21:                                               ; preds = %._crit_edge, %18, %15
  %22 = phi i32 [ %.pre77, %15 ], [ %.pre76, %._crit_edge ], [ %.pre77, %18 ]
  %23 = phi i32 [ %.pre75, %15 ], [ %.pre, %._crit_edge ], [ %.pre75, %18 ]
  %.0 = phi i1 [ false, %15 ], [ false, %._crit_edge ], [ %.not21, %18 ]
  %.not22 = icmp slt i32 %13, %23
  %.not23 = icmp slt i32 %22, %14
  %or.cond70 = select i1 %.not22, i1 true, i1 %.not23
  br i1 %or.cond70, label %24, label %.thread68

24:                                               ; preds = %21
  %.not24 = icmp slt i32 %22, %23
  %brmerge = or i1 %.not, %.not24
  br i1 %brmerge, label %25, label %.thread68

25:                                               ; preds = %24
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %.not26 = icmp slt i32 %26, %23
  %27 = load i32, ptr %8, align 4
  %.not27 = icmp slt i32 %27, %14
  %or.cond71 = select i1 %.not26, i1 true, i1 %.not27
  br i1 %or.cond71, label %28, label %.thread68

28:                                               ; preds = %25
  %.not28 = icmp slt i32 %27, %23
  %.not29 = icmp slt i32 %26, %14
  %or.cond72 = or i1 %.not29, %.not28
  br i1 %or.cond72, label %29, label %.thread68

29:                                               ; preds = %28
  br i1 %.not22, label %.thread, label %30

30:                                               ; preds = %29
  br i1 %.not26, label %36, label %31

31:                                               ; preds = %30
  %32 = add nsw i32 %26, %13
  %.not48 = icmp slt i32 %32, %23
  %33 = add nsw i32 %27, %22
  %.not49 = icmp slt i32 %33, %14
  %or.cond73 = select i1 %.not48, i1 true, i1 %.not49
  br i1 %or.cond73, label %34, label %.thread68

34:                                               ; preds = %31
  %.not50 = icmp slt i32 %32, %14
  br i1 %.not50, label %.thread64, label %35

35:                                               ; preds = %34
  %.not51 = icmp sge i32 %33, %23
  %spec.select52 = select i1 %.not51, i1 true, i1 %.0
  br i1 %spec.select52, label %.thread68, label %48

36:                                               ; preds = %30
  %37 = add nsw i32 %27, %13
  %.not46 = icmp slt i32 %37, %23
  %or.cond74 = select i1 %.not28, i1 true, i1 %.not46
  br i1 %or.cond74, label %.thread64, label %38

38:                                               ; preds = %36
  %39 = add nsw i32 %26, %22
  %.not47 = icmp sge i32 %39, %14
  %spec.select53 = select i1 %.not47, i1 true, i1 %.0
  br i1 %spec.select53, label %.thread68, label %48

.thread:                                          ; preds = %29
  br i1 %.not24, label %.thread64, label %40

40:                                               ; preds = %.thread
  br i1 %.not28, label %44, label %41

41:                                               ; preds = %40
  %42 = add nsw i32 %26, %13
  %.not44 = icmp sge i32 %42, %14
  %43 = add nsw i32 %27, %22
  %.not45 = icmp sge i32 %43, %23
  %or.cond54.not = select i1 %.not44, i1 %.not45, i1 false
  %spec.select58 = select i1 %or.cond54.not, i1 true, i1 %.0
  br i1 %spec.select58, label %.thread68, label %48

44:                                               ; preds = %40
  %45 = add nsw i32 %26, %22
  %.not40 = icmp slt i32 %45, %23
  %or.cond56 = select i1 %.not26, i1 true, i1 %.not40
  br i1 %or.cond56, label %.thread64, label %46

46:                                               ; preds = %44
  %47 = add nsw i32 %27, %13
  %.not41 = icmp sge i32 %47, %14
  %spec.select57 = select i1 %.not41, i1 true, i1 %.0
  br i1 %spec.select57, label %.thread68, label %48

.thread64:                                        ; preds = %36, %.thread, %34, %44
  br i1 %.0, label %.thread68, label %48

48:                                               ; preds = %41, %46, %38, %35, %.thread64
  br label %.thread68

.thread68:                                        ; preds = %.thread64, %21, %24, %25, %28, %31, %35, %38, %46, %41, %48
  %.str.1.sink = phi ptr [ @.str.1, %48 ], [ @.str, %41 ], [ @.str, %46 ], [ @.str, %38 ], [ @.str, %35 ], [ @.str, %31 ], [ @.str, %28 ], [ @.str, %25 ], [ @.str, %24 ], [ @.str, %21 ], [ @.str, %.thread64 ]
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.1.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret i32 0
}

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

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 = { "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 = { 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 #4 = { 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, !7, i64 0}
!6 = !{!"_ZTS4Rect", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass