; LLVM IR from Izaron/ACM-ICPC :: Russian Olympiad in Informatics/Final Stage 2017/tigers.ll (Z5find2v)

; 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<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator.11" = type { ptr }

@n = external dso_local global i32, align 4
@vec = external dso_local global %"class.std::vector", align 8
@hull = external dso_local global %"class.std::vector", align 8
@shrek = external dso_local global %"class.std::vector.6", align 8

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

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

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11convex_hullSt6vectorISt4pairIxxESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef) #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z8tiger_inRSt6vectorISt4pairIxxESaIS1_EEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z8tiger_inSt4pairIxxES0_S0_(i64, i64, i64, i64, i64, i64) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9tiger_ansSt4pairIxxES0_S0_(i64, i64, i64, i64, i64, i64) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5is_inSt4pairIxxES0_S0_S0_(i64, i64, i64, i64, i64, i64, ptr noundef byval(%"struct.std::pair") align 8) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5find2v() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca ptr, align 8
  %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 %"struct.std::pair", align 8
  %14 = alloca %"struct.std::pair", align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.11", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair", align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca %"struct.std::pair", align 8
  %24 = alloca %"struct.std::pair", align 8
  %25 = alloca %"struct.std::pair", align 8
  %26 = alloca %"struct.std::pair", align 8
  %27 = alloca %"struct.std::pair", align 8
  %28 = alloca %"struct.std::pair", align 8
  %29 = alloca %"struct.std::pair", align 8
  %30 = alloca %"struct.std::pair", align 8
  %31 = alloca %"struct.std::pair", align 8
  %32 = alloca %"struct.std::pair", align 8
  %33 = alloca %"struct.std::pair", align 8
  %34 = alloca %"struct.std::pair", align 8
  %35 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @hull) #7
  %36 = icmp eq i64 %35, 0
  br i1 %36, label %37, label %44

37:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) @vec)
  invoke void @_Z11convex_hullSt6vectorISt4pairIxxESaIS1_EE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %1, ptr noundef %2)
          to label %38 unwind label %40

38:                                               ; preds = %37
  %39 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) @hull, ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #7
  br label %44

40:                                               ; preds = %37
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %3, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %4, align 4
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #7
  br label %205

44:                                               ; preds = %38, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 2, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %45 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @hull) #7
  %46 = sub i64 %45, 1
  %47 = trunc i64 %46 to i32
  store i32 %47, ptr %9, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %81, %44
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = icmp ne i32 %49, %50
  br i1 %51, label %52, label %82

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %53 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %53, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %54 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %54, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %55 = load i32, ptr %8, align 4, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = add nsw i32 %55, %56
  %58 = sdiv i32 %57, 2
  store i32 %58, ptr %12, align 4, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !5
  %60 = call noundef zeroext i1 @_Z8tiger_inRSt6vectorISt4pairIxxESaIS1_EEii(ptr noundef nonnull align 8 dereferenceable(24) @hull, i32 noundef 0, i32 noundef %59)
  br i1 %60, label %61, label %63

61:                                               ; preds = %52
  %62 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %62, ptr %9, align 4, !tbaa !5
  br label %65

63:                                               ; preds = %52
  %64 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %64, ptr %8, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %63, %61
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = icmp eq i32 %66, %67
  br i1 %68, label %69, label %81

69:                                               ; preds = %65
  %70 = load i32, ptr %9, align 4, !tbaa !5
  %71 = load i32, ptr %11, align 4, !tbaa !5
  %72 = icmp eq i32 %70, %71
  br i1 %72, label %73, label %81

73:                                               ; preds = %69
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = call noundef zeroext i1 @_Z8tiger_inRSt6vectorISt4pairIxxESaIS1_EEii(ptr noundef nonnull align 8 dereferenceable(24) @hull, i32 noundef 0, i32 noundef %74)
  br i1 %75, label %76, label %78

76:                                               ; preds = %73
  %77 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %77, ptr %9, align 4, !tbaa !5
  br label %80

78:                                               ; preds = %73
  %79 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %79, ptr %8, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %78, %76
  br label %81

81:                                               ; preds = %80, %69, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %48, !llvm.loop !9

82:                                               ; preds = %48
  %83 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %83, ptr %7, align 4, !tbaa !5
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  store i32 %85, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @hull, i64 noundef %87) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %88, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @hull, i64 noundef %90) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %91, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @hull, i64 noundef %93) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %94, i64 16, i1 false)
  %95 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @shrek) #7
  %96 = icmp eq i64 %95, 0
  br i1 %96, label %97, label %116

97:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %104, %97
  %99 = load i32, ptr %16, align 4, !tbaa !5
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

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

103:                                              ; preds = %98
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @shrek, ptr noundef nonnull align 4 dereferenceable(4) %16)
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %16, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %16, align 4, !tbaa !5
  br label %98, !llvm.loop !11

107:                                              ; preds = %102
  call void @srand(i32 noundef 228) #7
  %108 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @shrek) #7
  %109 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %17, i32 0, i32 0
  store ptr %108, ptr %109, align 8
  %110 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @shrek) #7
  %111 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %18, i32 0, i32 0
  store ptr %110, ptr %111, align 8
  %112 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %17, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.11", ptr %18, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8
  call void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %113, ptr %115)
  br label %116

116:                                              ; preds = %107, %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %189, %116
  %118 = load i32, ptr %19, align 4, !tbaa !5
  %119 = load i32, ptr @n, align 4, !tbaa !5
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

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

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %123 = load i32, ptr %19, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @shrek, i64 noundef %124) #7
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %127) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %128, i64 16, i1 false)
  %129 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %13)
  br i1 %129, label %134, label %130

130:                                              ; preds = %122
  %131 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %14)
  br i1 %131, label %134, label %132

132:                                              ; preds = %130
  %133 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %15)
  br i1 %133, label %134, label %135

134:                                              ; preds = %132, %130, %122
  store i32 9, ptr %20, align 4
  br label %186

135:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %13, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %14, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %15, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %21, i64 16, i1 false)
  %136 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 0
  %137 = load i64, ptr %136, align 8
  %138 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 1
  %139 = load i64, ptr %138, align 8
  %140 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 0
  %141 = load i64, ptr %140, align 8
  %142 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 1
  %143 = load i64, ptr %142, align 8
  %144 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %145 = load i64, ptr %144, align 8
  %146 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %147 = load i64, ptr %146, align 8
  %148 = call noundef zeroext i1 @_Z5is_inSt4pairIxxES0_S0_S0_(i64 %137, i64 %139, i64 %141, i64 %143, i64 %145, i64 %147, ptr noundef byval(%"struct.std::pair") align 8 %25)
  br i1 %148, label %150, label %149

149:                                              ; preds = %135
  store i32 9, ptr %20, align 4
  br label %186

150:                                              ; preds = %135
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %13, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %14, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %21, i64 16, i1 false)
  %151 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 0
  %152 = load i64, ptr %151, align 8
  %153 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 1
  %154 = load i64, ptr %153, align 8
  %155 = getelementptr inbounds { i64, i64 }, ptr %27, i32 0, i32 0
  %156 = load i64, ptr %155, align 8
  %157 = getelementptr inbounds { i64, i64 }, ptr %27, i32 0, i32 1
  %158 = load i64, ptr %157, align 8
  %159 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 0
  %160 = load i64, ptr %159, align 8
  %161 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 1
  %162 = load i64, ptr %161, align 8
  %163 = call noundef zeroext i1 @_Z8tiger_inSt4pairIxxES0_S0_(i64 %152, i64 %154, i64 %156, i64 %158, i64 %160, i64 %162)
  br i1 %163, label %164, label %166

164:                                              ; preds = %150
  %165 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %21)
  br label %185

166:                                              ; preds = %150
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %29, ptr align 8 %13, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 8 %21, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %15, i64 16, i1 false)
  %167 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 0
  %168 = load i64, ptr %167, align 8
  %169 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 1
  %170 = load i64, ptr %169, align 8
  %171 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 0
  %172 = load i64, ptr %171, align 8
  %173 = getelementptr inbounds { i64, i64 }, ptr %30, i32 0, i32 1
  %174 = load i64, ptr %173, align 8
  %175 = getelementptr inbounds { i64, i64 }, ptr %31, i32 0, i32 0
  %176 = load i64, ptr %175, align 8
  %177 = getelementptr inbounds { i64, i64 }, ptr %31, i32 0, i32 1
  %178 = load i64, ptr %177, align 8
  %179 = call noundef zeroext i1 @_Z8tiger_inSt4pairIxxES0_S0_(i64 %168, i64 %170, i64 %172, i64 %174, i64 %176, i64 %178)
  br i1 %179, label %180, label %182

180:                                              ; preds = %166
  %181 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %21)
  br label %184

182:                                              ; preds = %166
  %183 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %21)
  br label %184

184:                                              ; preds = %182, %180
  br label %185

185:                                              ; preds = %184, %164
  store i32 0, ptr %20, align 4
  br label %186

186:                                              ; preds = %185, %149, %134
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  %187 = load i32, ptr %20, align 4
  switch i32 %187, label %210 [
    i32 0, label %188
    i32 9, label %189
  ]

188:                                              ; preds = %186
  br label %189

189:                                              ; preds = %188, %186
  %190 = load i32, ptr %19, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %19, align 4, !tbaa !5
  br label %117, !llvm.loop !12

192:                                              ; preds = %121
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %13, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %14, i64 16, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %15, i64 16, i1 false)
  %193 = getelementptr inbounds { i64, i64 }, ptr %32, i32 0, i32 0
  %194 = load i64, ptr %193, align 8
  %195 = getelementptr inbounds { i64, i64 }, ptr %32, i32 0, i32 1
  %196 = load i64, ptr %195, align 8
  %197 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 0
  %198 = load i64, ptr %197, align 8
  %199 = getelementptr inbounds { i64, i64 }, ptr %33, i32 0, i32 1
  %200 = load i64, ptr %199, align 8
  %201 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 0
  %202 = load i64, ptr %201, align 8
  %203 = getelementptr inbounds { i64, i64 }, ptr %34, i32 0, i32 1
  %204 = load i64, ptr %203, align 8
  call void @_Z9tiger_ansSt4pairIxxES0_S0_(i64 %194, i64 %196, i64 %198, i64 %200, i64 %202, i64 %204)
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void

205:                                              ; preds = %40
  %206 = load ptr, ptr %3, align 8
  %207 = load i32, ptr %4, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209

210:                                              ; preds = %186
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #6

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; 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<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }

@n = external dso_local local_unnamed_addr global i32, align 4
@vec = external dso_local global %"class.std::vector", align 8
@hull = external dso_local global %"class.std::vector", align 8
@shrek = external dso_local global %"class.std::vector.6", align 8

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11convex_hullSt6vectorISt4pairIxxESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef) local_unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z8tiger_inRSt6vectorISt4pairIxxESaIS1_EEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z8tiger_inSt4pairIxxES0_S0_(i64, i64, i64, i64, i64, i64) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9tiger_ansSt4pairIxxES0_S0_(i64, i64, i64, i64, i64, i64) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5is_inSt4pairIxxES0_S0_S0_(i64, i64, i64, i64, i64, i64, ptr noundef byval(%"struct.std::pair") align 8) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5find2v() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = tail call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @hull) #7
  %9 = icmp eq i64 %8, 0
  br i1 %9, label %10, label %15

10:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) @vec)
  invoke void @_Z11convex_hullSt6vectorISt4pairIxxESaIS1_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %1, ptr noundef nonnull %2)
          to label %11 unwind label %13

11:                                               ; preds = %10
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) @hull, ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  br label %15

13:                                               ; preds = %10
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  resume { ptr, i32 } %14

15:                                               ; preds = %11, %0
  %16 = call noundef i64 @_ZNKSt6vectorISt4pairIxxESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @hull) #7
  %17 = trunc i64 %16 to i32
  %18 = add i32 %17, -1
  %.not53 = icmp eq i32 %18, 2
  br i1 %.not53, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %15, %25
  %.055 = phi i32 [ %.0., %25 ], [ 2, %15 ]
  %.04954 = phi i32 [ %..049, %25 ], [ %18, %15 ]
  %19 = add nsw i32 %.055, %.04954
  %20 = sdiv i32 %19, 2
  %21 = call noundef zeroext i1 @_Z8tiger_inRSt6vectorISt4pairIxxESaIS1_EEii(ptr noundef nonnull align 8 dereferenceable(24) @hull, i32 noundef 0, i32 noundef %20)
  %..049 = select i1 %21, i32 %20, i32 %.04954
  %.0. = select i1 %21, i32 %.055, i32 %20
  %22 = icmp eq i32 %.0., %.055
  %23 = icmp eq i32 %..049, %.04954
  %or.cond = and i1 %22, %23
  br i1 %or.cond, label %.thread, label %25

.thread:                                          ; preds = %.lr.ph
  %24 = call noundef zeroext i1 @_Z8tiger_inRSt6vectorISt4pairIxxESaIS1_EEii(ptr noundef nonnull align 8 dereferenceable(24) @hull, i32 noundef 0, i32 noundef %.055)
  %.0....049 = select i1 %24, i32 %.055, i32 %.04954
  br label %._crit_edge

25:                                               ; preds = %.lr.ph
  %.not = icmp eq i32 %.0., %..049
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !5

._crit_edge:                                      ; preds = %25, %.thread, %15
  %.0.lcssa = phi i32 [ 2, %15 ], [ %.0....049, %.thread ], [ %..049, %25 ]
  %26 = add nsw i32 %.0.lcssa, -1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @hull, i64 noundef 0) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %27, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %28 = sext i32 %26 to i64
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @hull, i64 noundef %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %29, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %30 = sext i32 %.0.lcssa to i64
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @hull, i64 noundef %30) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %31, i64 16, i1 false)
  %32 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @shrek) #7
  %33 = icmp eq i64 %32, 0
  br i1 %33, label %34, label %43

34:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !7
  %35 = load i32, ptr @n, align 4, !tbaa !7
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph57, label %._crit_edge58

._crit_edge58:                                    ; preds = %.lr.ph57, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @srand(i32 noundef 228) #7
  %37 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @shrek) #7
  %38 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @shrek) #7
  call void @_ZSt14random_shuffleIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %37, ptr %38)
  br label %43

.lr.ph57:                                         ; preds = %34, %.lr.ph57
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @shrek, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %39 = load i32, ptr %6, align 4, !tbaa !7
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %6, align 4, !tbaa !7
  %41 = load i32, ptr @n, align 4, !tbaa !7
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %.lr.ph57, label %._crit_edge58, !llvm.loop !11

43:                                               ; preds = %._crit_edge58, %._crit_edge
  %44 = load i32, ptr @n, align 4, !tbaa !7
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %43
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  br label %46

._crit_edge62:                                    ; preds = %63, %43
  %.sroa.03.0.copyload = load i64, ptr %3, align 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.24.0.copyload = load i64, ptr %.sroa.24.0..sroa_idx, align 8
  %.sroa.01.0.copyload = load i64, ptr %4, align 8
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %.sroa.22.0.copyload = load i64, ptr %.sroa.22.0..sroa_idx, align 8
  %.sroa.0.0.copyload = load i64, ptr %5, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %.sroa.2.0.copyload = load i64, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_Z9tiger_ansSt4pairIxxES0_S0_(i64 %.sroa.03.0.copyload, i64 %.sroa.24.0.copyload, i64 %.sroa.01.0.copyload, i64 %.sroa.22.0.copyload, i64 %.sroa.0.0.copyload, i64 %.sroa.2.0.copyload)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void

46:                                               ; preds = %.lr.ph61, %63
  %indvars.iv = phi i64 [ 0, %.lr.ph61 ], [ %indvars.iv.next, %63 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @shrek, i64 noundef %indvars.iv) #7
  %48 = load i32, ptr %47, align 4, !tbaa !7
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @vec, i64 noundef %49) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %50, i64 16, i1 false)
  %51 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %3)
  br i1 %51, label %63, label %52

52:                                               ; preds = %46
  %53 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %4)
  br i1 %53, label %63, label %54

54:                                               ; preds = %52
  %55 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  br i1 %55, label %63, label %56

56:                                               ; preds = %54
  %.sroa.021.0.copyload = load i64, ptr %3, align 8
  %.sroa.222.0.copyload = load i64, ptr %.sroa.222.0..sroa_idx, align 8
  %.sroa.019.0.copyload = load i64, ptr %4, align 8
  %.sroa.220.0.copyload = load i64, ptr %.sroa.220.0..sroa_idx, align 8
  %.sroa.017.0.copyload = load i64, ptr %5, align 8
  %.sroa.218.0.copyload = load i64, ptr %.sroa.218.0..sroa_idx, align 8
  %57 = call noundef zeroext i1 @_Z5is_inSt4pairIxxES0_S0_S0_(i64 %.sroa.021.0.copyload, i64 %.sroa.222.0.copyload, i64 %.sroa.019.0.copyload, i64 %.sroa.220.0.copyload, i64 %.sroa.017.0.copyload, i64 %.sroa.218.0.copyload, ptr noundef nonnull byval(%"struct.std::pair") align 8 %7)
  br i1 %57, label %58, label %63

58:                                               ; preds = %56
  %.sroa.015.0.copyload = load i64, ptr %3, align 8
  %.sroa.216.0.copyload = load i64, ptr %.sroa.222.0..sroa_idx, align 8
  %.sroa.013.0.copyload = load i64, ptr %4, align 8
  %.sroa.214.0.copyload = load i64, ptr %.sroa.220.0..sroa_idx, align 8
  %.sroa.011.0.copyload = load i64, ptr %7, align 8
  %.sroa.212.0.copyload = load i64, ptr %.sroa.212.0..sroa_idx, align 8
  %59 = call noundef zeroext i1 @_Z8tiger_inSt4pairIxxES0_S0_(i64 %.sroa.015.0.copyload, i64 %.sroa.216.0.copyload, i64 %.sroa.013.0.copyload, i64 %.sroa.214.0.copyload, i64 %.sroa.011.0.copyload, i64 %.sroa.212.0.copyload)
  br i1 %59, label %.sink.split, label %60

60:                                               ; preds = %58
  %.sroa.09.0.copyload = load i64, ptr %3, align 8
  %.sroa.210.0.copyload = load i64, ptr %.sroa.222.0..sroa_idx, align 8
  %.sroa.07.0.copyload = load i64, ptr %7, align 8
  %.sroa.28.0.copyload = load i64, ptr %.sroa.212.0..sroa_idx, align 8
  %.sroa.05.0.copyload = load i64, ptr %5, align 8
  %.sroa.26.0.copyload = load i64, ptr %.sroa.218.0..sroa_idx, align 8
  %61 = call noundef zeroext i1 @_Z8tiger_inSt4pairIxxES0_S0_(i64 %.sroa.09.0.copyload, i64 %.sroa.210.0.copyload, i64 %.sroa.07.0.copyload, i64 %.sroa.28.0.copyload, i64 %.sroa.05.0.copyload, i64 %.sroa.26.0.copyload)
  %. = select i1 %61, ptr %4, ptr %3
  br label %.sink.split

.sink.split:                                      ; preds = %60, %58
  %.sink = phi ptr [ %5, %58 ], [ %., %60 ]
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIxxEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %.sink, ptr noundef nonnull align 8 dereferenceable(16) %7)
  br label %63

63:                                               ; preds = %.sink.split, %56, %46, %52, %54
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %64 = load i32, ptr @n, align 4, !tbaa !7
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next, %65
  br i1 %66, label %46, label %._crit_edge62, !llvm.loop !12
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIxxESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #4

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass