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

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

@qh_version2 = external dso_local constant [32 x i8], align 16
@.str.235 = external hidden unnamed_addr constant [180 x i8], align 1
@.str.236 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.241 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [165 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

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

declare void @qh_exit(i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @qh_lib_check(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) #2 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !5
  store i32 %5, ptr %13, align 4, !tbaa !5
  store i32 %6, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !5
  %16 = load i32, ptr %8, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %18, label %19

18:                                               ; preds = %7
  br label %31

19:                                               ; preds = %7
  %20 = load i32, ptr %8, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %22, label %23

22:                                               ; preds = %19
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6247, ptr noundef @.str.235)
  store i32 6247, ptr %15, align 4, !tbaa !5
  br label %30

23:                                               ; preds = %19
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 2
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6248, ptr noundef @.str.236)
  store i32 6248, ptr %15, align 4, !tbaa !5
  br label %29

27:                                               ; preds = %23
  %28 = load i32, ptr %8, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6262, ptr noundef @.str.237, i32 noundef %28)
  store i32 6262, ptr %15, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %27, %26
  br label %30

30:                                               ; preds = %29, %22
  br label %31

31:                                               ; preds = %30, %18
  %32 = load i32, ptr %9, align 4, !tbaa !5
  %33 = icmp ne i32 %32, 3000
  br i1 %33, label %34, label %36

34:                                               ; preds = %31
  %35 = load i32, ptr %9, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6249, ptr noundef @.str.238, i32 noundef %35, i32 noundef 3000)
  store i32 6249, ptr %15, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %34, %31
  %37 = load i32, ptr %10, align 4, !tbaa !5
  %38 = icmp ne i32 %37, 48
  br i1 %38, label %39, label %41

39:                                               ; preds = %36
  %40 = load i32, ptr %10, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6250, ptr noundef @.str.239, i32 noundef %40, i32 noundef 48)
  store i32 6250, ptr %15, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %39, %36
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = icmp ne i32 %42, 32
  br i1 %43, label %44, label %46

44:                                               ; preds = %41
  %45 = load i32, ptr %11, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6251, ptr noundef @.str.240, i32 noundef %45, i32 noundef 32)
  store i32 6251, ptr %15, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %44, %41
  %47 = load i32, ptr %12, align 4, !tbaa !5
  %48 = icmp ne i32 %47, 120
  br i1 %48, label %49, label %51

49:                                               ; preds = %46
  %50 = load i32, ptr %12, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6252, ptr noundef @.str.241, i32 noundef %50, i32 noundef 120)
  store i32 6252, ptr %15, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %49, %46
  %52 = load i32, ptr %13, align 4, !tbaa !5
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %59

54:                                               ; preds = %51
  %55 = load i32, ptr %13, align 4, !tbaa !5
  %56 = icmp ne i32 %55, 16
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = load i32, ptr %13, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6253, ptr noundef @.str.242, i32 noundef %58, i32 noundef 16)
  store i32 6253, ptr %15, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %57, %54, %51
  %60 = load i32, ptr %14, align 4, !tbaa !5
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %68

62:                                               ; preds = %59
  %63 = load i32, ptr %14, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = icmp ne i64 %64, 152
  br i1 %65, label %66, label %68

66:                                               ; preds = %62
  %67 = load i32, ptr %14, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6254, ptr noundef @.str.243, i32 noundef %67, i64 noundef 152)
  store i32 6254, ptr %15, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %66, %62, %59
  %69 = load i32, ptr %15, align 4, !tbaa !5
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %77

71:                                               ; preds = %68
  %72 = load i32, ptr %15, align 4, !tbaa !5
  %73 = load i32, ptr %15, align 4, !tbaa !5
  %74 = sub nsw i32 %73, 6200
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6256, ptr noundef @.str.244, i32 noundef %72, ptr noundef @qh_version2, i32 noundef %74)
  %75 = load i32, ptr %15, align 4, !tbaa !5
  %76 = sub nsw i32 %75, 6200
  call void @qh_exit(i32 noundef %76)
  br label %77

77:                                               ; preds = %71, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  ret void
}

declare void @qh_fprintf_stderr(i32 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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

@qh_version2 = external dso_local constant [32 x i8], align 16
@.str.235 = external hidden unnamed_addr constant [180 x i8], align 1
@.str.236 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.241 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [165 x i8], align 1

declare void @qh_exit(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @qh_lib_check(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #1 {
  switch i32 %0, label %10 [
    i32 0, label %11
    i32 1, label %8
    i32 2, label %9
  ]

8:                                                ; preds = %7
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6247, ptr noundef nonnull @.str.235) #2
  br label %11

9:                                                ; preds = %7
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6248, ptr noundef nonnull @.str.236) #2
  br label %11

10:                                               ; preds = %7
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6262, ptr noundef nonnull @.str.237, i32 noundef %0) #2
  br label %11

11:                                               ; preds = %7, %8, %10, %9
  %.0 = phi i32 [ %0, %7 ], [ 6247, %8 ], [ 6248, %9 ], [ 6262, %10 ]
  %.not = icmp eq i32 %1, 3000
  br i1 %.not, label %13, label %12

12:                                               ; preds = %11
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6249, ptr noundef nonnull @.str.238, i32 noundef %1, i32 noundef 3000) #2
  br label %13

13:                                               ; preds = %12, %11
  %.1 = phi i32 [ 6249, %12 ], [ %.0, %11 ]
  %.not33 = icmp eq i32 %2, 48
  br i1 %.not33, label %15, label %14

14:                                               ; preds = %13
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6250, ptr noundef nonnull @.str.239, i32 noundef %2, i32 noundef 48) #2
  br label %15

15:                                               ; preds = %14, %13
  %.2 = phi i32 [ 6250, %14 ], [ %.1, %13 ]
  %.not34 = icmp eq i32 %3, 32
  br i1 %.not34, label %17, label %16

16:                                               ; preds = %15
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6251, ptr noundef nonnull @.str.240, i32 noundef %3, i32 noundef 32) #2
  br label %17

17:                                               ; preds = %16, %15
  %.3 = phi i32 [ 6251, %16 ], [ %.2, %15 ]
  %.not35 = icmp eq i32 %4, 120
  br i1 %.not35, label %19, label %18

18:                                               ; preds = %17
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6252, ptr noundef nonnull @.str.241, i32 noundef %4, i32 noundef 120) #2
  br label %19

19:                                               ; preds = %18, %17
  %.4 = phi i32 [ 6252, %18 ], [ %.3, %17 ]
  %20 = and i32 %5, -17
  %or.cond.not = icmp eq i32 %20, 0
  br i1 %or.cond.not, label %22, label %21

21:                                               ; preds = %19
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6253, ptr noundef nonnull @.str.242, i32 noundef %5, i32 noundef 16) #2
  br label %22

22:                                               ; preds = %21, %19
  %.5 = phi i32 [ 6253, %21 ], [ %.4, %19 ]
  switch i32 %6, label %.thread [
    i32 152, label %23
    i32 0, label %23
  ]

.thread:                                          ; preds = %22
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6254, ptr noundef nonnull @.str.243, i32 noundef %6, i64 noundef 152) #2
  br label %24

23:                                               ; preds = %22, %22
  %.not36 = icmp eq i32 %.5, 0
  br i1 %.not36, label %26, label %24

24:                                               ; preds = %.thread, %23
  %.639 = phi i32 [ 6254, %.thread ], [ %.5, %23 ]
  %25 = add nsw i32 %.639, -6200
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6256, ptr noundef nonnull @.str.244, i32 noundef %.639, ptr noundef nonnull @qh_version2, i32 noundef %25) #2
  tail call void @qh_exit(i32 noundef %25) #2
  br label %26

26:                                               ; preds = %24, %23
  ret void
}

declare void @qh_fprintf_stderr(i32 noundef, ptr 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)"}


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