; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/ASC/1/Problem F (F)

; 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<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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@x = external dso_local global [310 x double], align 16
@y = external dso_local global [310 x double], align 16
@r = external dso_local global [310 x double], align 16
@g = external dso_local global [310 x %"class.std::vector"], align 16
@vis = external dso_local global [310 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6createi(i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5mergeii(i32 noundef, i32 noundef) #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 double @_Z4distdddd(double noundef, double noundef, double noundef, double noundef) #0

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

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

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

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

; 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 double @_Z8getAngledddd(double noundef, double noundef, double noundef, double noundef) #0

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

22:                                               ; preds = %39, %0
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds double, ptr @x, i64 %29
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds double, ptr @y, i64 %32
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds double, ptr @r, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %30, ptr noundef %33, ptr noundef %36)
  %38 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z6createi(i32 noundef %38)
  br label %39

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

42:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %68, %42
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = load i32, ptr @n, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %71

49:                                               ; preds = %44
  %50 = load double, ptr %3, align 8, !tbaa !11
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = fsub double %54, %50
  store double %55, ptr %53, align 8, !tbaa !11
  %56 = load double, ptr %4, align 8, !tbaa !11
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = fsub double %60, %56
  store double %61, ptr %59, align 8, !tbaa !11
  %62 = load double, ptr %5, align 8, !tbaa !11
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !11
  %67 = fadd double %66, %62
  store double %67, ptr %65, align 8, !tbaa !11
  br label %68

68:                                               ; preds = %49
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !13

71:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %242, %71
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 8, ptr %8, align 4
  br label %245

77:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %9, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %235, %77
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = load i32, ptr @n, align 4, !tbaa !5
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  store i32 11, ptr %8, align 4
  br label %239

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !11
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !11
  %102 = call noundef double @_Z4distdddd(double noundef %89, double noundef %93, double noundef %97, double noundef %101)
  store double %102, ptr %10, align 8, !tbaa !11
  %103 = load double, ptr %10, align 8, !tbaa !11
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !11
  %108 = load i32, ptr %9, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = fadd double %107, %111
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = fadd double %116, %120
  %122 = fmul double %112, %121
  %123 = fcmp oge double %103, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %85
  store i32 13, ptr %8, align 4
  br label %232

125:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = call noundef i32 @_Z4findi(i32 noundef %126)
  store i32 %127, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = call noundef i32 @_Z4findi(i32 noundef %128)
  store i32 %129, ptr %12, align 4, !tbaa !5
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = icmp ne i32 %130, %131
  br i1 %132, label %133, label %142

133:                                              ; preds = %125
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z5mergeii(i32 noundef %134, i32 noundef %135)
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [310 x %"class.std::vector"], ptr @g, i64 0, i64 %137
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %138, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %139 = load i32, ptr %9, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [310 x %"class.std::vector"], ptr @g, i64 0, i64 %140
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %141, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 13, ptr %8, align 4
  br label %231

142:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %143 = load i32, ptr @n, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr @vis, i64 %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @vis, ptr noundef %145, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %146 unwind label %169

146:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %147 = load i32, ptr %7, align 4, !tbaa !5
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = invoke noundef zeroext i1 @_Z3dfsiiRSt6vectorIiSaIiEE(i32 noundef %147, i32 noundef %148, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %150 unwind label %173

150:                                              ; preds = %146
  %151 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  %153 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %156, ptr %158)
          to label %159 unwind label %173

159:                                              ; preds = %150
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(4) %160)
          to label %161 unwind label %173

161:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %211, %161
  %163 = load i32, ptr %20, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %167 = icmp ult i64 %165, %166
  br i1 %167, label %177, label %168

168:                                              ; preds = %162
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %214

169:                                              ; preds = %142
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %15, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %238

173:                                              ; preds = %159, %150, %146
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %15, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %16, align 4
  br label %238

177:                                              ; preds = %162
  %178 = load i32, ptr %20, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %179) #8
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %182
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = load i32, ptr %20, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %186) #8
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !11
  %192 = load i32, ptr %20, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %194) #8
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = load i32, ptr %20, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  %202 = sext i32 %201 to i64
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %202) #8
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %205
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = call noundef double @_Z8getAngledddd(double noundef %184, double noundef %191, double noundef %199, double noundef %207)
  %209 = load double, ptr %19, align 8, !tbaa !11
  %210 = fadd double %209, %208
  store double %210, ptr %19, align 8, !tbaa !11
  br label %211

211:                                              ; preds = %177
  %212 = load i32, ptr %20, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %20, align 4, !tbaa !5
  br label %162, !llvm.loop !14

214:                                              ; preds = %168
  %215 = load double, ptr %19, align 8, !tbaa !11
  %216 = call double @llvm.fabs.f64(double %215)
  %217 = fpext double %216 to x86_fp80
  %218 = fsub x86_fp80 %217, 0xK4001C90FDAA22168C000
  %219 = invoke noundef x86_fp80 @_ZSt4fabse(x86_fp80 noundef %218)
          to label %220 unwind label %225

220:                                              ; preds = %214
  %221 = fcmp olt x86_fp80 %219, 0xK3FEB8637BD05AF6C6800
  br i1 %221, label %222, label %229

222:                                              ; preds = %220
  %223 = invoke i32 @puts(ptr noundef @.str.3)
          to label %224 unwind label %225

224:                                              ; preds = %222
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %230

225:                                              ; preds = %222, %214
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %15, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %238

229:                                              ; preds = %220
  store i32 0, ptr %8, align 4
  br label %230

230:                                              ; preds = %229, %224
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  br label %231

231:                                              ; preds = %230, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %232

232:                                              ; preds = %231, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  %233 = load i32, ptr %8, align 4
  switch i32 %233, label %239 [
    i32 0, label %234
    i32 13, label %235
  ]

234:                                              ; preds = %232
  br label %235

235:                                              ; preds = %234, %232
  %236 = load i32, ptr %9, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %9, align 4, !tbaa !5
  br label %80, !llvm.loop !15

238:                                              ; preds = %225, %173, %169
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %251

239:                                              ; preds = %232, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  %240 = load i32, ptr %8, align 4
  switch i32 %240, label %245 [
    i32 11, label %241
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %7, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %7, align 4, !tbaa !5
  br label %72, !llvm.loop !16

245:                                              ; preds = %239, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  %246 = load i32, ptr %8, align 4
  switch i32 %246, label %249 [
    i32 8, label %247
  ]

247:                                              ; preds = %245
  %248 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %249

249:                                              ; preds = %247, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  %250 = load i32, ptr %1, align 4
  ret i32 %250

251:                                              ; preds = %238
  %252 = load ptr, ptr %15, align 8
  %253 = load i32, ptr %16, align 4
  %254 = insertvalue { ptr, i32 } poison, ptr %252, 0
  %255 = insertvalue { ptr, i32 } %254, i32 %253, 1
  resume { ptr, i32 } %255
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #5

declare i32 @__gxx_personality_v0(...)

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

; 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt4fabse(x86_fp80 noundef) #6

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

declare i32 @puts(ptr noundef) #4

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 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 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 #4 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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<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 }

@n = external dso_local global i32, align 4
@x = external dso_local global [310 x double], align 16
@y = external dso_local global [310 x double], align 16
@r = external dso_local global [310 x double], align 16
@g = external dso_local global [310 x %"class.std::vector"], align 16
@vis = external dso_local global [310 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6createi(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5mergeii(i32 noundef, i32 noundef) 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 double @_Z4distdddd(double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0

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

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

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

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

; 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 double @_Z8getAngledddd(double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i32, align 4
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph58, label %._crit_edge59.thread

._crit_edge59.thread:                             ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  br label %._crit_edge74

.lr.ph58:                                         ; preds = %._crit_edge
  %14 = load double, ptr %1, align 8, !tbaa !9
  %15 = load double, ptr %2, align 8, !tbaa !9
  %16 = load double, ptr %3, align 8, !tbaa !9
  %wide.trip.count = zext nneg i32 %12 to i64
  %min.iters.check = icmp eq i32 %12, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph58
  %indvars.iv76.ph = phi i64 [ 0, %.lr.ph58 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph58
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %14, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert91 = insertelement <2 x double> poison, double %15, i64 0
  %broadcast.splat92 = shufflevector <2 x double> %broadcast.splatinsert91, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert94 = insertelement <2 x double> poison, double %16, i64 0
  %broadcast.splat95 = shufflevector <2 x double> %broadcast.splatinsert94, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %17 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %index
  %wide.load = load <2 x double>, ptr %17, align 16, !tbaa !9
  %18 = fsub <2 x double> %wide.load, %broadcast.splat
  store <2 x double> %18, ptr %17, align 16, !tbaa !9
  %19 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %index
  %wide.load90 = load <2 x double>, ptr %19, align 16, !tbaa !9
  %20 = fsub <2 x double> %wide.load90, %broadcast.splat92
  store <2 x double> %20, ptr %19, align 16, !tbaa !9
  %21 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %index
  %wide.load93 = load <2 x double>, ptr %21, align 16, !tbaa !9
  %22 = fadd <2 x double> %broadcast.splat95, %wide.load93
  store <2 x double> %22, ptr %21, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 2
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge59, label %scalar.ph.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %24 = getelementptr inbounds double, ptr @x, i64 %indvars.iv
  %25 = getelementptr inbounds double, ptr @y, i64 %indvars.iv
  %26 = getelementptr inbounds double, ptr @r, i64 %indvars.iv
  %27 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26)
  %28 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_Z6createi(i32 noundef %28)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge59:                                    ; preds = %scalar.ph, %middle.block
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br i1 %13, label %.lr.ph73, label %._crit_edge74

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %scalar.ph ], [ %indvars.iv76.ph, %scalar.ph.preheader ]
  %32 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %indvars.iv76
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = fsub double %33, %14
  store double %34, ptr %32, align 8, !tbaa !9
  %35 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %indvars.iv76
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = fsub double %36, %15
  store double %37, ptr %35, align 8, !tbaa !9
  %38 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %indvars.iv76
  %39 = load double, ptr %38, align 8, !tbaa !9
  %40 = fadd double %16, %39
  store double %40, ptr %38, align 8, !tbaa !9
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge59, label %scalar.ph, !llvm.loop !16

.lr.ph73:                                         ; preds = %._crit_edge59, %._crit_edge70
  %41 = phi i32 [ %127, %._crit_edge70 ], [ %12, %._crit_edge59 ]
  %storemerge46.in64 = phi i32 [ %.pre-phi, %._crit_edge70 ], [ 0, %._crit_edge59 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %storemerge4665 = add nsw i32 %storemerge46.in64, 1
  store i32 %storemerge4665, ptr %5, align 4, !tbaa !5
  %.not4966 = icmp slt i32 %storemerge4665, %41
  br i1 %.not4966, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %.lr.ph73, %.thread
  %storemerge4667 = phi i32 [ %storemerge46, %.thread ], [ %storemerge4665, %.lr.ph73 ]
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %43
  %45 = load double, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %43
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = sext i32 %storemerge4667 to i64
  %49 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !9
  %51 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %48
  %52 = load double, ptr %51, align 8, !tbaa !9
  %53 = call noundef double @_Z4distdddd(double noundef %45, double noundef %47, double noundef %50, double noundef %52)
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [310 x double], ptr @r, i64 0, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = fadd double %57, %61
  %63 = fmul double %62, %62
  %64 = fcmp ult double %53, %63
  br i1 %64, label %65, label %.thread

65:                                               ; preds = %.lr.ph69
  %66 = call noundef i32 @_Z4findi(i32 noundef %54)
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = call noundef i32 @_Z4findi(i32 noundef %67)
  %.not = icmp eq i32 %66, %68
  br i1 %.not, label %76, label %69

69:                                               ; preds = %65
  call void @_Z5mergeii(i32 noundef %66, i32 noundef %68)
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [310 x %"class.std::vector"], ptr @g, i64 0, i64 %71
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [310 x %"class.std::vector"], ptr @g, i64 0, i64 %74
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %.thread

76:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %77 = load i32, ptr @n, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i32, ptr @vis, i64 %78
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @vis, ptr noundef nonnull %79, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %80 unwind label %96

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = invoke noundef zeroext i1 @_Z3dfsiiRSt6vectorIiSaIiEE(i32 noundef %81, i32 noundef %82, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %84 unwind label %98

84:                                               ; preds = %80
  %85 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %86 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %85, ptr %86)
          to label %87 unwind label %98

87:                                               ; preds = %84
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %88)
          to label %.preheader unwind label %98

.preheader:                                       ; preds = %87
  %89 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %90 = icmp ugt i64 %89, 1
  br i1 %90, label %.lr.ph62, label %._crit_edge63

._crit_edge63:                                    ; preds = %.lr.ph62, %.preheader
  %.031.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %121, %.lr.ph62 ]
  %91 = call double @llvm.fabs.f64(double %.031.lcssa)
  %92 = fpext double %91 to x86_fp80
  %93 = fadd x86_fp80 %92, 0xKC001C90FDAA22168C000
  %94 = call noundef x86_fp80 @_ZSt4fabse(x86_fp80 noundef %93)
  %95 = fcmp olt x86_fp80 %94, 0xK3FEB8637BD05AF6C6800
  br i1 %95, label %128, label %124

96:                                               ; preds = %76
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %126

98:                                               ; preds = %87, %84, %80
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %126

.lr.ph62:                                         ; preds = %.preheader, %.lr.ph62
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.lr.ph62 ], [ 0, %.preheader ]
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph62 ], [ 1, %.preheader ]
  %.03160 = phi double [ %121, %.lr.ph62 ], [ 0.000000e+00, %.preheader ]
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv81) #8
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv81) #8
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv79) #8
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [310 x double], ptr @x, i64 0, i64 %112
  %114 = load double, ptr %113, align 8, !tbaa !9
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv79) #8
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [310 x double], ptr @y, i64 0, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !9
  %120 = call noundef double @_Z8getAngledddd(double noundef %104, double noundef %109, double noundef %114, double noundef %119)
  %121 = fadd double %.03160, %120
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %122 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  %123 = icmp ugt i64 %122, %indvars.iv.next80
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  br i1 %123, label %.lr.ph62, label %._crit_edge63, !llvm.loop !17

124:                                              ; preds = %._crit_edge63
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %.thread

.thread:                                          ; preds = %69, %.lr.ph69, %124
  %storemerge46.in = load i32, ptr %5, align 4, !tbaa !5
  %storemerge46 = add nsw i32 %storemerge46.in, 1
  store i32 %storemerge46, ptr %5, align 4, !tbaa !5
  %125 = load i32, ptr @n, align 4, !tbaa !5
  %.not49 = icmp slt i32 %storemerge46, %125
  br i1 %.not49, label %.lr.ph69, label %._crit_edge70.loopexit, !llvm.loop !18

126:                                              ; preds = %98, %96
  %.pn = phi { ptr, i32 } [ %99, %98 ], [ %97, %96 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn

._crit_edge70.loopexit:                           ; preds = %.thread
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  %.pre87 = add nsw i32 %.pre, 1
  br label %._crit_edge70

._crit_edge70:                                    ; preds = %._crit_edge70.loopexit, %.lr.ph73
  %.pre-phi = phi i32 [ %.pre87, %._crit_edge70.loopexit ], [ %storemerge4665, %.lr.ph73 ]
  %127 = phi i32 [ %125, %._crit_edge70.loopexit ], [ %41, %.lr.ph73 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  store i32 %.pre-phi, ptr %4, align 4, !tbaa !5
  %.not48 = icmp slt i32 %.pre-phi, %127
  br i1 %.not48, label %.lr.ph73, label %._crit_edge74, !llvm.loop !19

128:                                              ; preds = %._crit_edge63
  %129 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  br label %131

._crit_edge74:                                    ; preds = %._crit_edge70, %._crit_edge59.thread, %._crit_edge59
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %130 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %131

131:                                              ; preds = %128, %._crit_edge74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

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

; 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: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt4fabse(x86_fp80 noundef) local_unnamed_addr #6

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4

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 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 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 #4 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12, !14, !13}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass