; LLVM IR from Discngine/fpocket :: src/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.218 = external hidden unnamed_addr constant [168 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.224 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.225 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.226 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.227 = external hidden unnamed_addr constant [84 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.218)
  store i32 1, 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.219)
  store i32 1, 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.220, i32 noundef %28)
  store i32 1, 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 = sext i32 %32 to i64
  %34 = icmp ne i64 %33, 2896
  br i1 %34, label %35, label %37

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

37:                                               ; preds = %35, %31
  %38 = load i32, ptr %10, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp ne i64 %39, 48
  br i1 %40, label %41, label %43

41:                                               ; preds = %37
  %42 = load i32, ptr %10, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6250, ptr noundef @.str.222, i32 noundef %42, i64 noundef 48)
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %41, %37
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = icmp ne i64 %45, 32
  br i1 %46, label %47, label %49

47:                                               ; preds = %43
  %48 = load i32, ptr %11, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6251, ptr noundef @.str.223, i32 noundef %48, i64 noundef 32)
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %47, %43
  %50 = load i32, ptr %12, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = icmp ne i64 %51, 120
  br i1 %52, label %53, label %55

53:                                               ; preds = %49
  %54 = load i32, ptr %12, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6252, ptr noundef @.str.224, i32 noundef %54, i64 noundef 120)
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %53, %49
  %56 = load i32, ptr %13, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %64

58:                                               ; preds = %55
  %59 = load i32, ptr %13, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp ne i64 %60, 16
  br i1 %61, label %62, label %64

62:                                               ; preds = %58
  %63 = load i32, ptr %13, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6253, ptr noundef @.str.225, i32 noundef %63, i64 noundef 16)
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %62, %58, %55
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %64
  %68 = load i32, ptr %14, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp ne i64 %69, 152
  br i1 %70, label %71, label %73

71:                                               ; preds = %67
  %72 = load i32, ptr %14, align 4, !tbaa !5
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6254, ptr noundef @.str.226, i32 noundef %72, i64 noundef 152)
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %71, %67, %64
  %74 = load i32, ptr %15, align 4, !tbaa !5
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6256, ptr noundef @.str.227, ptr noundef @qh_version2)
  call void @qh_exit(i32 noundef 5)
  br label %77

77:                                               ; preds = %76, %73
  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.218 = external hidden unnamed_addr constant [168 x i8], align 1
@.str.219 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.220 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.221 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.222 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.224 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.225 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.226 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.227 = external hidden unnamed_addr constant [84 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.218) #2
  br label %11

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

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

11:                                               ; preds = %7, %8, %10, %9
  %.0 = phi i32 [ %0, %7 ], [ 1, %8 ], [ 1, %9 ], [ 1, %10 ]
  %.not = icmp eq i32 %1, 2896
  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.221, i32 noundef %1, i64 noundef 2896) #2
  br label %13

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

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

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

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

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

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

19:                                               ; preds = %18, %17
  %.4 = phi i32 [ 1, %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.225, i32 noundef %5, i64 noundef 16) #2
  br label %22

22:                                               ; preds = %21, %19
  %.5 = phi i32 [ 1, %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.226, i32 noundef %6, i64 noundef 152) #2
  br label %24

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

24:                                               ; preds = %.thread, %23
  tail call void (i32, ptr, ...) @qh_fprintf_stderr(i32 noundef 6256, ptr noundef nonnull @.str.227, ptr noundef nonnull @qh_version2) #2
  tail call void @qh_exit(i32 noundef 5) #2
  br label %25

25:                                               ; 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,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass