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

; 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 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [170 x i8], align 1
@__PRETTY_FUNCTION__.intersect = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @intersect(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Vec, align 8
  %7 = alloca %struct.Vec, align 8
  %8 = alloca %struct.Vec, align 8
  %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 double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call i32 @compareLines(ptr noundef %26, ptr noundef %27)
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %2
  br label %32

31:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 34, ptr noundef @__PRETTY_FUNCTION__.intersect) #6
  unreachable

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %33)
  %35 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  %36 = extractvalue { double, double } %34, 0
  store double %36, ptr %35, align 8
  %37 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  %38 = extractvalue { double, double } %34, 1
  store double %38, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %39)
  %41 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  %42 = extractvalue { double, double } %40, 0
  store double %42, ptr %41, align 8
  %43 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  %44 = extractvalue { double, double } %40, 1
  store double %44, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Line, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.Line, ptr %47, i32 0, i32 2
  %49 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %50 = load double, ptr %49, align 8
  %51 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %52 = load double, ptr %51, align 8
  %53 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %54 = load double, ptr %53, align 8
  %55 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %56 = load double, ptr %55, align 8
  %57 = call { double, double } @Vec_subtract(double %50, double %52, double %54, double %56)
  %58 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %59 = extractvalue { double, double } %57, 0
  store double %59, ptr %58, align 8
  %60 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %61 = extractvalue { double, double } %57, 1
  store double %61, ptr %60, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Line, ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %65 = load double, ptr %64, align 8
  %66 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %67 = load double, ptr %66, align 8
  %68 = call { double, double } @Vec_multiply(double %65, double %67, double noundef 5.000000e-01)
  %69 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %70 = extractvalue { double, double } %68, 0
  store double %70, ptr %69, align 8
  %71 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %72 = extractvalue { double, double } %68, 1
  store double %72, ptr %71, align 8
  %73 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 0
  %74 = load double, ptr %73, align 8
  %75 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 1
  %76 = load double, ptr %75, align 8
  %77 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %78 = load double, ptr %77, align 8
  %79 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  %81 = call { double, double } @Vec_add(double %74, double %76, double %78, double %80)
  %82 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %83 = extractvalue { double, double } %81, 0
  store double %83, ptr %82, align 8
  %84 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %85 = extractvalue { double, double } %81, 1
  store double %85, ptr %84, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.Line, ptr %86, i32 0, i32 1
  %88 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %89 = load double, ptr %88, align 8
  %90 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %91 = load double, ptr %90, align 8
  %92 = call { double, double } @Vec_multiply(double %89, double %91, double noundef 5.000000e-01)
  %93 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %94 = extractvalue { double, double } %92, 0
  store double %94, ptr %93, align 8
  %95 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %96 = extractvalue { double, double } %92, 1
  store double %96, ptr %95, align 8
  %97 = getelementptr inbounds { double, double }, ptr %87, i32 0, i32 0
  %98 = load double, ptr %97, align 8
  %99 = getelementptr inbounds { double, double }, ptr %87, i32 0, i32 1
  %100 = load double, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %102 = load double, ptr %101, align 8
  %103 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %104 = load double, ptr %103, align 8
  %105 = call { double, double } @Vec_add(double %98, double %100, double %102, double %104)
  %106 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %107 = extractvalue { double, double } %105, 0
  store double %107, ptr %106, align 8
  %108 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %109 = extractvalue { double, double } %105, 1
  store double %109, ptr %108, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.Line, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.Vec, ptr %111, i32 0, i32 0
  %113 = load double, ptr %112, align 8, !tbaa !9
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.Line, ptr %114, i32 0, i32 1
  %116 = getelementptr inbounds %struct.Vec, ptr %115, i32 0, i32 0
  %117 = load double, ptr %116, align 8, !tbaa !15
  %118 = call double @llvm.minnum.f64(double %113, double %117)
  store double %118, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.Line, ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds %struct.Vec, ptr %120, i32 0, i32 0
  %122 = load double, ptr %121, align 8, !tbaa !9
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.Line, ptr %123, i32 0, i32 1
  %125 = getelementptr inbounds %struct.Vec, ptr %124, i32 0, i32 0
  %126 = load double, ptr %125, align 8, !tbaa !15
  %127 = call double @llvm.maxnum.f64(double %122, double %126)
  store double %127, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %128 = getelementptr inbounds %struct.Vec, ptr %9, i32 0, i32 0
  %129 = load double, ptr %128, align 8, !tbaa !17
  %130 = getelementptr inbounds %struct.Vec, ptr %11, i32 0, i32 0
  %131 = load double, ptr %130, align 8, !tbaa !17
  %132 = call double @llvm.minnum.f64(double %129, double %131)
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Line, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %struct.Vec, ptr %134, i32 0, i32 0
  %136 = load double, ptr %135, align 8, !tbaa !9
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.Line, ptr %137, i32 0, i32 1
  %139 = getelementptr inbounds %struct.Vec, ptr %138, i32 0, i32 0
  %140 = load double, ptr %139, align 8, !tbaa !15
  %141 = call double @llvm.minnum.f64(double %136, double %140)
  %142 = call double @llvm.minnum.f64(double %132, double %141)
  store double %142, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %143 = getelementptr inbounds %struct.Vec, ptr %9, i32 0, i32 0
  %144 = load double, ptr %143, align 8, !tbaa !17
  %145 = getelementptr inbounds %struct.Vec, ptr %11, i32 0, i32 0
  %146 = load double, ptr %145, align 8, !tbaa !17
  %147 = call double @llvm.maxnum.f64(double %144, double %146)
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.Line, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %struct.Vec, ptr %149, i32 0, i32 0
  %151 = load double, ptr %150, align 8, !tbaa !9
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.Line, ptr %152, i32 0, i32 1
  %154 = getelementptr inbounds %struct.Vec, ptr %153, i32 0, i32 0
  %155 = load double, ptr %154, align 8, !tbaa !15
  %156 = call double @llvm.maxnum.f64(double %151, double %155)
  %157 = call double @llvm.maxnum.f64(double %147, double %156)
  store double %157, ptr %16, align 8, !tbaa !16
  %158 = load double, ptr %14, align 8, !tbaa !16
  %159 = load double, ptr %15, align 8, !tbaa !16
  %160 = fcmp olt double %158, %159
  br i1 %160, label %165, label %161

161:                                              ; preds = %32
  %162 = load double, ptr %13, align 8, !tbaa !16
  %163 = load double, ptr %16, align 8, !tbaa !16
  %164 = fcmp ogt double %162, %163
  br i1 %164, label %165, label %166

165:                                              ; preds = %161, %32
  store i32 0, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %415

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.Line, ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds %struct.Vec, ptr %168, i32 0, i32 1
  %170 = load double, ptr %169, align 8, !tbaa !18
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.Line, ptr %171, i32 0, i32 1
  %173 = getelementptr inbounds %struct.Vec, ptr %172, i32 0, i32 1
  %174 = load double, ptr %173, align 8, !tbaa !19
  %175 = call double @llvm.minnum.f64(double %170, double %174)
  store double %175, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %176 = getelementptr inbounds %struct.Vec, ptr %9, i32 0, i32 1
  %177 = load double, ptr %176, align 8, !tbaa !20
  %178 = getelementptr inbounds %struct.Vec, ptr %11, i32 0, i32 1
  %179 = load double, ptr %178, align 8, !tbaa !20
  %180 = call double @llvm.minnum.f64(double %177, double %179)
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.Line, ptr %181, i32 0, i32 0
  %183 = getelementptr inbounds %struct.Vec, ptr %182, i32 0, i32 1
  %184 = load double, ptr %183, align 8, !tbaa !18
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.Line, ptr %185, i32 0, i32 1
  %187 = getelementptr inbounds %struct.Vec, ptr %186, i32 0, i32 1
  %188 = load double, ptr %187, align 8, !tbaa !19
  %189 = call double @llvm.minnum.f64(double %184, double %188)
  %190 = call double @llvm.minnum.f64(double %180, double %189)
  store double %190, ptr %19, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.Line, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds %struct.Vec, ptr %192, i32 0, i32 1
  %194 = load double, ptr %193, align 8, !tbaa !18
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.Line, ptr %195, i32 0, i32 1
  %197 = getelementptr inbounds %struct.Vec, ptr %196, i32 0, i32 1
  %198 = load double, ptr %197, align 8, !tbaa !19
  %199 = call double @llvm.maxnum.f64(double %194, double %198)
  store double %199, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %200 = getelementptr inbounds %struct.Vec, ptr %9, i32 0, i32 1
  %201 = load double, ptr %200, align 8, !tbaa !20
  %202 = getelementptr inbounds %struct.Vec, ptr %11, i32 0, i32 1
  %203 = load double, ptr %202, align 8, !tbaa !20
  %204 = call double @llvm.maxnum.f64(double %201, double %203)
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.Line, ptr %205, i32 0, i32 0
  %207 = getelementptr inbounds %struct.Vec, ptr %206, i32 0, i32 1
  %208 = load double, ptr %207, align 8, !tbaa !18
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.Line, ptr %209, i32 0, i32 1
  %211 = getelementptr inbounds %struct.Vec, ptr %210, i32 0, i32 1
  %212 = load double, ptr %211, align 8, !tbaa !19
  %213 = call double @llvm.maxnum.f64(double %208, double %212)
  %214 = call double @llvm.maxnum.f64(double %204, double %213)
  store double %214, ptr %21, align 8, !tbaa !16
  %215 = load double, ptr %20, align 8, !tbaa !16
  %216 = load double, ptr %19, align 8, !tbaa !16
  %217 = fcmp olt double %215, %216
  br i1 %217, label %222, label %218

218:                                              ; preds = %166
  %219 = load double, ptr %18, align 8, !tbaa !16
  %220 = load double, ptr %21, align 8, !tbaa !16
  %221 = fcmp ogt double %219, %220
  br i1 %221, label %222, label %223

222:                                              ; preds = %218, %166
  store i32 0, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %414

223:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  store i8 0, ptr %23, align 1, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  store i8 0, ptr %24, align 1, !tbaa !23
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.Line, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.Line, ptr %226, i32 0, i32 1
  %228 = load ptr, ptr %5, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.Line, ptr %228, i32 0, i32 0
  %230 = load ptr, ptr %5, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.Line, ptr %230, i32 0, i32 1
  %232 = getelementptr inbounds { double, double }, ptr %225, i32 0, i32 0
  %233 = load double, ptr %232, align 8
  %234 = getelementptr inbounds { double, double }, ptr %225, i32 0, i32 1
  %235 = load double, ptr %234, align 8
  %236 = getelementptr inbounds { double, double }, ptr %227, i32 0, i32 0
  %237 = load double, ptr %236, align 8
  %238 = getelementptr inbounds { double, double }, ptr %227, i32 0, i32 1
  %239 = load double, ptr %238, align 8
  %240 = getelementptr inbounds { double, double }, ptr %229, i32 0, i32 0
  %241 = load double, ptr %240, align 8
  %242 = getelementptr inbounds { double, double }, ptr %229, i32 0, i32 1
  %243 = load double, ptr %242, align 8
  %244 = getelementptr inbounds { double, double }, ptr %231, i32 0, i32 0
  %245 = load double, ptr %244, align 8
  %246 = getelementptr inbounds { double, double }, ptr %231, i32 0, i32 1
  %247 = load double, ptr %246, align 8
  %248 = call zeroext i1 @intersectLines(double %233, double %235, double %237, double %239, double %241, double %243, double %245, double %247)
  br i1 %248, label %249, label %250

249:                                              ; preds = %223
  store i32 3, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %413

250:                                              ; preds = %223
  %251 = load ptr, ptr %4, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.Line, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.Line, ptr %253, i32 0, i32 1
  %255 = getelementptr inbounds { double, double }, ptr %252, i32 0, i32 0
  %256 = load double, ptr %255, align 8
  %257 = getelementptr inbounds { double, double }, ptr %252, i32 0, i32 1
  %258 = load double, ptr %257, align 8
  %259 = getelementptr inbounds { double, double }, ptr %254, i32 0, i32 0
  %260 = load double, ptr %259, align 8
  %261 = getelementptr inbounds { double, double }, ptr %254, i32 0, i32 1
  %262 = load double, ptr %261, align 8
  %263 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %264 = load double, ptr %263, align 8
  %265 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %266 = load double, ptr %265, align 8
  %267 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %268 = load double, ptr %267, align 8
  %269 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %270 = load double, ptr %269, align 8
  %271 = call zeroext i1 @intersectLines(double %256, double %258, double %260, double %262, double %264, double %266, double %268, double %270)
  br i1 %271, label %272, label %275

272:                                              ; preds = %250
  %273 = load i32, ptr %22, align 4, !tbaa !21
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %22, align 4, !tbaa !21
  br label %275

275:                                              ; preds = %272, %250
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.Line, ptr %276, i32 0, i32 0
  %278 = load ptr, ptr %4, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.Line, ptr %278, i32 0, i32 1
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.Line, ptr %280, i32 0, i32 0
  %282 = getelementptr inbounds { double, double }, ptr %277, i32 0, i32 0
  %283 = load double, ptr %282, align 8
  %284 = getelementptr inbounds { double, double }, ptr %277, i32 0, i32 1
  %285 = load double, ptr %284, align 8
  %286 = getelementptr inbounds { double, double }, ptr %279, i32 0, i32 0
  %287 = load double, ptr %286, align 8
  %288 = getelementptr inbounds { double, double }, ptr %279, i32 0, i32 1
  %289 = load double, ptr %288, align 8
  %290 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %291 = load double, ptr %290, align 8
  %292 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %293 = load double, ptr %292, align 8
  %294 = getelementptr inbounds { double, double }, ptr %281, i32 0, i32 0
  %295 = load double, ptr %294, align 8
  %296 = getelementptr inbounds { double, double }, ptr %281, i32 0, i32 1
  %297 = load double, ptr %296, align 8
  %298 = call zeroext i1 @intersectLines(double %283, double %285, double %287, double %289, double %291, double %293, double %295, double %297)
  br i1 %298, label %299, label %302

299:                                              ; preds = %275
  %300 = load i32, ptr %22, align 4, !tbaa !21
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %22, align 4, !tbaa !21
  store i8 1, ptr %23, align 1, !tbaa !23
  br label %302

302:                                              ; preds = %299, %275
  %303 = load ptr, ptr %4, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.Line, ptr %303, i32 0, i32 0
  %305 = load ptr, ptr %4, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.Line, ptr %305, i32 0, i32 1
  %307 = load ptr, ptr %5, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.Line, ptr %307, i32 0, i32 1
  %309 = getelementptr inbounds { double, double }, ptr %304, i32 0, i32 0
  %310 = load double, ptr %309, align 8
  %311 = getelementptr inbounds { double, double }, ptr %304, i32 0, i32 1
  %312 = load double, ptr %311, align 8
  %313 = getelementptr inbounds { double, double }, ptr %306, i32 0, i32 0
  %314 = load double, ptr %313, align 8
  %315 = getelementptr inbounds { double, double }, ptr %306, i32 0, i32 1
  %316 = load double, ptr %315, align 8
  %317 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %318 = load double, ptr %317, align 8
  %319 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %320 = load double, ptr %319, align 8
  %321 = getelementptr inbounds { double, double }, ptr %308, i32 0, i32 0
  %322 = load double, ptr %321, align 8
  %323 = getelementptr inbounds { double, double }, ptr %308, i32 0, i32 1
  %324 = load double, ptr %323, align 8
  %325 = call zeroext i1 @intersectLines(double %310, double %312, double %314, double %316, double %318, double %320, double %322, double %324)
  br i1 %325, label %326, label %329

326:                                              ; preds = %302
  %327 = load i32, ptr %22, align 4, !tbaa !21
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %22, align 4, !tbaa !21
  store i8 1, ptr %24, align 1, !tbaa !23
  br label %329

329:                                              ; preds = %326, %302
  %330 = load i32, ptr %22, align 4, !tbaa !21
  %331 = icmp eq i32 %330, 2
  br i1 %331, label %332, label %333

332:                                              ; preds = %329
  store i32 2, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %413

333:                                              ; preds = %329
  %334 = load ptr, ptr %4, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.Line, ptr %334, i32 0, i32 0
  %336 = load ptr, ptr %5, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.Line, ptr %336, i32 0, i32 0
  %338 = load ptr, ptr %5, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.Line, ptr %338, i32 0, i32 1
  %340 = getelementptr inbounds { double, double }, ptr %335, i32 0, i32 0
  %341 = load double, ptr %340, align 8
  %342 = getelementptr inbounds { double, double }, ptr %335, i32 0, i32 1
  %343 = load double, ptr %342, align 8
  %344 = getelementptr inbounds { double, double }, ptr %337, i32 0, i32 0
  %345 = load double, ptr %344, align 8
  %346 = getelementptr inbounds { double, double }, ptr %337, i32 0, i32 1
  %347 = load double, ptr %346, align 8
  %348 = getelementptr inbounds { double, double }, ptr %339, i32 0, i32 0
  %349 = load double, ptr %348, align 8
  %350 = getelementptr inbounds { double, double }, ptr %339, i32 0, i32 1
  %351 = load double, ptr %350, align 8
  %352 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %353 = load double, ptr %352, align 8
  %354 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %355 = load double, ptr %354, align 8
  %356 = call zeroext i1 @pointInParallelogram(double %341, double %343, double %345, double %347, double %349, double %351, double %353, double %355, ptr noundef byval(%struct.Vec) align 8 %11)
  br i1 %356, label %357, label %382

357:                                              ; preds = %333
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.Line, ptr %358, i32 0, i32 1
  %360 = load ptr, ptr %5, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.Line, ptr %360, i32 0, i32 0
  %362 = load ptr, ptr %5, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.Line, ptr %362, i32 0, i32 1
  %364 = getelementptr inbounds { double, double }, ptr %359, i32 0, i32 0
  %365 = load double, ptr %364, align 8
  %366 = getelementptr inbounds { double, double }, ptr %359, i32 0, i32 1
  %367 = load double, ptr %366, align 8
  %368 = getelementptr inbounds { double, double }, ptr %361, i32 0, i32 0
  %369 = load double, ptr %368, align 8
  %370 = getelementptr inbounds { double, double }, ptr %361, i32 0, i32 1
  %371 = load double, ptr %370, align 8
  %372 = getelementptr inbounds { double, double }, ptr %363, i32 0, i32 0
  %373 = load double, ptr %372, align 8
  %374 = getelementptr inbounds { double, double }, ptr %363, i32 0, i32 1
  %375 = load double, ptr %374, align 8
  %376 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %377 = load double, ptr %376, align 8
  %378 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %379 = load double, ptr %378, align 8
  %380 = call zeroext i1 @pointInParallelogram(double %365, double %367, double %369, double %371, double %373, double %375, double %377, double %379, ptr noundef byval(%struct.Vec) align 8 %11)
  br i1 %380, label %381, label %382

381:                                              ; preds = %357
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %413

382:                                              ; preds = %357, %333
  %383 = load i32, ptr %22, align 4, !tbaa !21
  %384 = icmp eq i32 %383, 0
  br i1 %384, label %385, label %386

385:                                              ; preds = %382
  store i32 0, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %413

386:                                              ; preds = %382
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %387 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 0
  %388 = load double, ptr %387, align 8
  %389 = getelementptr inbounds { double, double }, ptr %6, i32 0, i32 1
  %390 = load double, ptr %389, align 8
  %391 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 0
  %392 = load double, ptr %391, align 8
  %393 = getelementptr inbounds { double, double }, ptr %7, i32 0, i32 1
  %394 = load double, ptr %393, align 8
  %395 = call double @Vec_angle(double %388, double %390, double %392, double %394)
  store double %395, ptr %25, align 8, !tbaa !16
  %396 = load i8, ptr %23, align 1, !tbaa !23, !range !25, !noundef !26
  %397 = trunc i8 %396 to i1
  br i1 %397, label %398, label %403

398:                                              ; preds = %386
  %399 = load double, ptr %25, align 8, !tbaa !16
  %400 = fcmp olt double %399, 0.000000e+00
  br i1 %400, label %401, label %402

401:                                              ; preds = %398
  store i32 2, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %412

402:                                              ; preds = %398
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %412

403:                                              ; preds = %386
  %404 = load i8, ptr %24, align 1, !tbaa !23, !range !25, !noundef !26
  %405 = trunc i8 %404 to i1
  br i1 %405, label %406, label %411

406:                                              ; preds = %403
  %407 = load double, ptr %25, align 8, !tbaa !16
  %408 = fcmp ogt double %407, 0.000000e+00
  br i1 %408, label %409, label %410

409:                                              ; preds = %406
  store i32 2, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %412

410:                                              ; preds = %406
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %412

411:                                              ; preds = %403
  store i32 1, ptr %3, align 4
  store i32 1, ptr %17, align 4
  br label %412

412:                                              ; preds = %411, %410, %409, %402, %401
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %413

413:                                              ; preds = %412, %385, %381, %332, %249
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %414

414:                                              ; preds = %413, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %415

415:                                              ; preds = %414, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  %416 = load i32, ptr %3, align 4
  ret i32 %416
}

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @intersectLines(double, double, double, double, double, double, double, double) #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @pointInParallelogram(double, double, double, double, double, double, double, double, ptr noundef byval(%struct.Vec) align 8) #0

declare double @Vec_angle(double, double, double, double) #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 0}
!10 = !{!"Line", !11, i64 0, !11, i64 16, !11, i64 32, !13, i64 48, !14, i64 52}
!11 = !{!"Vec", !12, i64 0, !12, i64 8}
!12 = !{!"double", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!10, !12, i64 16}
!16 = !{!12, !12, i64 0}
!17 = !{!11, !12, i64 0}
!18 = !{!10, !12, i64 8}
!19 = !{!10, !12, i64 24}
!20 = !{!11, !12, i64 8}
!21 = !{!22, !22, i64 0}
!22 = !{!"int", !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"_Bool", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}


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

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [170 x i8], align 1
@__PRETTY_FUNCTION__.intersect = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 4) i32 @intersect(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.Vec, align 8
  %4 = tail call i32 @compareLines(ptr noundef %0, ptr noundef %1)
  %5 = icmp slt i32 %4, 0
  br i1 %5, label %7, label %6

6:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 34, ptr noundef nonnull @__PRETTY_FUNCTION__.intersect) #6
  unreachable

7:                                                ; preds = %2
  %8 = tail call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %0) #7
  %9 = extractvalue { double, double } %8, 0
  %10 = extractvalue { double, double } %8, 1
  %11 = tail call { double, double } @Vec_makeFromLine(ptr noundef byval(%struct.Line) align 8 %1) #7
  %12 = extractvalue { double, double } %11, 0
  %13 = extractvalue { double, double } %11, 1
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = load double, ptr %14, align 8
  %17 = getelementptr inbounds i8, ptr %1, i64 40
  %18 = load double, ptr %17, align 8
  %19 = load double, ptr %15, align 8
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load double, ptr %20, align 8
  %22 = tail call { double, double } @Vec_subtract(double %16, double %18, double %19, double %21) #7
  %23 = extractvalue { double, double } %22, 0
  %24 = extractvalue { double, double } %22, 1
  %25 = tail call { double, double } @Vec_multiply(double %23, double %24, double noundef 5.000000e-01) #7
  %26 = extractvalue { double, double } %25, 0
  %27 = extractvalue { double, double } %25, 1
  %28 = load double, ptr %1, align 8
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  %30 = load double, ptr %29, align 8
  %31 = tail call { double, double } @Vec_add(double %28, double %30, double %26, double %27) #7
  %32 = extractvalue { double, double } %31, 0
  %33 = extractvalue { double, double } %31, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %34 = getelementptr inbounds i8, ptr %1, i64 16
  %35 = tail call { double, double } @Vec_multiply(double %23, double %24, double noundef 5.000000e-01) #7
  %36 = extractvalue { double, double } %35, 0
  %37 = extractvalue { double, double } %35, 1
  %38 = load double, ptr %34, align 8
  %39 = getelementptr inbounds i8, ptr %1, i64 24
  %40 = load double, ptr %39, align 8
  %41 = tail call { double, double } @Vec_add(double %38, double %40, double %36, double %37) #7
  %42 = extractvalue { double, double } %41, 0
  store double %42, ptr %3, align 8
  %43 = getelementptr inbounds i8, ptr %3, i64 8
  %44 = extractvalue { double, double } %41, 1
  store double %44, ptr %43, align 8
  %45 = load double, ptr %0, align 8
  %46 = getelementptr inbounds i8, ptr %0, i64 16
  %47 = load double, ptr %46, align 8
  %48 = tail call double @llvm.maxnum.f64(double %45, double %47)
  %49 = tail call double @llvm.minnum.f64(double %32, double %42)
  %50 = load double, ptr %1, align 8
  %51 = load double, ptr %34, align 8
  %52 = tail call double @llvm.minnum.f64(double %50, double %51)
  %53 = tail call double @llvm.minnum.f64(double %49, double %52)
  %54 = fcmp olt double %48, %53
  br i1 %54, label %129, label %55

55:                                               ; preds = %7
  %56 = tail call double @llvm.maxnum.f64(double %32, double %42)
  %57 = tail call double @llvm.maxnum.f64(double %50, double %51)
  %58 = tail call double @llvm.maxnum.f64(double %56, double %57)
  %59 = tail call double @llvm.minnum.f64(double %45, double %47)
  %60 = fcmp ogt double %59, %58
  br i1 %60, label %129, label %61

61:                                               ; preds = %55
  %62 = getelementptr inbounds i8, ptr %0, i64 8
  %63 = load double, ptr %62, align 8
  %64 = getelementptr inbounds i8, ptr %0, i64 24
  %65 = load double, ptr %64, align 8
  %66 = tail call double @llvm.minnum.f64(double %33, double %44)
  %67 = load double, ptr %29, align 8
  %68 = load double, ptr %39, align 8
  %69 = tail call double @llvm.minnum.f64(double %67, double %68)
  %70 = tail call double @llvm.minnum.f64(double %66, double %69)
  %71 = tail call double @llvm.maxnum.f64(double %63, double %65)
  %72 = fcmp olt double %71, %70
  br i1 %72, label %129, label %73

73:                                               ; preds = %61
  %74 = tail call double @llvm.maxnum.f64(double %33, double %44)
  %75 = tail call double @llvm.maxnum.f64(double %67, double %68)
  %76 = tail call double @llvm.maxnum.f64(double %74, double %75)
  %77 = tail call double @llvm.minnum.f64(double %63, double %65)
  %78 = fcmp ogt double %77, %76
  br i1 %78, label %129, label %79

79:                                               ; preds = %73
  %80 = tail call zeroext i1 @intersectLines(double %45, double %63, double %47, double %65, double %50, double %67, double %51, double %68)
  br i1 %80, label %129, label %81

81:                                               ; preds = %79
  %82 = load double, ptr %0, align 8
  %83 = load double, ptr %62, align 8
  %84 = load double, ptr %46, align 8
  %85 = load double, ptr %64, align 8
  %86 = tail call zeroext i1 @intersectLines(double %82, double %83, double %84, double %85, double %32, double %33, double %42, double %44)
  %spec.select = zext i1 %86 to i32
  %87 = load double, ptr %0, align 8
  %88 = load double, ptr %62, align 8
  %89 = load double, ptr %46, align 8
  %90 = load double, ptr %64, align 8
  %91 = load double, ptr %1, align 8
  %92 = load double, ptr %29, align 8
  %93 = tail call zeroext i1 @intersectLines(double %87, double %88, double %89, double %90, double %32, double %33, double %91, double %92)
  %94 = select i1 %86, i32 2, i32 1
  %.181 = select i1 %93, i32 %94, i32 %spec.select
  %95 = load double, ptr %0, align 8
  %96 = load double, ptr %62, align 8
  %97 = load double, ptr %46, align 8
  %98 = load double, ptr %64, align 8
  %99 = load double, ptr %34, align 8
  %100 = load double, ptr %39, align 8
  %101 = tail call zeroext i1 @intersectLines(double %95, double %96, double %97, double %98, double %42, double %44, double %99, double %100)
  %102 = zext i1 %101 to i32
  %.282 = add nuw nsw i32 %.181, %102
  %103 = icmp eq i32 %.282, 2
  br i1 %103, label %129, label %104

104:                                              ; preds = %81
  %105 = load double, ptr %0, align 8
  %106 = load double, ptr %62, align 8
  %107 = load double, ptr %1, align 8
  %108 = load double, ptr %29, align 8
  %109 = load double, ptr %34, align 8
  %110 = load double, ptr %39, align 8
  %111 = tail call zeroext i1 @pointInParallelogram(double %105, double %106, double %107, double %108, double %109, double %110, double %32, double %33, ptr noundef nonnull byval(%struct.Vec) align 8 %3)
  br i1 %111, label %112, label %120

112:                                              ; preds = %104
  %113 = load double, ptr %46, align 8
  %114 = load double, ptr %64, align 8
  %115 = load double, ptr %1, align 8
  %116 = load double, ptr %29, align 8
  %117 = load double, ptr %34, align 8
  %118 = load double, ptr %39, align 8
  %119 = tail call zeroext i1 @pointInParallelogram(double %113, double %114, double %115, double %116, double %117, double %118, double %32, double %33, ptr noundef nonnull byval(%struct.Vec) align 8 %3)
  br i1 %119, label %129, label %120

120:                                              ; preds = %112, %104
  %121 = icmp eq i32 %.282, 0
  br i1 %121, label %129, label %122

122:                                              ; preds = %120
  %123 = tail call double @Vec_angle(double %9, double %10, double %12, double %13) #7
  br i1 %93, label %124, label %126

124:                                              ; preds = %122
  %125 = fcmp olt double %123, 0.000000e+00
  %. = select i1 %125, i32 2, i32 1
  br label %129

126:                                              ; preds = %122
  br i1 %101, label %127, label %129

127:                                              ; preds = %126
  %128 = fcmp ogt double %123, 0.000000e+00
  %.83 = select i1 %128, i32 2, i32 1
  br label %129

129:                                              ; preds = %73, %61, %124, %127, %126, %120, %112, %81, %79, %7, %55
  %.3 = phi i32 [ 0, %55 ], [ 0, %7 ], [ 0, %73 ], [ 0, %61 ], [ 3, %79 ], [ 2, %81 ], [ 1, %112 ], [ 0, %120 ], [ %., %124 ], [ %.83, %127 ], [ 1, %126 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret i32 %.3
}

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @intersectLines(double, double, double, double, double, double, double, double) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @pointInParallelogram(double, double, double, double, double, double, double, double, ptr noundef byval(%struct.Vec) align 8) local_unnamed_addr #0

declare double @Vec_angle(double, double, double, double) local_unnamed_addr #4

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

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

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

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


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