; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/libqhull_r (global_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"

@qh_version2 = external dso_local constant [36 x i8], align 16
@.str.236 = external hidden unnamed_addr constant [128 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [146 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.241 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [137 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
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6257, ptr noundef @.str.236)
  store i32 6257, ptr %15, align 4, !tbaa !5
  br label %30

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 6258, ptr noundef @.str.237)
  store i32 6258, ptr %15, align 4, !tbaa !5
  br label %29

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

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

28:                                               ; preds = %26, %23
  br label %29

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

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

33:                                               ; preds = %30
  %34 = load i32, ptr %9, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6249, ptr noundef @.str.239, i32 noundef %34, i32 noundef 8768)
  store i32 6249, ptr %15, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %33, %30
  %36 = load i32, ptr %10, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 48
  br i1 %37, label %38, label %40

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

40:                                               ; preds = %38, %35
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = icmp ne i32 %41, 32
  br i1 %42, label %43, label %45

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

45:                                               ; preds = %43, %40
  %46 = load i32, ptr %12, align 4, !tbaa !5
  %47 = icmp ne i32 %46, 120
  br i1 %47, label %48, label %50

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

50:                                               ; preds = %48, %45
  %51 = load i32, ptr %13, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %58

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

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

58:                                               ; preds = %56, %53, %50
  %59 = load i32, ptr %14, align 4, !tbaa !5
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %67

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

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

67:                                               ; preds = %65, %61, %58
  %68 = load i32, ptr %15, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %76

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

76:                                               ; preds = %70, %67
  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 [36 x i8], align 16
@.str.236 = external hidden unnamed_addr constant [128 x i8], align 1
@.str.237 = external hidden unnamed_addr constant [146 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.239 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.241 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [137 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 %8
    i32 1, label %9
    i32 2, label %11
  ]

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

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

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

11:                                               ; preds = %7, %9, %10, %8
  %.0 = phi i32 [ 6257, %8 ], [ 6258, %9 ], [ 6262, %10 ], [ 0, %7 ]
  %.not33 = icmp eq i32 %1, 8768
  br i1 %.not33, label %13, label %12

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

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

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

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

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

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

18:                                               ; preds = %17
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6252, ptr noundef nonnull @.str.242, 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.243, 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.244, i32 noundef %6, i64 noundef 152) #2
  br label %24

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

24:                                               ; preds = %.thread, %23
  %.640 = phi i32 [ 6254, %.thread ], [ %.5, %23 ]
  %25 = add nsw i32 %.640, -6200
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6259, ptr noundef nonnull @.str.245, i32 noundef %.640, 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