; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/DP Level 3/Packing Rectangles (pack)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { i32, i32 }

@rect = external dso_local global [4 x [2 x i32]], align 16
@MIN = external dso_local global i32, align 4
@rectangles = external dso_local global %"class.std::vector", align 8
@dic = external dso_local global %"class.std::map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z17check_and_permuteiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @rect)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([2 x i32], ptr @rect, i64 0, i64 1))
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([4 x [2 x i32]], ptr @rect, i64 0, i64 1))
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([2 x i32], ptr getelementptr inbounds ([4 x [2 x i32]], ptr @rect, i64 0, i64 1), i64 0, i64 1))
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([4 x [2 x i32]], ptr @rect, i64 0, i64 2))
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([2 x i32], ptr getelementptr inbounds ([4 x [2 x i32]], ptr @rect, i64 0, i64 2), i64 0, i64 1))
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([4 x [2 x i32]], ptr @rect, i64 0, i64 3))
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([2 x i32], ptr getelementptr inbounds ([4 x [2 x i32]], ptr @rect, i64 0, i64 3), i64 0, i64 1))
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %78, %0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 4
  br i1 %20, label %21, label %81

21:                                               ; preds = %18
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %74, %21
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 4
  br i1 %24, label %25, label %77

25:                                               ; preds = %22
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp ne i32 %26, %27
  br i1 %28, label %29, label %73

29:                                               ; preds = %25
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %69, %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 4
  br i1 %32, label %33, label %72

33:                                               ; preds = %30
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = icmp ne i32 %34, %35
  br i1 %36, label %37, label %68

37:                                               ; preds = %33
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = icmp ne i32 %38, %39
  br i1 %40, label %41, label %68

41:                                               ; preds = %37
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %64, %41
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = icmp slt i32 %43, 4
  br i1 %44, label %45, label %67

45:                                               ; preds = %42
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = icmp ne i32 %46, %47
  br i1 %48, label %49, label %63

49:                                               ; preds = %45
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = icmp ne i32 %50, %51
  br i1 %52, label %53, label %63

53:                                               ; preds = %49
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = icmp ne i32 %54, %55
  br i1 %56, label %57, label %63

57:                                               ; preds = %53
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %58, i32 noundef %59, i32 noundef %60, i32 noundef %61)
  br label %63

63:                                               ; preds = %57, %53, %49, %45
  br label %64

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

67:                                               ; preds = %42
  br label %68

68:                                               ; preds = %67, %37, %33
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %4, align 4, !tbaa !5
  br label %30, !llvm.loop !11

72:                                               ; preds = %30
  br label %73

73:                                               ; preds = %72, %25
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %3, align 4, !tbaa !5
  br label %22, !llvm.loop !12

77:                                               ; preds = %22
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !13

81:                                               ; preds = %18
  %82 = load i32, ptr @MIN, align 4, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %142, %81
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @rectangles) #6
  %89 = icmp ult i64 %87, %88
  br i1 %89, label %90, label %145

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %91 = load i32, ptr %2, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %92) #6
  %94 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) @dic, ptr noundef nonnull align 4 dereferenceable(8) %93)
  %95 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %8, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %96 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @dic) #6
  %97 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %9, i32 0, i32 0
  store ptr %96, ptr %97, align 8
  %98 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br i1 %98, label %99, label %141

99:                                               ; preds = %90
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %101) #6
  %103 = getelementptr inbounds %"struct.std::pair", ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 4, !tbaa !14
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %106) #6
  %108 = getelementptr inbounds %"struct.std::pair", ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !16
  %110 = icmp sgt i32 %104, %109
  br i1 %110, label %111, label %122

111:                                              ; preds = %99
  %112 = load i32, ptr %2, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %113) #6
  %115 = getelementptr inbounds %"struct.std::pair", ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 4, !tbaa !14
  store i32 %116, ptr %6, align 4, !tbaa !5
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %118) #6
  %120 = getelementptr inbounds %"struct.std::pair", ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 4, !tbaa !16
  store i32 %121, ptr %7, align 4, !tbaa !5
  br label %133

122:                                              ; preds = %99
  %123 = load i32, ptr %2, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %124) #6
  %126 = getelementptr inbounds %"struct.std::pair", ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 4, !tbaa !16
  store i32 %127, ptr %6, align 4, !tbaa !5
  %128 = load i32, ptr %2, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %129) #6
  %131 = getelementptr inbounds %"struct.std::pair", ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !14
  store i32 %132, ptr %7, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %122, %111
  %134 = load i32, ptr %2, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %135) #6
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @dic, ptr noundef nonnull align 4 dereferenceable(8) %136)
  store i32 1, ptr %137, align 4, !tbaa !5
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %138, i32 noundef %139)
  br label %141

141:                                              ; preds = %133, %90
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %2, align 4, !tbaa !5
  br label %85, !llvm.loop !17

145:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

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) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

declare i32 @printf(ptr noundef, ...) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!16 = !{!15, !6, i64 4}
!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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@rect = external dso_local global [4 x [2 x i32]], align 16
@MIN = external dso_local local_unnamed_addr global i32, align 4
@rectangles = external dso_local global %"class.std::vector", align 8
@dic = external dso_local global %"class.std::map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z17check_and_permuteiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %2 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @rect)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 4))
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 8))
  %6 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 12))
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 16))
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 20))
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 24))
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @rect, i64 28))
  br label %.preheader51

.preheader51:                                     ; preds = %0, %.loopexit120
  %.04055 = phi i32 [ 0, %0 ], [ %48, %.loopexit120 ]
  %.not43 = icmp eq i32 %.04055, 0
  %.not46.1 = icmp eq i32 %.04055, 1
  %.not46.2 = icmp eq i32 %.04055, 2
  %.not46.3 = icmp eq i32 %.04055, 3
  %.not43.1 = icmp eq i32 %.04055, 1
  %.not43.179 = icmp eq i32 %.04055, 1
  %.not46.2.1 = icmp eq i32 %.04055, 2
  %.not46.3.1 = icmp eq i32 %.04055, 3
  %.not43.2 = icmp eq i32 %.04055, 2
  %.not43.287 = icmp eq i32 %.04055, 2
  %.not46.3.2 = icmp eq i32 %.04055, 3
  %.not43.3 = icmp eq i32 %.04055, 3
  %.not.peel = icmp eq i32 %.04055, 0
  br i1 %.not.peel, label %.preheader51.peel.newph, label %.loopexit.thread.peel

.loopexit.thread.peel:                            ; preds = %.preheader51
  br i1 %.not43.179, label %.preheader.3.2.peel, label %.preheader.2.1.peel

.preheader.2.1.peel:                              ; preds = %.loopexit.thread.peel
  br i1 %.not46.2.1, label %.preheader.3.1.peel, label %11

11:                                               ; preds = %.preheader.2.1.peel
  %12 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef 0, i32 noundef 1, i32 noundef 2)
  br label %.preheader.3.1.peel

.preheader.3.1.peel:                              ; preds = %11, %.preheader.2.1.peel
  br i1 %.not46.3.1, label %.loopexit.1.peel, label %13

13:                                               ; preds = %.preheader.3.1.peel
  %14 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef 0, i32 noundef 1, i32 noundef 3)
  br label %.loopexit.1.peel

.loopexit.1.peel:                                 ; preds = %13, %.preheader.3.1.peel
  br i1 %.not43.2, label %.loopexit.2.peel, label %.preheader.1.2.peel

.preheader.1.2.peel:                              ; preds = %.loopexit.1.peel
  %15 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef 0, i32 noundef 2, i32 noundef 1)
  br label %.preheader.3.2.peel

.preheader.3.2.peel:                              ; preds = %.loopexit.thread.peel, %.preheader.1.2.peel
  %or.cond.182899699.peel = phi i1 [ false, %.preheader.1.2.peel ], [ true, %.loopexit.thread.peel ]
  br i1 %.not46.3.2, label %.loopexit.2.peel, label %16

16:                                               ; preds = %.preheader.3.2.peel
  %17 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef 0, i32 noundef 2, i32 noundef 3)
  br label %.loopexit.2.peel

.loopexit.2.peel:                                 ; preds = %16, %.preheader.3.2.peel, %.loopexit.1.peel
  %or.cond.292.peel = phi i1 [ true, %.loopexit.1.peel ], [ false, %16 ], [ false, %.preheader.3.2.peel ]
  %or.cond.18290.peel = phi i1 [ false, %.loopexit.1.peel ], [ %or.cond.182899699.peel, %16 ], [ %or.cond.182899699.peel, %.preheader.3.2.peel ]
  br i1 %.not43.3, label %.preheader51.peel.newph, label %.preheader.1.3.peel

.preheader.1.3.peel:                              ; preds = %.loopexit.2.peel
  br i1 %or.cond.18290.peel, label %.preheader.2.3.peel, label %18

18:                                               ; preds = %.preheader.1.3.peel
  %19 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef 0, i32 noundef 3, i32 noundef 1)
  br i1 %or.cond.292.peel, label %.preheader51.peel.newph, label %20

.preheader.2.3.peel:                              ; preds = %.preheader.1.3.peel
  br i1 %or.cond.292.peel, label %.preheader51.peel.newph, label %20

20:                                               ; preds = %.preheader.2.3.peel, %18
  %21 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef 0, i32 noundef 3, i32 noundef 2)
  br label %.preheader51.peel.newph

.preheader51.peel.newph:                          ; preds = %.preheader51, %.loopexit.2.peel, %18, %.preheader.2.3.peel, %20
  br label %22

22:                                               ; preds = %.preheader51.peel.newph, %.loopexit50
  %.03954 = phi i32 [ 1, %.preheader51.peel.newph ], [ %47, %.loopexit50 ]
  %.not = icmp eq i32 %.03954, %.04055
  br i1 %.not, label %.loopexit50, label %.preheader49.preheader

.preheader49.preheader:                           ; preds = %22
  %.not42.178 = icmp eq i32 %.03954, 1
  br i1 %.not43, label %.loopexit.thread, label %.preheader.1

.preheader.1:                                     ; preds = %.preheader49.preheader
  %or.cond48.1 = or i1 %.not46.1, %.not42.178
  br i1 %or.cond48.1, label %.preheader.2, label %23

23:                                               ; preds = %.preheader.1
  %24 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 0, i32 noundef 1)
  br label %.preheader.2

.preheader.2:                                     ; preds = %23, %.preheader.1
  %.not45.2 = icmp eq i32 %.03954, 2
  %or.cond48.2 = or i1 %.not46.2, %.not45.2
  br i1 %or.cond48.2, label %.preheader.3, label %25

25:                                               ; preds = %.preheader.2
  %26 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 0, i32 noundef 2)
  br label %.preheader.3

.preheader.3:                                     ; preds = %25, %.preheader.2
  %.not45.3 = icmp eq i32 %.03954, 3
  %or.cond48.3 = or i1 %.not46.3, %.not45.3
  br i1 %or.cond48.3, label %.loopexit, label %27

27:                                               ; preds = %.preheader.3
  %28 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 0, i32 noundef 3)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.3, %27
  %.not42.1 = icmp eq i32 %.03954, 1
  %or.cond.1 = or i1 %.not42.1, %.not43.1
  br i1 %or.cond.1, label %.loopexit.1, label %.preheader.preheader.1

.loopexit.thread:                                 ; preds = %.preheader49.preheader
  %or.cond.180 = or i1 %.not42.178, %.not43.179
  br i1 %or.cond.180, label %.loopexit.1.thread, label %.preheader.2.1

.preheader.preheader.1:                           ; preds = %.loopexit
  br i1 %.not43, label %.preheader.2.1, label %29

29:                                               ; preds = %.preheader.preheader.1
  %30 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 1, i32 noundef 0)
  br label %.preheader.2.1

.preheader.2.1:                                   ; preds = %.loopexit.thread, %.preheader.preheader.1, %29
  %.not45.2.1 = icmp eq i32 %.03954, 2
  %or.cond48.2.1 = or i1 %.not46.2.1, %.not45.2.1
  br i1 %or.cond48.2.1, label %.preheader.3.1, label %31

31:                                               ; preds = %.preheader.2.1
  %32 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 1, i32 noundef 2)
  br label %.preheader.3.1

.preheader.3.1:                                   ; preds = %31, %.preheader.2.1
  %.not45.3.1 = icmp eq i32 %.03954, 3
  %or.cond48.3.1 = or i1 %.not46.3.1, %.not45.3.1
  br i1 %or.cond48.3.1, label %.loopexit.1, label %33

33:                                               ; preds = %.preheader.3.1
  %34 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 1, i32 noundef 3)
  br label %.loopexit.1

.loopexit.1:                                      ; preds = %.preheader.3.1, %33, %.loopexit
  %or.cond.182 = phi i1 [ true, %.loopexit ], [ false, %33 ], [ false, %.preheader.3.1 ]
  %.not42.2 = icmp eq i32 %.03954, 2
  %or.cond.2 = or i1 %.not42.2, %.not43.2
  br i1 %or.cond.2, label %.loopexit.2, label %.preheader.preheader.2

.loopexit.1.thread:                               ; preds = %.loopexit.thread
  %.not42.286 = icmp eq i32 %.03954, 2
  %or.cond.288 = or i1 %.not42.286, %.not43.287
  br i1 %or.cond.288, label %.loopexit50, label %.preheader.3.2

.preheader.preheader.2:                           ; preds = %.loopexit.1
  br i1 %.not43, label %.preheader.1.2, label %35

35:                                               ; preds = %.preheader.preheader.2
  %36 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 2, i32 noundef 0)
  br i1 %or.cond.182, label %.preheader.3.2, label %37

.preheader.1.2:                                   ; preds = %.preheader.preheader.2
  br i1 %or.cond.182, label %.preheader.3.2, label %37

37:                                               ; preds = %35, %.preheader.1.2
  %38 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 2, i32 noundef 1)
  br label %.preheader.3.2

.preheader.3.2:                                   ; preds = %.loopexit.1.thread, %.preheader.1.2, %37, %35
  %or.cond.182899699 = phi i1 [ false, %37 ], [ true, %.preheader.1.2 ], [ true, %35 ], [ true, %.loopexit.1.thread ]
  %.not45.3.2 = icmp eq i32 %.03954, 3
  %or.cond48.3.2 = or i1 %.not46.3.2, %.not45.3.2
  br i1 %or.cond48.3.2, label %.loopexit.2, label %39

39:                                               ; preds = %.preheader.3.2
  %40 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 2, i32 noundef 3)
  br label %.loopexit.2

.loopexit.2:                                      ; preds = %.preheader.3.2, %39, %.loopexit.1
  %or.cond.292 = phi i1 [ true, %.loopexit.1 ], [ false, %39 ], [ false, %.preheader.3.2 ]
  %or.cond.18290 = phi i1 [ %or.cond.182, %.loopexit.1 ], [ %or.cond.182899699, %39 ], [ %or.cond.182899699, %.preheader.3.2 ]
  %.not42.3 = icmp eq i32 %.03954, 3
  %or.cond.3 = or i1 %.not42.3, %.not43.3
  br i1 %or.cond.3, label %.loopexit50, label %.preheader.preheader.3

.preheader.preheader.3:                           ; preds = %.loopexit.2
  br i1 %.not43, label %.preheader.1.3, label %41

41:                                               ; preds = %.preheader.preheader.3
  %42 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 3, i32 noundef 0)
  br i1 %or.cond.18290, label %.preheader.2.3, label %43

.preheader.1.3:                                   ; preds = %.preheader.preheader.3
  br i1 %or.cond.18290, label %.preheader.2.3, label %43

43:                                               ; preds = %41, %.preheader.1.3
  %44 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 3, i32 noundef 1)
  br i1 %or.cond.292, label %.loopexit50, label %45

.preheader.2.3:                                   ; preds = %41, %.preheader.1.3
  br i1 %or.cond.292, label %.loopexit50, label %45

45:                                               ; preds = %43, %.preheader.2.3
  %46 = tail call noundef i32 @_Z17check_and_permuteiiii(i32 noundef %.04055, i32 noundef %.03954, i32 noundef 3, i32 noundef 2)
  br label %.loopexit50

.loopexit50:                                      ; preds = %.loopexit.1.thread, %.loopexit.2, %.preheader.2.3, %45, %43, %22
  %47 = add nuw nsw i32 %.03954, 1
  %exitcond.not = icmp eq i32 %47, 4
  br i1 %exitcond.not, label %.loopexit120, label %22, !llvm.loop !5

.loopexit120:                                     ; preds = %.loopexit50
  %48 = add nuw nsw i32 %.04055, 1
  %exitcond76.not = icmp eq i32 %48, 4
  br i1 %exitcond76.not, label %49, label %.preheader51, !llvm.loop !8

49:                                               ; preds = %.loopexit120
  %50 = load i32, ptr @MIN, align 4, !tbaa !9
  %51 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %50)
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %53 = tail call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @rectangles) #7
  %.not57 = icmp eq i64 %53, 0
  br i1 %.not57, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %49, %78
  %indvars.iv = phi i64 [ %indvars.iv.next, %78 ], [ 0, %49 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %54 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  %55 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) @dic, ptr noundef nonnull align 4 dereferenceable(8) %54)
  store ptr %55, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %56 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @dic) #7
  store ptr %56, ptr %2, align 8
  %57 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  br i1 %57, label %58, label %78

58:                                               ; preds = %.lr.ph
  %59 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  %62 = getelementptr inbounds i8, ptr %61, i64 4
  %63 = load i32, ptr %62, align 4, !tbaa !15
  %64 = icmp sgt i32 %60, %63
  %65 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  br i1 %64, label %66, label %70

66:                                               ; preds = %58
  %67 = load i32, ptr %65, align 4, !tbaa !13
  %68 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  %69 = getelementptr inbounds i8, ptr %68, i64 4
  br label %74

70:                                               ; preds = %58
  %71 = getelementptr inbounds i8, ptr %65, i64 4
  %72 = load i32, ptr %71, align 4, !tbaa !15
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  br label %74

74:                                               ; preds = %70, %66
  %.036 = phi i32 [ %67, %66 ], [ %72, %70 ]
  %.0.in = phi ptr [ %69, %66 ], [ %73, %70 ]
  %.0 = load i32, ptr %.0.in, align 4, !tbaa !9
  %75 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @rectangles, i64 noundef %indvars.iv) #7
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @dic, ptr noundef nonnull align 4 dereferenceable(8) %75)
  store i32 1, ptr %76, align 4, !tbaa !9
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.0, i32 noundef %.036)
  br label %78

78:                                               ; preds = %.lr.ph, %74
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %79 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @rectangles) #7
  %80 = icmp ugt i64 %79, %indvars.iv.next
  br i1 %80, label %.lr.ph, label %._crit_edge, !llvm.loop !16

._crit_edge:                                      ; preds = %78, %49
  ret i32 0
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

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


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass