; LLVM IR from simonaertssen/MIT-6.172-Performance-Engineering-of-Software-Systems :: Project 2 - Collision Detection/screensaver (collision_world)

; 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.Vec = type { double, double }
%struct.Line = type { %struct.Vec, %struct.Vec, %struct.Vec, float, i16 }

@.str.1 = external hidden unnamed_addr constant [163 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@__PRETTY_FUNCTION__.CollisionWorld_collisionSolver = external hidden unnamed_addr constant [88 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [108 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

declare { double, double } @Vec_multiply(double, double, double noundef) #2

declare { double, double } @Vec_add(double, double, double, double) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @CollisionWorld_collisionSolver(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #4 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.Vec, align 8
  %10 = alloca %struct.Vec, align 8
  %11 = alloca %struct.Vec, align 8
  %12 = alloca %struct.Vec, align 8
  %13 = alloca %struct.Vec, align 8
  %14 = alloca %struct.Vec, align 8
  %15 = alloca %struct.Vec, align 8
  %16 = alloca %struct.Vec, align 8
  %17 = alloca %struct.Vec, align 8
  %18 = alloca %struct.Vec, align 8
  %19 = alloca %struct.Vec, align 8
  %20 = alloca %struct.Vec, align 8
  %21 = alloca %struct.Vec, align 8
  %22 = alloca %struct.Vec, align 8
  %23 = alloca %struct.Vec, align 8
  %24 = alloca %struct.Vec, align 8
  %25 = alloca %struct.Vec, align 8
  %26 = alloca %struct.Vec, align 8
  %27 = alloca %struct.Vec, align 8
  %28 = alloca %struct.Vec, align 8
  %29 = alloca %struct.Vec, align 8
  %30 = alloca %struct.Vec, align 8
  %31 = alloca %struct.Vec, align 8
  %32 = alloca %struct.Vec, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca %struct.Vec, align 8
  %42 = alloca %struct.Vec, align 8
  %43 = alloca %struct.Vec, align 8
  %44 = alloca %struct.Vec, align 8
  %45 = alloca %struct.Vec, align 8
  %46 = alloca %struct.Vec, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call i32 @compareLines(ptr noundef %47, ptr noundef %48)
  %50 = icmp slt i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %4
  br label %53

52:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 223, ptr noundef @__PRETTY_FUNCTION__.CollisionWorld_collisionSolver) #7
  unreachable

53:                                               ; preds = %51
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %62, label %56

56:                                               ; preds = %53
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 2
  br i1 %58, label %62, label %59

59:                                               ; preds = %56
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 3
  br i1 %61, label %62, label %63

62:                                               ; preds = %59, %56, %53
  br label %64

63:                                               ; preds = %59
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 226, ptr noundef @__PRETTY_FUNCTION__.CollisionWorld_collisionSolver) #7
  unreachable

64:                                               ; preds = %62
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 3
  br i1 %66, label %67, label %353

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.Line, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.Line, ptr %70, i32 0, i32 1
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.Line, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.Line, ptr %74, i32 0, i32 1
  %76 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %77 = load double, ptr %76, align 8
  %78 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %79 = load double, ptr %78, align 8
  %80 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 0
  %81 = load double, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %71, i32 0, i32 1
  %83 = load double, ptr %82, align 8
  %84 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %85 = load double, ptr %84, align 8
  %86 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %87 = load double, ptr %86, align 8
  %88 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 0
  %89 = load double, ptr %88, align 8
  %90 = getelementptr inbounds { double, double }, ptr %75, i32 0, i32 1
  %91 = load double, ptr %90, align 8
  %92 = call { double, double } @getIntersectionPoint(double %77, double %79, double %81, double %83, double %85, double %87, double %89, double %91)
  %93 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %94 = extractvalue { double, double } %92, 0
  store double %94, ptr %93, align 8
  %95 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %96 = extractvalue { double, double } %92, 1
  store double %96, ptr %95, align 8
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Line, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds { double, double }, ptr %98, i32 0, i32 0
  %100 = load double, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %98, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  %103 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %104 = load double, ptr %103, align 8
  %105 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %106 = load double, ptr %105, align 8
  %107 = call { double, double } @Vec_subtract(double %100, double %102, double %104, double %106)
  %108 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %109 = extractvalue { double, double } %107, 0
  store double %109, ptr %108, align 8
  %110 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %111 = extractvalue { double, double } %107, 1
  store double %111, ptr %110, align 8
  %112 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %113 = load double, ptr %112, align 8
  %114 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %115 = load double, ptr %114, align 8
  %116 = call double @Vec_length(double %113, double %115)
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.Line, ptr %117, i32 0, i32 1
  %119 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 0
  %120 = load double, ptr %119, align 8
  %121 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 1
  %122 = load double, ptr %121, align 8
  %123 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %124 = load double, ptr %123, align 8
  %125 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %126 = load double, ptr %125, align 8
  %127 = call { double, double } @Vec_subtract(double %120, double %122, double %124, double %126)
  %128 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %129 = extractvalue { double, double } %127, 0
  store double %129, ptr %128, align 8
  %130 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %131 = extractvalue { double, double } %127, 1
  store double %131, ptr %130, align 8
  %132 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %133 = load double, ptr %132, align 8
  %134 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %135 = load double, ptr %134, align 8
  %136 = call double @Vec_length(double %133, double %135)
  %137 = fcmp olt double %116, %136
  br i1 %137, label %138, label %181

138:                                              ; preds = %67
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.Line, ptr %139, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.Line, ptr %141, i32 0, i32 1
  %143 = getelementptr inbounds { double, double }, ptr %142, i32 0, i32 0
  %144 = load double, ptr %143, align 8
  %145 = getelementptr inbounds { double, double }, ptr %142, i32 0, i32 1
  %146 = load double, ptr %145, align 8
  %147 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %148 = load double, ptr %147, align 8
  %149 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %150 = load double, ptr %149, align 8
  %151 = call { double, double } @Vec_subtract(double %144, double %146, double %148, double %150)
  %152 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %153 = extractvalue { double, double } %151, 0
  store double %153, ptr %152, align 8
  %154 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %155 = extractvalue { double, double } %151, 1
  store double %155, ptr %154, align 8
  %156 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %157 = load double, ptr %156, align 8
  %158 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %159 = load double, ptr %158, align 8
  %160 = call { double, double } @Vec_normalize(double %157, double %159)
  %161 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %162 = extractvalue { double, double } %160, 0
  store double %162, ptr %161, align 8
  %163 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %164 = extractvalue { double, double } %160, 1
  store double %164, ptr %163, align 8
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.Line, ptr %165, i32 0, i32 2
  %167 = getelementptr inbounds { double, double }, ptr %166, i32 0, i32 0
  %168 = load double, ptr %167, align 8
  %169 = getelementptr inbounds { double, double }, ptr %166, i32 0, i32 1
  %170 = load double, ptr %169, align 8
  %171 = call double @Vec_length(double %168, double %170)
  %172 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %173 = load double, ptr %172, align 8
  %174 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %175 = load double, ptr %174, align 8
  %176 = call { double, double } @Vec_multiply(double %173, double %175, double noundef %171)
  %177 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %178 = extractvalue { double, double } %176, 0
  store double %178, ptr %177, align 8
  %179 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %180 = extractvalue { double, double } %176, 1
  store double %180, ptr %179, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %140, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %224

181:                                              ; preds = %67
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.Line, ptr %182, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.Line, ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds { double, double }, ptr %185, i32 0, i32 0
  %187 = load double, ptr %186, align 8
  %188 = getelementptr inbounds { double, double }, ptr %185, i32 0, i32 1
  %189 = load double, ptr %188, align 8
  %190 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %191 = load double, ptr %190, align 8
  %192 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %193 = load double, ptr %192, align 8
  %194 = call { double, double } @Vec_subtract(double %187, double %189, double %191, double %193)
  %195 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %196 = extractvalue { double, double } %194, 0
  store double %196, ptr %195, align 8
  %197 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %198 = extractvalue { double, double } %194, 1
  store double %198, ptr %197, align 8
  %199 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %200 = load double, ptr %199, align 8
  %201 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %202 = load double, ptr %201, align 8
  %203 = call { double, double } @Vec_normalize(double %200, double %202)
  %204 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %205 = extractvalue { double, double } %203, 0
  store double %205, ptr %204, align 8
  %206 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %207 = extractvalue { double, double } %203, 1
  store double %207, ptr %206, align 8
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.Line, ptr %208, i32 0, i32 2
  %210 = getelementptr inbounds { double, double }, ptr %209, i32 0, i32 0
  %211 = load double, ptr %210, align 8
  %212 = getelementptr inbounds { double, double }, ptr %209, i32 0, i32 1
  %213 = load double, ptr %212, align 8
  %214 = call double @Vec_length(double %211, double %213)
  %215 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %216 = load double, ptr %215, align 8
  %217 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %218 = load double, ptr %217, align 8
  %219 = call { double, double } @Vec_multiply(double %216, double %218, double noundef %214)
  %220 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %221 = extractvalue { double, double } %219, 0
  store double %221, ptr %220, align 8
  %222 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %223 = extractvalue { double, double } %219, 1
  store double %223, ptr %222, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %183, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  br label %224

224:                                              ; preds = %181, %138
  %225 = load ptr, ptr %7, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.Line, ptr %225, i32 0, i32 0
  %227 = getelementptr inbounds { double, double }, ptr %226, i32 0, i32 0
  %228 = load double, ptr %227, align 8
  %229 = getelementptr inbounds { double, double }, ptr %226, i32 0, i32 1
  %230 = load double, ptr %229, align 8
  %231 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %232 = load double, ptr %231, align 8
  %233 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %234 = load double, ptr %233, align 8
  %235 = call { double, double } @Vec_subtract(double %228, double %230, double %232, double %234)
  %236 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %237 = extractvalue { double, double } %235, 0
  store double %237, ptr %236, align 8
  %238 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %239 = extractvalue { double, double } %235, 1
  store double %239, ptr %238, align 8
  %240 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %241 = load double, ptr %240, align 8
  %242 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %243 = load double, ptr %242, align 8
  %244 = call double @Vec_length(double %241, double %243)
  %245 = load ptr, ptr %7, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.Line, ptr %245, i32 0, i32 1
  %247 = getelementptr inbounds { double, double }, ptr %246, i32 0, i32 0
  %248 = load double, ptr %247, align 8
  %249 = getelementptr inbounds { double, double }, ptr %246, i32 0, i32 1
  %250 = load double, ptr %249, align 8
  %251 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %252 = load double, ptr %251, align 8
  %253 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %254 = load double, ptr %253, align 8
  %255 = call { double, double } @Vec_subtract(double %248, double %250, double %252, double %254)
  %256 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %257 = extractvalue { double, double } %255, 0
  store double %257, ptr %256, align 8
  %258 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %259 = extractvalue { double, double } %255, 1
  store double %259, ptr %258, align 8
  %260 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %261 = load double, ptr %260, align 8
  %262 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %263 = load double, ptr %262, align 8
  %264 = call double @Vec_length(double %261, double %263)
  %265 = fcmp olt double %244, %264
  br i1 %265, label %266, label %309

266:                                              ; preds = %224
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.Line, ptr %267, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %269 = load ptr, ptr %7, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.Line, ptr %269, i32 0, i32 1
  %271 = getelementptr inbounds { double, double }, ptr %270, i32 0, i32 0
  %272 = load double, ptr %271, align 8
  %273 = getelementptr inbounds { double, double }, ptr %270, i32 0, i32 1
  %274 = load double, ptr %273, align 8
  %275 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %276 = load double, ptr %275, align 8
  %277 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %278 = load double, ptr %277, align 8
  %279 = call { double, double } @Vec_subtract(double %272, double %274, double %276, double %278)
  %280 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %281 = extractvalue { double, double } %279, 0
  store double %281, ptr %280, align 8
  %282 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %283 = extractvalue { double, double } %279, 1
  store double %283, ptr %282, align 8
  %284 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %285 = load double, ptr %284, align 8
  %286 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %287 = load double, ptr %286, align 8
  %288 = call { double, double } @Vec_normalize(double %285, double %287)
  %289 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %290 = extractvalue { double, double } %288, 0
  store double %290, ptr %289, align 8
  %291 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %292 = extractvalue { double, double } %288, 1
  store double %292, ptr %291, align 8
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.Line, ptr %293, i32 0, i32 2
  %295 = getelementptr inbounds { double, double }, ptr %294, i32 0, i32 0
  %296 = load double, ptr %295, align 8
  %297 = getelementptr inbounds { double, double }, ptr %294, i32 0, i32 1
  %298 = load double, ptr %297, align 8
  %299 = call double @Vec_length(double %296, double %298)
  %300 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %301 = load double, ptr %300, align 8
  %302 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %303 = load double, ptr %302, align 8
  %304 = call { double, double } @Vec_multiply(double %301, double %303, double noundef %299)
  %305 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %306 = extractvalue { double, double } %304, 0
  store double %306, ptr %305, align 8
  %307 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %308 = extractvalue { double, double } %304, 1
  store double %308, ptr %307, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %268, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %352

309:                                              ; preds = %224
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.Line, ptr %310, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %312 = load ptr, ptr %7, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.Line, ptr %312, i32 0, i32 0
  %314 = getelementptr inbounds { double, double }, ptr %313, i32 0, i32 0
  %315 = load double, ptr %314, align 8
  %316 = getelementptr inbounds { double, double }, ptr %313, i32 0, i32 1
  %317 = load double, ptr %316, align 8
  %318 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %319 = load double, ptr %318, align 8
  %320 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %321 = load double, ptr %320, align 8
  %322 = call { double, double } @Vec_subtract(double %315, double %317, double %319, double %321)
  %323 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %324 = extractvalue { double, double } %322, 0
  store double %324, ptr %323, align 8
  %325 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %326 = extractvalue { double, double } %322, 1
  store double %326, ptr %325, align 8
  %327 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %328 = load double, ptr %327, align 8
  %329 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %330 = load double, ptr %329, align 8
  %331 = call { double, double } @Vec_normalize(double %328, double %330)
  %332 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %333 = extractvalue { double, double } %331, 0
  store double %333, ptr %332, align 8
  %334 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %335 = extractvalue { double, double } %331, 1
  store double %335, ptr %334, align 8
  %336 = load ptr, ptr %7, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.Line, ptr %336, i32 0, i32 2
  %338 = getelementptr inbounds { double, double }, ptr %337, i32 0, i32 0
  %339 = load double, ptr %338, align 8
  %340 = getelementptr inbounds { double, double }, ptr %337, i32 0, i32 1
  %341 = load double, ptr %340, align 8
  %342 = call double @Vec_length(double %339, double %341)
  %343 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %344 = load double, ptr %343, align 8
  %345 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %346 = load double, ptr %345, align 8
  %347 = call { double, double } @Vec_multiply(double %344, double %346, double noundef %342)
  %348 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %349 = extractvalue { double, double } %347, 0
  store double %349, ptr %348, align 8
  %350 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %351 = extractvalue { double, double } %347, 1
  store double %351, ptr %350, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %311, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  br label %352

352:                                              ; preds = %309, %266
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  br label %554

353:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  %354 = load i32, ptr %8, align 4, !tbaa !9
  %355 = icmp eq i32 %354, 1
  br i1 %355, label %356, label %372

356:                                              ; preds = %353
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #8
  %357 = load ptr, ptr %7, align 8, !tbaa !5
  %358 = call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %357)
  %359 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %360 = extractvalue { double, double } %358, 0
  store double %360, ptr %359, align 8
  %361 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %362 = extractvalue { double, double } %358, 1
  store double %362, ptr %361, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %363 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %364 = load double, ptr %363, align 8
  %365 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %366 = load double, ptr %365, align 8
  %367 = call { double, double } @Vec_normalize(double %364, double %366)
  %368 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %369 = extractvalue { double, double } %367, 0
  store double %369, ptr %368, align 8
  %370 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %371 = extractvalue { double, double } %367, 1
  store double %371, ptr %370, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  br label %388

372:                                              ; preds = %353
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  %373 = load ptr, ptr %6, align 8, !tbaa !5
  %374 = call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %373)
  %375 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %376 = extractvalue { double, double } %374, 0
  store double %376, ptr %375, align 8
  %377 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %378 = extractvalue { double, double } %374, 1
  store double %378, ptr %377, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  %379 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %380 = load double, ptr %379, align 8
  %381 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %382 = load double, ptr %381, align 8
  %383 = call { double, double } @Vec_normalize(double %380, double %382)
  %384 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %385 = extractvalue { double, double } %383, 0
  store double %385, ptr %384, align 8
  %386 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %387 = extractvalue { double, double } %383, 1
  store double %387, ptr %386, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  br label %388

388:                                              ; preds = %372, %356
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #8
  %389 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %390 = load double, ptr %389, align 8
  %391 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %392 = load double, ptr %391, align 8
  %393 = call { double, double } @Vec_orthogonal(double %390, double %392)
  %394 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %395 = extractvalue { double, double } %393, 0
  store double %395, ptr %394, align 8
  %396 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %397 = extractvalue { double, double } %393, 1
  store double %397, ptr %396, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %32, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %398 = load ptr, ptr %6, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct.Line, ptr %398, i32 0, i32 2
  %400 = getelementptr inbounds { double, double }, ptr %399, i32 0, i32 0
  %401 = load double, ptr %400, align 8
  %402 = getelementptr inbounds { double, double }, ptr %399, i32 0, i32 1
  %403 = load double, ptr %402, align 8
  %404 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %405 = load double, ptr %404, align 8
  %406 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %407 = load double, ptr %406, align 8
  %408 = call double @Vec_dotProduct(double %401, double %403, double %405, double %407)
  store double %408, ptr %33, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %409 = load ptr, ptr %7, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.Line, ptr %409, i32 0, i32 2
  %411 = getelementptr inbounds { double, double }, ptr %410, i32 0, i32 0
  %412 = load double, ptr %411, align 8
  %413 = getelementptr inbounds { double, double }, ptr %410, i32 0, i32 1
  %414 = load double, ptr %413, align 8
  %415 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %416 = load double, ptr %415, align 8
  %417 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %418 = load double, ptr %417, align 8
  %419 = call double @Vec_dotProduct(double %412, double %414, double %416, double %418)
  store double %419, ptr %34, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %420 = load ptr, ptr %6, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.Line, ptr %420, i32 0, i32 2
  %422 = getelementptr inbounds { double, double }, ptr %421, i32 0, i32 0
  %423 = load double, ptr %422, align 8
  %424 = getelementptr inbounds { double, double }, ptr %421, i32 0, i32 1
  %425 = load double, ptr %424, align 8
  %426 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %427 = load double, ptr %426, align 8
  %428 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %429 = load double, ptr %428, align 8
  %430 = call double @Vec_dotProduct(double %423, double %425, double %427, double %429)
  store double %430, ptr %35, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %431 = load ptr, ptr %7, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.Line, ptr %431, i32 0, i32 2
  %433 = getelementptr inbounds { double, double }, ptr %432, i32 0, i32 0
  %434 = load double, ptr %433, align 8
  %435 = getelementptr inbounds { double, double }, ptr %432, i32 0, i32 1
  %436 = load double, ptr %435, align 8
  %437 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %438 = load double, ptr %437, align 8
  %439 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %440 = load double, ptr %439, align 8
  %441 = call double @Vec_dotProduct(double %434, double %436, double %438, double %440)
  store double %441, ptr %36, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %442 = load ptr, ptr %6, align 8, !tbaa !5
  %443 = getelementptr inbounds %struct.Line, ptr %442, i32 0, i32 3
  %444 = load float, ptr %443, align 8, !tbaa !14
  %445 = fpext float %444 to double
  store double %445, ptr %37, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %446 = load ptr, ptr %7, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.Line, ptr %446, i32 0, i32 3
  %448 = load float, ptr %447, align 8, !tbaa !14
  %449 = fpext float %448 to double
  store double %449, ptr %38, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %450 = load double, ptr %37, align 8, !tbaa !12
  %451 = load double, ptr %38, align 8, !tbaa !12
  %452 = fsub double %450, %451
  %453 = load double, ptr %37, align 8, !tbaa !12
  %454 = load double, ptr %38, align 8, !tbaa !12
  %455 = fadd double %453, %454
  %456 = fdiv double %452, %455
  %457 = load double, ptr %35, align 8, !tbaa !12
  %458 = load double, ptr %38, align 8, !tbaa !12
  %459 = fmul double 2.000000e+00, %458
  %460 = load double, ptr %37, align 8, !tbaa !12
  %461 = load double, ptr %38, align 8, !tbaa !12
  %462 = fadd double %460, %461
  %463 = fdiv double %459, %462
  %464 = load double, ptr %36, align 8, !tbaa !12
  %465 = fmul double %463, %464
  %466 = call double @llvm.fmuladd.f64(double %456, double %457, double %465)
  store double %466, ptr %39, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %467 = load double, ptr %37, align 8, !tbaa !12
  %468 = fmul double 2.000000e+00, %467
  %469 = load double, ptr %37, align 8, !tbaa !12
  %470 = load double, ptr %38, align 8, !tbaa !12
  %471 = fadd double %469, %470
  %472 = fdiv double %468, %471
  %473 = load double, ptr %35, align 8, !tbaa !12
  %474 = load double, ptr %38, align 8, !tbaa !12
  %475 = load double, ptr %37, align 8, !tbaa !12
  %476 = fsub double %474, %475
  %477 = load double, ptr %38, align 8, !tbaa !12
  %478 = load double, ptr %37, align 8, !tbaa !12
  %479 = fadd double %477, %478
  %480 = fdiv double %476, %479
  %481 = load double, ptr %36, align 8, !tbaa !12
  %482 = fmul double %480, %481
  %483 = call double @llvm.fmuladd.f64(double %472, double %473, double %482)
  store double %483, ptr %40, align 8, !tbaa !12
  %484 = load ptr, ptr %6, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.Line, ptr %484, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #8
  %486 = load double, ptr %39, align 8, !tbaa !12
  %487 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %488 = load double, ptr %487, align 8
  %489 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %490 = load double, ptr %489, align 8
  %491 = call { double, double } @Vec_multiply(double %488, double %490, double noundef %486)
  %492 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %493 = extractvalue { double, double } %491, 0
  store double %493, ptr %492, align 8
  %494 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %495 = extractvalue { double, double } %491, 1
  store double %495, ptr %494, align 8
  %496 = load double, ptr %33, align 8, !tbaa !12
  %497 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %498 = load double, ptr %497, align 8
  %499 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %500 = load double, ptr %499, align 8
  %501 = call { double, double } @Vec_multiply(double %498, double %500, double noundef %496)
  %502 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %503 = extractvalue { double, double } %501, 0
  store double %503, ptr %502, align 8
  %504 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %505 = extractvalue { double, double } %501, 1
  store double %505, ptr %504, align 8
  %506 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %507 = load double, ptr %506, align 8
  %508 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %509 = load double, ptr %508, align 8
  %510 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %511 = load double, ptr %510, align 8
  %512 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %513 = load double, ptr %512, align 8
  %514 = call { double, double } @Vec_add(double %507, double %509, double %511, double %513)
  %515 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %516 = extractvalue { double, double } %514, 0
  store double %516, ptr %515, align 8
  %517 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %518 = extractvalue { double, double } %514, 1
  store double %518, ptr %517, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %485, ptr align 8 %41, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #8
  %519 = load ptr, ptr %7, align 8, !tbaa !5
  %520 = getelementptr inbounds %struct.Line, ptr %519, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #8
  %521 = load double, ptr %40, align 8, !tbaa !12
  %522 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %523 = load double, ptr %522, align 8
  %524 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %525 = load double, ptr %524, align 8
  %526 = call { double, double } @Vec_multiply(double %523, double %525, double noundef %521)
  %527 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %528 = extractvalue { double, double } %526, 0
  store double %528, ptr %527, align 8
  %529 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %530 = extractvalue { double, double } %526, 1
  store double %530, ptr %529, align 8
  %531 = load double, ptr %34, align 8, !tbaa !12
  %532 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %533 = load double, ptr %532, align 8
  %534 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %535 = load double, ptr %534, align 8
  %536 = call { double, double } @Vec_multiply(double %533, double %535, double noundef %531)
  %537 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %538 = extractvalue { double, double } %536, 0
  store double %538, ptr %537, align 8
  %539 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %540 = extractvalue { double, double } %536, 1
  store double %540, ptr %539, align 8
  %541 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %542 = load double, ptr %541, align 8
  %543 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %544 = load double, ptr %543, align 8
  %545 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %546 = load double, ptr %545, align 8
  %547 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %548 = load double, ptr %547, align 8
  %549 = call { double, double } @Vec_add(double %542, double %544, double %546, double %548)
  %550 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %551 = extractvalue { double, double } %549, 0
  store double %551, ptr %550, align 8
  %552 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %553 = extractvalue { double, double } %549, 1
  store double %553, ptr %552, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %520, ptr align 8 %44, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %554

554:                                              ; preds = %388, %352
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @compareLines(ptr noundef, ptr noundef) #5

declare { double, double } @getIntersectionPoint(double, double, double, double, double, double, double, double) #2

declare double @Vec_length(double, double) #2

declare { double, double } @Vec_subtract(double, double, double, double) #2

declare { double, double } @Vec_normalize(double, double) #2

declare { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8) #2

declare { double, double } @Vec_orthogonal(double, double) #2

declare double @Vec_dotProduct(double, double, double, double) #2

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

attributes #0 = { noreturn 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { noreturn nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 8, !12, i64 8, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !17, i64 48}
!15 = !{!"Line", !16, i64 0, !16, i64 16, !16, i64 32, !17, i64 48, !18, i64 52}
!16 = !{!"Vec", !13, i64 0, !13, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{!"short", !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.Line = type { %struct.Vec, %struct.Vec, %struct.Vec, float, i16 }
%struct.Vec = type { double, double }

@.str.1 = external hidden unnamed_addr constant [163 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@__PRETTY_FUNCTION__.CollisionWorld_collisionSolver = external hidden unnamed_addr constant [88 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [108 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare { double, double } @Vec_multiply(double, double, double noundef) local_unnamed_addr #1

declare { double, double } @Vec_add(double, double, double, double) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @CollisionWorld_collisionSolver(ptr nocapture noundef readnone %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = tail call i32 @compareLines(ptr noundef %1, ptr noundef %2)
  %6 = icmp slt i32 %5, 0
  br i1 %6, label %8, label %7

7:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 223, ptr noundef nonnull @__PRETTY_FUNCTION__.CollisionWorld_collisionSolver) #5
  unreachable

8:                                                ; preds = %4
  %9 = add i32 %3, -1
  %or.cond3 = icmp ult i32 %9, 3
  br i1 %or.cond3, label %11, label %10

10:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 226, ptr noundef nonnull @__PRETTY_FUNCTION__.CollisionWorld_collisionSolver) #5
  unreachable

11:                                               ; preds = %8
  switch i32 %3, label %100 [
    i32 3, label %12
    i32 1, label %101
  ]

12:                                               ; preds = %11
  %13 = getelementptr inbounds i8, ptr %1, i64 16
  %14 = getelementptr inbounds i8, ptr %2, i64 16
  %15 = load double, ptr %1, align 8
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load double, ptr %16, align 8
  %18 = load double, ptr %13, align 8
  %19 = getelementptr inbounds i8, ptr %1, i64 24
  %20 = load double, ptr %19, align 8
  %21 = load double, ptr %2, align 8
  %22 = getelementptr inbounds i8, ptr %2, i64 8
  %23 = load double, ptr %22, align 8
  %24 = load double, ptr %14, align 8
  %25 = getelementptr inbounds i8, ptr %2, i64 24
  %26 = load double, ptr %25, align 8
  %27 = tail call { double, double } @getIntersectionPoint(double %15, double %17, double %18, double %20, double %21, double %23, double %24, double %26) #6
  %28 = extractvalue { double, double } %27, 0
  %29 = extractvalue { double, double } %27, 1
  %30 = load double, ptr %1, align 8
  %31 = load double, ptr %16, align 8
  %32 = tail call { double, double } @Vec_subtract(double %30, double %31, double %28, double %29) #6
  %33 = extractvalue { double, double } %32, 0
  %34 = extractvalue { double, double } %32, 1
  %35 = tail call double @Vec_length(double %33, double %34) #6
  %36 = load double, ptr %13, align 8
  %37 = load double, ptr %19, align 8
  %38 = tail call { double, double } @Vec_subtract(double %36, double %37, double %28, double %29) #6
  %39 = extractvalue { double, double } %38, 0
  %40 = extractvalue { double, double } %38, 1
  %41 = tail call double @Vec_length(double %39, double %40) #6
  %42 = fcmp olt double %35, %41
  %43 = getelementptr inbounds i8, ptr %1, i64 32
  %44 = getelementptr inbounds i8, ptr %1, i64 40
  %. = select i1 %42, ptr %13, ptr %1
  %.168 = select i1 %42, ptr %19, ptr %16
  %45 = load double, ptr %., align 8
  %46 = load double, ptr %.168, align 8
  %47 = tail call { double, double } @Vec_subtract(double %45, double %46, double %28, double %29) #6
  %48 = extractvalue { double, double } %47, 0
  %49 = extractvalue { double, double } %47, 1
  %50 = tail call { double, double } @Vec_normalize(double %48, double %49) #6
  %51 = extractvalue { double, double } %50, 0
  %52 = extractvalue { double, double } %50, 1
  %53 = load double, ptr %43, align 8
  %54 = load double, ptr %44, align 8
  %55 = tail call double @Vec_length(double %53, double %54) #6
  %56 = tail call { double, double } @Vec_multiply(double %51, double %52, double noundef %55) #6
  %57 = extractvalue { double, double } %56, 0
  %58 = extractvalue { double, double } %56, 1
  store double %57, ptr %43, align 8, !tbaa !5
  store double %58, ptr %44, align 8, !tbaa !5
  %59 = load double, ptr %2, align 8
  %60 = load double, ptr %22, align 8
  %61 = tail call { double, double } @Vec_subtract(double %59, double %60, double %28, double %29) #6
  %62 = extractvalue { double, double } %61, 0
  %63 = extractvalue { double, double } %61, 1
  %64 = tail call double @Vec_length(double %62, double %63) #6
  %65 = load double, ptr %14, align 8
  %66 = load double, ptr %25, align 8
  %67 = tail call { double, double } @Vec_subtract(double %65, double %66, double %28, double %29) #6
  %68 = extractvalue { double, double } %67, 0
  %69 = extractvalue { double, double } %67, 1
  %70 = tail call double @Vec_length(double %68, double %69) #6
  %71 = fcmp olt double %64, %70
  %72 = getelementptr inbounds i8, ptr %2, i64 32
  %73 = getelementptr inbounds i8, ptr %2, i64 40
  br i1 %71, label %74, label %87

74:                                               ; preds = %12
  %75 = load double, ptr %14, align 8
  %76 = load double, ptr %25, align 8
  %77 = tail call { double, double } @Vec_subtract(double %75, double %76, double %28, double %29) #6
  %78 = extractvalue { double, double } %77, 0
  %79 = extractvalue { double, double } %77, 1
  %80 = tail call { double, double } @Vec_normalize(double %78, double %79) #6
  %81 = extractvalue { double, double } %80, 0
  %82 = extractvalue { double, double } %80, 1
  %83 = load double, ptr %72, align 8
  %84 = load double, ptr %73, align 8
  %85 = tail call double @Vec_length(double %83, double %84) #6
  %86 = tail call { double, double } @Vec_multiply(double %81, double %82, double noundef %85) #6
  br label %160

87:                                               ; preds = %12
  %88 = load double, ptr %2, align 8
  %89 = load double, ptr %22, align 8
  %90 = tail call { double, double } @Vec_subtract(double %88, double %89, double %28, double %29) #6
  %91 = extractvalue { double, double } %90, 0
  %92 = extractvalue { double, double } %90, 1
  %93 = tail call { double, double } @Vec_normalize(double %91, double %92) #6
  %94 = extractvalue { double, double } %93, 0
  %95 = extractvalue { double, double } %93, 1
  %96 = load double, ptr %72, align 8
  %97 = load double, ptr %73, align 8
  %98 = tail call double @Vec_length(double %96, double %97) #6
  %99 = tail call { double, double } @Vec_multiply(double %94, double %95, double noundef %98) #6
  br label %160

100:                                              ; preds = %11
  br label %101

101:                                              ; preds = %11, %100
  %.sink161 = phi ptr [ %1, %100 ], [ %2, %11 ]
  %102 = tail call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %.sink161) #6
  %103 = extractvalue { double, double } %102, 0
  %104 = extractvalue { double, double } %102, 1
  %105 = tail call { double, double } @Vec_normalize(double %103, double %104) #6
  %.sroa.9.0 = extractvalue { double, double } %105, 1
  %.sroa.051.0 = extractvalue { double, double } %105, 0
  %106 = tail call { double, double } @Vec_orthogonal(double %.sroa.051.0, double %.sroa.9.0) #6
  %107 = extractvalue { double, double } %106, 0
  %108 = extractvalue { double, double } %106, 1
  %109 = getelementptr inbounds i8, ptr %1, i64 32
  %110 = load double, ptr %109, align 8
  %111 = getelementptr inbounds i8, ptr %1, i64 40
  %112 = load double, ptr %111, align 8
  %113 = tail call double @Vec_dotProduct(double %110, double %112, double %.sroa.051.0, double %.sroa.9.0) #6
  %114 = getelementptr inbounds i8, ptr %2, i64 32
  %115 = load double, ptr %114, align 8
  %116 = getelementptr inbounds i8, ptr %2, i64 40
  %117 = load double, ptr %116, align 8
  %118 = tail call double @Vec_dotProduct(double %115, double %117, double %.sroa.051.0, double %.sroa.9.0) #6
  %119 = load double, ptr %109, align 8
  %120 = load double, ptr %111, align 8
  %121 = tail call double @Vec_dotProduct(double %119, double %120, double %107, double %108) #6
  %122 = load double, ptr %114, align 8
  %123 = load double, ptr %116, align 8
  %124 = tail call double @Vec_dotProduct(double %122, double %123, double %107, double %108) #6
  %125 = getelementptr inbounds i8, ptr %1, i64 48
  %126 = load float, ptr %125, align 8, !tbaa !9
  %127 = fpext float %126 to double
  %128 = getelementptr inbounds i8, ptr %2, i64 48
  %129 = load float, ptr %128, align 8, !tbaa !9
  %130 = fpext float %129 to double
  %131 = fsub double %127, %130
  %132 = fadd double %127, %130
  %133 = fdiv double %131, %132
  %134 = fmul double %130, 2.000000e+00
  %135 = fdiv double %134, %132
  %136 = fmul double %124, %135
  %137 = tail call double @llvm.fmuladd.f64(double %133, double %121, double %136)
  %138 = fmul double %127, 2.000000e+00
  %139 = fdiv double %138, %132
  %140 = fsub double %130, %127
  %141 = fdiv double %140, %132
  %142 = fmul double %124, %141
  %143 = tail call double @llvm.fmuladd.f64(double %139, double %121, double %142)
  %144 = tail call { double, double } @Vec_multiply(double %107, double %108, double noundef %137) #6
  %145 = extractvalue { double, double } %144, 0
  %146 = extractvalue { double, double } %144, 1
  %147 = tail call { double, double } @Vec_multiply(double %.sroa.051.0, double %.sroa.9.0, double noundef %113) #6
  %148 = extractvalue { double, double } %147, 0
  %149 = extractvalue { double, double } %147, 1
  %150 = tail call { double, double } @Vec_add(double %145, double %146, double %148, double %149) #6
  %151 = extractvalue { double, double } %150, 0
  %152 = extractvalue { double, double } %150, 1
  store double %151, ptr %109, align 8, !tbaa !5
  store double %152, ptr %111, align 8, !tbaa !5
  %153 = tail call { double, double } @Vec_multiply(double %107, double %108, double noundef %143) #6
  %154 = extractvalue { double, double } %153, 0
  %155 = extractvalue { double, double } %153, 1
  %156 = tail call { double, double } @Vec_multiply(double %.sroa.051.0, double %.sroa.9.0, double noundef %118) #6
  %157 = extractvalue { double, double } %156, 0
  %158 = extractvalue { double, double } %156, 1
  %159 = tail call { double, double } @Vec_add(double %154, double %155, double %157, double %158) #6
  br label %160

160:                                              ; preds = %74, %87, %101
  %.sink167 = phi { double, double } [ %86, %74 ], [ %99, %87 ], [ %159, %101 ]
  %.sink165 = phi ptr [ %72, %74 ], [ %72, %87 ], [ %114, %101 ]
  %.sink163 = phi ptr [ %73, %74 ], [ %73, %87 ], [ %116, %101 ]
  %161 = extractvalue { double, double } %.sink167, 0
  %162 = extractvalue { double, double } %.sink167, 1
  store double %161, ptr %.sink165, align 8, !tbaa !5
  store double %162, ptr %.sink163, align 8, !tbaa !5
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @compareLines(ptr noundef, ptr noundef) local_unnamed_addr #3

declare { double, double } @getIntersectionPoint(double, double, double, double, double, double, double, double) local_unnamed_addr #1

declare double @Vec_length(double, double) local_unnamed_addr #1

declare { double, double } @Vec_subtract(double, double, double, double) local_unnamed_addr #1

declare { double, double } @Vec_normalize(double, double) local_unnamed_addr #1

declare { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8) local_unnamed_addr #1

declare { double, double } @Vec_orthogonal(double, double) local_unnamed_addr #1

declare double @Vec_dotProduct(double, double, double, double) local_unnamed_addr #1

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

attributes #0 = { noreturn 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 #1 = { "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 = { 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 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 speculatable willreturn memory(none) }
attributes #5 = { noreturn nounwind }
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/C++ TBAA"}
!9 = !{!10, !12, i64 48}
!10 = !{!"Line", !11, i64 0, !11, i64 16, !11, i64 32, !12, i64 48, !13, i64 52}
!11 = !{!"Vec", !6, i64 0, !6, i64 8}
!12 = !{!"float", !7, i64 0}
!13 = !{!"short", !7, i64 0}


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