; LLVM IR from osmart/hole2 :: src (sos_triangle)

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

@culled_tri_count = external dso_local global i32, align 4
@smooth = external dso_local global i32, align 4
@dots = external dso_local global [30000 x [7 x double]], align 16
@culled_tri = external dso_local global [30000 x [6 x i32]], align 16
@stdout = external global ptr, align 8
@.str.65 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [24 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @vmd_out() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 -1000, ptr %2, align 4, !tbaa !5
  %3 = load ptr, ptr @stdout, align 8, !tbaa !9
  %4 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %3, ptr noundef @.str.93) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %5

5:                                                ; preds = %226, %0
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %8 = icmp slt i32 %6, %7
  br i1 %8, label %9, label %229

9:                                                ; preds = %5
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %11
  %13 = getelementptr inbounds [6 x i32], ptr %12, i64 0, i64 3
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp ne i32 %14, %15
  br i1 %16, label %17, label %37

17:                                               ; preds = %9
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %19
  %21 = getelementptr inbounds [6 x i32], ptr %20, i64 0, i64 3
  %22 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %22, ptr %2, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  switch i32 %23, label %33 [
    i32 2, label %24
    i32 3, label %27
    i32 7, label %30
  ]

24:                                               ; preds = %17
  %25 = load ptr, ptr @stdout, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.94) #3
  br label %36

27:                                               ; preds = %17
  %28 = load ptr, ptr @stdout, align 8, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.95) #3
  br label %36

30:                                               ; preds = %17
  %31 = load ptr, ptr @stdout, align 8, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.96) #3
  br label %36

33:                                               ; preds = %17
  %34 = load ptr, ptr @stdout, align 8, !tbaa !9
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.97) #3
  br label %36

36:                                               ; preds = %33, %30, %27, %24
  br label %37

37:                                               ; preds = %36, %9
  %38 = load i32, ptr @smooth, align 4, !tbaa !5
  switch i32 %38, label %45 [
    i32 0, label %39
    i32 1, label %42
  ]

39:                                               ; preds = %37
  %40 = load ptr, ptr @stdout, align 8, !tbaa !9
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef @.str.98) #3
  br label %45

42:                                               ; preds = %37
  %43 = load ptr, ptr @stdout, align 8, !tbaa !9
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef @.str.99) #3
  br label %45

45:                                               ; preds = %42, %39, %37
  %46 = load ptr, ptr @stdout, align 8, !tbaa !9
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %48
  %50 = getelementptr inbounds [6 x i32], ptr %49, i64 0, i64 0
  %51 = load i32, ptr %50, align 8, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %52
  %54 = getelementptr inbounds [7 x double], ptr %53, i64 0, i64 0
  %55 = load double, ptr %54, align 8, !tbaa !11
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %57
  %59 = getelementptr inbounds [6 x i32], ptr %58, i64 0, i64 0
  %60 = load i32, ptr %59, align 8, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %61
  %63 = getelementptr inbounds [7 x double], ptr %62, i64 0, i64 1
  %64 = load double, ptr %63, align 8, !tbaa !11
  %65 = load i32, ptr %1, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %66
  %68 = getelementptr inbounds [6 x i32], ptr %67, i64 0, i64 0
  %69 = load i32, ptr %68, align 8, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %70
  %72 = getelementptr inbounds [7 x double], ptr %71, i64 0, i64 2
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.100, double noundef %55, double noundef %64, double noundef %73) #3
  %75 = load ptr, ptr @stdout, align 8, !tbaa !9
  %76 = load i32, ptr %1, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %77
  %79 = getelementptr inbounds [6 x i32], ptr %78, i64 0, i64 1
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %81
  %83 = getelementptr inbounds [7 x double], ptr %82, i64 0, i64 0
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = load i32, ptr %1, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %86
  %88 = getelementptr inbounds [6 x i32], ptr %87, i64 0, i64 1
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %90
  %92 = getelementptr inbounds [7 x double], ptr %91, i64 0, i64 1
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = load i32, ptr %1, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %95
  %97 = getelementptr inbounds [6 x i32], ptr %96, i64 0, i64 1
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %99
  %101 = getelementptr inbounds [7 x double], ptr %100, i64 0, i64 2
  %102 = load double, ptr %101, align 8, !tbaa !11
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.100, double noundef %84, double noundef %93, double noundef %102) #3
  %104 = load ptr, ptr @stdout, align 8, !tbaa !9
  %105 = load i32, ptr %1, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %106
  %108 = getelementptr inbounds [6 x i32], ptr %107, i64 0, i64 2
  %109 = load i32, ptr %108, align 8, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %110
  %112 = getelementptr inbounds [7 x double], ptr %111, i64 0, i64 0
  %113 = load double, ptr %112, align 8, !tbaa !11
  %114 = load i32, ptr %1, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %115
  %117 = getelementptr inbounds [6 x i32], ptr %116, i64 0, i64 2
  %118 = load i32, ptr %117, align 8, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %119
  %121 = getelementptr inbounds [7 x double], ptr %120, i64 0, i64 1
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = load i32, ptr %1, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %124
  %126 = getelementptr inbounds [6 x i32], ptr %125, i64 0, i64 2
  %127 = load i32, ptr %126, align 8, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %128
  %130 = getelementptr inbounds [7 x double], ptr %129, i64 0, i64 2
  %131 = load double, ptr %130, align 8, !tbaa !11
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str.100, double noundef %113, double noundef %122, double noundef %131) #3
  %133 = load i32, ptr @smooth, align 4, !tbaa !5
  %134 = icmp eq i32 %133, 1
  br i1 %134, label %135, label %223

135:                                              ; preds = %45
  %136 = load ptr, ptr @stdout, align 8, !tbaa !9
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %138
  %140 = getelementptr inbounds [6 x i32], ptr %139, i64 0, i64 0
  %141 = load i32, ptr %140, align 8, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %142
  %144 = getelementptr inbounds [7 x double], ptr %143, i64 0, i64 4
  %145 = load double, ptr %144, align 8, !tbaa !11
  %146 = load i32, ptr %1, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %147
  %149 = getelementptr inbounds [6 x i32], ptr %148, i64 0, i64 0
  %150 = load i32, ptr %149, align 8, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %151
  %153 = getelementptr inbounds [7 x double], ptr %152, i64 0, i64 5
  %154 = load double, ptr %153, align 8, !tbaa !11
  %155 = load i32, ptr %1, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %156
  %158 = getelementptr inbounds [6 x i32], ptr %157, i64 0, i64 0
  %159 = load i32, ptr %158, align 8, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %160
  %162 = getelementptr inbounds [7 x double], ptr %161, i64 0, i64 6
  %163 = load double, ptr %162, align 8, !tbaa !11
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.101, double noundef %145, double noundef %154, double noundef %163) #3
  %165 = load ptr, ptr @stdout, align 8, !tbaa !9
  %166 = load i32, ptr %1, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %167
  %169 = getelementptr inbounds [6 x i32], ptr %168, i64 0, i64 1
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %171
  %173 = getelementptr inbounds [7 x double], ptr %172, i64 0, i64 4
  %174 = load double, ptr %173, align 8, !tbaa !11
  %175 = load i32, ptr %1, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %176
  %178 = getelementptr inbounds [6 x i32], ptr %177, i64 0, i64 1
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %180
  %182 = getelementptr inbounds [7 x double], ptr %181, i64 0, i64 5
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = load i32, ptr %1, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %185
  %187 = getelementptr inbounds [6 x i32], ptr %186, i64 0, i64 1
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %189
  %191 = getelementptr inbounds [7 x double], ptr %190, i64 0, i64 6
  %192 = load double, ptr %191, align 8, !tbaa !11
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.101, double noundef %174, double noundef %183, double noundef %192) #3
  %194 = load ptr, ptr @stdout, align 8, !tbaa !9
  %195 = load i32, ptr %1, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %196
  %198 = getelementptr inbounds [6 x i32], ptr %197, i64 0, i64 2
  %199 = load i32, ptr %198, align 8, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %200
  %202 = getelementptr inbounds [7 x double], ptr %201, i64 0, i64 4
  %203 = load double, ptr %202, align 8, !tbaa !11
  %204 = load i32, ptr %1, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %205
  %207 = getelementptr inbounds [6 x i32], ptr %206, i64 0, i64 2
  %208 = load i32, ptr %207, align 8, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %209
  %211 = getelementptr inbounds [7 x double], ptr %210, i64 0, i64 5
  %212 = load double, ptr %211, align 8, !tbaa !11
  %213 = load i32, ptr %1, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %214
  %216 = getelementptr inbounds [6 x i32], ptr %215, i64 0, i64 2
  %217 = load i32, ptr %216, align 8, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %218
  %220 = getelementptr inbounds [7 x double], ptr %219, i64 0, i64 6
  %221 = load double, ptr %220, align 8, !tbaa !11
  %222 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.101, double noundef %203, double noundef %212, double noundef %221) #3
  br label %223

223:                                              ; preds = %135, %45
  %224 = load ptr, ptr @stdout, align 8, !tbaa !9
  %225 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %224, ptr noundef @.str.65) #3
  br label %226

226:                                              ; preds = %223
  %227 = load i32, ptr %1, align 4, !tbaa !5
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %1, align 4, !tbaa !5
  br label %5, !llvm.loop !13

229:                                              ; preds = %5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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"

@culled_tri_count = external dso_local local_unnamed_addr global i32, align 4
@smooth = external dso_local local_unnamed_addr global i32, align 4
@dots = external dso_local local_unnamed_addr global [30000 x [7 x double]], align 16
@culled_tri = external dso_local local_unnamed_addr global [30000 x [6 x i32]], align 16
@stdout = external local_unnamed_addr global ptr, align 8
@.str.65 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [24 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @vmd_out() local_unnamed_addr #1 {
  %1 = load ptr, ptr @stdout, align 8, !tbaa !5
  %2 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %1, ptr noundef nonnull @.str.93) #2
  %3 = load i32, ptr @culled_tri_count, align 4, !tbaa !9
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %88
  %indvars.iv = phi i64 [ %indvars.iv.next, %88 ], [ 0, %0 ]
  %.027 = phi i32 [ %.1, %88 ], [ -1000, %0 ]
  %5 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %indvars.iv
  %6 = getelementptr inbounds i8, ptr %5, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !9
  %.not = icmp eq i32 %7, %.027
  br i1 %.not, label %14, label %8

8:                                                ; preds = %.lr.ph
  %9 = load ptr, ptr @stdout, align 8, !tbaa !5
  switch i32 %7, label %12 [
    i32 2, label %.sink.split
    i32 3, label %10
    i32 7, label %11
  ]

10:                                               ; preds = %8
  br label %.sink.split

11:                                               ; preds = %8
  br label %.sink.split

12:                                               ; preds = %8
  br label %.sink.split

.sink.split:                                      ; preds = %8, %12, %11, %10
  %.str.94.sink = phi ptr [ @.str.95, %10 ], [ @.str.96, %11 ], [ @.str.97, %12 ], [ @.str.94, %8 ]
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull %.str.94.sink) #2
  br label %14

14:                                               ; preds = %.sink.split, %.lr.ph
  %.1 = phi i32 [ %.027, %.lr.ph ], [ %7, %.sink.split ]
  %15 = load i32, ptr @smooth, align 4, !tbaa !9
  switch i32 %15, label %19 [
    i32 0, label %.sink.split29
    i32 1, label %16
  ]

16:                                               ; preds = %14
  br label %.sink.split29

.sink.split29:                                    ; preds = %14, %16
  %.str.99.sink = phi ptr [ @.str.99, %16 ], [ @.str.98, %14 ]
  %17 = load ptr, ptr @stdout, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull %.str.99.sink) #2
  br label %19

19:                                               ; preds = %.sink.split29, %14
  %20 = load ptr, ptr @stdout, align 8, !tbaa !5
  %21 = load i32, ptr %5, align 8, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %22
  %24 = load double, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load double, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %23, i64 16
  %28 = load double, ptr %27, align 8, !tbaa !11
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.100, double noundef %24, double noundef %26, double noundef %28) #2
  %30 = load ptr, ptr @stdout, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %5, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %34, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %34, i64 16
  %39 = load double, ptr %38, align 8, !tbaa !11
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str.100, double noundef %35, double noundef %37, double noundef %39) #2
  %41 = load ptr, ptr @stdout, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %5, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %44
  %46 = load double, ptr %45, align 8, !tbaa !11
  %47 = getelementptr inbounds i8, ptr %45, i64 8
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds i8, ptr %45, i64 16
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.100, double noundef %46, double noundef %48, double noundef %50) #2
  %52 = load i32, ptr @smooth, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %88

54:                                               ; preds = %19
  %55 = load ptr, ptr @stdout, align 8, !tbaa !5
  %56 = load i32, ptr %5, align 8, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %57
  %59 = getelementptr inbounds i8, ptr %58, i64 32
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %58, i64 40
  %62 = load double, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds i8, ptr %58, i64 48
  %64 = load double, ptr %63, align 8, !tbaa !11
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.101, double noundef %60, double noundef %62, double noundef %64) #2
  %66 = load ptr, ptr @stdout, align 8, !tbaa !5
  %67 = load i32, ptr %31, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %68
  %70 = getelementptr inbounds i8, ptr %69, i64 32
  %71 = load double, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds i8, ptr %69, i64 40
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = getelementptr inbounds i8, ptr %69, i64 48
  %75 = load double, ptr %74, align 8, !tbaa !11
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.101, double noundef %71, double noundef %73, double noundef %75) #2
  %77 = load ptr, ptr @stdout, align 8, !tbaa !5
  %78 = load i32, ptr %42, align 8, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [30000 x [7 x double]], ptr @dots, i64 0, i64 %79
  %81 = getelementptr inbounds i8, ptr %80, i64 32
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds i8, ptr %80, i64 40
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds i8, ptr %80, i64 48
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str.101, double noundef %82, double noundef %84, double noundef %86) #2
  br label %88

88:                                               ; preds = %54, %19
  %89 = load ptr, ptr @stdout, align 8, !tbaa !5
  %90 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.65) #2
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %91 = load i32, ptr @culled_tri_count, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = icmp slt i64 %indvars.iv.next, %92
  br i1 %93, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %88, %0
  ret void
}

attributes #0 = { 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 #1 = { nofree 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)"}
!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"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass