; LLVM IR from osmart/hole2 :: src/retired_routines (surface)

; 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
@.str.33 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [15 x i8], align 1
@culled_tri = external dso_local global [30000 x [6 x i32]], align 16
@.str.46 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [5 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 i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local void @vrml_end() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  %3 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %4 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  %5 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  %6 = call i32 (ptr, ...) @printf(ptr noundef @.str.40)
  %7 = call i32 (ptr, ...) @printf(ptr noundef @.str.41)
  %8 = call i32 (ptr, ...) @printf(ptr noundef @.str.42)
  %9 = call i32 (ptr, ...) @printf(ptr noundef @.str.43)
  %10 = call i32 (ptr, ...) @printf(ptr noundef @.str.44)
  %11 = call i32 (ptr, ...) @printf(ptr noundef @.str.45)
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %46, %0
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %16, label %49

16:                                               ; preds = %12
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %18
  %20 = getelementptr inbounds [6 x i32], ptr %19, i64 0, i64 3
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 3
  br i1 %22, label %23, label %45

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

26:                                               ; preds = %23
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  br label %28

28:                                               ; preds = %26, %23
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %30
  %32 = getelementptr inbounds [6 x i32], ptr %31, i64 0, i64 0
  %33 = load i32, ptr %32, align 8, !tbaa !5
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %35
  %37 = getelementptr inbounds [6 x i32], ptr %36, i64 0, i64 1
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %40
  %42 = getelementptr inbounds [6 x i32], ptr %41, i64 0, i64 2
  %43 = load i32, ptr %42, align 8, !tbaa !5
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.46, i32 noundef %33, i32 noundef %38, i32 noundef %43)
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %28, %16
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %1, align 4, !tbaa !5
  br label %12, !llvm.loop !9

49:                                               ; preds = %12
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.47)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.48)
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.49)
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.50)
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.42)
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.43)
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.44)
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.45)
  store i32 0, ptr %2, align 4, !tbaa !5
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %94, %49
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %97

64:                                               ; preds = %60
  %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 3
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 7
  br i1 %70, label %71, label %93

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

74:                                               ; preds = %71
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  br label %76

76:                                               ; preds = %74, %71
  store i32 1, ptr %2, align 4, !tbaa !5
  %77 = load i32, ptr %1, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %78
  %80 = getelementptr inbounds [6 x i32], ptr %79, i64 0, i64 0
  %81 = load i32, ptr %80, align 8, !tbaa !5
  %82 = load i32, ptr %1, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %83
  %85 = getelementptr inbounds [6 x i32], ptr %84, i64 0, i64 1
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %88
  %90 = getelementptr inbounds [6 x i32], ptr %89, i64 0, i64 2
  %91 = load i32, ptr %90, align 8, !tbaa !5
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.46, i32 noundef %81, i32 noundef %86, i32 noundef %91)
  br label %93

93:                                               ; preds = %76, %64
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %1, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %1, align 4, !tbaa !5
  br label %60, !llvm.loop !11

97:                                               ; preds = %60
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.47)
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.51)
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.52)
  %103 = call i32 (ptr, ...) @printf(ptr noundef @.str.50)
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.53)
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.43)
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.44)
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.45)
  store i32 0, ptr %2, align 4, !tbaa !5
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %142, %97
  %109 = load i32, ptr %1, align 4, !tbaa !5
  %110 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %112, label %145

112:                                              ; preds = %108
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %114
  %116 = getelementptr inbounds [6 x i32], ptr %115, i64 0, i64 3
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = icmp eq i32 %117, 2
  br i1 %118, label %119, label %141

119:                                              ; preds = %112
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %124

122:                                              ; preds = %119
  %123 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  br label %124

124:                                              ; preds = %122, %119
  %125 = load i32, ptr %1, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %126
  %128 = getelementptr inbounds [6 x i32], ptr %127, i64 0, i64 0
  %129 = load i32, ptr %128, align 8, !tbaa !5
  %130 = load i32, ptr %1, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %131
  %133 = getelementptr inbounds [6 x i32], ptr %132, i64 0, i64 1
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %1, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %136
  %138 = getelementptr inbounds [6 x i32], ptr %137, i64 0, i64 2
  %139 = load i32, ptr %138, align 8, !tbaa !5
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.46, i32 noundef %129, i32 noundef %134, i32 noundef %139)
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %124, %112
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %1, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %1, align 4, !tbaa !5
  br label %108, !llvm.loop !12

145:                                              ; preds = %108
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.47)
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.54)
  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 = { "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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; 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
@.str.33 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [15 x i8], align 1
@culled_tri = external dso_local local_unnamed_addr global [30000 x [6 x i32]], align 16
@.str.46 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [5 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @vrml_end() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39)
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.40)
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.41)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.42)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.43)
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44)
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45)
  %10 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %27
  %12 = phi i32 [ %28, %27 ], [ %10, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %27 ], [ 0, %0 ]
  %.027 = phi i32 [ %.1, %27 ], [ 0, %0 ]
  %13 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %indvars.iv
  %14 = getelementptr inbounds i8, ptr %13, i64 12
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 3
  br i1 %16, label %17, label %27

17:                                               ; preds = %.lr.ph
  %.not25 = icmp eq i32 %.027, 0
  br i1 %.not25, label %20, label %18

18:                                               ; preds = %17
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  br label %20

20:                                               ; preds = %18, %17
  %21 = load i32, ptr %13, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %13, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %13, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !5
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46, i32 noundef %21, i32 noundef %23, i32 noundef %25)
  %.pre = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %.lr.ph, %20
  %28 = phi i32 [ %.pre, %20 ], [ %12, %.lr.ph ]
  %.1 = phi i32 [ 1, %20 ], [ %.027, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %27, %0
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47)
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48)
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50)
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.42)
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.43)
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44)
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45)
  %41 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph31, label %._crit_edge32

.lr.ph31:                                         ; preds = %._crit_edge, %58
  %43 = phi i32 [ %59, %58 ], [ %41, %._crit_edge ]
  %indvars.iv39 = phi i64 [ %indvars.iv.next40, %58 ], [ 0, %._crit_edge ]
  %.229 = phi i32 [ %.3, %58 ], [ 0, %._crit_edge ]
  %44 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %indvars.iv39
  %45 = getelementptr inbounds i8, ptr %44, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 7
  br i1 %47, label %48, label %58

48:                                               ; preds = %.lr.ph31
  %.not24 = icmp eq i32 %.229, 0
  br i1 %.not24, label %51, label %49

49:                                               ; preds = %48
  %50 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  br label %51

51:                                               ; preds = %49, %48
  %52 = load i32, ptr %44, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %44, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %44, i64 8
  %56 = load i32, ptr %55, align 8, !tbaa !5
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46, i32 noundef %52, i32 noundef %54, i32 noundef %56)
  %.pre45 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %.lr.ph31, %51
  %59 = phi i32 [ %.pre45, %51 ], [ %43, %.lr.ph31 ]
  %.3 = phi i32 [ 1, %51 ], [ %.229, %.lr.ph31 ]
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next40, %60
  br i1 %61, label %.lr.ph31, label %._crit_edge32, !llvm.loop !11

._crit_edge32:                                    ; preds = %58, %._crit_edge
  %62 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47)
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50)
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53)
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.43)
  %70 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44)
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45)
  %72 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph36, label %._crit_edge37

.lr.ph36:                                         ; preds = %._crit_edge32, %89
  %74 = phi i32 [ %90, %89 ], [ %72, %._crit_edge32 ]
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %89 ], [ 0, %._crit_edge32 ]
  %.434 = phi i32 [ %.5, %89 ], [ 0, %._crit_edge32 ]
  %75 = getelementptr inbounds [30000 x [6 x i32]], ptr @culled_tri, i64 0, i64 %indvars.iv42
  %76 = getelementptr inbounds i8, ptr %75, i64 12
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp eq i32 %77, 2
  br i1 %78, label %79, label %89

79:                                               ; preds = %.lr.ph36
  %.not = icmp eq i32 %.434, 0
  br i1 %.not, label %82, label %80

80:                                               ; preds = %79
  %81 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  br label %82

82:                                               ; preds = %80, %79
  %83 = load i32, ptr %75, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %75, i64 4
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %75, i64 8
  %87 = load i32, ptr %86, align 8, !tbaa !5
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46, i32 noundef %83, i32 noundef %85, i32 noundef %87)
  %.pre46 = load i32, ptr @culled_tri_count, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %.lr.ph36, %82
  %90 = phi i32 [ %.pre46, %82 ], [ %74, %.lr.ph36 ]
  %.5 = phi i32 [ 1, %82 ], [ %.434, %.lr.ph36 ]
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next43, %91
  br i1 %92, label %.lr.ph36, label %._crit_edge37, !llvm.loop !12

._crit_edge37:                                    ; preds = %89, %._crit_edge32
  %93 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47)
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54)
  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" }

!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"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


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