; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/process/src/c_src (imageprocess)

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

%struct.SIMPLE_MAT = type { i32, i32, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @simple_mat_addition_uchar(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %26

19:                                               ; preds = %3
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %26

22:                                               ; preds = %19
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  br label %30

26:                                               ; preds = %22, %19, %3
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

30:                                               ; preds = %25
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %31, i32 0, i32 3
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %34, i32 0, i32 3
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = icmp eq i32 %33, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %30
  br label %43

39:                                               ; preds = %30
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #4
  unreachable

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %44, i32 0, i32 3
  %46 = load i32, ptr %45, align 4, !tbaa !9
  store i32 %46, ptr %9, align 4, !tbaa !12
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !13
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !13
  %53 = icmp sge i32 %49, %52
  br i1 %53, label %54, label %58

54:                                               ; preds = %43
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !13
  store i32 %57, ptr %7, align 4, !tbaa !12
  br label %62

58:                                               ; preds = %43
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !13
  store i32 %61, ptr %7, align 4, !tbaa !12
  br label %62

62:                                               ; preds = %58, %54
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !14
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %66, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !14
  %69 = icmp sge i32 %65, %68
  br i1 %69, label %70, label %74

70:                                               ; preds = %62
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !14
  store i32 %73, ptr %8, align 4, !tbaa !12
  br label %78

74:                                               ; preds = %62
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %75, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !14
  store i32 %77, ptr %8, align 4, !tbaa !12
  br label %78

78:                                               ; preds = %74, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %79, i32 0, i32 5
  %81 = load ptr, ptr %80, align 8, !tbaa !15
  store ptr %81, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %82, i32 0, i32 5
  %84 = load ptr, ptr %83, align 8, !tbaa !15
  store ptr %84, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %85, i32 0, i32 5
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  store ptr %87, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !12
  br label %88

88:                                               ; preds = %162, %78
  %89 = load i32, ptr %13, align 4, !tbaa !12
  %90 = load i32, ptr %7, align 4, !tbaa !12
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %165

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !12
  br label %94

94:                                               ; preds = %158, %93
  %95 = load i32, ptr %15, align 4, !tbaa !12
  %96 = load i32, ptr %8, align 4, !tbaa !12
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %161

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %100

100:                                              ; preds = %154, %99
  %101 = load i32, ptr %16, align 4, !tbaa !12
  %102 = load i32, ptr %9, align 4, !tbaa !12
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %105, label %104

104:                                              ; preds = %100
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %157

105:                                              ; preds = %100
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = load i32, ptr %13, align 4, !tbaa !12
  %108 = load i32, ptr %8, align 4, !tbaa !12
  %109 = mul nsw i32 %107, %108
  %110 = load i32, ptr %9, align 4, !tbaa !12
  %111 = mul nsw i32 %109, %110
  %112 = load i32, ptr %15, align 4, !tbaa !12
  %113 = load i32, ptr %9, align 4, !tbaa !12
  %114 = mul nsw i32 %112, %113
  %115 = add nsw i32 %111, %114
  %116 = load i32, ptr %16, align 4, !tbaa !12
  %117 = add nsw i32 %115, %116
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i8, ptr %106, i64 %118
  %120 = load i8, ptr %119, align 1, !tbaa !16
  %121 = zext i8 %120 to i32
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = load i32, ptr %13, align 4, !tbaa !12
  %124 = load i32, ptr %8, align 4, !tbaa !12
  %125 = mul nsw i32 %123, %124
  %126 = load i32, ptr %9, align 4, !tbaa !12
  %127 = mul nsw i32 %125, %126
  %128 = load i32, ptr %15, align 4, !tbaa !12
  %129 = load i32, ptr %9, align 4, !tbaa !12
  %130 = mul nsw i32 %128, %129
  %131 = add nsw i32 %127, %130
  %132 = load i32, ptr %16, align 4, !tbaa !12
  %133 = add nsw i32 %131, %132
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i8, ptr %122, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !16
  %137 = zext i8 %136 to i32
  %138 = add nsw i32 %121, %137
  %139 = trunc i32 %138 to i8
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = load i32, ptr %13, align 4, !tbaa !12
  %142 = load i32, ptr %8, align 4, !tbaa !12
  %143 = mul nsw i32 %141, %142
  %144 = load i32, ptr %9, align 4, !tbaa !12
  %145 = mul nsw i32 %143, %144
  %146 = load i32, ptr %15, align 4, !tbaa !12
  %147 = load i32, ptr %9, align 4, !tbaa !12
  %148 = mul nsw i32 %146, %147
  %149 = add nsw i32 %145, %148
  %150 = load i32, ptr %16, align 4, !tbaa !12
  %151 = add nsw i32 %149, %150
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i8, ptr %140, i64 %152
  store i8 %139, ptr %153, align 1, !tbaa !16
  br label %154

154:                                              ; preds = %105
  %155 = load i32, ptr %16, align 4, !tbaa !12
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %16, align 4, !tbaa !12
  br label %100, !llvm.loop !17

157:                                              ; preds = %104
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %15, align 4, !tbaa !12
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %15, align 4, !tbaa !12
  br label %94, !llvm.loop !19

161:                                              ; preds = %98
  br label %162

162:                                              ; preds = %161
  %163 = load i32, ptr %13, align 4, !tbaa !12
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %13, align 4, !tbaa !12
  br label %88, !llvm.loop !20

165:                                              ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

attributes #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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { noreturn nounwind }
attributes #5 = { 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, !11, i64 12}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !6, i64 24}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


; 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 [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @simple_mat_addition_uchar(ptr noundef readonly %0, ptr noundef readonly %1, ptr noundef readonly %2) local_unnamed_addr #2 {
  %4 = icmp ne ptr %0, null
  %5 = icmp ne ptr %1, null
  %or.cond = and i1 %4, %5
  %6 = icmp ne ptr %2, null
  %or.cond3 = and i1 %or.cond, %6
  br i1 %or.cond3, label %11, label %7

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

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %1, i64 12
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %13, %15
  br i1 %16, label %21, label %17

17:                                               ; preds = %11
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #4
  unreachable

21:                                               ; preds = %11
  %22 = load i32, ptr %0, align 8, !tbaa !11
  %23 = load i32, ptr %1, align 8, !tbaa !11
  %. = tail call i32 @llvm.smin.i32(i32 %22, i32 %23)
  %24 = getelementptr inbounds i8, ptr %0, i64 4
  %25 = load i32, ptr %24, align 4, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %1, i64 4
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %.052 = tail call i32 @llvm.smin.i32(i32 %25, i32 %27)
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds i8, ptr %1, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %2, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = icmp sgt i32 %., 0
  %35 = icmp sgt i32 %.052, 0
  %or.cond84 = select i1 %34, i1 %35, i1 false
  %36 = icmp sgt i32 %13, 0
  %or.cond85 = and i1 %or.cond84, %36
  br i1 %or.cond85, label %.preheader62.us.us.preheader, label %._crit_edge

.preheader62.us.us.preheader:                     ; preds = %21
  %37 = ptrtoint ptr %33 to i64
  %38 = ptrtoint ptr %31 to i64
  %39 = ptrtoint ptr %29 to i64
  %40 = zext nneg i32 %.052 to i64
  %wide.trip.count82 = zext nneg i32 %. to i64
  %wide.trip.count = zext nneg i32 %13 to i64
  %41 = sub i64 %37, %39
  %42 = sub i64 %37, %38
  %min.iters.check = icmp ult i32 %13, 8
  %diff.check = icmp ult i64 %41, 32
  %diff.check86 = icmp ult i64 %42, 32
  %conflict.rdx = or i1 %diff.check, %diff.check86
  %min.iters.check87 = icmp ult i32 %13, 32
  %n.vec = and i64 %wide.trip.count, 2147483616
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %n.vec.remaining = and i64 %wide.trip.count, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  %n.vec92 = and i64 %wide.trip.count, 2147483640
  %cmp.n97 = icmp eq i64 %n.vec92, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %43 = add nsw i64 %wide.trip.count, -1
  br label %.preheader62.us.us

.preheader62.us.us:                               ; preds = %.preheader62.us.us.preheader, %._crit_edge65.split.us.us.us
  %indvars.iv79 = phi i64 [ 0, %.preheader62.us.us.preheader ], [ %indvars.iv.next80, %._crit_edge65.split.us.us.us ]
  %44 = mul nuw nsw i64 %indvars.iv79, %40
  br label %iter.check

iter.check:                                       ; preds = %._crit_edge.us.us.us, %.preheader62.us.us
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %._crit_edge.us.us.us ], [ 0, %.preheader62.us.us ]
  %45 = add nuw nsw i64 %indvars.iv74, %44
  %46 = trunc nuw i64 %45 to i32
  %47 = mul i32 %13, %46
  %48 = sext i32 %47 to i64
  %brmerge = select i1 %min.iters.check, i1 true, i1 %conflict.rdx
  br i1 %brmerge, label %vec.epilog.scalar.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  br i1 %min.iters.check87, label %vec.epilog.ph, label %vector.body

vector.body:                                      ; preds = %vector.main.loop.iter.check, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
  %49 = add nsw i64 %index, %48
  %50 = getelementptr inbounds i8, ptr %29, i64 %49
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %wide.load = load <16 x i8>, ptr %50, align 1, !tbaa !14
  %wide.load88 = load <16 x i8>, ptr %51, align 1, !tbaa !14
  %52 = getelementptr inbounds i8, ptr %31, i64 %49
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %wide.load89 = load <16 x i8>, ptr %52, align 1, !tbaa !14
  %wide.load90 = load <16 x i8>, ptr %53, align 1, !tbaa !14
  %54 = add <16 x i8> %wide.load89, %wide.load
  %55 = add <16 x i8> %wide.load90, %wide.load88
  %56 = getelementptr inbounds i8, ptr %33, i64 %49
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  store <16 x i8> %54, ptr %56, align 1, !tbaa !14
  store <16 x i8> %55, ptr %57, align 1, !tbaa !14
  %index.next = add nuw i64 %index, 32
  %58 = icmp eq i64 %index.next, %n.vec
  br i1 %58, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us.us.us, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  br i1 %min.epilog.iters.check, label %vec.epilog.scalar.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index93 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next96, %vec.epilog.vector.body ]
  %59 = add nsw i64 %index93, %48
  %60 = getelementptr inbounds i8, ptr %29, i64 %59
  %wide.load94 = load <8 x i8>, ptr %60, align 1, !tbaa !14
  %61 = getelementptr inbounds i8, ptr %31, i64 %59
  %wide.load95 = load <8 x i8>, ptr %61, align 1, !tbaa !14
  %62 = add <8 x i8> %wide.load95, %wide.load94
  %63 = getelementptr inbounds i8, ptr %33, i64 %59
  store <8 x i8> %62, ptr %63, align 1, !tbaa !14
  %index.next96 = add nuw i64 %index93, 8
  %64 = icmp eq i64 %index.next96, %n.vec92
  br i1 %64, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !19

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  br i1 %cmp.n97, label %._crit_edge.us.us.us, label %vec.epilog.scalar.ph.preheader

vec.epilog.scalar.ph.preheader:                   ; preds = %iter.check, %vec.epilog.middle.block, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec92, %vec.epilog.middle.block ]
  br i1 %lcmp.mod.not, label %vec.epilog.scalar.ph.prol.loopexit, label %vec.epilog.scalar.ph.prol

vec.epilog.scalar.ph.prol:                        ; preds = %vec.epilog.scalar.ph.preheader
  %65 = add nsw i64 %indvars.iv.ph, %48
  %66 = getelementptr inbounds i8, ptr %29, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !14
  %68 = getelementptr inbounds i8, ptr %31, i64 %65
  %69 = load i8, ptr %68, align 1, !tbaa !14
  %70 = add i8 %69, %67
  %71 = getelementptr inbounds i8, ptr %33, i64 %65
  store i8 %70, ptr %71, align 1, !tbaa !14
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %vec.epilog.scalar.ph.prol.loopexit

vec.epilog.scalar.ph.prol.loopexit:               ; preds = %vec.epilog.scalar.ph.prol, %vec.epilog.scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %vec.epilog.scalar.ph.preheader ], [ %indvars.iv.next.prol, %vec.epilog.scalar.ph.prol ]
  %72 = icmp eq i64 %indvars.iv.ph, %43
  br i1 %72, label %._crit_edge.us.us.us, label %vec.epilog.scalar.ph

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph.prol.loopexit, %vec.epilog.scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %vec.epilog.scalar.ph ], [ %indvars.iv.unr, %vec.epilog.scalar.ph.prol.loopexit ]
  %73 = add nsw i64 %indvars.iv, %48
  %74 = getelementptr inbounds i8, ptr %29, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !14
  %76 = getelementptr inbounds i8, ptr %31, i64 %73
  %77 = load i8, ptr %76, align 1, !tbaa !14
  %78 = add i8 %77, %75
  %79 = getelementptr inbounds i8, ptr %33, i64 %73
  store i8 %78, ptr %79, align 1, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %80 = add nsw i64 %indvars.iv.next, %48
  %81 = getelementptr inbounds i8, ptr %29, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !14
  %83 = getelementptr inbounds i8, ptr %31, i64 %80
  %84 = load i8, ptr %83, align 1, !tbaa !14
  %85 = add i8 %84, %82
  %86 = getelementptr inbounds i8, ptr %33, i64 %80
  store i8 %85, ptr %86, align 1, !tbaa !14
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.us.us.us, label %vec.epilog.scalar.ph, !llvm.loop !20

._crit_edge.us.us.us:                             ; preds = %vec.epilog.scalar.ph.prol.loopexit, %vec.epilog.scalar.ph, %vec.epilog.middle.block, %middle.block
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %40
  br i1 %exitcond78.not, label %._crit_edge65.split.us.us.us, label %iter.check, !llvm.loop !21

._crit_edge65.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count82
  br i1 %exitcond83.not, label %._crit_edge, label %.preheader62.us.us, !llvm.loop !22

._crit_edge:                                      ; preds = %._crit_edge65.split.us.us.us, %21
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #3

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 12}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !10, i64 24}
!14 = !{!8, !8, i64 0}
!15 = distinct !{!15, !16, !17, !18}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !16, !17, !18}
!20 = distinct !{!20, !16, !17}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass