; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (io_r)

; 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.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }
%struct.qhT = type { i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [29 x i32], i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, double, i32, ptr, ptr, i32, i32, i32, i32, i32, ptr, i32, ptr, i32, [256 x i8], i32, [256 x i8], [512 x i8], i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, double, double, double, double, i32, [6 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], [1 x %struct.__jmp_buf_tag], [40 x i8], ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32, ptr, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, i32, i32, double, double, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, ptr, double, double, double, double, i32, i32, i32, i32, i32, i32, ptr, i32, i32, [1 x %struct.__jmp_buf_tag], [40 x i8], i32, double, ptr, ptr, ptr, %struct.qhmemT, %struct.qhstatT }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.qhmemT = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.qhstatT = type { [249 x %union.intrealT], [259 x i8], [249 x ptr], [249 x i16], [249 x i8], [249 x i8], [9 x %union.intrealT], i32, i32, i32, i32, double }
%union.intrealT = type { double }
%struct.vertexT = type { ptr, ptr, ptr, ptr, i32, i32, i8 }

@.str.76 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @qh_setsize(ptr noundef, ptr noundef) #1

declare void @qh_fprintf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

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

declare ptr @qh_settemp(ptr noundef, i32 noundef) #1

declare void @qh_setappend(ptr noundef, ptr noundef, ptr noundef) #1

declare void @qh_settempfree(ptr noundef, ptr noundef) #1

declare void @qh_distplane(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare ptr @qh_projectpoint(ptr noundef, ptr noundef, ptr noundef, double noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_printfacet3math(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %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 i32, align 4
  %18 = alloca double, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 1, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %24, ptr noundef %25, i32 noundef 9105, ptr noundef @.str.76)
  br label %26

26:                                               ; preds = %23, %5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = call ptr @qh_facet3vertex(ptr noundef %27, ptr noundef %28)
  store ptr %29, ptr %14, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  %33 = call i32 @qh_setsize(ptr noundef %31, ptr noundef %32)
  %34 = call ptr @qh_settemp(ptr noundef %30, i32 noundef %33)
  store ptr %34, ptr %13, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %68

37:                                               ; preds = %26
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.setT, ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds [1 x %union.setelemT], ptr %39, i64 0, i64 0
  store ptr %40, ptr %12, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %46, %37
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = getelementptr inbounds ptr, ptr %42, i32 1
  store ptr %43, ptr %12, align 8, !tbaa !5
  %44 = load ptr, ptr %42, align 8, !tbaa !5
  store ptr %44, ptr %11, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %67

46:                                               ; preds = %41
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.qhT, ptr %47, i32 0, i32 258
  %49 = getelementptr inbounds %struct.qhstatT, ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds [249 x %union.intrealT], ptr %49, i64 0, i64 60
  %51 = load i32, ptr %50, align 8, !tbaa !11
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %50, align 8, !tbaa !11
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load ptr, ptr %11, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.vertexT, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !12
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  call void @qh_distplane(ptr noundef %53, ptr noundef %56, ptr noundef %57, ptr noundef %18)
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.vertexT, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !12
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load double, ptr %18, align 8, !tbaa !14
  %64 = call ptr @qh_projectpoint(ptr noundef %58, ptr noundef %61, ptr noundef %62, double noundef %63)
  store ptr %64, ptr %15, align 8, !tbaa !5
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  call void @qh_setappend(ptr noundef %65, ptr noundef %13, ptr noundef %66)
  br label %41, !llvm.loop !16

67:                                               ; preds = %41
  br label %68

68:                                               ; preds = %67, %26
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = icmp eq i32 %69, 13
  br i1 %70, label %71, label %74

71:                                               ; preds = %68
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %72, ptr noundef %73, i32 noundef 9106, ptr noundef @.str.77)
  store ptr @.str.78, ptr %19, align 8, !tbaa !5
  store ptr @.str.79, ptr %20, align 8, !tbaa !5
  br label %77

74:                                               ; preds = %68
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %75, ptr noundef %76, i32 noundef 9107, ptr noundef @.str.80)
  store ptr @.str.81, ptr %19, align 8, !tbaa !5
  store ptr @.str.82, ptr %20, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %74, %71
  store ptr null, ptr %15, align 8, !tbaa !5
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %110

80:                                               ; preds = %77
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.setT, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds [1 x %union.setelemT], ptr %82, i64 0, i64 0
  store ptr %83, ptr %16, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %96, %80
  %85 = load ptr, ptr %16, align 8, !tbaa !5
  %86 = getelementptr inbounds ptr, ptr %85, i32 1
  store ptr %86, ptr %16, align 8, !tbaa !5
  %87 = load ptr, ptr %85, align 8, !tbaa !5
  store ptr %87, ptr %15, align 8, !tbaa !5
  %88 = icmp ne ptr %87, null
  br i1 %88, label %89, label %109

89:                                               ; preds = %84
  %90 = load i32, ptr %17, align 4, !tbaa !9
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %89
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %96

93:                                               ; preds = %89
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %94, ptr noundef %95, i32 noundef 9108, ptr noundef @.str.76)
  br label %96

96:                                               ; preds = %93, %92
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = getelementptr inbounds double, ptr %100, i64 0
  %102 = load double, ptr %101, align 8, !tbaa !14
  %103 = load ptr, ptr %15, align 8, !tbaa !5
  %104 = getelementptr inbounds double, ptr %103, i64 1
  %105 = load double, ptr %104, align 8, !tbaa !14
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = getelementptr inbounds double, ptr %106, i64 2
  %108 = load double, ptr %107, align 8, !tbaa !14
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %97, ptr noundef %98, i32 noundef 9109, ptr noundef %99, double noundef %102, double noundef %105, double noundef %108)
  br label %84, !llvm.loop !18

109:                                              ; preds = %84
  br label %110

110:                                              ; preds = %109, %77
  store ptr null, ptr %15, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %129

113:                                              ; preds = %110
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.setT, ptr %114, i32 0, i32 1
  %116 = getelementptr inbounds [1 x %union.setelemT], ptr %115, i64 0, i64 0
  store ptr %116, ptr %16, align 8, !tbaa !5
  br label %117

117:                                              ; preds = %122, %113
  %118 = load ptr, ptr %16, align 8, !tbaa !5
  %119 = getelementptr inbounds ptr, ptr %118, i32 1
  store ptr %119, ptr %16, align 8, !tbaa !5
  %120 = load ptr, ptr %118, align 8, !tbaa !5
  store ptr %120, ptr %15, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %128

122:                                              ; preds = %117
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.qhT, ptr %125, i32 0, i32 160
  %127 = load i32, ptr %126, align 8, !tbaa !19
  call void @qh_memfree(ptr noundef %123, ptr noundef %124, i32 noundef %127)
  br label %117, !llvm.loop !24

128:                                              ; preds = %117
  br label %129

129:                                              ; preds = %128, %110
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_settempfree(ptr noundef %130, ptr noundef %13)
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_settempfree(ptr noundef %131, ptr noundef %14)
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = load ptr, ptr %20, align 8, !tbaa !5
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %132, ptr noundef %133, i32 noundef 9110, ptr noundef @.str.83, ptr noundef %134)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  ret void
}

declare void @qh_memfree(ptr noundef, ptr noundef, i32 noundef) #1

declare ptr @qh_facet3vertex(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40, !10, i64 40}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !10, i64 2440}
!20 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !15, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !15, i64 64, !15, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !6, i64 104, !10, i64 112, !10, i64 116, !6, i64 120, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !15, i64 160, !15, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !15, i64 192, !15, i64 200, !10, i64 208, !10, i64 212, !15, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !10, i64 280, !10, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !7, i64 300, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !15, i64 448, !15, i64 456, !15, i64 464, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !10, i64 512, !10, i64 516, !10, i64 520, !10, i64 524, !10, i64 528, !10, i64 532, !10, i64 536, !10, i64 540, !10, i64 544, !15, i64 552, !10, i64 560, !10, i64 564, !10, i64 568, !10, i64 572, !10, i64 576, !10, i64 580, !10, i64 584, !10, i64 588, !15, i64 592, !10, i64 600, !6, i64 608, !6, i64 616, !10, i64 624, !10, i64 628, !10, i64 632, !10, i64 636, !10, i64 640, !6, i64 648, !10, i64 656, !6, i64 664, !10, i64 672, !7, i64 676, !10, i64 932, !7, i64 936, !7, i64 1192, !10, i64 1704, !10, i64 1708, !10, i64 1712, !10, i64 1716, !10, i64 1720, !10, i64 1724, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !15, i64 1760, !15, i64 1768, !15, i64 1776, !15, i64 1784, !15, i64 1792, !15, i64 1800, !15, i64 1808, !15, i64 1816, !15, i64 1824, !15, i64 1832, !15, i64 1840, !15, i64 1848, !15, i64 1856, !15, i64 1864, !6, i64 1872, !15, i64 1880, !15, i64 1888, !15, i64 1896, !15, i64 1904, !10, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !6, i64 2408, !6, i64 2416, !6, i64 2424, !6, i64 2432, !10, i64 2440, !10, i64 2444, !10, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !10, i64 2496, !10, i64 2500, !6, i64 2504, !10, i64 2512, !6, i64 2520, !10, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !10, i64 2568, !10, i64 2572, !10, i64 2576, !10, i64 2580, !10, i64 2584, !10, i64 2588, !10, i64 2592, !10, i64 2596, !21, i64 2600, !10, i64 2608, !10, i64 2612, !10, i64 2616, !10, i64 2620, !10, i64 2624, !6, i64 2632, !6, i64 2640, !10, i64 2648, !10, i64 2652, !10, i64 2656, !15, i64 2664, !10, i64 2672, !15, i64 2680, !15, i64 2688, !15, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !15, i64 2728, !15, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !15, i64 2768, !15, i64 2776, !10, i64 2784, !10, i64 2788, !10, i64 2792, !10, i64 2796, !6, i64 2800, !6, i64 2808, !6, i64 2816, !6, i64 2824, !6, i64 2832, !6, i64 2840, !6, i64 2848, !6, i64 2856, !6, i64 2864, !10, i64 2872, !6, i64 2880, !6, i64 2888, !10, i64 2896, !10, i64 2900, !10, i64 2904, !6, i64 2912, !15, i64 2920, !15, i64 2928, !15, i64 2936, !15, i64 2944, !10, i64 2952, !10, i64 2956, !10, i64 2960, !10, i64 2964, !10, i64 2968, !10, i64 2972, !6, i64 2976, !10, i64 2984, !10, i64 2988, !7, i64 2992, !7, i64 3192, !10, i64 3232, !15, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !22, i64 3272, !23, i64 3424}
!21 = !{!"long", !7, i64 0}
!22 = !{!"qhmemT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144}
!23 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !10, i64 5320, !10, i64 5324, !10, i64 5328, !10, i64 5332, !15, i64 5336}
!24 = distinct !{!24, !17}


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

@.str.76 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @qh_setsize(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_fprintf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

declare ptr @qh_settemp(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @qh_setappend(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_settempfree(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @qh_distplane(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @qh_projectpoint(ptr noundef, ptr noundef, ptr noundef, double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_printfacet3math(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %10, label %9

9:                                                ; preds = %5
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9105, ptr noundef nonnull @.str.76) #3
  br label %10

10:                                               ; preds = %9, %5
  %11 = tail call ptr @qh_facet3vertex(ptr noundef %0, ptr noundef %2) #3
  store ptr %11, ptr %7, align 8, !tbaa !5
  %12 = tail call i32 @qh_setsize(ptr noundef %0, ptr noundef %11) #3
  %13 = tail call ptr @qh_settemp(ptr noundef %0, i32 noundef %12) #3
  store ptr %13, ptr %6, align 8, !tbaa !5
  %.not51 = icmp eq ptr %11, null
  br i1 %.not51, label %.loopexit, label %.preheader62

.preheader62:                                     ; preds = %10
  %.04463 = getelementptr inbounds i8, ptr %11, i64 8
  %14 = load ptr, ptr %.04463, align 8, !tbaa !5
  %.not5264 = icmp eq ptr %14, null
  br i1 %.not5264, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader62
  %15 = getelementptr inbounds i8, ptr %0, i64 3904
  br label %16

16:                                               ; preds = %.lr.ph, %16
  %17 = phi ptr [ %14, %.lr.ph ], [ %25, %16 ]
  %.04465 = phi ptr [ %.04463, %.lr.ph ], [ %.044, %16 ]
  %18 = load i32, ptr %15, align 8, !tbaa !9
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %15, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %17, i64 16
  %21 = load ptr, ptr %20, align 8, !tbaa !10
  call void @qh_distplane(ptr noundef %0, ptr noundef %21, ptr noundef %2, ptr noundef nonnull %8) #3
  %22 = load ptr, ptr %20, align 8, !tbaa !10
  %23 = load double, ptr %8, align 8, !tbaa !13
  %24 = call ptr @qh_projectpoint(ptr noundef %0, ptr noundef %22, ptr noundef %2, double noundef %23) #3
  call void @qh_setappend(ptr noundef %0, ptr noundef nonnull %6, ptr noundef %24) #3
  %.044 = getelementptr inbounds i8, ptr %.04465, i64 8
  %25 = load ptr, ptr %.044, align 8, !tbaa !5
  %.not52 = icmp eq ptr %25, null
  br i1 %.not52, label %.loopexit, label %16, !llvm.loop !15

.loopexit:                                        ; preds = %16, %.preheader62, %10
  %26 = icmp eq i32 %3, 13
  br i1 %26, label %27, label %28

27:                                               ; preds = %.loopexit
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9106, ptr noundef nonnull @.str.77) #3
  br label %29

28:                                               ; preds = %.loopexit
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9107, ptr noundef nonnull @.str.80) #3
  br label %29

29:                                               ; preds = %28, %27
  %.040 = phi ptr [ @.str.78, %27 ], [ @.str.81, %28 ]
  %.0 = phi ptr [ @.str.79, %27 ], [ @.str.82, %28 ]
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %.not53 = icmp eq ptr %30, null
  br i1 %.not53, label %.thread, label %.preheader61

.preheader61:                                     ; preds = %29
  %.04266 = getelementptr inbounds i8, ptr %30, i64 8
  %31 = load ptr, ptr %.04266, align 8, !tbaa !5
  %.not5567 = icmp eq ptr %31, null
  br i1 %.not5567, label %.preheader, label %.lr.ph70.preheader._crit_edge

.lr.ph70.preheader._crit_edge:                    ; preds = %.preheader61
  %.phi.trans.insert77 = getelementptr inbounds i8, ptr %31, i64 16
  %.pre78 = load double, ptr %.phi.trans.insert77, align 8, !tbaa !13
  %.phi.trans.insert = getelementptr inbounds i8, ptr %31, i64 8
  %.pre76 = load double, ptr %.phi.trans.insert, align 8, !tbaa !13
  %.pre = load double, ptr %31, align 8, !tbaa !13
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9109, ptr noundef nonnull %.040, double noundef %.pre, double noundef %.pre76, double noundef %.pre78) #3
  %.042.peel = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load ptr, ptr %.042.peel, align 8, !tbaa !5
  %.not55.peel = icmp eq ptr %32, null
  br i1 %.not55.peel, label %._crit_edge, label %.lr.ph70.peel.next

.lr.ph70.peel.next:                               ; preds = %.lr.ph70.preheader._crit_edge, %.lr.ph70.peel.next
  %33 = phi ptr [ %39, %.lr.ph70.peel.next ], [ %32, %.lr.ph70.preheader._crit_edge ]
  %.04269 = phi ptr [ %.042, %.lr.ph70.peel.next ], [ %.042.peel, %.lr.ph70.preheader._crit_edge ]
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9108, ptr noundef nonnull @.str.76) #3
  %34 = load double, ptr %33, align 8, !tbaa !13
  %35 = getelementptr inbounds i8, ptr %33, i64 8
  %36 = load double, ptr %35, align 8, !tbaa !13
  %37 = getelementptr inbounds i8, ptr %33, i64 16
  %38 = load double, ptr %37, align 8, !tbaa !13
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9109, ptr noundef nonnull %.040, double noundef %34, double noundef %36, double noundef %38) #3
  %.042 = getelementptr inbounds i8, ptr %.04269, i64 8
  %39 = load ptr, ptr %.042, align 8, !tbaa !5
  %.not55 = icmp eq ptr %39, null
  br i1 %.not55, label %._crit_edge, label %.lr.ph70.peel.next, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph70.peel.next, %.lr.ph70.preheader._crit_edge
  %.pr.pre = load ptr, ptr %6, align 8, !tbaa !5
  %.not56 = icmp eq ptr %.pr.pre, null
  br i1 %.not56, label %.thread, label %.preheader

.preheader:                                       ; preds = %.preheader61, %._crit_edge
  %.pr82 = phi ptr [ %.pr.pre, %._crit_edge ], [ %30, %.preheader61 ]
  %.14371 = getelementptr inbounds i8, ptr %.pr82, i64 8
  %40 = load ptr, ptr %.14371, align 8, !tbaa !5
  %.not5872 = icmp eq ptr %40, null
  br i1 %.not5872, label %.thread, label %.lr.ph74

.lr.ph74:                                         ; preds = %.preheader
  %41 = getelementptr inbounds i8, ptr %0, i64 2440
  br label %42

42:                                               ; preds = %.lr.ph74, %42
  %43 = phi ptr [ %40, %.lr.ph74 ], [ %45, %42 ]
  %.14373 = phi ptr [ %.14371, %.lr.ph74 ], [ %.143, %42 ]
  %44 = load i32, ptr %41, align 8, !tbaa !19
  call void @qh_memfree(ptr noundef %0, ptr noundef nonnull %43, i32 noundef %44) #3
  %.143 = getelementptr inbounds i8, ptr %.14373, i64 8
  %45 = load ptr, ptr %.143, align 8, !tbaa !5
  %.not58 = icmp eq ptr %45, null
  br i1 %.not58, label %.thread, label %42, !llvm.loop !24

.thread:                                          ; preds = %42, %.preheader, %29, %._crit_edge
  call void @qh_settempfree(ptr noundef %0, ptr noundef nonnull %6) #3
  call void @qh_settempfree(ptr noundef %0, ptr noundef nonnull %7) #3
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %1, i32 noundef 9110, ptr noundef nonnull @.str.83, ptr noundef nonnull %.0) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  ret void
}

declare void @qh_memfree(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @qh_facet3vertex(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 16}
!11 = !{!"vertexT", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 40, !12, i64 40, !12, i64 40, !12, i64 40, !12, i64 40}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16, !18}
!18 = !{!"llvm.loop.peeled.count", i32 1}
!19 = !{!20, !12, i64 2440}
!20 = !{!"qhT", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !14, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !14, i64 64, !14, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !6, i64 104, !12, i64 112, !12, i64 116, !6, i64 120, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !12, i64 152, !14, i64 160, !14, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !14, i64 192, !14, i64 200, !12, i64 208, !12, i64 212, !14, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236, !12, i64 240, !12, i64 244, !12, i64 248, !12, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !12, i64 280, !12, i64 284, !12, i64 288, !12, i64 292, !12, i64 296, !7, i64 300, !12, i64 416, !12, i64 420, !12, i64 424, !12, i64 428, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !14, i64 448, !14, i64 456, !14, i64 464, !12, i64 472, !12, i64 476, !12, i64 480, !12, i64 484, !12, i64 488, !12, i64 492, !12, i64 496, !12, i64 500, !12, i64 504, !12, i64 508, !12, i64 512, !12, i64 516, !12, i64 520, !12, i64 524, !12, i64 528, !12, i64 532, !12, i64 536, !12, i64 540, !12, i64 544, !14, i64 552, !12, i64 560, !12, i64 564, !12, i64 568, !12, i64 572, !12, i64 576, !12, i64 580, !12, i64 584, !12, i64 588, !14, i64 592, !12, i64 600, !6, i64 608, !6, i64 616, !12, i64 624, !12, i64 628, !12, i64 632, !12, i64 636, !12, i64 640, !6, i64 648, !12, i64 656, !6, i64 664, !12, i64 672, !7, i64 676, !12, i64 932, !7, i64 936, !7, i64 1192, !12, i64 1704, !12, i64 1708, !12, i64 1712, !12, i64 1716, !12, i64 1720, !12, i64 1724, !6, i64 1728, !6, i64 1736, !6, i64 1744, !6, i64 1752, !14, i64 1760, !14, i64 1768, !14, i64 1776, !14, i64 1784, !14, i64 1792, !14, i64 1800, !14, i64 1808, !14, i64 1816, !14, i64 1824, !14, i64 1832, !14, i64 1840, !14, i64 1848, !14, i64 1856, !14, i64 1864, !6, i64 1872, !14, i64 1880, !14, i64 1888, !14, i64 1896, !14, i64 1904, !12, i64 1912, !7, i64 1916, !7, i64 1928, !7, i64 2128, !7, i64 2168, !7, i64 2368, !6, i64 2408, !6, i64 2416, !6, i64 2424, !6, i64 2432, !12, i64 2440, !12, i64 2444, !12, i64 2448, !6, i64 2456, !6, i64 2464, !6, i64 2472, !6, i64 2480, !6, i64 2488, !12, i64 2496, !12, i64 2500, !6, i64 2504, !12, i64 2512, !6, i64 2520, !12, i64 2528, !6, i64 2536, !6, i64 2544, !6, i64 2552, !6, i64 2560, !12, i64 2568, !12, i64 2572, !12, i64 2576, !12, i64 2580, !12, i64 2584, !12, i64 2588, !12, i64 2592, !12, i64 2596, !21, i64 2600, !12, i64 2608, !12, i64 2612, !12, i64 2616, !12, i64 2620, !12, i64 2624, !6, i64 2632, !6, i64 2640, !12, i64 2648, !12, i64 2652, !12, i64 2656, !14, i64 2664, !12, i64 2672, !14, i64 2680, !14, i64 2688, !14, i64 2696, !12, i64 2704, !12, i64 2708, !12, i64 2712, !12, i64 2716, !12, i64 2720, !14, i64 2728, !14, i64 2736, !12, i64 2744, !12, i64 2748, !12, i64 2752, !12, i64 2756, !12, i64 2760, !12, i64 2764, !14, i64 2768, !14, i64 2776, !12, i64 2784, !12, i64 2788, !12, i64 2792, !12, i64 2796, !6, i64 2800, !6, i64 2808, !6, i64 2816, !6, i64 2824, !6, i64 2832, !6, i64 2840, !6, i64 2848, !6, i64 2856, !6, i64 2864, !12, i64 2872, !6, i64 2880, !6, i64 2888, !12, i64 2896, !12, i64 2900, !12, i64 2904, !6, i64 2912, !14, i64 2920, !14, i64 2928, !14, i64 2936, !14, i64 2944, !12, i64 2952, !12, i64 2956, !12, i64 2960, !12, i64 2964, !12, i64 2968, !12, i64 2972, !6, i64 2976, !12, i64 2984, !12, i64 2988, !7, i64 2992, !7, i64 3192, !12, i64 3232, !14, i64 3240, !6, i64 3248, !6, i64 3256, !6, i64 3264, !22, i64 3272, !23, i64 3424}
!21 = !{!"long", !7, i64 0}
!22 = !{!"qhmemT", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !12, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144}
!23 = !{!"qhstatT", !7, i64 0, !7, i64 1992, !7, i64 2256, !7, i64 4248, !7, i64 4746, !7, i64 4995, !7, i64 5248, !12, i64 5320, !12, i64 5324, !12, i64 5328, !12, i64 5332, !14, i64 5336}
!24 = distinct !{!24, !16}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass