; 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.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 }
%struct.otri = type { ptr, i32 }
%struct.behavior = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float }

@o3derrboundA = external dso_local global float, 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: nounwind uwtable
declare dso_local float @orient3dadapt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, float noundef, float noundef, float noundef, float noundef, float noundef) #2

; Function Attrs: nounwind uwtable
define dso_local float @orient3d(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, float noundef %6, float noundef %7, float noundef %8, float noundef %9) #2 {
  %11 = alloca float, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca float, align 4
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca float, align 4
  %38 = alloca float, align 4
  %39 = alloca float, align 4
  %40 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store float %6, ptr %18, align 4, !tbaa !9
  store float %7, ptr %19, align 4, !tbaa !9
  store float %8, ptr %20, align 4, !tbaa !9
  store float %9, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #3
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.mesh, ptr %41, i32 0, i32 41
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = add nsw i64 %43, 1
  store i64 %44, ptr %42, align 8, !tbaa !11
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = getelementptr inbounds float, ptr %45, i64 0
  %47 = load float, ptr %46, align 4, !tbaa !9
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = getelementptr inbounds float, ptr %48, i64 0
  %50 = load float, ptr %49, align 4, !tbaa !9
  %51 = fsub float %47, %50
  store float %51, ptr %22, align 4, !tbaa !9
  %52 = load ptr, ptr %15, align 8, !tbaa !5
  %53 = getelementptr inbounds float, ptr %52, i64 0
  %54 = load float, ptr %53, align 4, !tbaa !9
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = getelementptr inbounds float, ptr %55, i64 0
  %57 = load float, ptr %56, align 4, !tbaa !9
  %58 = fsub float %54, %57
  store float %58, ptr %23, align 4, !tbaa !9
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = getelementptr inbounds float, ptr %59, i64 0
  %61 = load float, ptr %60, align 4, !tbaa !9
  %62 = load ptr, ptr %17, align 8, !tbaa !5
  %63 = getelementptr inbounds float, ptr %62, i64 0
  %64 = load float, ptr %63, align 4, !tbaa !9
  %65 = fsub float %61, %64
  store float %65, ptr %24, align 4, !tbaa !9
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds float, ptr %66, i64 1
  %68 = load float, ptr %67, align 4, !tbaa !9
  %69 = load ptr, ptr %17, align 8, !tbaa !5
  %70 = getelementptr inbounds float, ptr %69, i64 1
  %71 = load float, ptr %70, align 4, !tbaa !9
  %72 = fsub float %68, %71
  store float %72, ptr %25, align 4, !tbaa !9
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = getelementptr inbounds float, ptr %73, i64 1
  %75 = load float, ptr %74, align 4, !tbaa !9
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  %77 = getelementptr inbounds float, ptr %76, i64 1
  %78 = load float, ptr %77, align 4, !tbaa !9
  %79 = fsub float %75, %78
  store float %79, ptr %26, align 4, !tbaa !9
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = getelementptr inbounds float, ptr %80, i64 1
  %82 = load float, ptr %81, align 4, !tbaa !9
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds float, ptr %83, i64 1
  %85 = load float, ptr %84, align 4, !tbaa !9
  %86 = fsub float %82, %85
  store float %86, ptr %27, align 4, !tbaa !9
  %87 = load float, ptr %18, align 4, !tbaa !9
  %88 = load float, ptr %21, align 4, !tbaa !9
  %89 = fsub float %87, %88
  store float %89, ptr %28, align 4, !tbaa !9
  %90 = load float, ptr %19, align 4, !tbaa !9
  %91 = load float, ptr %21, align 4, !tbaa !9
  %92 = fsub float %90, %91
  store float %92, ptr %29, align 4, !tbaa !9
  %93 = load float, ptr %20, align 4, !tbaa !9
  %94 = load float, ptr %21, align 4, !tbaa !9
  %95 = fsub float %93, %94
  store float %95, ptr %30, align 4, !tbaa !9
  %96 = load float, ptr %23, align 4, !tbaa !9
  %97 = load float, ptr %27, align 4, !tbaa !9
  %98 = fmul float %96, %97
  store float %98, ptr %31, align 4, !tbaa !9
  %99 = load float, ptr %24, align 4, !tbaa !9
  %100 = load float, ptr %26, align 4, !tbaa !9
  %101 = fmul float %99, %100
  store float %101, ptr %32, align 4, !tbaa !9
  %102 = load float, ptr %24, align 4, !tbaa !9
  %103 = load float, ptr %25, align 4, !tbaa !9
  %104 = fmul float %102, %103
  store float %104, ptr %33, align 4, !tbaa !9
  %105 = load float, ptr %22, align 4, !tbaa !9
  %106 = load float, ptr %27, align 4, !tbaa !9
  %107 = fmul float %105, %106
  store float %107, ptr %34, align 4, !tbaa !9
  %108 = load float, ptr %22, align 4, !tbaa !9
  %109 = load float, ptr %26, align 4, !tbaa !9
  %110 = fmul float %108, %109
  store float %110, ptr %35, align 4, !tbaa !9
  %111 = load float, ptr %23, align 4, !tbaa !9
  %112 = load float, ptr %25, align 4, !tbaa !9
  %113 = fmul float %111, %112
  store float %113, ptr %36, align 4, !tbaa !9
  %114 = load float, ptr %28, align 4, !tbaa !9
  %115 = load float, ptr %31, align 4, !tbaa !9
  %116 = load float, ptr %32, align 4, !tbaa !9
  %117 = fsub float %115, %116
  %118 = load float, ptr %29, align 4, !tbaa !9
  %119 = load float, ptr %33, align 4, !tbaa !9
  %120 = load float, ptr %34, align 4, !tbaa !9
  %121 = fsub float %119, %120
  %122 = fmul float %118, %121
  %123 = call float @llvm.fmuladd.f32(float %114, float %117, float %122)
  %124 = load float, ptr %30, align 4, !tbaa !9
  %125 = load float, ptr %35, align 4, !tbaa !9
  %126 = load float, ptr %36, align 4, !tbaa !9
  %127 = fsub float %125, %126
  %128 = call float @llvm.fmuladd.f32(float %124, float %127, float %123)
  store float %128, ptr %37, align 4, !tbaa !9
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.behavior, ptr %129, i32 0, i32 21
  %131 = load i32, ptr %130, align 4, !tbaa !17
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %135

133:                                              ; preds = %10
  %134 = load float, ptr %37, align 4, !tbaa !9
  store float %134, ptr %11, align 4
  store i32 1, ptr %40, align 4
  br label %256

135:                                              ; preds = %10
  %136 = load float, ptr %31, align 4, !tbaa !9
  %137 = fpext float %136 to double
  %138 = fcmp oge double %137, 0.000000e+00
  br i1 %138, label %139, label %141

139:                                              ; preds = %135
  %140 = load float, ptr %31, align 4, !tbaa !9
  br label %144

141:                                              ; preds = %135
  %142 = load float, ptr %31, align 4, !tbaa !9
  %143 = fneg float %142
  br label %144

144:                                              ; preds = %141, %139
  %145 = phi float [ %140, %139 ], [ %143, %141 ]
  %146 = load float, ptr %32, align 4, !tbaa !9
  %147 = fpext float %146 to double
  %148 = fcmp oge double %147, 0.000000e+00
  br i1 %148, label %149, label %151

149:                                              ; preds = %144
  %150 = load float, ptr %32, align 4, !tbaa !9
  br label %154

151:                                              ; preds = %144
  %152 = load float, ptr %32, align 4, !tbaa !9
  %153 = fneg float %152
  br label %154

154:                                              ; preds = %151, %149
  %155 = phi float [ %150, %149 ], [ %153, %151 ]
  %156 = fadd float %145, %155
  %157 = load float, ptr %28, align 4, !tbaa !9
  %158 = fpext float %157 to double
  %159 = fcmp oge double %158, 0.000000e+00
  br i1 %159, label %160, label %162

160:                                              ; preds = %154
  %161 = load float, ptr %28, align 4, !tbaa !9
  br label %165

162:                                              ; preds = %154
  %163 = load float, ptr %28, align 4, !tbaa !9
  %164 = fneg float %163
  br label %165

165:                                              ; preds = %162, %160
  %166 = phi float [ %161, %160 ], [ %164, %162 ]
  %167 = load float, ptr %33, align 4, !tbaa !9
  %168 = fpext float %167 to double
  %169 = fcmp oge double %168, 0.000000e+00
  br i1 %169, label %170, label %172

170:                                              ; preds = %165
  %171 = load float, ptr %33, align 4, !tbaa !9
  br label %175

172:                                              ; preds = %165
  %173 = load float, ptr %33, align 4, !tbaa !9
  %174 = fneg float %173
  br label %175

175:                                              ; preds = %172, %170
  %176 = phi float [ %171, %170 ], [ %174, %172 ]
  %177 = load float, ptr %34, align 4, !tbaa !9
  %178 = fpext float %177 to double
  %179 = fcmp oge double %178, 0.000000e+00
  br i1 %179, label %180, label %182

180:                                              ; preds = %175
  %181 = load float, ptr %34, align 4, !tbaa !9
  br label %185

182:                                              ; preds = %175
  %183 = load float, ptr %34, align 4, !tbaa !9
  %184 = fneg float %183
  br label %185

185:                                              ; preds = %182, %180
  %186 = phi float [ %181, %180 ], [ %184, %182 ]
  %187 = fadd float %176, %186
  %188 = load float, ptr %29, align 4, !tbaa !9
  %189 = fpext float %188 to double
  %190 = fcmp oge double %189, 0.000000e+00
  br i1 %190, label %191, label %193

191:                                              ; preds = %185
  %192 = load float, ptr %29, align 4, !tbaa !9
  br label %196

193:                                              ; preds = %185
  %194 = load float, ptr %29, align 4, !tbaa !9
  %195 = fneg float %194
  br label %196

196:                                              ; preds = %193, %191
  %197 = phi float [ %192, %191 ], [ %195, %193 ]
  %198 = fmul float %187, %197
  %199 = call float @llvm.fmuladd.f32(float %156, float %166, float %198)
  %200 = load float, ptr %35, align 4, !tbaa !9
  %201 = fpext float %200 to double
  %202 = fcmp oge double %201, 0.000000e+00
  br i1 %202, label %203, label %205

203:                                              ; preds = %196
  %204 = load float, ptr %35, align 4, !tbaa !9
  br label %208

205:                                              ; preds = %196
  %206 = load float, ptr %35, align 4, !tbaa !9
  %207 = fneg float %206
  br label %208

208:                                              ; preds = %205, %203
  %209 = phi float [ %204, %203 ], [ %207, %205 ]
  %210 = load float, ptr %36, align 4, !tbaa !9
  %211 = fpext float %210 to double
  %212 = fcmp oge double %211, 0.000000e+00
  br i1 %212, label %213, label %215

213:                                              ; preds = %208
  %214 = load float, ptr %36, align 4, !tbaa !9
  br label %218

215:                                              ; preds = %208
  %216 = load float, ptr %36, align 4, !tbaa !9
  %217 = fneg float %216
  br label %218

218:                                              ; preds = %215, %213
  %219 = phi float [ %214, %213 ], [ %217, %215 ]
  %220 = fadd float %209, %219
  %221 = load float, ptr %30, align 4, !tbaa !9
  %222 = fpext float %221 to double
  %223 = fcmp oge double %222, 0.000000e+00
  br i1 %223, label %224, label %226

224:                                              ; preds = %218
  %225 = load float, ptr %30, align 4, !tbaa !9
  br label %229

226:                                              ; preds = %218
  %227 = load float, ptr %30, align 4, !tbaa !9
  %228 = fneg float %227
  br label %229

229:                                              ; preds = %226, %224
  %230 = phi float [ %225, %224 ], [ %228, %226 ]
  %231 = call float @llvm.fmuladd.f32(float %220, float %230, float %199)
  store float %231, ptr %38, align 4, !tbaa !9
  %232 = load float, ptr @o3derrboundA, align 4, !tbaa !9
  %233 = load float, ptr %38, align 4, !tbaa !9
  %234 = fmul float %232, %233
  store float %234, ptr %39, align 4, !tbaa !9
  %235 = load float, ptr %37, align 4, !tbaa !9
  %236 = load float, ptr %39, align 4, !tbaa !9
  %237 = fcmp ogt float %235, %236
  br i1 %237, label %243, label %238

238:                                              ; preds = %229
  %239 = load float, ptr %37, align 4, !tbaa !9
  %240 = fneg float %239
  %241 = load float, ptr %39, align 4, !tbaa !9
  %242 = fcmp ogt float %240, %241
  br i1 %242, label %243, label %245

243:                                              ; preds = %238, %229
  %244 = load float, ptr %37, align 4, !tbaa !9
  store float %244, ptr %11, align 4
  store i32 1, ptr %40, align 4
  br label %256

245:                                              ; preds = %238
  %246 = load ptr, ptr %14, align 8, !tbaa !5
  %247 = load ptr, ptr %15, align 8, !tbaa !5
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  %249 = load ptr, ptr %17, align 8, !tbaa !5
  %250 = load float, ptr %18, align 4, !tbaa !9
  %251 = load float, ptr %19, align 4, !tbaa !9
  %252 = load float, ptr %20, align 4, !tbaa !9
  %253 = load float, ptr %21, align 4, !tbaa !9
  %254 = load float, ptr %38, align 4, !tbaa !9
  %255 = call float @orient3dadapt(ptr noundef %246, ptr noundef %247, ptr noundef %248, ptr noundef %249, float noundef %250, float noundef %251, float noundef %252, float noundef %253, float noundef %254)
  store float %255, ptr %11, align 4
  store i32 1, ptr %40, align 4
  br label %256

256:                                              ; preds = %245, %243, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  %257 = load float, ptr %11, align 4
  ret float %257
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !15, i64 82784}
!12 = !{!"mesh", !13, i64 0, !13, i64 88, !13, i64 176, !13, i64 264, !13, i64 352, !13, i64 440, !13, i64 528, !13, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !14, i64 82624, !6, i64 82632, !10, i64 82640, !10, i64 82644, !10, i64 82648, !10, i64 82652, !10, i64 82656, !14, i64 82660, !14, i64 82664, !14, i64 82668, !14, i64 82672, !14, i64 82676, !14, i64 82680, !15, i64 82688, !14, i64 82696, !14, i64 82700, !14, i64 82704, !15, i64 82712, !14, i64 82720, !14, i64 82724, !14, i64 82728, !14, i64 82732, !14, i64 82736, !14, i64 82740, !14, i64 82744, !14, i64 82748, !14, i64 82752, !15, i64 82760, !15, i64 82768, !15, i64 82776, !15, i64 82784, !15, i64 82792, !15, i64 82800, !15, i64 82808, !6, i64 82816, !6, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !16, i64 82872}
!13 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !15, i64 64, !15, i64 72, !14, i64 80, !14, i64 84}
!14 = !{!"int", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"otri", !6, i64 0, !14, i64 8}
!17 = !{!18, !14, i64 84}
!18 = !{!"behavior", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}


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

@o3derrboundA = external dso_local local_unnamed_addr global float, align 4

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

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

; Function Attrs: nounwind uwtable
define dso_local float @orient3d(ptr nocapture noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, float noundef %6, float noundef %7, float noundef %8, float noundef %9) local_unnamed_addr #1 {
  %11 = getelementptr inbounds i8, ptr %0, i64 82784
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %13 = add nsw i64 %12, 1
  store i64 %13, ptr %11, align 8, !tbaa !5
  %14 = fsub float %6, %9
  %15 = fsub float %7, %9
  %16 = fsub float %8, %9
  %17 = load <2 x float>, ptr %5, align 4, !tbaa !15
  %18 = load <2 x float>, ptr %2, align 4, !tbaa !15
  %19 = fsub <2 x float> %18, %17
  %20 = load <2 x float>, ptr %3, align 4, !tbaa !15
  %21 = fsub <2 x float> %20, %17
  %22 = shufflevector <2 x float> %21, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %23 = load <2 x float>, ptr %4, align 4, !tbaa !15
  %24 = fsub <2 x float> %23, %17
  %25 = fmul <2 x float> %22, %24
  %26 = shufflevector <2 x float> %19, <2 x float> poison, <2 x i32> <i32 1, i32 0>
  %27 = fmul <2 x float> %26, %24
  %28 = fmul <2 x float> %22, %19
  %shift = shufflevector <2 x float> %25, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %29 = fsub <2 x float> %shift, %25
  %30 = extractelement <2 x float> %29, i64 0
  %shift88 = shufflevector <2 x float> %27, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %31 = fsub <2 x float> %27, %shift88
  %32 = extractelement <2 x float> %31, i64 0
  %33 = fmul float %15, %32
  %34 = tail call float @llvm.fmuladd.f32(float %14, float %30, float %33)
  %shift89 = shufflevector <2 x float> %28, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %35 = fsub <2 x float> %28, %shift89
  %36 = extractelement <2 x float> %35, i64 0
  %37 = tail call float @llvm.fmuladd.f32(float %16, float %36, float %34)
  %38 = getelementptr inbounds i8, ptr %1, i64 84
  %39 = load i32, ptr %38, align 4, !tbaa !16
  %.not = icmp eq i32 %39, 0
  br i1 %.not, label %40, label %75

40:                                               ; preds = %10
  %41 = fcmp oge <2 x float> %25, zeroinitializer
  %42 = fneg <2 x float> %25
  %43 = select <2 x i1> %41, <2 x float> %25, <2 x float> %42
  %shift90 = shufflevector <2 x float> %43, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %44 = fadd <2 x float> %43, %shift90
  %45 = extractelement <2 x float> %44, i64 0
  %46 = fcmp oge float %14, 0.000000e+00
  %47 = fneg float %14
  %48 = select i1 %46, float %14, float %47
  %49 = fcmp oge <2 x float> %27, zeroinitializer
  %50 = fneg <2 x float> %27
  %51 = select <2 x i1> %49, <2 x float> %27, <2 x float> %50
  %shift91 = shufflevector <2 x float> %51, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %52 = fadd <2 x float> %51, %shift91
  %53 = extractelement <2 x float> %52, i64 0
  %54 = fcmp oge float %15, 0.000000e+00
  %55 = fneg float %15
  %56 = select i1 %54, float %15, float %55
  %57 = fmul float %56, %53
  %58 = tail call float @llvm.fmuladd.f32(float %45, float %48, float %57)
  %59 = fcmp oge <2 x float> %28, zeroinitializer
  %60 = fneg <2 x float> %28
  %61 = select <2 x i1> %59, <2 x float> %28, <2 x float> %60
  %shift92 = shufflevector <2 x float> %61, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %62 = fadd <2 x float> %shift92, %61
  %63 = extractelement <2 x float> %62, i64 0
  %64 = fcmp oge float %16, 0.000000e+00
  %65 = fneg float %16
  %66 = select i1 %64, float %16, float %65
  %67 = tail call float @llvm.fmuladd.f32(float %63, float %66, float %58)
  %68 = load float, ptr @o3derrboundA, align 4, !tbaa !15
  %69 = fmul float %67, %68
  %70 = fcmp ogt float %37, %69
  %71 = fneg float %37
  %72 = fcmp olt float %69, %71
  %or.cond = or i1 %70, %72
  br i1 %or.cond, label %75, label %73

73:                                               ; preds = %40
  %74 = tail call float @orient3dadapt(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5, float noundef %6, float noundef %7, float noundef %8, float noundef %9, float noundef %67)
  br label %75

75:                                               ; preds = %40, %10, %73
  %.0 = phi float [ %74, %73 ], [ %37, %10 ], [ %37, %40 ]
  ret float %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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" }

!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, !12, i64 82784}
!6 = !{!"mesh", !7, i64 0, !7, i64 88, !7, i64 176, !7, i64 264, !7, i64 352, !7, i64 440, !7, i64 528, !7, i64 616, !9, i64 704, !9, i64 33472, !9, i64 66240, !11, i64 82624, !8, i64 82632, !13, i64 82640, !13, i64 82644, !13, i64 82648, !13, i64 82652, !13, i64 82656, !11, i64 82660, !11, i64 82664, !11, i64 82668, !11, i64 82672, !11, i64 82676, !11, i64 82680, !12, i64 82688, !11, i64 82696, !11, i64 82700, !11, i64 82704, !12, i64 82712, !11, i64 82720, !11, i64 82724, !11, i64 82728, !11, i64 82732, !11, i64 82736, !11, i64 82740, !11, i64 82744, !11, i64 82748, !11, i64 82752, !12, i64 82760, !12, i64 82768, !12, i64 82776, !12, i64 82784, !12, i64 82792, !12, i64 82800, !12, i64 82808, !8, i64 82816, !8, i64 82824, !8, i64 82832, !8, i64 82840, !8, i64 82848, !8, i64 82856, !8, i64 82864, !14, i64 82872}
!7 = !{!"memorypool", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !12, i64 64, !12, i64 72, !11, i64 80, !11, i64 84}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"long", !9, i64 0}
!13 = !{!"float", !9, i64 0}
!14 = !{!"otri", !8, i64 0, !11, i64 8}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !11, i64 84}
!17 = !{!"behavior", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148}


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