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

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

@stderr = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [59 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @qh_fprintf(ptr noundef, i32 noundef, ptr noundef, ...) #0

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

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

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

19:                                               ; preds = %6
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 4
  br i1 %21, label %22, label %25

22:                                               ; preds = %19, %6
  %23 = load ptr, ptr %9, align 8, !tbaa !9
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %23)
  call void @exit(i32 noundef 0) #6
  unreachable

25:                                               ; preds = %19
  %26 = load ptr, ptr %8, align 8, !tbaa !9
  %27 = getelementptr inbounds ptr, ptr %26, i64 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call i64 @strtol(ptr noundef %28, ptr noundef %15, i32 noundef 10) #5
  store i64 %29, ptr %13, align 8, !tbaa !11
  %30 = load i64, ptr %13, align 8, !tbaa !11
  %31 = icmp slt i64 %30, 1
  br i1 %31, label %32, label %37

32:                                               ; preds = %25
  %33 = load ptr, ptr @stderr, align 8, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 1
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %33, i32 noundef 6301, ptr noundef @.str.8, ptr noundef %36)
  call void @exit(i32 noundef 1) #6
  unreachable

37:                                               ; preds = %25
  %38 = load i64, ptr %13, align 8, !tbaa !11
  %39 = icmp sgt i64 %38, 2147483647
  br i1 %39, label %40, label %42

40:                                               ; preds = %37
  %41 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %41, i32 noundef 6302, ptr noundef @.str.9, i32 noundef 2147483647)
  call void @exit(i32 noundef 1) #6
  unreachable

42:                                               ; preds = %37
  %43 = load i64, ptr %13, align 8, !tbaa !11
  %44 = trunc i64 %43 to i32
  %45 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 %44, ptr %45, align 4, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 3
  br i1 %47, label %48, label %66

48:                                               ; preds = %42
  %49 = load ptr, ptr %8, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %49, i64 2
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i64 0
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 84
  br i1 %55, label %56, label %66

56:                                               ; preds = %48
  %57 = load ptr, ptr %8, align 8, !tbaa !9
  %58 = getelementptr inbounds ptr, ptr %57, i64 2
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %59, i64 1
  %61 = load i8, ptr %60, align 1, !tbaa !13
  %62 = sext i8 %61 to i32
  %63 = icmp eq i32 %62, 53
  br i1 %63, label %64, label %66

64:                                               ; preds = %56
  store i32 1, ptr %16, align 4, !tbaa !5
  %65 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 5, ptr %65, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %64, %56, %48, %42
  %67 = load i32, ptr %7, align 4, !tbaa !5
  %68 = icmp eq i32 %67, 4
  br i1 %68, label %75, label %69

69:                                               ; preds = %66
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = icmp eq i32 %70, 3
  br i1 %71, label %72, label %123

72:                                               ; preds = %69
  %73 = load i32, ptr %16, align 4, !tbaa !5
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %123, label %75

75:                                               ; preds = %72, %66
  %76 = load ptr, ptr %8, align 8, !tbaa !9
  %77 = getelementptr inbounds ptr, ptr %76, i64 2
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = call i64 @strtol(ptr noundef %78, ptr noundef %15, i32 noundef 10) #5
  store i64 %79, ptr %14, align 8, !tbaa !11
  %80 = load i64, ptr %14, align 8, !tbaa !11
  %81 = icmp slt i64 %80, 1
  br i1 %81, label %82, label %87

82:                                               ; preds = %75
  %83 = load ptr, ptr @stderr, align 8, !tbaa !9
  %84 = load ptr, ptr %8, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i64 2
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %83, i32 noundef 6321, ptr noundef @.str.10, ptr noundef %86)
  call void @exit(i32 noundef 1) #6
  unreachable

87:                                               ; preds = %75
  %88 = load i64, ptr %14, align 8, !tbaa !11
  %89 = icmp sgt i64 %88, 2147483647
  br i1 %89, label %90, label %92

90:                                               ; preds = %87
  %91 = load ptr, ptr @stderr, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %91, i32 noundef 6322, ptr noundef @.str.11, i32 noundef 2147483647)
  call void @exit(i32 noundef 1) #6
  unreachable

92:                                               ; preds = %87
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = icmp eq i32 %93, 4
  br i1 %94, label %95, label %119

95:                                               ; preds = %92
  %96 = load ptr, ptr %8, align 8, !tbaa !9
  %97 = getelementptr inbounds ptr, ptr %96, i64 3
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds i8, ptr %98, i64 0
  %100 = load i8, ptr %99, align 1, !tbaa !13
  %101 = sext i8 %100 to i32
  %102 = icmp eq i32 %101, 84
  br i1 %102, label %103, label %113

103:                                              ; preds = %95
  %104 = load ptr, ptr %8, align 8, !tbaa !9
  %105 = getelementptr inbounds ptr, ptr %104, i64 3
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds i8, ptr %106, i64 1
  %108 = load i8, ptr %107, align 1, !tbaa !13
  %109 = sext i8 %108 to i32
  %110 = icmp eq i32 %109, 53
  br i1 %110, label %111, label %113

111:                                              ; preds = %103
  store i32 1, ptr %16, align 4, !tbaa !5
  %112 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 5, ptr %112, align 4, !tbaa !5
  br label %118

113:                                              ; preds = %103, %95
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = load ptr, ptr %8, align 8, !tbaa !9
  %116 = getelementptr inbounds ptr, ptr %115, i64 3
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %114, i32 noundef 6242, ptr noundef @.str.12, ptr noundef %117)
  call void @exit(i32 noundef 1) #6
  unreachable

118:                                              ; preds = %111
  br label %119

119:                                              ; preds = %118, %92
  %120 = load i64, ptr %14, align 8, !tbaa !11
  %121 = trunc i64 %120 to i32
  %122 = load ptr, ptr %11, align 8, !tbaa !9
  store i32 %121, ptr %122, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %119, %72, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret void
}

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: nounwind
declare i64 @strtol(ptr noundef, ptr noundef, i32 noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "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 = { "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 #4 = { nounwind "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 #5 = { nounwind }
attributes #6 = { noreturn 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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [59 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @qh_fprintf(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @readOptions(i32 noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #0 {
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %8 = add i32 %0, -5
  %or.cond = icmp ult i32 %8, -3
  br i1 %or.cond, label %9, label %11

9:                                                ; preds = %6
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %2)
  tail call void @exit(i32 noundef 0) #6
  unreachable

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = call i64 @strtol(ptr noundef %13, ptr noundef nonnull %7, i32 noundef 10) #5
  %15 = icmp slt i64 %14, 1
  br i1 %15, label %16, label %19

16:                                               ; preds = %11
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = load ptr, ptr %12, align 8, !tbaa !5
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %17, i32 noundef 6301, ptr noundef nonnull @.str.8, ptr noundef %18)
  tail call void @exit(i32 noundef 1) #6
  unreachable

19:                                               ; preds = %11
  %20 = icmp ugt i64 %14, 2147483647
  br i1 %20, label %21, label %23

21:                                               ; preds = %19
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %22, i32 noundef 6302, ptr noundef nonnull @.str.9, i32 noundef 2147483647)
  tail call void @exit(i32 noundef 1) #6
  unreachable

23:                                               ; preds = %19
  %24 = trunc nuw nsw i64 %14 to i32
  store i32 %24, ptr %3, align 4, !tbaa !9
  %25 = icmp eq i32 %0, 3
  br i1 %25, label %26, label %36

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %1, i64 16
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = icmp eq i8 %29, 84
  br i1 %30, label %31, label %36

31:                                               ; preds = %26
  %32 = getelementptr inbounds i8, ptr %28, i64 1
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = icmp eq i8 %33, 53
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  store i32 5, ptr %5, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %35, %31, %26, %23
  %37 = phi i1 [ true, %35 ], [ false, %31 ], [ false, %26 ], [ false, %23 ]
  %38 = icmp ne i32 %0, 4
  %39 = icmp ne i32 %0, 3
  %or.cond3 = or i1 %39, %37
  %or.cond32 = and i1 %38, %or.cond3
  br i1 %or.cond32, label %67, label %40

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %1, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = call i64 @strtol(ptr noundef %42, ptr noundef nonnull %7, i32 noundef 10) #5
  %44 = icmp slt i64 %43, 1
  br i1 %44, label %45, label %48

45:                                               ; preds = %40
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = load ptr, ptr %41, align 8, !tbaa !5
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %46, i32 noundef 6321, ptr noundef nonnull @.str.10, ptr noundef %47)
  tail call void @exit(i32 noundef 1) #6
  unreachable

48:                                               ; preds = %40
  %49 = icmp ugt i64 %43, 2147483647
  br i1 %49, label %50, label %52

50:                                               ; preds = %48
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %51, i32 noundef 6322, ptr noundef nonnull @.str.11, i32 noundef 2147483647)
  tail call void @exit(i32 noundef 1) #6
  unreachable

52:                                               ; preds = %48
  br i1 %38, label %65, label %53

53:                                               ; preds = %52
  %54 = getelementptr inbounds i8, ptr %1, i64 24
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = icmp eq i8 %56, 84
  br i1 %57, label %58, label %63

58:                                               ; preds = %53
  %59 = getelementptr inbounds i8, ptr %55, i64 1
  %60 = load i8, ptr %59, align 1, !tbaa !11
  %61 = icmp eq i8 %60, 53
  br i1 %61, label %62, label %63

62:                                               ; preds = %58
  store i32 5, ptr %5, align 4, !tbaa !9
  br label %65

63:                                               ; preds = %58, %53
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void (ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %64, i32 noundef 6242, ptr noundef nonnull @.str.12, ptr noundef nonnull %55)
  tail call void @exit(i32 noundef 1) #6
  unreachable

65:                                               ; preds = %62, %52
  %66 = trunc nuw nsw i64 %43 to i32
  store i32 %66, ptr %4, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %36, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  ret void
}

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "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 = { nofree nounwind "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 #4 = { mustprogress nofree nounwind willreturn "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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!7, !7, i64 0}


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