; LLVM IR from MIT-SPARK/Kimera-VIO :: third_party/triangle/src (triangle)

; 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.otri = type { ptr, i32 }
%struct.osub = type { ptr, i32 }
%struct.mesh = type { %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, [4096 x ptr], [4096 x ptr], [4096 x i32], i32, ptr, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.otri }
%struct.memorypool = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i64, i64, i32, i32 }

@plus1mod3 = external dso_local global [3 x i32], align 4
@minus1mod3 = external dso_local global [3 x i32], align 4

; 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 void @insertsubseg(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @segmentintersection(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @scoutsegment(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.otri, align 8
  %13 = alloca %struct.osub, align 8
  %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 %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #2
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = call i32 @finddirection(ptr noundef %19, ptr noundef %20, ptr noundef %21, ptr noundef %22)
  store i32 %23, ptr %16, align 4, !tbaa !9
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.otri, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.otri, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 8, !tbaa !13
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = add nsw i32 %32, 3
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds ptr, ptr %26, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  store ptr %36, ptr %15, align 8, !tbaa !5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.otri, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.otri, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !13
  %43 = add nsw i32 %42, 3
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %39, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  store ptr %46, ptr %14, align 8, !tbaa !5
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = getelementptr inbounds float, ptr %47, i64 0
  %49 = load float, ptr %48, align 4, !tbaa !14
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds float, ptr %50, i64 0
  %52 = load float, ptr %51, align 4, !tbaa !14
  %53 = fcmp oeq float %49, %52
  br i1 %53, label %54, label %62

54:                                               ; preds = %5
  %55 = load ptr, ptr %14, align 8, !tbaa !5
  %56 = getelementptr inbounds float, ptr %55, i64 1
  %57 = load float, ptr %56, align 4, !tbaa !14
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds float, ptr %58, i64 1
  %60 = load float, ptr %59, align 4, !tbaa !14
  %61 = fcmp oeq float %57, %60
  br i1 %61, label %78, label %62

62:                                               ; preds = %54, %5
  %63 = load ptr, ptr %15, align 8, !tbaa !5
  %64 = getelementptr inbounds float, ptr %63, i64 0
  %65 = load float, ptr %64, align 4, !tbaa !14
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds float, ptr %66, i64 0
  %68 = load float, ptr %67, align 4, !tbaa !14
  %69 = fcmp oeq float %65, %68
  br i1 %69, label %70, label %108

70:                                               ; preds = %62
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = getelementptr inbounds float, ptr %71, i64 1
  %73 = load float, ptr %72, align 4, !tbaa !14
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds float, ptr %74, i64 1
  %76 = load float, ptr %75, align 4, !tbaa !14
  %77 = fcmp oeq float %73, %76
  br i1 %77, label %78, label %108

78:                                               ; preds = %70, %54
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = getelementptr inbounds float, ptr %79, i64 0
  %81 = load float, ptr %80, align 4, !tbaa !14
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds float, ptr %82, i64 0
  %84 = load float, ptr %83, align 4, !tbaa !14
  %85 = fcmp oeq float %81, %84
  br i1 %85, label %86, label %103

86:                                               ; preds = %78
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = getelementptr inbounds float, ptr %87, i64 1
  %89 = load float, ptr %88, align 4, !tbaa !14
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds float, ptr %90, i64 1
  %92 = load float, ptr %91, align 4, !tbaa !14
  %93 = fcmp oeq float %89, %92
  br i1 %93, label %94, label %103

94:                                               ; preds = %86
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.otri, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 8, !tbaa !13
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.otri, ptr %101, i32 0, i32 1
  store i32 %100, ptr %102, align 8, !tbaa !13
  br label %103

103:                                              ; preds = %94, %86, %78
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load i32, ptr %11, align 4, !tbaa !9
  call void @insertsubseg(ptr noundef %104, ptr noundef %105, ptr noundef %106, i32 noundef %107)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %211

108:                                              ; preds = %70, %62
  %109 = load i32, ptr %16, align 4, !tbaa !9
  %110 = icmp eq i32 %109, 1
  br i1 %110, label %111, label %130

111:                                              ; preds = %108
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.otri, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 8, !tbaa !13
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.otri, ptr %118, i32 0, i32 1
  store i32 %117, ptr %119, align 8, !tbaa !13
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load i32, ptr %11, align 4, !tbaa !9
  call void @insertsubseg(ptr noundef %120, ptr noundef %121, ptr noundef %122, i32 noundef %123)
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = call i32 @scoutsegment(ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127, i32 noundef %128)
  store i32 %129, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %211

130:                                              ; preds = %108
  %131 = load i32, ptr %16, align 4, !tbaa !9
  %132 = icmp eq i32 %131, 2
  br i1 %132, label %133, label %152

133:                                              ; preds = %130
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = load i32, ptr %11, align 4, !tbaa !9
  call void @insertsubseg(ptr noundef %134, ptr noundef %135, ptr noundef %136, i32 noundef %137)
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.otri, ptr %138, i32 0, i32 1
  %140 = load i32, ptr %139, align 8, !tbaa !13
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.otri, ptr %144, i32 0, i32 1
  store i32 %143, ptr %145, align 8, !tbaa !13
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = call i32 @scoutsegment(ptr noundef %146, ptr noundef %147, ptr noundef %148, ptr noundef %149, i32 noundef %150)
  store i32 %151, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %211

152:                                              ; preds = %130
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.otri, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !11
  %156 = getelementptr inbounds %struct.otri, ptr %12, i32 0, i32 0
  store ptr %155, ptr %156, align 8, !tbaa !11
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.otri, ptr %157, i32 0, i32 1
  %159 = load i32, ptr %158, align 8, !tbaa !13
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = getelementptr inbounds %struct.otri, ptr %12, i32 0, i32 1
  store i32 %162, ptr %163, align 8, !tbaa !13
  %164 = getelementptr inbounds %struct.otri, ptr %12, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !11
  %166 = getelementptr inbounds %struct.otri, ptr %12, i32 0, i32 1
  %167 = load i32, ptr %166, align 8, !tbaa !13
  %168 = add nsw i32 6, %167
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds ptr, ptr %165, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  store ptr %171, ptr %17, align 8, !tbaa !5
  %172 = load ptr, ptr %17, align 8, !tbaa !5
  %173 = ptrtoint ptr %172 to i64
  %174 = and i64 %173, 1
  %175 = trunc i64 %174 to i32
  %176 = getelementptr inbounds %struct.osub, ptr %13, i32 0, i32 1
  store i32 %175, ptr %176, align 8, !tbaa !16
  %177 = load ptr, ptr %17, align 8, !tbaa !5
  %178 = ptrtoint ptr %177 to i64
  %179 = and i64 %178, -4
  %180 = inttoptr i64 %179 to ptr
  %181 = getelementptr inbounds %struct.osub, ptr %13, i32 0, i32 0
  store ptr %180, ptr %181, align 8, !tbaa !18
  %182 = getelementptr inbounds %struct.osub, ptr %13, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !18
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.mesh, ptr %184, i32 0, i32 50
  %186 = load ptr, ptr %185, align 8, !tbaa !19
  %187 = icmp eq ptr %183, %186
  br i1 %187, label %188, label %189

188:                                              ; preds = %152
  store i32 0, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %211

189:                                              ; preds = %152
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = load ptr, ptr %8, align 8, !tbaa !5
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  call void @segmentintersection(ptr noundef %190, ptr noundef %191, ptr noundef %12, ptr noundef %13, ptr noundef %192)
  %193 = getelementptr inbounds %struct.otri, ptr %12, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !11
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.otri, ptr %195, i32 0, i32 0
  store ptr %194, ptr %196, align 8, !tbaa !11
  %197 = getelementptr inbounds %struct.otri, ptr %12, i32 0, i32 1
  %198 = load i32, ptr %197, align 8, !tbaa !13
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.otri, ptr %199, i32 0, i32 1
  store i32 %198, ptr %200, align 8, !tbaa !13
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = load ptr, ptr %8, align 8, !tbaa !5
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  %204 = load i32, ptr %11, align 4, !tbaa !9
  call void @insertsubseg(ptr noundef %201, ptr noundef %202, ptr noundef %203, i32 noundef %204)
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = load i32, ptr %11, align 4, !tbaa !9
  %210 = call i32 @scoutsegment(ptr noundef %205, ptr noundef %206, ptr noundef %207, ptr noundef %208, i32 noundef %209)
  store i32 %210, ptr %6, align 4
  store i32 1, ptr %18, align 4
  br label %211

211:                                              ; preds = %189, %188, %133, %111, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #2
  %212 = load i32, ptr %6, align 4
  ret i32 %212
}

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 = { 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 = !{!12, !6, i64 0}
!12 = !{!"otri", !6, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !10, i64 8}
!17 = !{!"osub", !6, i64 0, !10, i64 8}
!18 = !{!17, !6, i64 0}
!19 = !{!20, !6, i64 82856}
!20 = !{!"mesh", !21, i64 0, !21, i64 88, !21, i64 176, !21, i64 264, !21, i64 352, !21, i64 440, !21, i64 528, !21, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !10, i64 82624, !6, i64 82632, !15, i64 82640, !15, i64 82644, !15, i64 82648, !15, i64 82652, !15, i64 82656, !10, i64 82660, !10, i64 82664, !10, i64 82668, !10, i64 82672, !10, i64 82676, !10, i64 82680, !22, i64 82688, !10, i64 82696, !10, i64 82700, !10, i64 82704, !22, i64 82712, !10, i64 82720, !10, i64 82724, !10, i64 82728, !10, i64 82732, !10, i64 82736, !10, i64 82740, !10, i64 82744, !10, i64 82748, !10, i64 82752, !22, i64 82760, !22, i64 82768, !22, i64 82776, !22, i64 82784, !22, i64 82792, !22, i64 82800, !22, i64 82808, !6, i64 82816, !6, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !12, i64 82872}
!21 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !22, i64 64, !22, i64 72, !10, i64 80, !10, i64 84}
!22 = !{!"long", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.otri = type { ptr, i32 }
%struct.osub = type { ptr, i32 }

@plus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@minus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4

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

; Function Attrs: mustprogress 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 void @insertsubseg(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @finddirection(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @segmentintersection(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @scoutsegment(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = alloca %struct.otri, align 8
  %7 = alloca %struct.osub, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #2
  %8 = tail call i32 @finddirection(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3)
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !11
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !12
  %15 = sext i32 %14 to i64
  %16 = getelementptr ptr, ptr %9, i64 %15
  %17 = getelementptr i8, ptr %16, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = getelementptr ptr, ptr %9, i64 %12
  %20 = getelementptr i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = load float, ptr %21, align 4, !tbaa !14
  %23 = load float, ptr %3, align 4, !tbaa !14
  %24 = fcmp oeq float %22, %23
  br i1 %24, label %25, label %31

25:                                               ; preds = %5
  %26 = getelementptr inbounds i8, ptr %21, i64 4
  %27 = load float, ptr %26, align 4, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %3, i64 4
  %29 = load float, ptr %28, align 4, !tbaa !14
  %30 = fcmp oeq float %27, %29
  br i1 %30, label %.thread, label %31

31:                                               ; preds = %25, %5
  %32 = load float, ptr %18, align 4, !tbaa !14
  %33 = fcmp oeq float %32, %23
  br i1 %33, label %34, label %46

34:                                               ; preds = %31
  %35 = getelementptr inbounds i8, ptr %18, i64 4
  %36 = load float, ptr %35, align 4, !tbaa !14
  %37 = getelementptr inbounds i8, ptr %3, i64 4
  %38 = load float, ptr %37, align 4, !tbaa !14
  %39 = fcmp oeq float %36, %38
  br i1 %39, label %40, label %46

40:                                               ; preds = %34
  br i1 %24, label %..thread_crit_edge, label %45

..thread_crit_edge:                               ; preds = %40
  %.phi.trans.insert = getelementptr inbounds i8, ptr %21, i64 4
  %.pre = load float, ptr %.phi.trans.insert, align 4, !tbaa !14
  br label %.thread

.thread:                                          ; preds = %..thread_crit_edge, %25
  %41 = phi float [ %38, %..thread_crit_edge ], [ %29, %25 ]
  %42 = phi float [ %.pre, %..thread_crit_edge ], [ %27, %25 ]
  %43 = fcmp oeq float %42, %41
  br i1 %43, label %44, label %45

44:                                               ; preds = %.thread
  store i32 %14, ptr %10, align 8, !tbaa !11
  br label %45

45:                                               ; preds = %44, %.thread, %40
  tail call void @insertsubseg(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, i32 noundef %4)
  br label %76

46:                                               ; preds = %34, %31
  switch i32 %8, label %55 [
    i32 1, label %47
    i32 2, label %49
  ]

47:                                               ; preds = %46
  store i32 %14, ptr %10, align 8, !tbaa !11
  tail call void @insertsubseg(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, i32 noundef %4)
  %48 = tail call i32 @scoutsegment(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %4)
  br label %76

49:                                               ; preds = %46
  tail call void @insertsubseg(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, i32 noundef %4)
  %50 = load i32, ptr %10, align 8, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !12
  store i32 %53, ptr %10, align 8, !tbaa !11
  %54 = tail call i32 @scoutsegment(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %4)
  br label %76

55:                                               ; preds = %46
  store ptr %9, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %12
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %57, ptr %58, align 8, !tbaa !11
  %59 = sext i32 %57 to i64
  %60 = getelementptr ptr, ptr %9, i64 %59
  %61 = getelementptr i8, ptr %60, i64 48
  %62 = load ptr, ptr %61, align 8, !tbaa !13
  %63 = ptrtoint ptr %62 to i64
  %64 = trunc i64 %63 to i32
  %65 = and i32 %64, 1
  %66 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %65, ptr %66, align 8, !tbaa !16
  %67 = and i64 %63, -4
  %68 = inttoptr i64 %67 to ptr
  store ptr %68, ptr %7, align 8, !tbaa !18
  %69 = getelementptr inbounds i8, ptr %0, i64 82856
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  %71 = icmp eq ptr %70, %68
  br i1 %71, label %76, label %72

72:                                               ; preds = %55
  call void @segmentintersection(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %3)
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %73, ptr %2, align 8, !tbaa !5
  %74 = load i32, ptr %58, align 8, !tbaa !11
  store i32 %74, ptr %10, align 8, !tbaa !11
  call void @insertsubseg(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %2, i32 noundef %4)
  %75 = call i32 @scoutsegment(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %4)
  br label %76

76:                                               ; preds = %55, %72, %49, %47, %45
  %.0 = phi i32 [ 1, %45 ], [ %48, %47 ], [ %54, %49 ], [ %75, %72 ], [ 0, %55 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #2
  ret i32 %.0
}

attributes #0 = { mustprogress 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 = { 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, !7, i64 0}
!6 = !{!"otri", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!10, !10, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = !{!17, !10, i64 8}
!17 = !{!"osub", !7, i64 0, !10, i64 8}
!18 = !{!17, !7, i64 0}
!19 = !{!20, !7, i64 82856}
!20 = !{!"mesh", !21, i64 0, !21, i64 88, !21, i64 176, !21, i64 264, !21, i64 352, !21, i64 440, !21, i64 528, !21, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !10, i64 82624, !7, i64 82632, !15, i64 82640, !15, i64 82644, !15, i64 82648, !15, i64 82652, !15, i64 82656, !10, i64 82660, !10, i64 82664, !10, i64 82668, !10, i64 82672, !10, i64 82676, !10, i64 82680, !22, i64 82688, !10, i64 82696, !10, i64 82700, !10, i64 82704, !22, i64 82712, !10, i64 82720, !10, i64 82724, !10, i64 82728, !10, i64 82732, !10, i64 82736, !10, i64 82740, !10, i64 82744, !10, i64 82748, !10, i64 82752, !22, i64 82760, !22, i64 82768, !22, i64 82776, !22, i64 82784, !22, i64 82792, !22, i64 82800, !22, i64 82808, !7, i64 82816, !7, i64 82824, !7, i64 82832, !7, i64 82840, !7, i64 82848, !7, i64 82856, !7, i64 82864, !6, i64 82872}
!21 = !{!"memorypool", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !22, i64 64, !22, i64 72, !10, i64 80, !10, i64 84}
!22 = !{!"long", !8, i64 0}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass