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

; 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.facetT = type { double, double, double, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }
%union.anon = type { double }

@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.174 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.175 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.176 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [32 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_printridge(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.ridgeT, ptr %6, i32 0, i32 3
  %8 = load i32, ptr %7, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %5, i32 noundef 9222, ptr noundef @.str.170, i32 noundef %8)
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.ridgeT, ptr %9, i32 0, i32 4
  %11 = load i8, ptr %10, align 4
  %12 = lshr i8 %11, 1
  %13 = and i8 %12, 1
  %14 = zext i8 %13 to i32
  %15 = icmp ne i32 %14, 0
  br i1 %15, label %16, label %18

16:                                               ; preds = %2
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %17, i32 noundef 9223, ptr noundef @.str.101)
  br label %18

18:                                               ; preds = %16, %2
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ridgeT, ptr %19, i32 0, i32 4
  %21 = load i8, ptr %20, align 4
  %22 = lshr i8 %21, 2
  %23 = and i8 %22, 1
  %24 = zext i8 %23 to i32
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %18
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %27, i32 noundef 9224, ptr noundef @.str.171)
  br label %28

28:                                               ; preds = %26, %18
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ridgeT, ptr %29, i32 0, i32 4
  %31 = load i8, ptr %30, align 4
  %32 = lshr i8 %31, 3
  %33 = and i8 %32, 1
  %34 = zext i8 %33 to i32
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %28
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %37, i32 noundef 9421, ptr noundef @.str.172)
  br label %38

38:                                               ; preds = %36, %28
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ridgeT, ptr %39, i32 0, i32 4
  %41 = load i8, ptr %40, align 4
  %42 = lshr i8 %41, 4
  %43 = and i8 %42, 1
  %44 = zext i8 %43 to i32
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %38
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %47, i32 noundef 9422, ptr noundef @.str.173)
  br label %48

48:                                               ; preds = %46, %38
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ridgeT, ptr %49, i32 0, i32 4
  %51 = load i8, ptr %50, align 4
  %52 = lshr i8 %51, 5
  %53 = and i8 %52, 1
  %54 = zext i8 %53 to i32
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %48
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %57, i32 noundef 9425, ptr noundef @.str.174)
  br label %58

58:                                               ; preds = %56, %48
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ridgeT, ptr %59, i32 0, i32 4
  %61 = load i8, ptr %60, align 4
  %62 = lshr i8 %61, 6
  %63 = and i8 %62, 1
  %64 = zext i8 %63 to i32
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %68

66:                                               ; preds = %58
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %67, i32 noundef 9423, ptr noundef @.str.175)
  br label %68

68:                                               ; preds = %66, %58
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %69, i32 noundef 9225, ptr noundef @.str.18)
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ridgeT, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !12
  call void @qh_printvertices(ptr noundef %70, ptr noundef @.str.176, ptr noundef %73)
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ridgeT, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %95

78:                                               ; preds = %68
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ridgeT, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !14
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %95

83:                                               ; preds = %78
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.ridgeT, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !13
  %88 = getelementptr inbounds %struct.facetT, ptr %87, i32 0, i32 14
  %89 = load i32, ptr %88, align 4, !tbaa !15
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ridgeT, ptr %90, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !14
  %93 = getelementptr inbounds %struct.facetT, ptr %92, i32 0, i32 14
  %94 = load i32, ptr %93, align 4, !tbaa !15
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %84, i32 noundef 9226, ptr noundef @.str.177, i32 noundef %89, i32 noundef %94)
  br label %95

95:                                               ; preds = %83, %78, %68
  ret void
}

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

!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, !11, i64 24}
!10 = !{!"ridgeT", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 28, !11, i64 28, !11, i64 28, !11, i64 28, !11, i64 28, !11, i64 28}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!16, !11, i64 108}
!16 = !{!"facetT", !17, i64 0, !17, i64 8, !17, i64 16, !6, i64 24, !7, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 113, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 114, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115, !11, i64 115}
!17 = !{!"double", !7, i64 0}


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

@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.174 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.175 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.176 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [32 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @qh_printridge(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %1, i64 24
  %4 = load i32, ptr %3, align 8, !tbaa !5
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9222, ptr noundef nonnull @.str.170, i32 noundef %4) #2
  %5 = getelementptr inbounds i8, ptr %1, i64 28
  %6 = load i8, ptr %5, align 4
  %7 = and i8 %6, 2
  %.not = icmp eq i8 %7, 0
  br i1 %.not, label %9, label %8

8:                                                ; preds = %2
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9223, ptr noundef nonnull @.str.101) #2
  %.pre = load i8, ptr %5, align 4
  br label %9

9:                                                ; preds = %8, %2
  %10 = phi i8 [ %.pre, %8 ], [ %6, %2 ]
  %11 = and i8 %10, 4
  %.not23 = icmp eq i8 %11, 0
  br i1 %.not23, label %13, label %12

12:                                               ; preds = %9
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9224, ptr noundef nonnull @.str.171) #2
  %.pre30 = load i8, ptr %5, align 4
  br label %13

13:                                               ; preds = %12, %9
  %14 = phi i8 [ %.pre30, %12 ], [ %10, %9 ]
  %15 = and i8 %14, 8
  %.not24 = icmp eq i8 %15, 0
  br i1 %.not24, label %17, label %16

16:                                               ; preds = %13
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9421, ptr noundef nonnull @.str.172) #2
  %.pre31 = load i8, ptr %5, align 4
  br label %17

17:                                               ; preds = %16, %13
  %18 = phi i8 [ %.pre31, %16 ], [ %14, %13 ]
  %19 = and i8 %18, 16
  %.not25 = icmp eq i8 %19, 0
  br i1 %.not25, label %21, label %20

20:                                               ; preds = %17
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9422, ptr noundef nonnull @.str.173) #2
  %.pre32 = load i8, ptr %5, align 4
  br label %21

21:                                               ; preds = %20, %17
  %22 = phi i8 [ %.pre32, %20 ], [ %18, %17 ]
  %23 = and i8 %22, 32
  %.not26 = icmp eq i8 %23, 0
  br i1 %.not26, label %25, label %24

24:                                               ; preds = %21
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9425, ptr noundef nonnull @.str.174) #2
  %.pre33 = load i8, ptr %5, align 4
  br label %25

25:                                               ; preds = %24, %21
  %26 = phi i8 [ %.pre33, %24 ], [ %22, %21 ]
  %27 = and i8 %26, 64
  %.not27 = icmp eq i8 %27, 0
  br i1 %.not27, label %29, label %28

28:                                               ; preds = %25
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9423, ptr noundef nonnull @.str.175) #2
  br label %29

29:                                               ; preds = %28, %25
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9225, ptr noundef nonnull @.str.18) #2
  %30 = load ptr, ptr %1, align 8, !tbaa !11
  tail call void @qh_printvertices(ptr noundef %0, ptr noundef nonnull @.str.176, ptr noundef %30)
  %31 = getelementptr inbounds i8, ptr %1, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  %.not28 = icmp eq ptr %32, null
  br i1 %.not28, label %41, label %33

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %1, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %.not29 = icmp eq ptr %35, null
  br i1 %.not29, label %41, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %32, i64 108
  %38 = load i32, ptr %37, align 4, !tbaa !14
  %39 = getelementptr inbounds i8, ptr %35, i64 108
  %40 = load i32, ptr %39, align 4, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, i32 noundef 9226, ptr noundef nonnull @.str.177, i32 noundef %38, i32 noundef %40) #2
  br label %41

41:                                               ; preds = %36, %33, %29
  ret void
}

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, !10, i64 24}
!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 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 16}
!14 = !{!15, !10, i64 108}
!15 = !{!"facetT", !16, i64 0, !16, i64 8, !16, i64 16, !7, i64 24, !8, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 113, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 114, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115, !10, i64 115}
!16 = !{!"double", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass