; LLVM IR from sourceryinstitute/MORFEUS-Source :: src/FV/src/mesh_optimize/OptMS (SMequil)

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

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1

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

19:                                               ; preds = %3
  store i32 101, ptr %9, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %19, %3
  br label %21

21:                                               ; preds = %137, %20
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 109
  br i1 %23, label %24, label %30

24:                                               ; preds = %21
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 101
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = icmp ne i32 %28, 110
  br label %30

30:                                               ; preds = %27, %24, %21
  %31 = phi i1 [ false, %24 ], [ false, %21 ], [ %29, %27 ]
  br i1 %31, label %32, label %138

32:                                               ; preds = %30
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = icmp eq i32 %33, 108
  br i1 %34, label %35, label %48

35:                                               ; preds = %32
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 0
  %39 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  %40 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  %41 = call i32 @SMfindPlanePoints(i32 noundef 2, i32 noundef 1, ptr noundef %36, i32 noundef %37, ptr noundef %38, ptr noundef %39, ptr noundef %40, ptr noundef %9)
  store i32 %41, ptr %8, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %47

44:                                               ; preds = %35
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = call i32 @SMerror(i32 noundef 50, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %45, i32 noundef 0, ptr noundef null)
  store i32 %46, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

47:                                               ; preds = %35
  store i32 2, ptr %10, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %47, %32
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 106
  br i1 %50, label %51, label %64

51:                                               ; preds = %48
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 0
  %55 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  %56 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  %57 = call i32 @SMfindPlanePoints(i32 noundef 1, i32 noundef 0, ptr noundef %52, i32 noundef %53, ptr noundef %54, ptr noundef %55, ptr noundef %56, ptr noundef %9)
  store i32 %57, ptr %8, align 4, !tbaa !9
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %63

60:                                               ; preds = %51
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = call i32 @SMerror(i32 noundef 56, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %61, i32 noundef 0, ptr noundef null)
  store i32 %62, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

63:                                               ; preds = %51
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %63, %48
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = icmp eq i32 %65, 107
  br i1 %66, label %67, label %80

67:                                               ; preds = %64
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 0
  %71 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  %72 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  %73 = call i32 @SMfindPlanePoints(i32 noundef 0, i32 noundef 2, ptr noundef %68, i32 noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef %72, ptr noundef %9)
  store i32 %73, ptr %8, align 4, !tbaa !9
  %74 = load i32, ptr %8, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %79

76:                                               ; preds = %67
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = call i32 @SMerror(i32 noundef 62, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %77, i32 noundef 0, ptr noundef null)
  store i32 %78, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

79:                                               ; preds = %67
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %79, %64
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = icmp eq i32 %81, 104
  br i1 %82, label %83, label %87

83:                                               ; preds = %80
  %84 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store double 0.000000e+00, ptr %84, align 16, !tbaa !11
  %85 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 1
  store double 0.000000e+00, ptr %85, align 8, !tbaa !11
  %86 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 2
  store double 0.000000e+00, ptr %86, align 16, !tbaa !11
  br label %87

87:                                               ; preds = %83, %80
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = icmp eq i32 %88, 104
  br i1 %89, label %93, label %90

90:                                               ; preds = %87
  %91 = load i32, ptr %9, align 4, !tbaa !9
  %92 = icmp eq i32 %91, 105
  br i1 %92, label %93, label %137

93:                                               ; preds = %90, %87
  %94 = getelementptr inbounds [3 x double], ptr %11, i64 0, i64 0
  %95 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  %96 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  %97 = getelementptr inbounds [3 x double], ptr %14, i64 0, i64 0
  %98 = call i32 @SMfindPlaneNormal(ptr noundef %94, ptr noundef %95, ptr noundef %96, ptr noundef %97)
  store i32 %98, ptr %8, align 4, !tbaa !9
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %104

101:                                              ; preds = %93
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = call i32 @SMerror(i32 noundef 69, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %102, i32 noundef 0, ptr noundef null)
  store i32 %103, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

104:                                              ; preds = %93
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load i32, ptr %6, align 4, !tbaa !9
  %107 = getelementptr inbounds [3 x double], ptr %14, i64 0, i64 0
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = call i32 @SMcheckVectorDots(ptr noundef %105, i32 noundef %106, ptr noundef %107, ptr noundef %108)
  store i32 %109, ptr %8, align 4, !tbaa !9
  %110 = load i32, ptr %8, align 4, !tbaa !9
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %115

112:                                              ; preds = %104
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = call i32 @SMerror(i32 noundef 71, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %113, i32 noundef 0, ptr noundef null)
  store i32 %114, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

115:                                              ; preds = %104
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = icmp eq i32 %117, 1
  br i1 %118, label %119, label %128

119:                                              ; preds = %115
  %120 = load i32, ptr %10, align 4, !tbaa !9
  switch i32 %120, label %127 [
    i32 2, label %121
    i32 1, label %123
    i32 0, label %125
  ]

121:                                              ; preds = %119
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %122, align 4, !tbaa !9
  store i32 106, ptr %9, align 4, !tbaa !9
  br label %127

123:                                              ; preds = %119
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %124, align 4, !tbaa !9
  store i32 107, ptr %9, align 4, !tbaa !9
  br label %127

125:                                              ; preds = %119
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %126, align 4, !tbaa !9
  store i32 109, ptr %9, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %125, %123, %121, %119
  br label %136

128:                                              ; preds = %115
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %128
  store i32 101, ptr %9, align 4, !tbaa !9
  br label %135

133:                                              ; preds = %128
  %134 = call i32 @SMerror(i32 noundef 86, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 63, i32 noundef 0, ptr noundef @.str.3)
  store i32 %134, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

135:                                              ; preds = %132
  br label %136

136:                                              ; preds = %135, %127
  br label %137

137:                                              ; preds = %136, %90
  br label %21, !llvm.loop !13

138:                                              ; preds = %30
  %139 = load i32, ptr %9, align 4, !tbaa !9
  switch i32 %139, label %144 [
    i32 101, label %140
    i32 109, label %142
  ]

140:                                              ; preds = %138
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %141, align 4, !tbaa !9
  br label %145

142:                                              ; preds = %138
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %143, align 4, !tbaa !9
  br label %145

144:                                              ; preds = %138
  br label %145

145:                                              ; preds = %144, %142, %140
  store i32 0, ptr %8, align 4, !tbaa !9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %146

146:                                              ; preds = %145, %133, %112, %101, %76, %60, %44
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %147 = load i32, ptr %4, align 4
  ret i32 %147
}

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

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

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

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

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

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

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 = { "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 = !{!"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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMconvexHullTest(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = alloca [3 x double], align 16
  %6 = alloca [3 x double], align 16
  %7 = alloca [3 x double], align 16
  %8 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  %9 = icmp slt i32 %1, 3
  %spec.select = select i1 %9, i32 101, i32 108
  store i32 %spec.select, ptr %4, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %.backedge, %3
  %.pr68 = phi i32 [ %spec.select, %3 ], [ %.pr68.be, %.backedge ]
  %.0 = phi i32 [ -1, %3 ], [ %.3, %.backedge ]
  switch i32 %.pr68, label %15 [
    i32 108, label %11
    i32 101, label %48
    i32 109, label %49
    i32 110, label %.loopexit
  ]

11:                                               ; preds = %10
  %12 = call i32 @SMfindPlanePoints(i32 noundef 2, i32 noundef 1, ptr noundef %0, i32 noundef %1, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4)
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %._crit_edge, label %13

._crit_edge:                                      ; preds = %11
  %.pre = load i32, ptr %4, align 4
  br label %15

13:                                               ; preds = %11
  %14 = call i32 @SMerror(i32 noundef 50, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %12, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

15:                                               ; preds = %._crit_edge, %10
  %.pr67 = phi i32 [ %.pr68, %10 ], [ %.pre, %._crit_edge ]
  %.1 = phi i32 [ %.0, %10 ], [ 2, %._crit_edge ]
  %16 = icmp eq i32 %.pr67, 106
  br i1 %16, label %17, label %21

17:                                               ; preds = %15
  %18 = call i32 @SMfindPlanePoints(i32 noundef 1, i32 noundef 0, ptr noundef %0, i32 noundef %1, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4)
  %.not42 = icmp eq i32 %18, 0
  br i1 %.not42, label %thread-pre-split, label %19

19:                                               ; preds = %17
  %20 = call i32 @SMerror(i32 noundef 56, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %18, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

thread-pre-split:                                 ; preds = %17
  %.pr46 = load i32, ptr %4, align 4
  br label %21

21:                                               ; preds = %thread-pre-split, %15
  %.pr66 = phi i32 [ %.pr46, %thread-pre-split ], [ %.pr67, %15 ]
  %.2 = phi i32 [ 1, %thread-pre-split ], [ %.1, %15 ]
  %22 = icmp eq i32 %.pr66, 107
  br i1 %22, label %23, label %27

23:                                               ; preds = %21
  %24 = call i32 @SMfindPlanePoints(i32 noundef 0, i32 noundef 2, ptr noundef %0, i32 noundef %1, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4)
  %.not43 = icmp eq i32 %24, 0
  br i1 %.not43, label %._crit_edge62, label %25

._crit_edge62:                                    ; preds = %23
  %.pre63 = load i32, ptr %4, align 4
  br label %27

25:                                               ; preds = %23
  %26 = call i32 @SMerror(i32 noundef 62, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %24, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

27:                                               ; preds = %._crit_edge62, %21
  %.pr65 = phi i32 [ %.pr66, %21 ], [ %.pre63, %._crit_edge62 ]
  %.3 = phi i32 [ %.2, %21 ], [ 0, %._crit_edge62 ]
  %28 = icmp eq i32 %.pr65, 104
  br i1 %28, label %.thread, label %29

.thread:                                          ; preds = %27
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  br label %31

29:                                               ; preds = %27
  %30 = and i32 %.pr65, -2
  %or.cond3 = icmp eq i32 %30, 104
  br i1 %or.cond3, label %31, label %.backedge

31:                                               ; preds = %.thread, %29
  %32 = call i32 @SMfindPlaneNormal(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not44 = icmp eq i32 %32, 0
  br i1 %.not44, label %35, label %33

33:                                               ; preds = %31
  %34 = call i32 @SMerror(i32 noundef 69, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %32, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

35:                                               ; preds = %31
  %36 = call i32 @SMcheckVectorDots(ptr noundef %0, i32 noundef %1, ptr noundef nonnull %8, ptr noundef nonnull %2)
  %.not45 = icmp eq i32 %36, 0
  br i1 %.not45, label %39, label %37

37:                                               ; preds = %35
  %38 = call i32 @SMerror(i32 noundef 71, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %36, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

39:                                               ; preds = %35
  %40 = load i32, ptr %2, align 4, !tbaa !5
  switch i32 %40, label %46 [
    i32 1, label %41
    i32 0, label %45
  ]

41:                                               ; preds = %39
  switch i32 %.3, label %._crit_edge64 [
    i32 2, label %42
    i32 1, label %43
    i32 0, label %44
  ]

._crit_edge64:                                    ; preds = %41
  %.pr.pre = load i32, ptr %4, align 4
  br label %.backedge

.backedge:                                        ; preds = %._crit_edge64, %45, %44, %43, %42, %29
  %.pr68.be = phi i32 [ %.pr.pre, %._crit_edge64 ], [ 101, %45 ], [ 109, %44 ], [ 107, %43 ], [ 106, %42 ], [ %.pr65, %29 ]
  br label %10, !llvm.loop !9

42:                                               ; preds = %41
  store i32 0, ptr %2, align 4, !tbaa !5
  store i32 106, ptr %4, align 4, !tbaa !5
  br label %.backedge

43:                                               ; preds = %41
  store i32 0, ptr %2, align 4, !tbaa !5
  store i32 107, ptr %4, align 4, !tbaa !5
  br label %.backedge

44:                                               ; preds = %41
  store i32 1, ptr %2, align 4, !tbaa !5
  store i32 109, ptr %4, align 4, !tbaa !5
  br label %.backedge

45:                                               ; preds = %39
  store i32 101, ptr %4, align 4, !tbaa !5
  br label %.backedge

46:                                               ; preds = %39
  %47 = call i32 @SMerror(i32 noundef 86, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 63, i32 noundef 0, ptr noundef nonnull @.str.3) #4
  br label %.loopexit

48:                                               ; preds = %10
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %.loopexit

49:                                               ; preds = %10
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %10, %48, %49, %46, %37, %33, %25, %19, %13
  %.034 = phi i32 [ %14, %13 ], [ %20, %19 ], [ %26, %25 ], [ %34, %33 ], [ %38, %37 ], [ %47, %46 ], [ 0, %49 ], [ 0, %48 ], [ 0, %10 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret i32 %.034
}

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

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

declare i32 @SMerror(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass