; LLVM IR from xirc/cp-algorithm :: aoj/CGL/CGL7A/main.ll (Z15intersection_cc7vector2dS_dRSt6vectorIS_SaIS_EE)

; 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"

%struct.vector2 = type { double, double }

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15intersection_cc7vector2dS_dRSt6vectorIS_SaIS_EE(double %0, double %1, double noundef %2, double %3, double %4, double noundef %5, ptr noundef nonnull align 8 dereferenceable(24) %6) #0 {
  %8 = alloca i32, align 4
  %9 = alloca %struct.vector2, align 8
  %10 = alloca %struct.vector2, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca %struct.vector2, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca %struct.vector2, align 8
  %19 = alloca %struct.vector2, align 8
  %20 = alloca %struct.vector2, align 8
  %21 = alloca %struct.vector2, align 8
  %22 = alloca double, align 8
  %23 = alloca %struct.vector2, align 8
  %24 = alloca %struct.vector2, align 8
  %25 = alloca %struct.vector2, align 8
  %26 = alloca double, align 8
  %27 = alloca %struct.vector2, align 8
  %28 = alloca %struct.vector2, align 8
  %29 = alloca %struct.vector2, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  %33 = alloca %struct.vector2, align 8
  %34 = alloca %struct.vector2, align 8
  %35 = alloca %struct.vector2, align 8
  %36 = alloca %struct.vector2, align 8
  %37 = alloca %struct.vector2, align 8
  %38 = alloca %struct.vector2, align 8
  %39 = alloca %struct.vector2, align 8
  %40 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  store double %0, ptr %40, align 8
  %41 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  store double %1, ptr %41, align 8
  %42 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %3, ptr %42, align 8
  %43 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %4, ptr %43, align 8
  store double %2, ptr %11, align 8, !tbaa !5
  store double %5, ptr %12, align 8, !tbaa !5
  store ptr %6, ptr %13, align 8, !tbaa !9
  %44 = load ptr, ptr %13, align 8, !tbaa !9
  call void @_ZNSt6vectorI7vector2SaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #6
  %45 = load ptr, ptr %13, align 8, !tbaa !9
  call void @_ZNSt6vectorI7vector2SaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef 2)
  %46 = load double, ptr %11, align 8, !tbaa !5
  %47 = load double, ptr %12, align 8, !tbaa !5
  %48 = fcmp olt double %46, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %7
  call void @_ZSt4swapI7vector2ENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %50

50:                                               ; preds = %49, %7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %51 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %52 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %53 = extractvalue { double, double } %51, 0
  store double %53, ptr %52, align 8
  %54 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %55 = extractvalue { double, double } %51, 1
  store double %55, ptr %54, align 8
  %56 = call noundef double @_ZNK7vector26lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  store double %56, ptr %14, align 8, !tbaa !5
  %57 = load double, ptr %14, align 8, !tbaa !5
  %58 = load double, ptr %11, align 8, !tbaa !5
  %59 = load double, ptr %12, align 8, !tbaa !5
  %60 = fadd double %58, %59
  %61 = fcmp ogt double %57, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %50
  store i32 4, ptr %8, align 4
  store i32 1, ptr %16, align 4
  br label %195

63:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %64 = load double, ptr %11, align 8, !tbaa !5
  %65 = load double, ptr %12, align 8, !tbaa !5
  %66 = fadd double %64, %65
  store double %66, ptr %17, align 8, !tbaa !5
  %67 = call noundef zeroext i1 @_Z2EQRKdS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br i1 %67, label %68, label %90

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %69 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %70 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %71 = extractvalue { double, double } %69, 0
  store double %71, ptr %70, align 8
  %72 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %73 = extractvalue { double, double } %69, 1
  store double %73, ptr %72, align 8
  %74 = call { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %75 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %76 = extractvalue { double, double } %74, 0
  store double %76, ptr %75, align 8
  %77 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %78 = extractvalue { double, double } %74, 1
  store double %78, ptr %77, align 8
  %79 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %80 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %81 = extractvalue { double, double } %79, 0
  store double %81, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %83 = extractvalue { double, double } %79, 1
  store double %83, ptr %82, align 8
  %84 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %85 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %86 = extractvalue { double, double } %84, 0
  store double %86, ptr %85, align 8
  %87 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %88 = extractvalue { double, double } %84, 1
  store double %88, ptr %87, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  %89 = load ptr, ptr %13, align 8, !tbaa !9
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr noundef nonnull align 8 dereferenceable(16) %18)
  store i32 3, ptr %8, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %195

90:                                               ; preds = %63
  %91 = load double, ptr %14, align 8, !tbaa !5
  %92 = load double, ptr %11, align 8, !tbaa !5
  %93 = load double, ptr %12, align 8, !tbaa !5
  %94 = fsub double %92, %93
  %95 = fcmp olt double %91, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %90
  store i32 0, ptr %8, align 4
  store i32 1, ptr %16, align 4
  br label %195

97:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %98 = load double, ptr %11, align 8, !tbaa !5
  %99 = load double, ptr %12, align 8, !tbaa !5
  %100 = fsub double %98, %99
  store double %100, ptr %22, align 8, !tbaa !5
  %101 = call noundef zeroext i1 @_Z2EQRKdS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %22)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br i1 %101, label %102, label %119

102:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  %103 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %104 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %105 = extractvalue { double, double } %103, 0
  store double %105, ptr %104, align 8
  %106 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %107 = extractvalue { double, double } %103, 1
  store double %107, ptr %106, align 8
  %108 = call { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16) %25)
  %109 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %110 = extractvalue { double, double } %108, 0
  store double %110, ptr %109, align 8
  %111 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %112 = extractvalue { double, double } %108, 1
  store double %112, ptr %111, align 8
  %113 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %114 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %115 = extractvalue { double, double } %113, 0
  store double %115, ptr %114, align 8
  %116 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %117 = extractvalue { double, double } %113, 1
  store double %117, ptr %116, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  %118 = load ptr, ptr %13, align 8, !tbaa !9
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %118, ptr noundef nonnull align 8 dereferenceable(16) %23)
  store i32 1, ptr %8, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br label %195

119:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %120 = load double, ptr %14, align 8, !tbaa !5
  %121 = load double, ptr %14, align 8, !tbaa !5
  %122 = load double, ptr %11, align 8, !tbaa !5
  %123 = load double, ptr %11, align 8, !tbaa !5
  %124 = fmul double %122, %123
  %125 = call double @llvm.fmuladd.f64(double %120, double %121, double %124)
  %126 = load double, ptr %12, align 8, !tbaa !5
  %127 = load double, ptr %12, align 8, !tbaa !5
  %128 = fneg double %126
  %129 = call double @llvm.fmuladd.f64(double %128, double %127, double %125)
  %130 = load double, ptr %14, align 8, !tbaa !5
  %131 = fmul double 2.000000e+00, %130
  %132 = fdiv double %129, %131
  store double %132, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #6
  %133 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %134 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %135 = extractvalue { double, double } %133, 0
  store double %135, ptr %134, align 8
  %136 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %137 = extractvalue { double, double } %133, 1
  store double %137, ptr %136, align 8
  %138 = call { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
  %139 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %140 = extractvalue { double, double } %138, 0
  store double %140, ptr %139, align 8
  %141 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %142 = extractvalue { double, double } %138, 1
  store double %142, ptr %141, align 8
  %143 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %144 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %145 = extractvalue { double, double } %143, 0
  store double %145, ptr %144, align 8
  %146 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %147 = extractvalue { double, double } %143, 1
  store double %147, ptr %146, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %148 = load double, ptr %11, align 8, !tbaa !5
  %149 = load double, ptr %11, align 8, !tbaa !5
  %150 = load double, ptr %26, align 8, !tbaa !5
  %151 = load double, ptr %26, align 8, !tbaa !5
  %152 = fmul double %150, %151
  %153 = fneg double %152
  %154 = call double @llvm.fmuladd.f64(double %148, double %149, double %153)
  store double %154, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  store double 0.000000e+00, ptr %32, align 8, !tbaa !5
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %32)
  %156 = load double, ptr %155, align 8, !tbaa !5
  %157 = call double @sqrt(double noundef %156) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  store double %157, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #6
  %158 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %159 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %160 = extractvalue { double, double } %158, 0
  store double %160, ptr %159, align 8
  %161 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %162 = extractvalue { double, double } %158, 1
  store double %162, ptr %161, align 8
  %163 = call { double, double } @_ZNK7vector211unit_normalEv(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %164 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %165 = extractvalue { double, double } %163, 0
  store double %165, ptr %164, align 8
  %166 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %167 = extractvalue { double, double } %163, 1
  store double %167, ptr %166, align 8
  %168 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %169 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %170 = extractvalue { double, double } %168, 0
  store double %170, ptr %169, align 8
  %171 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %172 = extractvalue { double, double } %168, 1
  store double %172, ptr %171, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  %173 = load ptr, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #6
  %174 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %175 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %176 = extractvalue { double, double } %174, 0
  store double %176, ptr %175, align 8
  %177 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %178 = extractvalue { double, double } %174, 1
  store double %178, ptr %177, align 8
  %179 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %180 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 0
  %181 = extractvalue { double, double } %179, 0
  store double %181, ptr %180, align 8
  %182 = getelementptr inbounds { double, double }, ptr %36, i32 0, i32 1
  %183 = extractvalue { double, double } %179, 1
  store double %183, ptr %182, align 8
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %173, ptr noundef nonnull align 8 dereferenceable(16) %36)
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #6
  %184 = load ptr, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #6
  %185 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %186 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %187 = extractvalue { double, double } %185, 0
  store double %187, ptr %186, align 8
  %188 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %189 = extractvalue { double, double } %185, 1
  store double %189, ptr %188, align 8
  %190 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %191 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %192 = extractvalue { double, double } %190, 0
  store double %192, ptr %191, align 8
  %193 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %194 = extractvalue { double, double } %190, 1
  store double %194, ptr %193, align 8
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %184, ptr noundef nonnull align 8 dereferenceable(16) %38)
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %38) #6
  store i32 2, ptr %8, align 4
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %195

195:                                              ; preds = %119, %102, %96, %68, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %196 = load i32, ptr %8, align 4
  ret i32 %196
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI7vector2ENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector211unit_normalEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; 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"

%struct.vector2 = type { double, double }

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 5) i32 @_Z15intersection_cc7vector2dS_dRSt6vectorIS_SaIS_EE(double %0, double %1, double noundef %2, double %3, double %4, double noundef %5, ptr noundef nonnull align 8 dereferenceable(24) %6) local_unnamed_addr #0 {
  %8 = alloca %struct.vector2, align 8
  %9 = alloca %struct.vector2, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %struct.vector2, align 8
  %14 = alloca double, align 8
  %15 = alloca %struct.vector2, align 8
  %16 = alloca %struct.vector2, align 8
  %17 = alloca %struct.vector2, align 8
  %18 = alloca %struct.vector2, align 8
  %19 = alloca double, align 8
  %20 = alloca %struct.vector2, align 8
  %21 = alloca %struct.vector2, align 8
  %22 = alloca %struct.vector2, align 8
  %23 = alloca double, align 8
  %24 = alloca %struct.vector2, align 8
  %25 = alloca %struct.vector2, align 8
  %26 = alloca %struct.vector2, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca %struct.vector2, align 8
  %31 = alloca %struct.vector2, align 8
  %32 = alloca %struct.vector2, align 8
  %33 = alloca %struct.vector2, align 8
  %34 = alloca %struct.vector2, align 8
  %35 = alloca %struct.vector2, align 8
  %36 = alloca %struct.vector2, align 8
  store double %0, ptr %8, align 8
  %37 = getelementptr inbounds i8, ptr %8, i64 8
  store double %1, ptr %37, align 8
  store double %3, ptr %9, align 8
  %38 = getelementptr inbounds i8, ptr %9, i64 8
  store double %4, ptr %38, align 8
  store double %2, ptr %10, align 8, !tbaa !5
  store double %5, ptr %11, align 8, !tbaa !5
  tail call void @_ZNSt6vectorI7vector2SaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  tail call void @_ZNSt6vectorI7vector2SaIS0_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 2)
  %39 = fcmp olt double %2, %5
  br i1 %39, label %40, label %41

40:                                               ; preds = %7
  call void @_ZSt4swapI7vector2ENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br label %41

41:                                               ; preds = %40, %7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %42 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %43 = extractvalue { double, double } %42, 0
  store double %43, ptr %13, align 8
  %44 = getelementptr inbounds i8, ptr %13, i64 8
  %45 = extractvalue { double, double } %42, 1
  store double %45, ptr %44, align 8
  %46 = call noundef double @_ZNK7vector26lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  store double %46, ptr %12, align 8, !tbaa !5
  %47 = load double, ptr %10, align 8, !tbaa !5
  %48 = load double, ptr %11, align 8, !tbaa !5
  %49 = fadd double %47, %48
  %50 = fcmp ogt double %46, %49
  br i1 %50, label %149, label %51

51:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  store double %49, ptr %14, align 8, !tbaa !5
  %52 = call noundef zeroext i1 @_Z2EQRKdS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br i1 %52, label %53, label %70

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #6
  %54 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %55 = extractvalue { double, double } %54, 0
  store double %55, ptr %18, align 8
  %56 = getelementptr inbounds i8, ptr %18, i64 8
  %57 = extractvalue { double, double } %54, 1
  store double %57, ptr %56, align 8
  %58 = call { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %59 = extractvalue { double, double } %58, 0
  store double %59, ptr %17, align 8
  %60 = getelementptr inbounds i8, ptr %17, i64 8
  %61 = extractvalue { double, double } %58, 1
  store double %61, ptr %60, align 8
  %62 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %63 = extractvalue { double, double } %62, 0
  store double %63, ptr %16, align 8
  %64 = getelementptr inbounds i8, ptr %16, i64 8
  %65 = extractvalue { double, double } %62, 1
  store double %65, ptr %64, align 8
  %66 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %67 = extractvalue { double, double } %66, 0
  store double %67, ptr %15, align 8
  %68 = getelementptr inbounds i8, ptr %15, i64 8
  %69 = extractvalue { double, double } %66, 1
  store double %69, ptr %68, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %15)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  br label %149

70:                                               ; preds = %51
  %71 = load double, ptr %12, align 8, !tbaa !5
  %72 = load double, ptr %10, align 8, !tbaa !5
  %73 = load double, ptr %11, align 8, !tbaa !5
  %74 = fsub double %72, %73
  %75 = fcmp olt double %71, %74
  br i1 %75, label %149, label %76

76:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  store double %74, ptr %19, align 8, !tbaa !5
  %77 = call noundef zeroext i1 @_Z2EQRKdS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br i1 %77, label %78, label %91

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #6
  %79 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %80 = extractvalue { double, double } %79, 0
  store double %80, ptr %22, align 8
  %81 = getelementptr inbounds i8, ptr %22, i64 8
  %82 = extractvalue { double, double } %79, 1
  store double %82, ptr %81, align 8
  %83 = call { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16) %22)
  %84 = extractvalue { double, double } %83, 0
  store double %84, ptr %21, align 8
  %85 = getelementptr inbounds i8, ptr %21, i64 8
  %86 = extractvalue { double, double } %83, 1
  store double %86, ptr %85, align 8
  %87 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %88 = extractvalue { double, double } %87, 0
  store double %88, ptr %20, align 8
  %89 = getelementptr inbounds i8, ptr %20, i64 8
  %90 = extractvalue { double, double } %87, 1
  store double %90, ptr %89, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %20)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  br label %149

91:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %92 = load double, ptr %12, align 8, !tbaa !5
  %93 = load double, ptr %10, align 8, !tbaa !5
  %94 = fmul double %93, %93
  %95 = call double @llvm.fmuladd.f64(double %92, double %92, double %94)
  %96 = load double, ptr %11, align 8, !tbaa !5
  %97 = fneg double %96
  %98 = call double @llvm.fmuladd.f64(double %97, double %96, double %95)
  %99 = fmul double %92, 2.000000e+00
  %100 = fdiv double %98, %99
  store double %100, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #6
  %101 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %102 = extractvalue { double, double } %101, 0
  store double %102, ptr %26, align 8
  %103 = getelementptr inbounds i8, ptr %26, i64 8
  %104 = extractvalue { double, double } %101, 1
  store double %104, ptr %103, align 8
  %105 = call { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %106 = extractvalue { double, double } %105, 0
  store double %106, ptr %25, align 8
  %107 = getelementptr inbounds i8, ptr %25, i64 8
  %108 = extractvalue { double, double } %105, 1
  store double %108, ptr %107, align 8
  %109 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %110 = extractvalue { double, double } %109, 0
  store double %110, ptr %24, align 8
  %111 = getelementptr inbounds i8, ptr %24, i64 8
  %112 = extractvalue { double, double } %109, 1
  store double %112, ptr %111, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #6
  %113 = load double, ptr %10, align 8, !tbaa !5
  %114 = load double, ptr %23, align 8, !tbaa !5
  %115 = fneg double %114
  %116 = fmul double %114, %115
  %117 = call double @llvm.fmuladd.f64(double %113, double %113, double %116)
  store double %117, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #6
  store double 0.000000e+00, ptr %29, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %119 = load double, ptr %118, align 8, !tbaa !5
  %120 = call double @sqrt(double noundef %119) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #6
  store double %120, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %31) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %32) #6
  %121 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %122 = extractvalue { double, double } %121, 0
  store double %122, ptr %32, align 8
  %123 = getelementptr inbounds i8, ptr %32, i64 8
  %124 = extractvalue { double, double } %121, 1
  store double %124, ptr %123, align 8
  %125 = call { double, double } @_ZNK7vector211unit_normalEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
  %126 = extractvalue { double, double } %125, 0
  store double %126, ptr %31, align 8
  %127 = getelementptr inbounds i8, ptr %31, i64 8
  %128 = extractvalue { double, double } %125, 1
  store double %128, ptr %127, align 8
  %129 = call { double, double } @_ZNK7vector2mlERKd(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %130 = extractvalue { double, double } %129, 0
  store double %130, ptr %30, align 8
  %131 = getelementptr inbounds i8, ptr %30, i64 8
  %132 = extractvalue { double, double } %129, 1
  store double %132, ptr %131, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %33) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %34) #6
  %133 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %134 = extractvalue { double, double } %133, 0
  store double %134, ptr %34, align 8
  %135 = getelementptr inbounds i8, ptr %34, i64 8
  %136 = extractvalue { double, double } %133, 1
  store double %136, ptr %135, align 8
  %137 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %30)
  %138 = extractvalue { double, double } %137, 0
  store double %138, ptr %33, align 8
  %139 = getelementptr inbounds i8, ptr %33, i64 8
  %140 = extractvalue { double, double } %137, 1
  store double %140, ptr %139, align 8
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %33)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %33) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %35) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %36) #6
  %141 = call { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %142 = extractvalue { double, double } %141, 0
  store double %142, ptr %36, align 8
  %143 = getelementptr inbounds i8, ptr %36, i64 8
  %144 = extractvalue { double, double } %141, 1
  store double %144, ptr %143, align 8
  %145 = call { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(16) %30)
  %146 = extractvalue { double, double } %145, 0
  store double %146, ptr %35, align 8
  %147 = getelementptr inbounds i8, ptr %35, i64 8
  %148 = extractvalue { double, double } %145, 1
  store double %148, ptr %147, align 8
  call void @_ZNSt6vectorI7vector2SaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %35)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %35) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  br label %149

149:                                              ; preds = %70, %41, %91, %78, %53
  %.0 = phi i32 [ 3, %53 ], [ 1, %78 ], [ 2, %91 ], [ 4, %41 ], [ 0, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  ret i32 %.0
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapI7vector2ENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector2miERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector2plERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector210normalizedEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7vector211unit_normalEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass