; LLVM IR from PaddlePaddle/Serving :: core/predictor/tools/ocrtools (clipper)

; 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.ClipperLib::TEdge" = type { %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.ClipperLib::IntPoint" = type { i64, i64 }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib14IntersectPointERNS_5TEdgeES1_RNS_8IntPointE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(136) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %11, i32 0, i32 3
  %13 = load double, ptr %12, align 8, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %14, i32 0, i32 3
  %16 = load double, ptr %15, align 8, !tbaa !9
  %17 = fcmp oeq double %13, %16
  br i1 %17, label %18, label %32

18:                                               ; preds = %3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %19, i32 0, i32 1
  %21 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %20, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !17
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %23, i32 0, i32 1
  store i64 %22, ptr %24, align 8, !tbaa !18
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %26, i32 0, i32 1
  %28 = load i64, ptr %27, align 8, !tbaa !18
  %29 = call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %25, i64 noundef %28)
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %30, i32 0, i32 0
  store i64 %29, ptr %31, align 8, !tbaa !19
  store i32 1, ptr %9, align 4
  br label %324

32:                                               ; preds = %3
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %33, i32 0, i32 3
  %35 = load double, ptr %34, align 8, !tbaa !9
  %36 = fcmp oeq double %35, 0.000000e+00
  br i1 %36, label %37, label %83

37:                                               ; preds = %32
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !20
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %42, i32 0, i32 0
  store i64 %41, ptr %43, align 8, !tbaa !19
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = call noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %44)
  br i1 %45, label %46, label %53

46:                                               ; preds = %37
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %47, i32 0, i32 0
  %49 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %48, i32 0, i32 1
  %50 = load i64, ptr %49, align 8, !tbaa !21
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %51, i32 0, i32 1
  store i64 %50, ptr %52, align 8, !tbaa !18
  br label %82

53:                                               ; preds = %37
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %55, i32 0, i32 1
  %57 = load i64, ptr %56, align 8, !tbaa !21
  %58 = sitofp i64 %57 to double
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %60, i32 0, i32 0
  %62 = load i64, ptr %61, align 8, !tbaa !20
  %63 = sitofp i64 %62 to double
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %64, i32 0, i32 3
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = fdiv double %63, %66
  %68 = fsub double %58, %67
  store double %68, ptr %8, align 8, !tbaa !22
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %69, i32 0, i32 0
  %71 = load i64, ptr %70, align 8, !tbaa !19
  %72 = sitofp i64 %71 to double
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %73, i32 0, i32 3
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = fdiv double %72, %75
  %77 = load double, ptr %8, align 8, !tbaa !22
  %78 = fadd double %76, %77
  %79 = call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %78)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %80, i32 0, i32 1
  store i64 %79, ptr %81, align 8, !tbaa !18
  br label %82

82:                                               ; preds = %53, %46
  br label %211

83:                                               ; preds = %32
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %84, i32 0, i32 3
  %86 = load double, ptr %85, align 8, !tbaa !9
  %87 = fcmp oeq double %86, 0.000000e+00
  br i1 %87, label %88, label %134

88:                                               ; preds = %83
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %90, i32 0, i32 0
  %92 = load i64, ptr %91, align 8, !tbaa !20
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %93, i32 0, i32 0
  store i64 %92, ptr %94, align 8, !tbaa !19
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = call noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %95)
  br i1 %96, label %97, label %104

97:                                               ; preds = %88
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %99, i32 0, i32 1
  %101 = load i64, ptr %100, align 8, !tbaa !21
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %102, i32 0, i32 1
  store i64 %101, ptr %103, align 8, !tbaa !18
  br label %133

104:                                              ; preds = %88
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %106, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !21
  %109 = sitofp i64 %108 to double
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %111, i32 0, i32 0
  %113 = load i64, ptr %112, align 8, !tbaa !20
  %114 = sitofp i64 %113 to double
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %115, i32 0, i32 3
  %117 = load double, ptr %116, align 8, !tbaa !9
  %118 = fdiv double %114, %117
  %119 = fsub double %109, %118
  store double %119, ptr %7, align 8, !tbaa !22
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %120, i32 0, i32 0
  %122 = load i64, ptr %121, align 8, !tbaa !19
  %123 = sitofp i64 %122 to double
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %124, i32 0, i32 3
  %126 = load double, ptr %125, align 8, !tbaa !9
  %127 = fdiv double %123, %126
  %128 = load double, ptr %7, align 8, !tbaa !22
  %129 = fadd double %127, %128
  %130 = call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %129)
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %131, i32 0, i32 1
  store i64 %130, ptr %132, align 8, !tbaa !18
  br label %133

133:                                              ; preds = %104, %97
  br label %210

134:                                              ; preds = %83
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %135, i32 0, i32 0
  %137 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %136, i32 0, i32 0
  %138 = load i64, ptr %137, align 8, !tbaa !20
  %139 = sitofp i64 %138 to double
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %141, i32 0, i32 1
  %143 = load i64, ptr %142, align 8, !tbaa !21
  %144 = sitofp i64 %143 to double
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %145, i32 0, i32 3
  %147 = load double, ptr %146, align 8, !tbaa !9
  %148 = fneg double %144
  %149 = call double @llvm.fmuladd.f64(double %148, double %147, double %139)
  store double %149, ptr %7, align 8, !tbaa !22
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %150, i32 0, i32 0
  %152 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %151, i32 0, i32 0
  %153 = load i64, ptr %152, align 8, !tbaa !20
  %154 = sitofp i64 %153 to double
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %155, i32 0, i32 0
  %157 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %156, i32 0, i32 1
  %158 = load i64, ptr %157, align 8, !tbaa !21
  %159 = sitofp i64 %158 to double
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %160, i32 0, i32 3
  %162 = load double, ptr %161, align 8, !tbaa !9
  %163 = fneg double %159
  %164 = call double @llvm.fmuladd.f64(double %163, double %162, double %154)
  store double %164, ptr %8, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %165 = load double, ptr %8, align 8, !tbaa !22
  %166 = load double, ptr %7, align 8, !tbaa !22
  %167 = fsub double %165, %166
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %168, i32 0, i32 3
  %170 = load double, ptr %169, align 8, !tbaa !9
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %171, i32 0, i32 3
  %173 = load double, ptr %172, align 8, !tbaa !9
  %174 = fsub double %170, %173
  %175 = fdiv double %167, %174
  store double %175, ptr %10, align 8, !tbaa !22
  %176 = load double, ptr %10, align 8, !tbaa !22
  %177 = call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %176)
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %178, i32 0, i32 1
  store i64 %177, ptr %179, align 8, !tbaa !18
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %180, i32 0, i32 3
  %182 = load double, ptr %181, align 8, !tbaa !9
  %183 = call double @llvm.fabs.f64(double %182)
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %184, i32 0, i32 3
  %186 = load double, ptr %185, align 8, !tbaa !9
  %187 = call double @llvm.fabs.f64(double %186)
  %188 = fcmp olt double %183, %187
  br i1 %188, label %189, label %199

189:                                              ; preds = %134
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %190, i32 0, i32 3
  %192 = load double, ptr %191, align 8, !tbaa !9
  %193 = load double, ptr %10, align 8, !tbaa !22
  %194 = load double, ptr %7, align 8, !tbaa !22
  %195 = call double @llvm.fmuladd.f64(double %192, double %193, double %194)
  %196 = call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %195)
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %197, i32 0, i32 0
  store i64 %196, ptr %198, align 8, !tbaa !19
  br label %209

199:                                              ; preds = %134
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %200, i32 0, i32 3
  %202 = load double, ptr %201, align 8, !tbaa !9
  %203 = load double, ptr %10, align 8, !tbaa !22
  %204 = load double, ptr %8, align 8, !tbaa !22
  %205 = call double @llvm.fmuladd.f64(double %202, double %203, double %204)
  %206 = call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %205)
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %207, i32 0, i32 0
  store i64 %206, ptr %208, align 8, !tbaa !19
  br label %209

209:                                              ; preds = %199, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %210

210:                                              ; preds = %209, %133
  br label %211

211:                                              ; preds = %210, %82
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %213, i32 0, i32 1
  %215 = load i64, ptr %214, align 8, !tbaa !18
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %216, i32 0, i32 2
  %218 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %217, i32 0, i32 1
  %219 = load i64, ptr %218, align 8, !tbaa !23
  %220 = icmp slt i64 %215, %219
  br i1 %220, label %230, label %221

221:                                              ; preds = %212
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %222, i32 0, i32 1
  %224 = load i64, ptr %223, align 8, !tbaa !18
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %225, i32 0, i32 2
  %227 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %226, i32 0, i32 1
  %228 = load i64, ptr %227, align 8, !tbaa !23
  %229 = icmp slt i64 %224, %228
  br i1 %229, label %230, label %281

230:                                              ; preds = %221, %212
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %231, i32 0, i32 2
  %233 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %232, i32 0, i32 1
  %234 = load i64, ptr %233, align 8, !tbaa !23
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %235, i32 0, i32 2
  %237 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %236, i32 0, i32 1
  %238 = load i64, ptr %237, align 8, !tbaa !23
  %239 = icmp sgt i64 %234, %238
  br i1 %239, label %240, label %247

240:                                              ; preds = %230
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %241, i32 0, i32 2
  %243 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %242, i32 0, i32 1
  %244 = load i64, ptr %243, align 8, !tbaa !23
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %245, i32 0, i32 1
  store i64 %244, ptr %246, align 8, !tbaa !18
  br label %254

247:                                              ; preds = %230
  %248 = load ptr, ptr %5, align 8, !tbaa !5
  %249 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %248, i32 0, i32 2
  %250 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %249, i32 0, i32 1
  %251 = load i64, ptr %250, align 8, !tbaa !23
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %252, i32 0, i32 1
  store i64 %251, ptr %253, align 8, !tbaa !18
  br label %254

254:                                              ; preds = %247, %240
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %255, i32 0, i32 3
  %257 = load double, ptr %256, align 8, !tbaa !9
  %258 = call double @llvm.fabs.f64(double %257)
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %259, i32 0, i32 3
  %261 = load double, ptr %260, align 8, !tbaa !9
  %262 = call double @llvm.fabs.f64(double %261)
  %263 = fcmp olt double %258, %262
  br i1 %263, label %264, label %272

264:                                              ; preds = %254
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = load ptr, ptr %6, align 8, !tbaa !5
  %267 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %266, i32 0, i32 1
  %268 = load i64, ptr %267, align 8, !tbaa !18
  %269 = call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %265, i64 noundef %268)
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %270, i32 0, i32 0
  store i64 %269, ptr %271, align 8, !tbaa !19
  br label %280

272:                                              ; preds = %254
  %273 = load ptr, ptr %5, align 8, !tbaa !5
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %274, i32 0, i32 1
  %276 = load i64, ptr %275, align 8, !tbaa !18
  %277 = call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %273, i64 noundef %276)
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %278, i32 0, i32 0
  store i64 %277, ptr %279, align 8, !tbaa !19
  br label %280

280:                                              ; preds = %272, %264
  br label %281

281:                                              ; preds = %280, %221
  %282 = load ptr, ptr %6, align 8, !tbaa !5
  %283 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %282, i32 0, i32 1
  %284 = load i64, ptr %283, align 8, !tbaa !18
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %285, i32 0, i32 1
  %287 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %286, i32 0, i32 1
  %288 = load i64, ptr %287, align 8, !tbaa !17
  %289 = icmp sgt i64 %284, %288
  br i1 %289, label %290, label %323

290:                                              ; preds = %281
  %291 = load ptr, ptr %4, align 8, !tbaa !5
  %292 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %291, i32 0, i32 1
  %293 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %292, i32 0, i32 1
  %294 = load i64, ptr %293, align 8, !tbaa !17
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %295, i32 0, i32 1
  store i64 %294, ptr %296, align 8, !tbaa !18
  %297 = load ptr, ptr %4, align 8, !tbaa !5
  %298 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %297, i32 0, i32 3
  %299 = load double, ptr %298, align 8, !tbaa !9
  %300 = call double @llvm.fabs.f64(double %299)
  %301 = load ptr, ptr %5, align 8, !tbaa !5
  %302 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %301, i32 0, i32 3
  %303 = load double, ptr %302, align 8, !tbaa !9
  %304 = call double @llvm.fabs.f64(double %303)
  %305 = fcmp ogt double %300, %304
  br i1 %305, label %306, label %314

306:                                              ; preds = %290
  %307 = load ptr, ptr %5, align 8, !tbaa !5
  %308 = load ptr, ptr %6, align 8, !tbaa !5
  %309 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %308, i32 0, i32 1
  %310 = load i64, ptr %309, align 8, !tbaa !18
  %311 = call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %307, i64 noundef %310)
  %312 = load ptr, ptr %6, align 8, !tbaa !5
  %313 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %312, i32 0, i32 0
  store i64 %311, ptr %313, align 8, !tbaa !19
  br label %322

314:                                              ; preds = %290
  %315 = load ptr, ptr %4, align 8, !tbaa !5
  %316 = load ptr, ptr %6, align 8, !tbaa !5
  %317 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %316, i32 0, i32 1
  %318 = load i64, ptr %317, align 8, !tbaa !18
  %319 = call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %315, i64 noundef %318)
  %320 = load ptr, ptr %6, align 8, !tbaa !5
  %321 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %320, i32 0, i32 0
  store i64 %319, ptr %321, align 8, !tbaa !19
  br label %322

322:                                              ; preds = %314, %306
  br label %323

323:                                              ; preds = %322, %281
  store i32 0, ptr %9, align 4
  br label %324

324:                                              ; preds = %323, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %325 = load i32, ptr %9, align 4
  switch i32 %325, label %327 [
    i32 0, label %326
    i32 1, label %326
  ]

326:                                              ; preds = %324, %324
  ret void

327:                                              ; preds = %324
  unreachable
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN10ClipperLib5RoundEd(double noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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++ TBAA"}
!9 = !{!10, !13, i64 48}
!10 = !{!"_ZTSN10ClipperLib5TEdgeE", !11, i64 0, !11, i64 16, !11, i64 32, !13, i64 48, !14, i64 56, !15, i64 60, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!11 = !{!"_ZTSN10ClipperLib8IntPointE", !12, i64 0, !12, i64 8}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTSN10ClipperLib8PolyTypeE", !7, i64 0}
!15 = !{!"_ZTSN10ClipperLib8EdgeSideE", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!10, !12, i64 24}
!18 = !{!11, !12, i64 8}
!19 = !{!11, !12, i64 0}
!20 = !{!10, !12, i64 0}
!21 = !{!10, !12, i64 8}
!22 = !{!13, !13, i64 0}
!23 = !{!10, !12, i64 40}


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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ClipperLib14IntersectPointERNS_5TEdgeES1_RNS_8IntPointE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(136) %1, ptr nocapture noundef nonnull align 8 dereferenceable(16) %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  %5 = load double, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 48
  %7 = load double, ptr %6, align 8, !tbaa !5
  %8 = fcmp oeq double %5, %7
  br i1 %8, label %9, label %14

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load i64, ptr %10, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %11, ptr %12, align 8, !tbaa !17
  %13 = tail call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %11)
  br label %.sink.split95

14:                                               ; preds = %3
  %15 = fcmp oeq double %5, 0.000000e+00
  br i1 %15, label %16, label %36

16:                                               ; preds = %14
  %17 = load i64, ptr %0, align 8, !tbaa !18
  store i64 %17, ptr %2, align 8, !tbaa !19
  %18 = tail call noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %1)
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load i64, ptr %19, align 8, !tbaa !20
  br i1 %18, label %21, label %23

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %20, ptr %22, align 8, !tbaa !17
  br label %86

23:                                               ; preds = %16
  %24 = sitofp i64 %20 to double
  %25 = load i64, ptr %1, align 8, !tbaa !18
  %26 = sitofp i64 %25 to double
  %27 = load double, ptr %6, align 8, !tbaa !5
  %28 = fdiv double %26, %27
  %29 = fsub double %24, %28
  %30 = load i64, ptr %2, align 8, !tbaa !19
  %31 = sitofp i64 %30 to double
  %32 = fdiv double %31, %27
  %33 = fadd double %29, %32
  %34 = tail call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %33)
  %35 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %34, ptr %35, align 8, !tbaa !17
  br label %86

36:                                               ; preds = %14
  %37 = fcmp oeq double %7, 0.000000e+00
  br i1 %37, label %38, label %58

38:                                               ; preds = %36
  %39 = load i64, ptr %1, align 8, !tbaa !18
  store i64 %39, ptr %2, align 8, !tbaa !19
  %40 = tail call noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %0)
  %41 = getelementptr inbounds i8, ptr %0, i64 8
  %42 = load i64, ptr %41, align 8, !tbaa !20
  br i1 %40, label %43, label %45

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %42, ptr %44, align 8, !tbaa !17
  br label %86

45:                                               ; preds = %38
  %46 = sitofp i64 %42 to double
  %47 = load i64, ptr %0, align 8, !tbaa !18
  %48 = sitofp i64 %47 to double
  %49 = load double, ptr %4, align 8, !tbaa !5
  %50 = fdiv double %48, %49
  %51 = fsub double %46, %50
  %52 = load i64, ptr %2, align 8, !tbaa !19
  %53 = sitofp i64 %52 to double
  %54 = fdiv double %53, %49
  %55 = fadd double %51, %54
  %56 = tail call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %55)
  %57 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %56, ptr %57, align 8, !tbaa !17
  br label %86

58:                                               ; preds = %36
  %59 = load i64, ptr %0, align 8, !tbaa !18
  %60 = sitofp i64 %59 to double
  %61 = getelementptr inbounds i8, ptr %0, i64 8
  %62 = load i64, ptr %61, align 8, !tbaa !20
  %63 = sitofp i64 %62 to double
  %64 = fneg double %63
  %65 = tail call double @llvm.fmuladd.f64(double %64, double %5, double %60)
  %66 = load i64, ptr %1, align 8, !tbaa !18
  %67 = sitofp i64 %66 to double
  %68 = getelementptr inbounds i8, ptr %1, i64 8
  %69 = load i64, ptr %68, align 8, !tbaa !20
  %70 = sitofp i64 %69 to double
  %71 = fneg double %70
  %72 = tail call double @llvm.fmuladd.f64(double %71, double %7, double %67)
  %73 = fsub double %72, %65
  %74 = fsub double %5, %7
  %75 = fdiv double %73, %74
  %76 = tail call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %75)
  %77 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %76, ptr %77, align 8, !tbaa !17
  %78 = load double, ptr %4, align 8, !tbaa !5
  %79 = tail call double @llvm.fabs.f64(double %78)
  %80 = load double, ptr %6, align 8, !tbaa !5
  %81 = tail call double @llvm.fabs.f64(double %80)
  %82 = fcmp olt double %79, %81
  %83 = tail call double @llvm.fmuladd.f64(double %80, double %75, double %72)
  %84 = tail call double @llvm.fmuladd.f64(double %78, double %75, double %65)
  %.sink = select i1 %82, double %84, double %83
  %85 = tail call noundef i64 @_ZN10ClipperLib5RoundEd(double noundef %.sink)
  store i64 %85, ptr %2, align 8, !tbaa !19
  %.pre = load i64, ptr %77, align 8, !tbaa !17
  br label %86

86:                                               ; preds = %23, %21, %43, %45, %58
  %87 = phi i64 [ %34, %23 ], [ %20, %21 ], [ %42, %43 ], [ %56, %45 ], [ %.pre, %58 ]
  %88 = getelementptr inbounds i8, ptr %2, i64 8
  %89 = getelementptr inbounds i8, ptr %0, i64 40
  %90 = load i64, ptr %89, align 8, !tbaa !21
  %91 = icmp slt i64 %87, %90
  %92 = getelementptr inbounds i8, ptr %1, i64 40
  %93 = load i64, ptr %92, align 8
  %94 = icmp slt i64 %87, %93
  %or.cond = select i1 %91, i1 true, i1 %94
  br i1 %or.cond, label %.sink.split, label %101

.sink.split:                                      ; preds = %86
  %. = tail call i64 @llvm.smax.i64(i64 %90, i64 %93)
  store i64 %., ptr %88, align 8, !tbaa !17
  %95 = load double, ptr %4, align 8, !tbaa !5
  %96 = tail call double @llvm.fabs.f64(double %95)
  %97 = load double, ptr %6, align 8, !tbaa !5
  %98 = tail call double @llvm.fabs.f64(double %97)
  %99 = fcmp olt double %96, %98
  %.97 = select i1 %99, ptr %0, ptr %1
  %100 = tail call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %.97, i64 noundef %.)
  store i64 %100, ptr %2, align 8, !tbaa !19
  br label %101

101:                                              ; preds = %.sink.split, %86
  %102 = load i64, ptr %88, align 8, !tbaa !17
  %103 = getelementptr inbounds i8, ptr %0, i64 24
  %104 = load i64, ptr %103, align 8, !tbaa !16
  %105 = icmp sgt i64 %102, %104
  br i1 %105, label %106, label %116

106:                                              ; preds = %101
  store i64 %104, ptr %88, align 8, !tbaa !17
  %107 = load double, ptr %4, align 8, !tbaa !5
  %108 = tail call double @llvm.fabs.f64(double %107)
  %109 = load double, ptr %6, align 8, !tbaa !5
  %110 = tail call double @llvm.fabs.f64(double %109)
  %111 = fcmp ogt double %108, %110
  br i1 %111, label %112, label %114

112:                                              ; preds = %106
  %113 = tail call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %1, i64 noundef %104)
  br label %.sink.split95

114:                                              ; preds = %106
  %115 = tail call noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %104)
  br label %.sink.split95

.sink.split95:                                    ; preds = %9, %112, %114
  %.sink96 = phi i64 [ %115, %114 ], [ %113, %112 ], [ %13, %9 ]
  store i64 %.sink96, ptr %2, align 8, !tbaa !19
  br label %116

116:                                              ; preds = %.sink.split95, %101
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN10ClipperLib4TopXERNS_5TEdgeEx(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib12IsHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN10ClipperLib5RoundEd(double noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !11, i64 48}
!6 = !{!"_ZTSN10ClipperLib5TEdgeE", !7, i64 0, !7, i64 16, !7, i64 32, !11, i64 48, !12, i64 56, !13, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128}
!7 = !{!"_ZTSN10ClipperLib8IntPointE", !8, i64 0, !8, i64 8}
!8 = !{!"long long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"_ZTSN10ClipperLib8PolyTypeE", !9, i64 0}
!13 = !{!"_ZTSN10ClipperLib8EdgeSideE", !9, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!6, !8, i64 24}
!17 = !{!7, !8, i64 8}
!18 = !{!6, !8, i64 0}
!19 = !{!7, !8, i64 0}
!20 = !{!6, !8, i64 8}
!21 = !{!6, !8, i64 40}


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