; LLVM IR from tyoma/agge :: src/agge/vector_rasterizer.ll (ZN4agge17vector_rasterizer6appendERKS0_ii)

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

%"class.agge::vector_rasterizer" = type <{ %"class.agge::pod_vector", %"class.agge::pod_vector.0", %"class.agge::pod_vector.0", %"class.agge::pod_vector", i32, i32, i32, i32, i32, [4 x i8] }>
%"class.agge::pod_vector.0" = type { ptr, ptr, ptr }
%"class.agge::pod_vector" = type { ptr, ptr, ptr }
%"struct.agge::vector_rasterizer::cell" = type <{ i16, i16, i32, i16 }>

; 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

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef ptr @_ZN4agge12_GLOBAL__N_19resize_byINS_10pod_vectorINS_17vector_rasterizer4cellEEEEEPS4_RT_i(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4agge17vector_rasterizer6appendERKS0_ii(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(116) %1, i32 noundef %2, i32 noundef %3) #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %14 = load ptr, ptr %5, align 8
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call noundef zeroext i1 @_ZNK4agge17vector_rasterizer5emptyEv(ptr noundef nonnull align 8 dereferenceable(116) %15)
  br i1 %16, label %17, label %18

17:                                               ; preds = %4
  br label %109

18:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %19 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 0
  %20 = call noundef ptr @_ZN4agge10pod_vectorINS_17vector_rasterizer4cellEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %21 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %20, i64 -1
  store ptr %21, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %22, i32 0, i32 2
  %24 = load i32, ptr %23, align 1, !tbaa !11
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %25, i32 0, i32 3
  %27 = load i16, ptr %26, align 1, !tbaa !14
  %28 = sext i16 %27 to i32
  %29 = or i32 %24, %28
  %30 = icmp ne i32 %29, 0
  %31 = xor i1 %30, true
  %32 = zext i1 %31 to i32
  store i32 %32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %33, i32 0, i32 0
  %35 = call noundef i32 @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34)
  store i32 %35, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %36, i32 0, i32 0
  %38 = call noundef ptr @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %37)
  store ptr %38, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %39 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 0
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = sub i32 %40, %41
  %43 = call noundef ptr @_ZN4agge12_GLOBAL__N_19resize_byINS_10pod_vectorINS_17vector_rasterizer4cellEEEEEPS4_RT_i(ptr noundef nonnull align 8 dereferenceable(24) %39, i32 noundef %42)
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = sub i64 0, %45
  %47 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %43, i64 %46
  store ptr %47, ptr %13, align 8, !tbaa !5
  %48 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 8
  store i32 0, ptr %48, align 8, !tbaa !15
  br label %49

49:                                               ; preds = %53, %18
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = add i32 %50, -1
  store i32 %51, ptr %11, align 4, !tbaa !9
  %52 = icmp ne i32 %50, 0
  br i1 %52, label %53, label %84

53:                                               ; preds = %49
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %54, i32 0, i32 0
  %56 = load i16, ptr %55, align 1, !tbaa !19
  %57 = sext i16 %56 to i32
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = add nsw i32 %57, %58
  %60 = trunc i32 %59 to i16
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %61, i32 0, i32 0
  store i16 %60, ptr %62, align 1, !tbaa !19
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %63, i32 0, i32 1
  %65 = load i16, ptr %64, align 1, !tbaa !20
  %66 = sext i16 %65 to i32
  %67 = load i32, ptr %8, align 4, !tbaa !9
  %68 = add nsw i32 %66, %67
  %69 = trunc i32 %68 to i16
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %70, i32 0, i32 1
  store i16 %69, ptr %71, align 1, !tbaa !20
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 1, !tbaa !11
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %75, i32 0, i32 2
  store i32 %74, ptr %76, align 1, !tbaa !11
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %77, i32 1
  store ptr %78, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %77, i32 0, i32 3
  %80 = load i16, ptr %79, align 1, !tbaa !14
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %81, i32 1
  store ptr %82, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %81, i32 0, i32 3
  store i16 %80, ptr %83, align 1, !tbaa !14
  br label %49, !llvm.loop !21

84:                                               ; preds = %49
  %85 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 5
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %86, i32 0, i32 5
  %88 = load i32, ptr %87, align 4, !tbaa !23
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = add nsw i32 %88, %89
  call void @_ZN4agge10update_minIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %85, i32 noundef %90)
  %91 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 4
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %92, i32 0, i32 4
  %94 = load i32, ptr %93, align 8, !tbaa !24
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = add nsw i32 %94, %95
  call void @_ZN4agge10update_minIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %91, i32 noundef %96)
  %97 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 6
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %98, i32 0, i32 6
  %100 = load i32, ptr %99, align 8, !tbaa !25
  %101 = load i32, ptr %7, align 4, !tbaa !9
  %102 = add nsw i32 %100, %101
  call void @_ZN4agge10update_maxIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %97, i32 noundef %102)
  %103 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %14, i32 0, i32 7
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.agge::vector_rasterizer", ptr %104, i32 0, i32 7
  %106 = load i32, ptr %105, align 4, !tbaa !26
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = add nsw i32 %106, %107
  call void @_ZN4agge10update_maxIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %103, i32 noundef %108)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %109

109:                                              ; preds = %84, %17
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4agge17vector_rasterizer5emptyEv(ptr noundef nonnull align 8 dereferenceable(116)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4agge10pod_vectorINS_17vector_rasterizer4cellEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4agge10update_minIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4agge10update_maxIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress 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 = { mustprogress 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 = { inlinehint mustprogress 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_ZTSN4agge17vector_rasterizer4cellE", !13, i64 0, !13, i64 2, !10, i64 4, !13, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !10, i64 112}
!16 = !{!"_ZTSN4agge17vector_rasterizerE", !17, i64 0, !18, i64 24, !18, i64 48, !17, i64 72, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112}
!17 = !{!"_ZTSN4agge10pod_vectorINS_17vector_rasterizer4cellEEE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSN4agge10pod_vectorIjEE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!12, !13, i64 0}
!20 = !{!12, !13, i64 2}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!16, !10, i64 100}
!24 = !{!16, !10, i64 96}
!25 = !{!16, !10, i64 104}
!26 = !{!16, !10, i64 108}


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

%"struct.agge::vector_rasterizer::cell" = type <{ i16, i16, i32, i16 }>

; Function Attrs: alwaysinline mustprogress uwtable
declare hidden noundef ptr @_ZN4agge12_GLOBAL__N_19resize_byINS_10pod_vectorINS_17vector_rasterizer4cellEEEEEPS4_RT_i(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4agge17vector_rasterizer6appendERKS0_ii(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(116) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #1 align 2 {
  %5 = tail call noundef zeroext i1 @_ZNK4agge17vector_rasterizer5emptyEv(ptr noundef nonnull align 8 dereferenceable(116) %1)
  br i1 %5, label %83, label %6

6:                                                ; preds = %4
  %7 = tail call noundef ptr @_ZN4agge10pod_vectorINS_17vector_rasterizer4cellEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %8 = getelementptr inbounds i8, ptr %7, i64 -6
  %9 = load i32, ptr %8, align 1, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %7, i64 -2
  %11 = load i16, ptr %10, align 1, !tbaa !11
  %12 = sext i16 %11 to i32
  %13 = or i32 %9, %12
  %.not = icmp eq i32 %13, 0
  %.neg = sext i1 %.not to i32
  %14 = tail call noundef i32 @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %15 = tail call noundef ptr @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %16 = add i32 %14, %.neg
  %17 = tail call noundef ptr @_ZN4agge12_GLOBAL__N_19resize_byINS_10pod_vectorINS_17vector_rasterizer4cellEEEEEPS4_RT_i(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 0, ptr %18, align 8, !tbaa !12
  %.not3031 = icmp eq i32 %14, 0
  br i1 %.not3031, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %.neg29 = sext i1 %.not to i64
  %19 = getelementptr inbounds %"struct.agge::vector_rasterizer::cell", ptr %17, i64 %.neg29
  %20 = trunc i32 %2 to i16
  %21 = trunc i32 %3 to i16
  %xtraiter = and i32 %14, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph
  %22 = add nsw i32 %14, -1
  %23 = load i16, ptr %15, align 1, !tbaa !17
  %24 = add i16 %23, %20
  store i16 %24, ptr %19, align 1, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %15, i64 2
  %26 = load i16, ptr %25, align 1, !tbaa !18
  %27 = add i16 %26, %21
  %28 = getelementptr inbounds i8, ptr %19, i64 2
  store i16 %27, ptr %28, align 1, !tbaa !18
  %29 = getelementptr inbounds i8, ptr %15, i64 4
  %30 = load i32, ptr %29, align 1, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %19, i64 4
  store i32 %30, ptr %31, align 1, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %15, i64 10
  %33 = getelementptr inbounds i8, ptr %15, i64 8
  %34 = load i16, ptr %33, align 1, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %19, i64 10
  %36 = getelementptr inbounds i8, ptr %19, i64 8
  store i16 %34, ptr %36, align 1, !tbaa !11
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph
  %.034.unr = phi ptr [ %19, %.lr.ph ], [ %35, %.prol.loopexit.unr-lcssa ]
  %.02733.unr = phi ptr [ %15, %.lr.ph ], [ %32, %.prol.loopexit.unr-lcssa ]
  %.02832.unr = phi i32 [ %14, %.lr.ph ], [ %22, %.prol.loopexit.unr-lcssa ]
  %37 = icmp eq i32 %14, 1
  br i1 %37, label %._crit_edge, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.prol.loopexit, %.lr.ph.new
  %.034 = phi ptr [ %65, %.lr.ph.new ], [ %.034.unr, %.prol.loopexit ]
  %.02733 = phi ptr [ %62, %.lr.ph.new ], [ %.02733.unr, %.prol.loopexit ]
  %.02832 = phi i32 [ %52, %.lr.ph.new ], [ %.02832.unr, %.prol.loopexit ]
  %38 = load i16, ptr %.02733, align 1, !tbaa !17
  %39 = add i16 %38, %20
  store i16 %39, ptr %.034, align 1, !tbaa !17
  %40 = getelementptr inbounds i8, ptr %.02733, i64 2
  %41 = load i16, ptr %40, align 1, !tbaa !18
  %42 = add i16 %41, %21
  %43 = getelementptr inbounds i8, ptr %.034, i64 2
  store i16 %42, ptr %43, align 1, !tbaa !18
  %44 = getelementptr inbounds i8, ptr %.02733, i64 4
  %45 = load i32, ptr %44, align 1, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %.034, i64 4
  store i32 %45, ptr %46, align 1, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %.02733, i64 10
  %48 = getelementptr inbounds i8, ptr %.02733, i64 8
  %49 = load i16, ptr %48, align 1, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %.034, i64 10
  %51 = getelementptr inbounds i8, ptr %.034, i64 8
  store i16 %49, ptr %51, align 1, !tbaa !11
  %52 = add i32 %.02832, -2
  %53 = load i16, ptr %47, align 1, !tbaa !17
  %54 = add i16 %53, %20
  store i16 %54, ptr %50, align 1, !tbaa !17
  %55 = getelementptr inbounds i8, ptr %.02733, i64 12
  %56 = load i16, ptr %55, align 1, !tbaa !18
  %57 = add i16 %56, %21
  %58 = getelementptr inbounds i8, ptr %.034, i64 12
  store i16 %57, ptr %58, align 1, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %.02733, i64 14
  %60 = load i32, ptr %59, align 1, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %.034, i64 14
  store i32 %60, ptr %61, align 1, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %.02733, i64 20
  %63 = getelementptr inbounds i8, ptr %.02733, i64 18
  %64 = load i16, ptr %63, align 1, !tbaa !11
  %65 = getelementptr inbounds i8, ptr %.034, i64 20
  %66 = getelementptr inbounds i8, ptr %.034, i64 18
  store i16 %64, ptr %66, align 1, !tbaa !11
  %.not30.1 = icmp eq i32 %52, 0
  br i1 %.not30.1, label %._crit_edge, label %.lr.ph.new, !llvm.loop !19

._crit_edge:                                      ; preds = %.prol.loopexit, %.lr.ph.new, %6
  %67 = getelementptr inbounds i8, ptr %0, i64 100
  %68 = getelementptr inbounds i8, ptr %1, i64 100
  %69 = load i32, ptr %68, align 4, !tbaa !21
  %70 = add nsw i32 %69, %2
  tail call void @_ZN4agge10update_minIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %67, i32 noundef %70)
  %71 = getelementptr inbounds i8, ptr %0, i64 96
  %72 = getelementptr inbounds i8, ptr %1, i64 96
  %73 = load i32, ptr %72, align 8, !tbaa !22
  %74 = add nsw i32 %73, %3
  tail call void @_ZN4agge10update_minIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %71, i32 noundef %74)
  %75 = getelementptr inbounds i8, ptr %0, i64 104
  %76 = getelementptr inbounds i8, ptr %1, i64 104
  %77 = load i32, ptr %76, align 8, !tbaa !23
  %78 = add nsw i32 %77, %2
  tail call void @_ZN4agge10update_maxIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %75, i32 noundef %78)
  %79 = getelementptr inbounds i8, ptr %0, i64 108
  %80 = getelementptr inbounds i8, ptr %1, i64 108
  %81 = load i32, ptr %80, align 4, !tbaa !24
  %82 = add nsw i32 %81, %3
  tail call void @_ZN4agge10update_maxIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4) %79, i32 noundef %82)
  br label %83

83:                                               ; preds = %4, %._crit_edge
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4agge17vector_rasterizer5emptyEv(ptr noundef nonnull align 8 dereferenceable(116)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4agge10pod_vectorINS_17vector_rasterizer4cellEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4agge10pod_vectorINS_17vector_rasterizer4cellEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4agge10update_minIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4agge10update_maxIiEEvRT_S1_(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #2

attributes #0 = { alwaysinline mustprogress 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 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 = { inlinehint mustprogress 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, !10, i64 4}
!6 = !{!"_ZTSN4agge17vector_rasterizer4cellE", !7, i64 0, !7, i64 2, !10, i64 4, !7, i64 8}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!13, !10, i64 112}
!13 = !{!"_ZTSN4agge17vector_rasterizerE", !14, i64 0, !16, i64 24, !16, i64 48, !14, i64 72, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112}
!14 = !{!"_ZTSN4agge10pod_vectorINS_17vector_rasterizer4cellEEE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"_ZTSN4agge10pod_vectorIjEE", !15, i64 0, !15, i64 8, !15, i64 16}
!17 = !{!6, !7, i64 0}
!18 = !{!6, !7, i64 2}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!13, !10, i64 100}
!22 = !{!13, !10, i64 96}
!23 = !{!13, !10, i64 104}
!24 = !{!13, !10, i64 108}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass