; LLVM IR from jgaeddert/liquid-dsp :: src/sequence/src (bsequence)

; 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.bsequence_s = type { ptr, i32, i32, i32, i32 }

@.str.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [58 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

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

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

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @bsequence_create_ccodes(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.bsequence_s, ptr %14, i32 0, i32 1
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.bsequence_s, ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = icmp ne i32 %16, %19
  br i1 %20, label %21, label %23

21:                                               ; preds = %2
  %22 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 297, ptr noundef @.str.6)
  store i32 %22, ptr %3, align 4
  br label %138

23:                                               ; preds = %2
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.bsequence_s, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %27 = icmp ult i32 %26, 8
  br i1 %27, label %28, label %30

28:                                               ; preds = %23
  %29 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 299, ptr noundef @.str.7)
  store i32 %29, ptr %3, align 4
  br label %138

30:                                               ; preds = %23
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.bsequence_s, ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 8, !tbaa !9
  %34 = urem i32 %33, 8
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %30
  %37 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.1, i32 noundef 301, ptr noundef @.str.8)
  store i32 %37, ptr %3, align 4
  br label %138

38:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.bsequence_s, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 8, !tbaa !9
  %42 = udiv i32 %41, 8
  store i32 %42, ptr %6, align 4, !tbaa !12
  %43 = load i32, ptr %6, align 4, !tbaa !12
  %44 = zext i32 %43 to i64
  %45 = call ptr @llvm.stacksave.p0()
  store ptr %45, ptr %7, align 8
  %46 = alloca i8, i64 %44, align 16
  store i64 %44, ptr %8, align 8
  %47 = load i32, ptr %6, align 4, !tbaa !12
  %48 = zext i32 %47 to i64
  %49 = alloca i8, i64 %48, align 16
  store i64 %48, ptr %9, align 8
  %50 = load i32, ptr %6, align 4, !tbaa !12
  %51 = zext i32 %50 to i64
  call void @llvm.memset.p0.i64(ptr align 16 %46, i8 0, i64 %51, i1 false)
  %52 = load i32, ptr %6, align 4, !tbaa !12
  %53 = zext i32 %52 to i64
  call void @llvm.memset.p0.i64(ptr align 16 %49, i8 0, i64 %53, i1 false)
  %54 = load i32, ptr %6, align 4, !tbaa !12
  %55 = sub i32 %54, 1
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds i8, ptr %46, i64 %56
  store i8 -72, ptr %57, align 1, !tbaa !13
  %58 = load i32, ptr %6, align 4, !tbaa !12
  %59 = sub i32 %58, 1
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %49, i64 %60
  store i8 -73, ptr %61, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  br label %62

62:                                               ; preds = %128, %38
  %63 = load i32, ptr %11, align 4, !tbaa !12
  %64 = load i32, ptr %6, align 4, !tbaa !12
  %65 = icmp ult i32 %63, %64
  br i1 %65, label %66, label %132

66:                                               ; preds = %62
  %67 = load i32, ptr %6, align 4, !tbaa !12
  %68 = load i32, ptr %11, align 4, !tbaa !12
  %69 = sub i32 %67, %68
  store i32 %69, ptr %12, align 4, !tbaa !12
  %70 = load i32, ptr %6, align 4, !tbaa !12
  %71 = load i32, ptr %11, align 4, !tbaa !12
  %72 = mul i32 2, %71
  %73 = sub i32 %70, %72
  store i32 %73, ptr %13, align 4, !tbaa !12
  %74 = load i32, ptr %13, align 4, !tbaa !12
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %46, i64 %75
  %77 = load i32, ptr %12, align 4, !tbaa !12
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %46, i64 %78
  %80 = load i32, ptr %11, align 4, !tbaa !12
  %81 = zext i32 %80 to i64
  %82 = mul i64 %81, 1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %76, ptr align 1 %79, i64 %82, i1 false)
  %83 = load i32, ptr %13, align 4, !tbaa !12
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %49, i64 %84
  %86 = load i32, ptr %12, align 4, !tbaa !12
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds i8, ptr %46, i64 %87
  %89 = load i32, ptr %11, align 4, !tbaa !12
  %90 = zext i32 %89 to i64
  %91 = mul i64 %90, 1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %85, ptr align 1 %88, i64 %91, i1 false)
  %92 = load i32, ptr %12, align 4, !tbaa !12
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %46, i64 %93
  %95 = load i32, ptr %12, align 4, !tbaa !12
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds i8, ptr %49, i64 %96
  %98 = load i32, ptr %11, align 4, !tbaa !12
  %99 = zext i32 %98 to i64
  %100 = mul i64 %99, 1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %94, ptr align 1 %97, i64 %100, i1 false)
  %101 = load i32, ptr %12, align 4, !tbaa !12
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %49, i64 %102
  %104 = load i32, ptr %12, align 4, !tbaa !12
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds i8, ptr %49, i64 %105
  %107 = load i32, ptr %11, align 4, !tbaa !12
  %108 = zext i32 %107 to i64
  %109 = mul i64 %108, 1
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %103, ptr align 1 %106, i64 %109, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %110

110:                                              ; preds = %125, %66
  %111 = load i32, ptr %10, align 4, !tbaa !12
  %112 = load i32, ptr %11, align 4, !tbaa !12
  %113 = icmp ult i32 %111, %112
  br i1 %113, label %114, label %128

114:                                              ; preds = %110
  %115 = load i32, ptr %6, align 4, !tbaa !12
  %116 = load i32, ptr %10, align 4, !tbaa !12
  %117 = sub i32 %115, %116
  %118 = sub i32 %117, 1
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %49, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !13
  %122 = zext i8 %121 to i32
  %123 = xor i32 %122, 255
  %124 = trunc i32 %123 to i8
  store i8 %124, ptr %120, align 1, !tbaa !13
  br label %125

125:                                              ; preds = %114
  %126 = load i32, ptr %10, align 4, !tbaa !12
  %127 = add i32 %126, 1
  store i32 %127, ptr %10, align 4, !tbaa !12
  br label %110, !llvm.loop !14

128:                                              ; preds = %110
  %129 = load i32, ptr %11, align 4, !tbaa !12
  %130 = load i32, ptr %11, align 4, !tbaa !12
  %131 = add i32 %130, %129
  store i32 %131, ptr %11, align 4, !tbaa !12
  br label %62, !llvm.loop !16

132:                                              ; preds = %62
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = call i32 @bsequence_init(ptr noundef %133, ptr noundef %46)
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = call i32 @bsequence_init(ptr noundef %135, ptr noundef %49)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %137 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %137)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %138

138:                                              ; preds = %132, %36, %28, %21
  %139 = load i32, ptr %3, align 4
  ret i32 %139
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 8}
!10 = !{!"bsequence_s", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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.1 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [58 x i8], align 1

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

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

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @bsequence_create_ccodes(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i32 %4, %6
  br i1 %.not, label %9, label %7

7:                                                ; preds = %2
  %8 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 297, ptr noundef nonnull @.str.6) #7
  br label %79

9:                                                ; preds = %2
  %10 = icmp ult i32 %4, 8
  br i1 %10, label %11, label %13

11:                                               ; preds = %9
  %12 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 299, ptr noundef nonnull @.str.7) #7
  br label %79

13:                                               ; preds = %9
  %14 = and i32 %4, 7
  %.not43 = icmp eq i32 %14, 0
  br i1 %.not43, label %17, label %15

15:                                               ; preds = %13
  %16 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.1, i32 noundef 301, ptr noundef nonnull @.str.8) #7
  br label %79

17:                                               ; preds = %13
  %18 = lshr exact i32 %4, 3
  %19 = zext nneg i32 %18 to i64
  %20 = tail call ptr @llvm.stacksave.p0()
  %21 = alloca i8, i64 %19, align 16
  %22 = alloca i8, i64 %19, align 16
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %21, i8 0, i64 %19, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %22, i8 0, i64 %19, i1 false)
  %23 = add nsw i32 %18, -1
  %24 = zext nneg i32 %23 to i64
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  store i8 -72, ptr %25, align 1, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %22, i64 %24
  store i8 -73, ptr %26, align 1, !tbaa !11
  %.not46 = icmp eq i32 %4, 8
  br i1 %.not46, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %17
  %27 = add nsw i32 %18, -1
  %invariant.gep = getelementptr i8, ptr %22, i64 -15
  %28 = add nsw i32 %18, -1
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr %22, i64 %29
  %31 = getelementptr inbounds i8, ptr %30, i64 -7
  br label %iter.check

.loopexit.loopexit.unr-lcssa:                     ; preds = %vec.epilog.scalar.ph, %vec.epilog.scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %vec.epilog.scalar.ph.preheader ], [ %indvars.iv.next.1, %vec.epilog.scalar.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %vec.epilog.scalar.ph.epil

vec.epilog.scalar.ph.epil:                        ; preds = %.loopexit.loopexit.unr-lcssa
  %32 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %33 = xor i32 %32, -1
  %34 = add nsw i32 %18, %33
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %22, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !11
  %38 = xor i8 %37, -1
  store i8 %38, ptr %36, align 1, !tbaa !11
  br label %.loopexit

.loopexit:                                        ; preds = %vector.body, %vec.epilog.scalar.ph.epil, %.loopexit.loopexit.unr-lcssa, %vec.epilog.vector.body
  %39 = icmp ult i32 %41, %18
  br i1 %39, label %iter.check, label %._crit_edge, !llvm.loop !12

iter.check:                                       ; preds = %.lr.ph.preheader, %.loopexit
  %.04045 = phi i32 [ %41, %.loopexit ], [ 1, %.lr.ph.preheader ]
  %40 = sub nsw i32 %18, %.04045
  %41 = shl nuw nsw i32 %.04045, 1
  %42 = sub nsw i32 %18, %41
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %21, i64 %43
  %45 = zext i32 %40 to i64
  %46 = getelementptr inbounds i8, ptr %21, i64 %45
  %47 = zext nneg i32 %.04045 to i64
  call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %44, ptr noundef nonnull align 1 dereferenceable(1) %46, i64 %47, i1 false)
  %48 = getelementptr inbounds i8, ptr %22, i64 %43
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %48, ptr noundef nonnull align 1 dereferenceable(1) %46, i64 %47, i1 false)
  %49 = getelementptr inbounds i8, ptr %22, i64 %45
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %46, ptr noundef nonnull align 1 dereferenceable(1) %49, i64 %47, i1 false)
  %umax = tail call i32 @llvm.umax.i32(i32 %.04045, i32 1)
  %wide.trip.count = zext nneg i32 %umax to i64
  %min.iters.check = icmp ult i32 %.04045, 8
  br i1 %min.iters.check, label %vec.epilog.scalar.ph.preheader, label %vector.scevcheck

vec.epilog.scalar.ph.preheader:                   ; preds = %vector.scevcheck, %iter.check
  %xtraiter = and i64 %wide.trip.count, 1
  %50 = icmp ult i32 %.04045, 2
  br i1 %50, label %.loopexit.loopexit.unr-lcssa, label %vec.epilog.scalar.ph.preheader.new

vec.epilog.scalar.ph.preheader.new:               ; preds = %vec.epilog.scalar.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %vec.epilog.scalar.ph

vector.scevcheck:                                 ; preds = %iter.check
  %51 = add nsw i64 %wide.trip.count, -1
  %52 = trunc nsw i64 %51 to i32
  %53 = icmp ult i32 %27, %52
  %54 = icmp ugt i64 %51, 4294967295
  %55 = or i1 %53, %54
  br i1 %55, label %vec.epilog.scalar.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.scevcheck
  %min.iters.check48 = icmp ult i32 %.04045, 16
  br i1 %min.iters.check48, label %vec.epilog.vector.body, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %wide.trip.count, 2147483632
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %56 = trunc i64 %index to i32
  %57 = xor i32 %56, -1
  %58 = add nsw i32 %18, %57
  %59 = zext i32 %58 to i64
  %gep = getelementptr i8, ptr %invariant.gep, i64 %59
  %wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !11
  %60 = xor <16 x i8> %wide.load, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
  store <16 x i8> %60, ptr %gep, align 1, !tbaa !11
  %index.next = add nuw i64 %index, 16
  %61 = icmp eq i64 %index.next, %n.vec
  br i1 %61, label %.loopexit, label %vector.body, !llvm.loop !14

vec.epilog.vector.body:                           ; preds = %vector.main.loop.iter.check
  %wide.load53 = load <8 x i8>, ptr %31, align 1, !tbaa !11
  %62 = xor <8 x i8> %wide.load53, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
  store <8 x i8> %62, ptr %31, align 1, !tbaa !11
  br label %.loopexit

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph, %vec.epilog.scalar.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %vec.epilog.scalar.ph.preheader.new ], [ %indvars.iv.next.1, %vec.epilog.scalar.ph ]
  %niter = phi i64 [ 0, %vec.epilog.scalar.ph.preheader.new ], [ %niter.next.1, %vec.epilog.scalar.ph ]
  %63 = trunc nuw nsw i64 %indvars.iv to i32
  %64 = xor i32 %63, -1
  %65 = add nsw i32 %18, %64
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i8, ptr %22, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !11
  %69 = xor i8 %68, -1
  store i8 %69, ptr %67, align 1, !tbaa !11
  %70 = trunc i64 %indvars.iv to i32
  %71 = xor i32 %70, -2
  %72 = add nsw i32 %18, %71
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds i8, ptr %22, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = xor i8 %75, -1
  store i8 %76, ptr %74, align 1, !tbaa !11
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %vec.epilog.scalar.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.loopexit, %17
  %77 = call i32 @bsequence_init(ptr noundef %0, ptr noundef nonnull %21)
  %78 = call i32 @bsequence_init(ptr noundef %1, ptr noundef nonnull %22)
  call void @llvm.stackrestore.p0(ptr %20)
  br label %79

79:                                               ; preds = %._crit_edge, %15, %11, %7
  %.0 = phi i32 [ %8, %7 ], [ %12, %11 ], [ %16, %15 ], [ 0, %._crit_edge ]
  ret i32 %.0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #1 = { 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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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, !10, i64 8}
!6 = !{!"bsequence_s", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !13, !15}


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass