; LLVM IR from ayush-tulsyan/ACM-ICPC-Handbook :: code (ConvexHull)

; 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<PT, std::allocator<PT>>::_Vector_impl" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_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 }
%struct.PT = type { double, double }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10ConvexHullRSt6vectorI2PTSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24)) #1

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %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 %"class.std::vector", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::map", align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %20

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

24:                                               ; preds = %20
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %190

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  call void @_ZNSaI2PTEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt6vectorI2PTSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %29 unwind label %35

29:                                               ; preds = %25
  call void @_ZNSt15__new_allocatorI2PTED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %30

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

34:                                               ; preds = %30
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %57

35:                                               ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %8, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %9, align 4
  call void @_ZNSt15__new_allocatorI2PTED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  br label %189

39:                                               ; preds = %30
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %41) #7
  %43 = getelementptr inbounds %struct.PT, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %10, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %45) #7
  %47 = getelementptr inbounds %struct.PT, ptr %46, i32 0, i32 1
  %48 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %43, ptr noundef %47)
          to label %49 unwind label %53

49:                                               ; preds = %39
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %10, align 4, !tbaa !5
  br label %30, !llvm.loop !9

53:                                               ; preds = %39
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %8, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %188

57:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  invoke void @_ZNSt6vectorI2PTSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %58 unwind label %65

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #7
  call void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %59 = load i32, ptr %5, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  store i32 %60, ptr %13, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %77, %58
  %62 = load i32, ptr %13, align 4, !tbaa !5
  %63 = icmp sge i32 %62, 0
  br i1 %63, label %69, label %64

64:                                               ; preds = %61
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %84

65:                                               ; preds = %57
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  br label %187

69:                                               ; preds = %61
  %70 = load i32, ptr %13, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %73) #7
  %75 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(16) %74)
          to label %76 unwind label %80

76:                                               ; preds = %69
  store i32 %71, ptr %75, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %13, align 4, !tbaa !5
  %79 = add nsw i32 %78, -1
  store i32 %79, ptr %13, align 4, !tbaa !5
  br label %61, !llvm.loop !11

80:                                               ; preds = %69
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %186

84:                                               ; preds = %64
  invoke void @_Z10ConvexHullRSt6vectorI2PTSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %85 unwind label %92

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store double 0.000000e+00, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %134, %85
  %87 = load i32, ptr %15, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %90 = icmp ult i64 %88, %89
  br i1 %90, label %96, label %91

91:                                               ; preds = %86
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %137

92:                                               ; preds = %84
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %8, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %9, align 4
  br label %186

96:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %97 = load i32, ptr %15, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %98) #7
  %100 = getelementptr inbounds %struct.PT, ptr %99, i32 0, i32 0
  %101 = load double, ptr %100, align 8, !tbaa !14
  %102 = load i32, ptr %15, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %106 = urem i64 %104, %105
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %106) #7
  %108 = getelementptr inbounds %struct.PT, ptr %107, i32 0, i32 0
  %109 = load double, ptr %108, align 8, !tbaa !14
  %110 = fsub double %101, %109
  store double %110, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %111 = load i32, ptr %15, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %112) #7
  %114 = getelementptr inbounds %struct.PT, ptr %113, i32 0, i32 1
  %115 = load double, ptr %114, align 8, !tbaa !16
  %116 = load i32, ptr %15, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %120 = urem i64 %118, %119
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %120) #7
  %122 = getelementptr inbounds %struct.PT, ptr %121, i32 0, i32 1
  %123 = load double, ptr %122, align 8, !tbaa !16
  %124 = fsub double %115, %123
  store double %124, ptr %17, align 8, !tbaa !12
  %125 = load double, ptr %16, align 8, !tbaa !12
  %126 = load double, ptr %16, align 8, !tbaa !12
  %127 = load double, ptr %17, align 8, !tbaa !12
  %128 = load double, ptr %17, align 8, !tbaa !12
  %129 = fmul double %127, %128
  %130 = call double @llvm.fmuladd.f64(double %125, double %126, double %129)
  %131 = call double @sqrt(double noundef %130) #7
  %132 = load double, ptr %14, align 8, !tbaa !12
  %133 = fadd double %132, %131
  store double %133, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %134

134:                                              ; preds = %96
  %135 = load i32, ptr %15, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %15, align 4, !tbaa !5
  br label %86, !llvm.loop !17

137:                                              ; preds = %91
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %140, label %147

140:                                              ; preds = %137
  %141 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %142 unwind label %143

142:                                              ; preds = %140
  br label %147

143:                                              ; preds = %179, %147, %140
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %8, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %9, align 4
  br label %185

147:                                              ; preds = %142, %137
  %148 = load double, ptr %14, align 8, !tbaa !12
  %149 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %148)
          to label %150 unwind label %143

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

151:                                              ; preds = %176, %150
  %152 = load i32, ptr %18, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %155 = icmp ult i64 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %151
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %179

157:                                              ; preds = %151
  %158 = load i32, ptr %18, align 4, !tbaa !5
  %159 = icmp sgt i32 %158, 0
  br i1 %159, label %160, label %167

160:                                              ; preds = %157
  %161 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4)
          to label %162 unwind label %163

162:                                              ; preds = %160
  br label %167

163:                                              ; preds = %172, %167, %160
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %8, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %185

167:                                              ; preds = %162, %157
  %168 = load i32, ptr %18, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %169) #7
  %171 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(16) %170)
          to label %172 unwind label %163

172:                                              ; preds = %167
  %173 = load i32, ptr %171, align 4, !tbaa !5
  %174 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %173)
          to label %175 unwind label %163

175:                                              ; preds = %172
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %18, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %18, align 4, !tbaa !5
  br label %151, !llvm.loop !18

179:                                              ; preds = %156
  %180 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %181 unwind label %143

181:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %3, align 4, !tbaa !5
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %3, align 4, !tbaa !5
  br label %20, !llvm.loop !19

185:                                              ; preds = %163, %143
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %186

186:                                              ; preds = %185, %92, %80
  call void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %187

187:                                              ; preds = %186, %65
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %188

188:                                              ; preds = %187, %53
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %189

189:                                              ; preds = %188, %35
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %192

190:                                              ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %191 = load i32, ptr %1, align 4
  ret i32 %191

192:                                              ; preds = %189
  %193 = load ptr, ptr %8, align 8
  %194 = load i32, ptr %9, align 4
  %195 = insertvalue { ptr, i32 } poison, ptr %193, 0
  %196 = insertvalue { ptr, i32 } %195, i32 %194, 1
  resume { ptr, i32 } %196
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI2PTEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI2PTED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "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 "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 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"_ZTS2PT", !13, i64 0, !13, i64 8}
!16 = !{!15, !13, i64 8}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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<PT, std::allocator<PT>>::_Vector_impl" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl" = type { %"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" }
%"struct.std::_Vector_base<PT, std::allocator<PT>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<PT, std::pair<const PT, int>, std::_Select1st<std::pair<const PT, int>>, std::less<PT>>::_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 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10ConvexHullRSt6vectorI2PTSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::map", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph61, label %._crit_edge62

._crit_edge62:                                    ; preds = %._crit_edge58, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph61:                                         ; preds = %0, %._crit_edge58
  %.02959 = phi i32 [ %75, %._crit_edge58 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaI2PTEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorI2PTSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %13 unwind label %16

13:                                               ; preds = %.lr.ph61
  call void @_ZNSt15__new_allocatorI2PTED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  invoke void @_ZNSt6vectorI2PTSaIS0_EEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %25 unwind label %30

16:                                               ; preds = %.lr.ph61
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI2PTED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %88

.lr.ph:                                           ; preds = %13, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %13 ]
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %18, ptr noundef nonnull %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !9

25:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  call void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph49.preheader, label %._crit_edge50

.lr.ph49.preheader:                               ; preds = %25
  %28 = zext nneg i32 %26 to i64
  br label %.lr.ph49

._crit_edge50:                                    ; preds = %34, %25
  invoke void @_Z10ConvexHullRSt6vectorI2PTSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %.preheader unwind label %39

.preheader:                                       ; preds = %._crit_edge50
  %29 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %.not63 = icmp eq i64 %29, 0
  br i1 %.not63, label %._crit_edge54, label %.lr.ph53

30:                                               ; preds = %._crit_edge
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %87

.lr.ph49:                                         ; preds = %.lr.ph49.preheader, %34
  %indvars.iv66 = phi i64 [ %28, %.lr.ph49.preheader ], [ %indvars.iv.next67, %34 ]
  %indvars.iv.next67 = add nsw i64 %indvars.iv66, -1
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv.next67) #7
  %33 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %34 unwind label %37

34:                                               ; preds = %.lr.ph49
  %35 = trunc nuw nsw i64 %indvars.iv66 to i32
  store i32 %35, ptr %33, align 4, !tbaa !5
  %36 = icmp ugt i64 %indvars.iv66, 1
  br i1 %36, label %.lr.ph49, label %._crit_edge50, !llvm.loop !11

37:                                               ; preds = %.lr.ph49
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %86

._crit_edge54:                                    ; preds = %.lr.ph53, %.preheader
  %.031.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %59, %.lr.ph53 ]
  %.not = icmp eq i32 %.02959, 0
  br i1 %.not, label %64, label %62

39:                                               ; preds = %._crit_edge50
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %86

.lr.ph53:                                         ; preds = %.preheader, %.lr.ph53
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %.lr.ph53 ], [ 0, %.preheader ]
  %.03151 = phi double [ %59, %.lr.ph53 ], [ 0.000000e+00, %.preheader ]
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv69) #7
  %42 = load double, ptr %41, align 8, !tbaa !12
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %43 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %44 = urem i64 %indvars.iv.next70, %43
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %44) #7
  %46 = load double, ptr %45, align 8, !tbaa !12
  %47 = fsub double %42, %46
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv69) #7
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %52 = urem i64 %indvars.iv.next70, %51
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %52) #7
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = load double, ptr %54, align 8, !tbaa !15
  %56 = fsub double %50, %55
  %57 = fmul double %56, %56
  %58 = call double @llvm.fmuladd.f64(double %47, double %47, double %57)
  %sqrt = call double @llvm.sqrt.f64(double %58)
  %59 = fadd double %.03151, %sqrt
  %60 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %61 = icmp ugt i64 %60, %indvars.iv.next70
  br i1 %61, label %.lr.ph53, label %._crit_edge54, !llvm.loop !16

62:                                               ; preds = %._crit_edge54
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %64

64:                                               ; preds = %62, %._crit_edge54
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %.031.lcssa)
  %66 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %.not64 = icmp eq i64 %66, 0
  br i1 %.not64, label %._crit_edge58, label %.lr.ph57.preheader

.lr.ph57.preheader:                               ; preds = %64
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #7
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(16) %67)
          to label %69 unwind label %.loopexit.split-lp

69:                                               ; preds = %.lr.ph57.preheader
  %70 = load i32, ptr %68, align 4, !tbaa !5
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %70)
  %72 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %73 = icmp ugt i64 %72, 1
  br i1 %73, label %.lr.ph57.peel.next, label %._crit_edge58

._crit_edge58:                                    ; preds = %81, %69, %64
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %75 = add nuw nsw i32 %.02959, 1
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %.lr.ph61, label %._crit_edge62, !llvm.loop !17

.loopexit:                                        ; preds = %.lr.ph57.peel.next
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %86

.loopexit.split-lp:                               ; preds = %.lr.ph57.preheader
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %86

.lr.ph57.peel.next:                               ; preds = %69, %81
  %indvars.iv72 = phi i64 [ %indvars.iv.next73, %81 ], [ 1, %69 ]
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI2PTSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv72) #7
  %80 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(16) %79)
          to label %81 unwind label %.loopexit

81:                                               ; preds = %.lr.ph57.peel.next
  %82 = load i32, ptr %80, align 4, !tbaa !5
  %83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %82)
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %84 = call noundef i64 @_ZNKSt6vectorI2PTSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %85 = icmp ugt i64 %84, %indvars.iv.next73
  br i1 %85, label %.lr.ph57.peel.next, label %._crit_edge58, !llvm.loop !18

86:                                               ; preds = %.loopexit, %.loopexit.split-lp, %39, %37
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %40, %39 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %87

87:                                               ; preds = %86, %30
  %.pn.pn = phi { ptr, i32 } [ %.pn, %86 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorI2PTSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %88

88:                                               ; preds = %87, %16
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %87 ], [ %17, %16 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaI2PTEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapI2PTiSt4lessIS0_ESaISt4pairIKS0_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI2PTED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!13, !14, i64 0}
!13 = !{!"_ZTS2PT", !14, i64 0, !14, i64 8}
!14 = !{!"double", !7, i64 0}
!15 = !{!13, !14, i64 8}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !19}
!19 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass