; LLVM IR from robinrodricks/InspiritImage :: Inspirit.Assurf/clib (utils)

; 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._IPointMatch = type { ptr, ptr, ptr, double, double, i32, i32, i32 }
%struct._IPoint = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, double, ptr, i32, [256 x i8] }

; 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: nounwind uwtable
declare dso_local i32 @compareIPointMatch(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @filterOutliersByLines(ptr noundef %0, i32 noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = icmp sgt i32 %19, 15
  br i1 %20, label %21, label %201

21:                                               ; preds = %2
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  call void @qsort(ptr noundef %22, i64 noundef %24, i64 noundef 56, ptr noundef @compareIPointMatch)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = ashr i32 %25, 1
  %27 = call i32 @IMIN(i32 noundef %26, i32 noundef 30)
  store i32 %27, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = ashr i32 %28, 1
  store i32 %29, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  store ptr %32, ptr %10, align 8
  %33 = alloca i32, i64 %31, align 16
  store i64 %31, ptr %11, align 8
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %42, %21
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %45

38:                                               ; preds = %34
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %33, i64 %40
  store i32 0, ptr %41, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %38
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %6, align 4, !tbaa !9
  br label %34, !llvm.loop !11

45:                                               ; preds = %34
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %170, %45
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %50, label %173

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = shl i32 %51, 1
  store i32 %52, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds %struct._IPointMatch, ptr %55, i64 %57
  store ptr %58, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %struct._IPointMatch, ptr %59, i64 %61
  store ptr %62, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %166, %50
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %169

67:                                               ; preds = %63
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = icmp eq i32 %68, %69
  br i1 %70, label %75, label %71

71:                                               ; preds = %67
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %71, %67
  br label %166

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = load i32, ptr %7, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct._IPointMatch, ptr %77, i64 %79
  store ptr %80, ptr %17, align 8, !tbaa !5
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._IPointMatch, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = getelementptr inbounds %struct._IPoint, ptr %83, i32 0, i32 4
  %85 = load i32, ptr %84, align 8, !tbaa !16
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._IPointMatch, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !13
  %89 = getelementptr inbounds %struct._IPoint, ptr %88, i32 0, i32 5
  %90 = load i32, ptr %89, align 4, !tbaa !18
  %91 = load ptr, ptr %15, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._IPointMatch, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct._IPoint, ptr %93, i32 0, i32 4
  %95 = load i32, ptr %94, align 8, !tbaa !16
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._IPointMatch, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = getelementptr inbounds %struct._IPoint, ptr %98, i32 0, i32 5
  %100 = load i32, ptr %99, align 4, !tbaa !18
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._IPointMatch, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = getelementptr inbounds %struct._IPoint, ptr %103, i32 0, i32 4
  %105 = load i32, ptr %104, align 8, !tbaa !16
  %106 = load ptr, ptr %17, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct._IPointMatch, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = getelementptr inbounds %struct._IPoint, ptr %108, i32 0, i32 5
  %110 = load i32, ptr %109, align 4, !tbaa !18
  %111 = call i32 @testSideOfLine(i32 noundef %85, i32 noundef %90, i32 noundef %95, i32 noundef %100, i32 noundef %105, i32 noundef %110)
  %112 = load ptr, ptr %14, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._IPointMatch, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !19
  %115 = getelementptr inbounds %struct._IPoint, ptr %114, i32 0, i32 4
  %116 = load i32, ptr %115, align 8, !tbaa !16
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._IPointMatch, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !19
  %120 = getelementptr inbounds %struct._IPoint, ptr %119, i32 0, i32 5
  %121 = load i32, ptr %120, align 4, !tbaa !18
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._IPointMatch, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !19
  %125 = getelementptr inbounds %struct._IPoint, ptr %124, i32 0, i32 4
  %126 = load i32, ptr %125, align 8, !tbaa !16
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._IPointMatch, ptr %127, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !19
  %130 = getelementptr inbounds %struct._IPoint, ptr %129, i32 0, i32 5
  %131 = load i32, ptr %130, align 4, !tbaa !18
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._IPointMatch, ptr %132, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !19
  %135 = getelementptr inbounds %struct._IPoint, ptr %134, i32 0, i32 4
  %136 = load i32, ptr %135, align 8, !tbaa !16
  %137 = load ptr, ptr %17, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._IPointMatch, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !19
  %140 = getelementptr inbounds %struct._IPoint, ptr %139, i32 0, i32 5
  %141 = load i32, ptr %140, align 4, !tbaa !18
  %142 = call i32 @testSideOfLine(i32 noundef %116, i32 noundef %121, i32 noundef %126, i32 noundef %131, i32 noundef %136, i32 noundef %141)
  %143 = icmp ne i32 %111, %142
  br i1 %143, label %144, label %162

144:                                              ; preds = %76
  %145 = load i32, ptr %16, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %16, align 4, !tbaa !9
  %147 = load i32, ptr %9, align 4, !tbaa !9
  %148 = sub nsw i32 %147, 2
  %149 = icmp sgt i32 %146, %148
  br i1 %149, label %150, label %161

150:                                              ; preds = %144
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %33, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %153, align 4, !tbaa !9
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %33, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %158, align 4, !tbaa !9
  store i32 8, ptr %18, align 4
  br label %163

161:                                              ; preds = %144
  br label %162

162:                                              ; preds = %161, %76
  store i32 0, ptr %18, align 4
  br label %163

163:                                              ; preds = %162, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  %164 = load i32, ptr %18, align 4
  switch i32 %164, label %205 [
    i32 0, label %165
    i32 8, label %169
  ]

165:                                              ; preds = %163
  br label %166

166:                                              ; preds = %165, %75
  %167 = load i32, ptr %7, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %7, align 4, !tbaa !9
  br label %63, !llvm.loop !20

169:                                              ; preds = %163, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %6, align 4, !tbaa !9
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %6, align 4, !tbaa !9
  br label %46, !llvm.loop !21

173:                                              ; preds = %46
  store i32 0, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %195, %173
  %175 = load i32, ptr %6, align 4, !tbaa !9
  %176 = load i32, ptr %5, align 4, !tbaa !9
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %178, label %198

178:                                              ; preds = %174
  %179 = load i32, ptr %6, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds i32, ptr %33, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = icmp slt i32 %182, 1
  br i1 %183, label %184, label %194

184:                                              ; preds = %178
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = load i32, ptr %8, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %8, align 4, !tbaa !9
  %188 = sext i32 %186 to i64
  %189 = getelementptr inbounds %struct._IPointMatch, ptr %185, i64 %188
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = load i32, ptr %6, align 4, !tbaa !9
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds %struct._IPointMatch, ptr %190, i64 %192
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %189, ptr align 8 %193, i64 56, i1 false), !tbaa.struct !22
  br label %194

194:                                              ; preds = %184, %178
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %6, align 4, !tbaa !9
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %6, align 4, !tbaa !9
  br label %174, !llvm.loop !24

198:                                              ; preds = %174
  %199 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %199, ptr %3, align 4
  store i32 1, ptr %18, align 4
  %200 = load ptr, ptr %10, align 8
  call void @llvm.stackrestore.p0(ptr %200)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %203

201:                                              ; preds = %2
  %202 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %202, ptr %3, align 4
  br label %203

203:                                              ; preds = %201, %198
  %204 = load i32, ptr %3, align 4
  ret i32 %204

205:                                              ; preds = %163
  unreachable
}

declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { nocallback nofree 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 = { 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 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_IPointMatch", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !15, i64 32, !10, i64 40, !10, i64 44, !10, i64 48}
!15 = !{!"double", !7, i64 0}
!16 = !{!17, !10, i64 16}
!17 = !{!"_IPoint", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !15, i64 40, !15, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !15, i64 72, !6, i64 80, !10, i64 88, !7, i64 92}
!18 = !{!17, !10, i64 20}
!19 = !{!14, !6, i64 8}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !23, i64 32, i64 8, !23, i64 40, i64 4, !9, i64 44, i64 4, !9, i64 48, i64 4, !9}
!23 = !{!15, !15, i64 0}
!24 = distinct !{!24, !12}


; 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._IPointMatch = type { ptr, ptr, ptr, double, double, i32, i32, i32 }

; Function Attrs: nounwind uwtable
declare dso_local i32 @compareIPointMatch(ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #1

; Function Attrs: mustprogress 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) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @filterOutliersByLines(ptr noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = icmp sgt i32 %1, 15
  br i1 %3, label %.preheader72, label %89

.preheader72:                                     ; preds = %2
  %4 = zext nneg i32 %1 to i64
  tail call void @qsort(ptr noundef %0, i64 noundef %4, i64 noundef 56, ptr noundef nonnull @compareIPointMatch) #7
  %5 = lshr i32 %1, 1
  %6 = tail call i32 @IMIN(i32 noundef %5, i32 noundef 30)
  %7 = tail call ptr @llvm.stacksave.p0()
  %8 = alloca i32, i64 %4, align 16
  %9 = shl nuw nsw i64 %4, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %8, i8 0, i64 %9, i1 false), !tbaa !5
  %10 = icmp sgt i32 %6, 0
  br i1 %10, label %.lr.ph.us.preheader, label %.lr.ph.preheader

.lr.ph.us.preheader:                              ; preds = %.preheader72
  %11 = add nsw i32 %5, -2
  %wide.trip.count86 = zext nneg i32 %6 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %..loopexit_crit_edge.us
  %indvars.iv83 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next84, %..loopexit_crit_edge.us ]
  %12 = shl nuw i64 %indvars.iv83, 1
  %13 = or disjoint i64 %12, 1
  %sext = shl i64 %indvars.iv83, 33
  %14 = ashr exact i64 %sext, 32
  %15 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %14
  %sext93 = shl i64 %13, 32
  %16 = ashr exact i64 %sext93, 32
  %17 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %16
  %18 = getelementptr inbounds i8, ptr %15, i64 8
  %19 = getelementptr inbounds i8, ptr %17, i64 8
  br label %20

20:                                               ; preds = %.lr.ph.us, %.thread.us
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %.thread.us ]
  %.05775.us = phi i32 [ 0, %.lr.ph.us ], [ %.3.us, %.thread.us ]
  %21 = icmp eq i64 %12, %indvars.iv
  %22 = icmp eq i64 %13, %indvars.iv
  %or.cond.us = select i1 %21, i1 true, i1 %22
  br i1 %or.cond.us, label %.thread.us, label %23

23:                                               ; preds = %20
  %24 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %indvars.iv
  %25 = load ptr, ptr %15, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load i32, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds i8, ptr %25, i64 20
  %29 = load i32, ptr %28, align 4, !tbaa !15
  %30 = load ptr, ptr %17, align 8, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load i32, ptr %31, align 8, !tbaa !13
  %33 = getelementptr inbounds i8, ptr %30, i64 20
  %34 = load i32, ptr %33, align 4, !tbaa !15
  %35 = load ptr, ptr %24, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %37 = load i32, ptr %36, align 8, !tbaa !13
  %38 = getelementptr inbounds i8, ptr %35, i64 20
  %39 = load i32, ptr %38, align 4, !tbaa !15
  %40 = tail call i32 @testSideOfLine(i32 noundef %27, i32 noundef %29, i32 noundef %32, i32 noundef %34, i32 noundef %37, i32 noundef %39)
  %41 = load ptr, ptr %18, align 8, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %43 = load i32, ptr %42, align 8, !tbaa !13
  %44 = getelementptr inbounds i8, ptr %41, i64 20
  %45 = load i32, ptr %44, align 4, !tbaa !15
  %46 = load ptr, ptr %19, align 8, !tbaa !16
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  %48 = load i32, ptr %47, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %46, i64 20
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = getelementptr inbounds i8, ptr %24, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = getelementptr inbounds i8, ptr %52, i64 20
  %56 = load i32, ptr %55, align 4, !tbaa !15
  %57 = tail call i32 @testSideOfLine(i32 noundef %43, i32 noundef %45, i32 noundef %48, i32 noundef %50, i32 noundef %54, i32 noundef %56)
  %.not.us = icmp eq i32 %40, %57
  br i1 %.not.us, label %.thread.us, label %58

58:                                               ; preds = %23
  %59 = add nsw i32 %.05775.us, 1
  %.not68.us = icmp slt i32 %.05775.us, %11
  br i1 %.not68.us, label %.thread.us, label %60

60:                                               ; preds = %58
  %61 = getelementptr inbounds i32, ptr %8, i64 %14
  %62 = load <2 x i32>, ptr %61, align 8, !tbaa !5
  %63 = add nsw <2 x i32> %62, <i32 1, i32 1>
  store <2 x i32> %63, ptr %61, align 8, !tbaa !5
  br label %..loopexit_crit_edge.us

..loopexit_crit_edge.us:                          ; preds = %.thread.us, %60
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %.lr.ph.preheader, label %.lr.ph.us, !llvm.loop !17

.thread.us:                                       ; preds = %58, %23, %20
  %.3.us = phi i32 [ %.05775.us, %20 ], [ %.05775.us, %23 ], [ %59, %58 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %4
  br i1 %exitcond.not, label %..loopexit_crit_edge.us, label %20, !llvm.loop !19

.lr.ph.preheader:                                 ; preds = %..loopexit_crit_edge.us, %.preheader72
  %smax = tail call i32 @llvm.smax.i32(i32 %1, i32 1)
  %wide.trip.count91 = zext nneg i32 %smax to i64
  %xtraiter = and i64 %wide.trip.count91, 1
  %unroll_iter = and i64 %wide.trip.count91, 2147483646
  br label %.lr.ph

.lr.ph:                                           ; preds = %80, %.lr.ph.preheader
  %indvars.iv88 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next89.1, %80 ]
  %.06278 = phi i32 [ 0, %.lr.ph.preheader ], [ %.163.1, %80 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader ], [ %niter.next.1, %80 ]
  %64 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv88
  %65 = load i32, ptr %64, align 8, !tbaa !5
  %66 = icmp slt i32 %65, 1
  br i1 %66, label %67, label %.lr.ph.1

67:                                               ; preds = %.lr.ph
  %68 = add nsw i32 %.06278, 1
  %69 = sext i32 %.06278 to i64
  %70 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %69
  %71 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %indvars.iv88
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %70, ptr noundef nonnull align 8 dereferenceable(56) %71, i64 56, i1 false), !tbaa.struct !20
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph, %67
  %.163 = phi i32 [ %68, %67 ], [ %.06278, %.lr.ph ]
  %indvars.iv.next89 = or disjoint i64 %indvars.iv88, 1
  %72 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv.next89
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp slt i32 %73, 1
  br i1 %74, label %75, label %80

75:                                               ; preds = %.lr.ph.1
  %76 = add nsw i32 %.163, 1
  %77 = sext i32 %.163 to i64
  %78 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %77
  %79 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %indvars.iv.next89
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %78, ptr noundef nonnull align 8 dereferenceable(56) %79, i64 56, i1 false), !tbaa.struct !20
  br label %80

80:                                               ; preds = %75, %.lr.ph.1
  %.163.1 = phi i32 [ %76, %75 ], [ %.163, %.lr.ph.1 ]
  %indvars.iv.next89.1 = add nuw nsw i64 %indvars.iv88, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph, !llvm.loop !23

._crit_edge.unr-lcssa:                            ; preds = %80
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa
  %81 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv.next89.1
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = icmp slt i32 %82, 1
  br i1 %83, label %84, label %._crit_edge

84:                                               ; preds = %.lr.ph.epil
  %85 = add nsw i32 %.163.1, 1
  %86 = sext i32 %.163.1 to i64
  %87 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %86
  %88 = getelementptr inbounds %struct._IPointMatch, ptr %0, i64 %indvars.iv.next89.1
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %87, ptr noundef nonnull align 8 dereferenceable(56) %88, i64 56, i1 false), !tbaa.struct !20
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %84, %._crit_edge.unr-lcssa
  %.163.lcssa = phi i32 [ %.163.1, %._crit_edge.unr-lcssa ], [ %85, %84 ], [ %.163.1, %.lr.ph.epil ]
  tail call void @llvm.stackrestore.p0(ptr %7)
  br label %89

89:                                               ; preds = %2, %._crit_edge
  %.056 = phi i32 [ %.163.lcssa, %._crit_edge ], [ %1, %2 ]
  ret i32 %.056
}

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare i32 @IMIN(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare i32 @testSideOfLine(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree "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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_IPointMatch", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !12, i64 32, !6, i64 40, !6, i64 44, !6, i64 48}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_IPoint", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !12, i64 40, !12, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !12, i64 72, !11, i64 80, !6, i64 88, !7, i64 92}
!15 = !{!14, !6, i64 20}
!16 = !{!10, !11, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{i64 0, i64 8, !21, i64 8, i64 8, !21, i64 16, i64 8, !21, i64 24, i64 8, !22, i64 32, i64 8, !22, i64 40, i64 4, !5, i64 44, i64 4, !5, i64 48, i64 4, !5}
!21 = !{!11, !11, i64 0}
!22 = !{!12, !12, i64 0}
!23 = distinct !{!23, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass