; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (merge_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.ridgeT = type { ptr, ptr, ptr, i32, i8 }
%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 }
%struct.setT = type { i32, [1 x %union.setelemT] }
%union.setelemT = type { ptr }

@.str.209 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [63 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 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 void @qh_errexit(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

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

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

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

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

23:                                               ; preds = %4
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.qhT, ptr %25, i32 0, i32 158
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.vertexT, ptr %28, i32 0, i32 4
  %30 = load i32, ptr %29, align 8, !tbaa !19
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ridgeT, ptr %31, i32 0, i32 3
  %33 = load i32, ptr %32, align 8, !tbaa !21
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.vertexT, ptr %34, i32 0, i32 4
  %36 = load i32, ptr %35, align 8, !tbaa !19
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %24, ptr noundef %27, i32 noundef 6424, ptr noundef @.str.209, i32 noundef %30, i32 noundef %33, i32 noundef %36)
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_errexit(ptr noundef %37, i32 noundef 5, ptr noundef null, ptr noundef %38)
  br label %39

39:                                               ; preds = %23, %4
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ridgeT, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = call ptr @qh_setdelnthsorted(ptr noundef %40, ptr noundef %43, i32 noundef %44)
  store ptr null, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ridgeT, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %117

50:                                               ; preds = %39
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ridgeT, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct.setT, ptr %53, i32 0, i32 1
  %55 = getelementptr inbounds [1 x %union.setelemT], ptr %54, i64 0, i64 0
  store ptr %55, ptr %14, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %113, %50
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = getelementptr inbounds ptr, ptr %57, i32 1
  store ptr %58, ptr %14, align 8, !tbaa !5
  %59 = load ptr, ptr %57, align 8, !tbaa !5
  store ptr %59, ptr %13, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %116

61:                                               ; preds = %56
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = icmp eq ptr %62, %63
  br i1 %64, label %65, label %104

65:                                               ; preds = %61
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.qhT, ptr %66, i32 0, i32 258
  %68 = getelementptr inbounds %struct.qhstatT, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds [249 x %union.intrealT], ptr %68, i64 0, i64 52
  %70 = load i32, ptr %69, align 8, !tbaa !22
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %69, align 8, !tbaa !22
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.ridgeT, ptr %72, i32 0, i32 4
  %74 = load i8, ptr %73, align 4
  %75 = lshr i8 %74, 2
  %76 = and i8 %75, 1
  %77 = zext i8 %76 to i32
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %82

79:                                               ; preds = %65
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_copynonconvex(ptr noundef %80, ptr noundef %81)
  br label %82

82:                                               ; preds = %79, %65
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.qhT, ptr %83, i32 0, i32 29
  %85 = load i32, ptr %84, align 8, !tbaa !23
  %86 = icmp sge i32 %85, 2
  br i1 %86, label %87, label %101

87:                                               ; preds = %82
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.qhT, ptr %89, i32 0, i32 158
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ridgeT, ptr %92, i32 0, i32 3
  %94 = load i32, ptr %93, align 8, !tbaa !21
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.vertexT, ptr %95, i32 0, i32 4
  %97 = load i32, ptr %96, align 8, !tbaa !19
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.vertexT, ptr %98, i32 0, i32 4
  %100 = load i32, ptr %99, align 8, !tbaa !19
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %88, ptr noundef %91, i32 noundef 2038, ptr noundef @.str.210, i32 noundef %94, i32 noundef %97, i32 noundef %100)
  br label %101

101:                                              ; preds = %87, %82
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  call void @qh_delridge_merge(ptr noundef %102, ptr noundef %103)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %165

104:                                              ; preds = %61
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.vertexT, ptr %105, i32 0, i32 4
  %107 = load i32, ptr %106, align 8, !tbaa !19
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.vertexT, ptr %108, i32 0, i32 4
  %110 = load i32, ptr %109, align 8, !tbaa !19
  %111 = icmp ult i32 %107, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %104
  br label %116

113:                                              ; preds = %104
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %10, align 4, !tbaa !9
  br label %56, !llvm.loop !24

116:                                              ; preds = %112, %56
  br label %117

117:                                              ; preds = %116, %39
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ridgeT, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  call void @qh_setaddnth(ptr noundef %118, ptr noundef %120, i32 noundef %121, ptr noundef %122)
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ridgeT, ptr %123, i32 0, i32 4
  %125 = load i8, ptr %124, align 4
  %126 = and i8 %125, -33
  %127 = or i8 %126, 0
  store i8 %127, ptr %124, align 4
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ridgeT, ptr %128, i32 0, i32 4
  %130 = load i8, ptr %129, align 4
  %131 = and i8 %130, -65
  %132 = or i8 %131, 0
  store i8 %132, ptr %129, align 4
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = load i32, ptr %10, align 4, !tbaa !9
  %135 = sub nsw i32 %133, %134
  %136 = call i32 @llvm.abs.i32(i32 %135, i1 true)
  %137 = srem i32 %136, 2
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %164

139:                                              ; preds = %117
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.qhT, ptr %140, i32 0, i32 29
  %142 = load i32, ptr %141, align 8, !tbaa !23
  %143 = icmp sge i32 %142, 3
  br i1 %143, label %144, label %152

144:                                              ; preds = %139
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.qhT, ptr %146, i32 0, i32 158
  %148 = load ptr, ptr %147, align 8, !tbaa !13
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ridgeT, ptr %149, i32 0, i32 3
  %151 = load i32, ptr %150, align 8, !tbaa !21
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %145, ptr noundef %148, i32 noundef 3010, ptr noundef @.str.211, i32 noundef %151)
  br label %152

152:                                              ; preds = %144, %139
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ridgeT, ptr %153, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !26
  store ptr %155, ptr %12, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ridgeT, ptr %156, i32 0, i32 2
  %158 = load ptr, ptr %157, align 8, !tbaa !27
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.ridgeT, ptr %159, i32 0, i32 1
  store ptr %158, ptr %160, align 8, !tbaa !26
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.ridgeT, ptr %162, i32 0, i32 2
  store ptr %161, ptr %163, align 8, !tbaa !27
  br label %164

164:                                              ; preds = %152, %117
  store i32 1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %165

165:                                              ; preds = %164, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %166 = load i32, ptr %5, align 4
  ret i32 %166
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"ridgeT", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28}
!13 = !{!14, !6, i64 2424}
!14 = !{!"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, !16, 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, !17, i64 3272, !18, i64 3424}
!15 = !{!"double", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"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}
!18 = !{!"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}
!19 = !{!20, !10, i64 32}
!20 = !{!"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}
!21 = !{!12, !10, i64 24}
!22 = !{!7, !7, i64 0}
!23 = !{!14, !10, i64 136}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!12, !6, i64 8}
!27 = !{!12, !6, i64 16}


; 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.209 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.211 = external hidden unnamed_addr constant [63 x i8], align 1

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

declare void @qh_errexit(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @qh_setaddnth(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

declare i32 @qh_setindex(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @qh_renameridgevertex(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = tail call i32 @qh_setindex(ptr noundef %5, ptr noundef %2) #2
  %7 = icmp slt i32 %6, 0
  br i1 %7, label %8, label %17

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 2424
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %2, i64 32
  %12 = load i32, ptr %11, align 8, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %1, i64 24
  %14 = load i32, ptr %13, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %3, i64 32
  %16 = load i32, ptr %15, align 8, !tbaa !17
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %10, i32 noundef 6424, ptr noundef nonnull @.str.209, i32 noundef %12, i32 noundef %14, i32 noundef %16) #2
  tail call void @qh_errexit(ptr noundef %0, i32 noundef 5, ptr noundef null, ptr noundef nonnull %1) #2
  br label %17

17:                                               ; preds = %8, %4
  %18 = load ptr, ptr %1, align 8, !tbaa !5
  %19 = tail call ptr @qh_setdelnthsorted(ptr noundef %0, ptr noundef %18, i32 noundef %6) #2
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  %.not = icmp eq ptr %20, null
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %17
  %.060 = getelementptr inbounds i8, ptr %20, i64 8
  %21 = load ptr, ptr %.060, align 8, !tbaa !20
  %.not5661 = icmp eq ptr %21, null
  br i1 %.not5661, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %22 = getelementptr inbounds i8, ptr %3, i64 32
  br label %23

23:                                               ; preds = %.lr.ph, %52
  %24 = phi ptr [ %21, %.lr.ph ], [ %54, %52 ]
  %.063 = phi ptr [ %.060, %.lr.ph ], [ %.0, %52 ]
  %.05162 = phi i32 [ 0, %.lr.ph ], [ %53, %52 ]
  %25 = icmp eq ptr %24, %3
  br i1 %25, label %26, label %47

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %0, i64 3840
  %28 = load i32, ptr %27, align 8, !tbaa !21
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 8, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %1, i64 28
  %31 = load i8, ptr %30, align 4
  %32 = and i8 %31, 4
  %.not58 = icmp eq i8 %32, 0
  br i1 %.not58, label %34, label %33

33:                                               ; preds = %26
  tail call void @qh_copynonconvex(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %34

34:                                               ; preds = %33, %26
  %35 = getelementptr inbounds i8, ptr %0, i64 136
  %36 = load i32, ptr %35, align 8, !tbaa !22
  %37 = icmp sgt i32 %36, 1
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %0, i64 2424
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds i8, ptr %1, i64 24
  %42 = load i32, ptr %41, align 8, !tbaa !19
  %43 = getelementptr inbounds i8, ptr %2, i64 32
  %44 = load i32, ptr %43, align 8, !tbaa !17
  %45 = load i32, ptr %22, align 8, !tbaa !17
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %40, i32 noundef 2038, ptr noundef nonnull @.str.210, i32 noundef %42, i32 noundef %44, i32 noundef %45) #2
  br label %46

46:                                               ; preds = %38, %34
  tail call void @qh_delridge_merge(ptr noundef nonnull %0, ptr noundef nonnull %1)
  br label %73

47:                                               ; preds = %23
  %48 = getelementptr inbounds i8, ptr %24, i64 32
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = load i32, ptr %22, align 8, !tbaa !17
  %51 = icmp ult i32 %49, %50
  br i1 %51, label %.loopexit, label %52

52:                                               ; preds = %47
  %53 = add nuw nsw i32 %.05162, 1
  %.0 = getelementptr inbounds i8, ptr %.063, i64 8
  %54 = load ptr, ptr %.0, align 8, !tbaa !20
  %.not56 = icmp eq ptr %54, null
  br i1 %.not56, label %.loopexit, label %23, !llvm.loop !23

.loopexit:                                        ; preds = %47, %52, %.preheader, %17
  %.1 = phi i32 [ 0, %17 ], [ 0, %.preheader ], [ %.05162, %47 ], [ %53, %52 ]
  tail call void @qh_setaddnth(ptr noundef %0, ptr noundef nonnull %1, i32 noundef %.1, ptr noundef %3) #2
  %55 = getelementptr inbounds i8, ptr %1, i64 28
  %56 = load i8, ptr %55, align 4
  %57 = and i8 %56, -97
  store i8 %57, ptr %55, align 4
  %58 = sub nsw i32 %6, %.1
  %59 = and i32 %58, 1
  %.not57 = icmp eq i32 %59, 0
  br i1 %.not57, label %73, label %60

60:                                               ; preds = %.loopexit
  %61 = getelementptr inbounds i8, ptr %0, i64 136
  %62 = load i32, ptr %61, align 8, !tbaa !22
  %63 = icmp sgt i32 %62, 2
  br i1 %63, label %64, label %69

64:                                               ; preds = %60
  %65 = getelementptr inbounds i8, ptr %0, i64 2424
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = getelementptr inbounds i8, ptr %1, i64 24
  %68 = load i32, ptr %67, align 8, !tbaa !19
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef nonnull %0, ptr noundef %66, i32 noundef 3010, ptr noundef nonnull @.str.211, i32 noundef %68) #2
  br label %69

69:                                               ; preds = %64, %60
  %70 = getelementptr inbounds i8, ptr %1, i64 8
  %71 = load <2 x ptr>, ptr %70, align 8, !tbaa !20
  %72 = shufflevector <2 x ptr> %71, <2 x ptr> poison, <2 x i32> <i32 1, i32 0>
  store <2 x ptr> %72, ptr %70, align 8, !tbaa !20
  br label %73

73:                                               ; preds = %.loopexit, %69, %46
  %.050 = phi i32 [ 0, %46 ], [ 1, %69 ], [ 1, %.loopexit ]
  ret i32 %.050
}

declare ptr @qh_setdelnthsorted(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

attributes #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 = { 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 = !{!"ridgeT", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 2424}
!12 = !{!"qhT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, 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, !13, i64 64, !13, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !7, i64 104, !10, i64 112, !10, i64 116, !7, i64 120, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !13, i64 160, !13, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !13, i64 192, !13, i64 200, !10, i64 208, !10, i64 212, !13, 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, !8, 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, !13, i64 448, !13, i64 456, !13, 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, !13, 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, !13, i64 592, !10, i64 600, !7, i64 608, !7, i64 616, !10, i64 624, !10, i64 628, !10, i64 632, !10, i64 636, !10, i64 640, !7, i64 648, !10, i64 656, !7, i64 664, !10, i64 672, !8, i64 676, !10, i64 932, !8, i64 936, !8, i64 1192, !10, i64 1704, !10, i64 1708, !10, i64 1712, !10, i64 1716, !10, i64 1720, !10, i64 1724, !7, i64 1728, !7, i64 1736, !7, i64 1744, !7, i64 1752, !13, i64 1760, !13, i64 1768, !13, i64 1776, !13, i64 1784, !13, i64 1792, !13, i64 1800, !13, i64 1808, !13, i64 1816, !13, i64 1824, !13, i64 1832, !13, i64 1840, !13, i64 1848, !13, i64 1856, !13, i64 1864, !7, i64 1872, !13, i64 1880, !13, i64 1888, !13, i64 1896, !13, i64 1904, !10, i64 1912, !8, i64 1916, !8, i64 1928, !8, i64 2128, !8, i64 2168, !8, i64 2368, !7, i64 2408, !7, i64 2416, !7, i64 2424, !7, i64 2432, !10, i64 2440, !10, i64 2444, !10, i64 2448, !7, i64 2456, !7, i64 2464, !7, i64 2472, !7, i64 2480, !7, i64 2488, !10, i64 2496, !10, i64 2500, !7, i64 2504, !10, i64 2512, !7, i64 2520, !10, i64 2528, !7, i64 2536, !7, i64 2544, !7, i64 2552, !7, 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, !14, i64 2600, !10, i64 2608, !10, i64 2612, !10, i64 2616, !10, i64 2620, !10, i64 2624, !7, i64 2632, !7, i64 2640, !10, i64 2648, !10, i64 2652, !10, i64 2656, !13, i64 2664, !10, i64 2672, !13, i64 2680, !13, i64 2688, !13, i64 2696, !10, i64 2704, !10, i64 2708, !10, i64 2712, !10, i64 2716, !10, i64 2720, !13, i64 2728, !13, i64 2736, !10, i64 2744, !10, i64 2748, !10, i64 2752, !10, i64 2756, !10, i64 2760, !10, i64 2764, !13, i64 2768, !13, i64 2776, !10, i64 2784, !10, i64 2788, !10, i64 2792, !10, i64 2796, !7, i64 2800, !7, i64 2808, !7, i64 2816, !7, i64 2824, !7, i64 2832, !7, i64 2840, !7, i64 2848, !7, i64 2856, !7, i64 2864, !10, i64 2872, !7, i64 2880, !7, i64 2888, !10, i64 2896, !10, i64 2900, !10, i64 2904, !7, i64 2912, !13, i64 2920, !13, i64 2928, !13, i64 2936, !13, i64 2944, !10, i64 2952, !10, i64 2956, !10, i64 2960, !10, i64 2964, !10, i64 2968, !10, i64 2972, !7, i64 2976, !10, i64 2984, !10, i64 2988, !8, i64 2992, !8, i64 3192, !10, i64 3232, !13, i64 3240, !7, i64 3248, !7, i64 3256, !7, i64 3264, !15, i64 3272, !16, i64 3424}
!13 = !{!"double", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!"qhmemT", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !7, 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}
!16 = !{!"qhstatT", !8, i64 0, !8, i64 1992, !8, i64 2256, !8, i64 4248, !8, i64 4746, !8, i64 4995, !8, i64 5248, !10, i64 5320, !10, i64 5324, !10, i64 5328, !10, i64 5332, !13, i64 5336}
!17 = !{!18, !10, i64 32}
!18 = !{!"vertexT", !7, i64 0, !7, i64 8, !7, i64 16, !7, 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}
!19 = !{!6, !10, i64 24}
!20 = !{!7, !7, i64 0}
!21 = !{!8, !8, i64 0}
!22 = !{!12, !10, i64 136}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass