; LLVM IR from jgaeddert/liquid-dsp :: src/multichannel/src/ofdmframe.common (ofdmframe_init_default_sctype)

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

@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 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

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

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

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

14:                                               ; preds = %2
  %15 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str, i32 noundef 179, ptr noundef @.str.3)
  store i32 %15, ptr %3, align 4
  br label %103

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = udiv i32 %17, 2
  store i32 %18, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = udiv i32 %19, 10
  store i32 %20, ptr %8, align 4, !tbaa !5
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = icmp ult i32 %21, 2
  br i1 %22, label %23, label %24

23:                                               ; preds = %16
  store i32 2, ptr %8, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %23, %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp ugt i32 %25, 34
  %27 = zext i1 %26 to i64
  %28 = select i1 %26, i32 8, i32 4
  store i32 %28, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = udiv i32 %29, 2
  store i32 %30, ptr %10, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %40, %24
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = icmp ult i32 %32, %33
  br i1 %34, label %35, label %43

35:                                               ; preds = %31
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds i8, ptr %36, i64 %38
  store i8 0, ptr %39, align 1, !tbaa !11
  br label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = add i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !5
  br label %31, !llvm.loop !12

43:                                               ; preds = %31
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %68, %43
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = sub i32 %46, %47
  %49 = icmp ult i32 %45, %48
  br i1 %49, label %50, label %71

50:                                               ; preds = %44
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = add i32 %51, %52
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = urem i32 %53, %54
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %62

57:                                               ; preds = %50
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %58, i64 %60
  store i8 1, ptr %61, align 1, !tbaa !11
  br label %67

62:                                               ; preds = %50
  %63 = load ptr, ptr %5, align 8, !tbaa !9
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds i8, ptr %63, i64 %65
  store i8 2, ptr %66, align 1, !tbaa !11
  br label %67

67:                                               ; preds = %62, %57
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = add i32 %69, 1
  store i32 %70, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !14

71:                                               ; preds = %44
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %99, %71
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sub i32 %74, %75
  %77 = icmp ult i32 %73, %76
  br i1 %77, label %78, label %102

78:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = sub i32 %79, %80
  store i32 %81, ptr %11, align 4, !tbaa !5
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr %10, align 4, !tbaa !5
  %84 = add i32 %82, %83
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = urem i32 %84, %85
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %93

88:                                               ; preds = %78
  %89 = load ptr, ptr %5, align 8, !tbaa !9
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = zext i32 %90 to i64
  %92 = getelementptr inbounds i8, ptr %89, i64 %91
  store i8 1, ptr %92, align 1, !tbaa !11
  br label %98

93:                                               ; preds = %78
  %94 = load ptr, ptr %5, align 8, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds i8, ptr %94, i64 %96
  store i8 2, ptr %97, align 1, !tbaa !11
  br label %98

98:                                               ; preds = %93, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = add i32 %100, 1
  store i32 %101, ptr %6, align 4, !tbaa !5
  br label %72, !llvm.loop !15

102:                                              ; preds = %72
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %103

103:                                              ; preds = %102, %14
  %104 = load i32, ptr %3, align 4
  ret i32 %104
}

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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; 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 [94 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ofdmframe_init_default_sctype(i32 noundef %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #1 {
  %3 = icmp ult i32 %0, 6
  br i1 %3, label %4, label %.preheader38

4:                                                ; preds = %2
  %5 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 179, ptr noundef nonnull @.str.3) #4
  br label %.loopexit

.preheader38:                                     ; preds = %2
  %6 = udiv i32 %0, 10
  %7 = icmp ugt i32 %0, 34
  %8 = select i1 %7, i32 8, i32 4
  %9 = zext i32 %0 to i64
  tail call void @llvm.memset.p0.i64(ptr align 1 %1, i8 0, i64 %9, i1 false), !tbaa !5
  %10 = lshr i32 %0, 1
  %spec.store.select = tail call i32 @llvm.umax.i32(i32 %6, i32 2)
  %11 = lshr exact i32 %8, 1
  %12 = sub nsw i32 %10, %spec.store.select
  %13 = icmp ugt i32 %12, 1
  br i1 %13, label %iter.check, label %.loopexit

iter.check:                                       ; preds = %.preheader38
  %14 = add nsw i32 %8, -1
  %wide.trip.count = zext i32 %12 to i64
  %15 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i32 %12, 9
  br i1 %min.iters.check, label %vec.epilog.scalar.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check50 = icmp ult i32 %12, 17
  br i1 %min.iters.check50, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %15, -16
  %broadcast.splatinsert = insertelement <16 x i32> poison, i32 %11, i64 0
  %broadcast.splat = shufflevector <16 x i32> %broadcast.splatinsert, <16 x i32> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert51 = insertelement <16 x i32> poison, i32 %14, i64 0
  %broadcast.splat52 = shufflevector <16 x i32> %broadcast.splatinsert51, <16 x i32> poison, <16 x i32> zeroinitializer
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <16 x i32> [ <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %16 = add <16 x i32> %broadcast.splat, %vec.ind
  %17 = and <16 x i32> %16, %broadcast.splat52
  %18 = icmp eq <16 x i32> %17, zeroinitializer
  %19 = select <16 x i1> %18, <16 x i8> <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>, <16 x i8> <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
  %20 = getelementptr inbounds i8, ptr %1, i64 %offset.idx
  store <16 x i8> %19, ptr %20, align 1
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <16 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %15, %n.vec
  br i1 %cmp.n, label %.preheader, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end56 = or disjoint i64 %n.vec, 1
  %n.vec.remaining = and i64 %15, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %vec.epilog.scalar.ph.preheader, label %vec.epilog.ph

vec.epilog.scalar.ph.preheader:                   ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 1, %iter.check ], [ %ind.end56, %vec.epilog.iter.check ], [ %ind.end55, %vec.epilog.middle.block ]
  br label %vec.epilog.scalar.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %bc.resume.val = phi i64 [ %ind.end, %vec.epilog.iter.check ], [ 1, %vector.main.loop.iter.check ]
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec54 = and i64 %15, -8
  %ind.end55 = or disjoint i64 %n.vec54, 1
  %22 = trunc i64 %bc.resume.val to i32
  %.splatinsert = insertelement <8 x i32> poison, i32 %22, i64 0
  %.splat = shufflevector <8 x i32> %.splatinsert, <8 x i32> poison, <8 x i32> zeroinitializer
  %induction = add <8 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %broadcast.splatinsert62 = insertelement <8 x i32> poison, i32 %11, i64 0
  %broadcast.splat63 = shufflevector <8 x i32> %broadcast.splatinsert62, <8 x i32> poison, <8 x i32> zeroinitializer
  %broadcast.splatinsert64 = insertelement <8 x i32> poison, i32 %14, i64 0
  %broadcast.splat65 = shufflevector <8 x i32> %broadcast.splatinsert64, <8 x i32> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index58 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next66, %vec.epilog.vector.body ]
  %vec.ind59 = phi <8 x i32> [ %induction, %vec.epilog.ph ], [ %vec.ind.next60, %vec.epilog.vector.body ]
  %offset.idx61 = or disjoint i64 %index58, 1
  %23 = add <8 x i32> %broadcast.splat63, %vec.ind59
  %24 = and <8 x i32> %23, %broadcast.splat65
  %25 = icmp eq <8 x i32> %24, zeroinitializer
  %26 = select <8 x i1> %25, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>, <8 x i8> <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
  %27 = getelementptr inbounds i8, ptr %1, i64 %offset.idx61
  store <8 x i8> %26, ptr %27, align 1
  %index.next66 = add nuw i64 %index58, 8
  %vec.ind.next60 = add <8 x i32> %vec.ind59, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
  %28 = icmp eq i64 %index.next66, %n.vec54
  br i1 %28, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !12

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n67 = icmp eq i64 %15, %n.vec54
  br i1 %cmp.n67, label %.preheader, label %vec.epilog.scalar.ph.preheader

.preheader:                                       ; preds = %vec.epilog.scalar.ph, %vec.epilog.middle.block, %middle.block
  br i1 %13, label %iter.check71, label %.loopexit

iter.check71:                                     ; preds = %.preheader
  %29 = add nsw i32 %8, -1
  %wide.trip.count48 = zext i32 %12 to i64
  %30 = add nsw i64 %wide.trip.count, -1
  %min.iters.check69 = icmp ult i32 %12, 9
  br i1 %min.iters.check69, label %vec.epilog.scalar.ph91.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %iter.check71
  %31 = add nsw i64 %wide.trip.count, -2
  %32 = add i32 %0, -1
  %33 = trunc i64 %31 to i32
  %34 = icmp ult i32 %32, %33
  %35 = icmp ugt i64 %31, 4294967295
  %36 = or i1 %34, %35
  br i1 %36, label %vec.epilog.scalar.ph91.preheader, label %vector.main.loop.iter.check73

vector.main.loop.iter.check73:                    ; preds = %vector.scevcheck
  %min.iters.check72 = icmp ult i32 %12, 17
  br i1 %min.iters.check72, label %vec.epilog.ph92, label %vector.ph74

vector.ph74:                                      ; preds = %vector.main.loop.iter.check73
  %n.vec76 = and i64 %30, -16
  %broadcast.splatinsert82 = insertelement <16 x i32> poison, i32 %11, i64 0
  %broadcast.splat83 = shufflevector <16 x i32> %broadcast.splatinsert82, <16 x i32> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert84 = insertelement <16 x i32> poison, i32 %29, i64 0
  %broadcast.splat85 = shufflevector <16 x i32> %broadcast.splatinsert84, <16 x i32> poison, <16 x i32> zeroinitializer
  %ind.end88 = or disjoint i64 %n.vec76, 1
  %invariant.gep = getelementptr i8, ptr %1, i64 -15
  br label %vector.body77

vector.body77:                                    ; preds = %vector.body77, %vector.ph74
  %index78 = phi i64 [ 0, %vector.ph74 ], [ %index.next86, %vector.body77 ]
  %vec.ind79 = phi <16 x i32> [ <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16>, %vector.ph74 ], [ %vec.ind.next80, %vector.body77 ]
  %37 = trunc i64 %index78 to i32
  %.neg = xor i32 %37, -1
  %38 = add i32 %.neg, %0
  %39 = add <16 x i32> %broadcast.splat83, %vec.ind79
  %40 = and <16 x i32> %39, %broadcast.splat85
  %41 = icmp eq <16 x i32> %40, zeroinitializer
  %42 = zext i32 %38 to i64
  %43 = select <16 x i1> %41, <16 x i8> <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>, <16 x i8> <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
  %gep = getelementptr i8, ptr %invariant.gep, i64 %42
  %reverse = shufflevector <16 x i8> %43, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <16 x i8> %reverse, ptr %gep, align 1, !tbaa !5
  %index.next86 = add nuw i64 %index78, 16
  %vec.ind.next80 = add <16 x i32> %vec.ind79, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %44 = icmp eq i64 %index.next86, %n.vec76
  br i1 %44, label %middle.block68, label %vector.body77, !llvm.loop !13

middle.block68:                                   ; preds = %vector.body77
  %cmp.n87 = icmp eq i64 %30, %n.vec76
  br i1 %cmp.n87, label %.loopexit, label %vec.epilog.iter.check93

vec.epilog.iter.check93:                          ; preds = %middle.block68
  %ind.end100 = or disjoint i64 %n.vec76, 1
  %n.vec.remaining94 = and i64 %30, 8
  %min.epilog.iters.check95.not.not = icmp eq i64 %n.vec.remaining94, 0
  br i1 %min.epilog.iters.check95.not.not, label %vec.epilog.scalar.ph91.preheader, label %vec.epilog.ph92

vec.epilog.scalar.ph91.preheader:                 ; preds = %vec.epilog.middle.block90, %vector.scevcheck, %iter.check71, %vec.epilog.iter.check93
  %indvars.iv45.ph = phi i64 [ 1, %iter.check71 ], [ 1, %vector.scevcheck ], [ %ind.end100, %vec.epilog.iter.check93 ], [ %ind.end99, %vec.epilog.middle.block90 ]
  %45 = and i64 %wide.trip.count, 1
  %lcmp.mod.not.not = icmp eq i64 %45, 0
  br i1 %lcmp.mod.not.not, label %vec.epilog.scalar.ph91.prol, label %vec.epilog.scalar.ph91.prol.loopexit

vec.epilog.scalar.ph91.prol:                      ; preds = %vec.epilog.scalar.ph91.preheader
  %46 = trunc nuw i64 %indvars.iv45.ph to i32
  %47 = sub i32 %0, %46
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %1, i64 %48
  store i8 2, ptr %49, align 1, !tbaa !5
  %indvars.iv.next46.prol = add nuw nsw i64 %indvars.iv45.ph, 1
  br label %vec.epilog.scalar.ph91.prol.loopexit

vec.epilog.scalar.ph91.prol.loopexit:             ; preds = %vec.epilog.scalar.ph91.prol, %vec.epilog.scalar.ph91.preheader
  %indvars.iv45.unr = phi i64 [ %indvars.iv45.ph, %vec.epilog.scalar.ph91.preheader ], [ %indvars.iv.next46.prol, %vec.epilog.scalar.ph91.prol ]
  %50 = add nsw i64 %wide.trip.count, -1
  %51 = icmp eq i64 %indvars.iv45.ph, %50
  br i1 %51, label %.loopexit, label %vec.epilog.scalar.ph91

vec.epilog.ph92:                                  ; preds = %vector.main.loop.iter.check73, %vec.epilog.iter.check93
  %bc.resume.val89 = phi i64 [ %ind.end88, %vec.epilog.iter.check93 ], [ 1, %vector.main.loop.iter.check73 ]
  %vec.epilog.resume.val96 = phi i64 [ %n.vec76, %vec.epilog.iter.check93 ], [ 0, %vector.main.loop.iter.check73 ]
  %n.vec98 = and i64 %30, -8
  %ind.end99 = or disjoint i64 %n.vec98, 1
  %52 = trunc i64 %bc.resume.val89 to i32
  %.splatinsert104 = insertelement <8 x i32> poison, i32 %52, i64 0
  %.splat105 = shufflevector <8 x i32> %.splatinsert104, <8 x i32> poison, <8 x i32> zeroinitializer
  %induction106 = add <8 x i32> %.splat105, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %broadcast.splatinsert110 = insertelement <8 x i32> poison, i32 %11, i64 0
  %broadcast.splat111 = shufflevector <8 x i32> %broadcast.splatinsert110, <8 x i32> poison, <8 x i32> zeroinitializer
  %broadcast.splatinsert112 = insertelement <8 x i32> poison, i32 %29, i64 0
  %broadcast.splat113 = shufflevector <8 x i32> %broadcast.splatinsert112, <8 x i32> poison, <8 x i32> zeroinitializer
  %invariant.gep118 = getelementptr i8, ptr %1, i64 -7
  br label %vec.epilog.vector.body102

vec.epilog.vector.body102:                        ; preds = %vec.epilog.vector.body102, %vec.epilog.ph92
  %index103 = phi i64 [ %vec.epilog.resume.val96, %vec.epilog.ph92 ], [ %index.next115, %vec.epilog.vector.body102 ]
  %vec.ind107 = phi <8 x i32> [ %induction106, %vec.epilog.ph92 ], [ %vec.ind.next108, %vec.epilog.vector.body102 ]
  %53 = trunc i64 %index103 to i32
  %.neg117 = xor i32 %53, -1
  %54 = add i32 %.neg117, %0
  %55 = add <8 x i32> %broadcast.splat111, %vec.ind107
  %56 = and <8 x i32> %55, %broadcast.splat113
  %57 = icmp eq <8 x i32> %56, zeroinitializer
  %58 = zext i32 %54 to i64
  %59 = select <8 x i1> %57, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>, <8 x i8> <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
  %gep119 = getelementptr i8, ptr %invariant.gep118, i64 %58
  %reverse114 = shufflevector <8 x i8> %59, <8 x i8> poison, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  store <8 x i8> %reverse114, ptr %gep119, align 1, !tbaa !5
  %index.next115 = add nuw i64 %index103, 8
  %vec.ind.next108 = add <8 x i32> %vec.ind107, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
  %60 = icmp eq i64 %index.next115, %n.vec98
  br i1 %60, label %vec.epilog.middle.block90, label %vec.epilog.vector.body102, !llvm.loop !14

vec.epilog.middle.block90:                        ; preds = %vec.epilog.vector.body102
  %cmp.n116 = icmp eq i64 %30, %n.vec98
  br i1 %cmp.n116, label %.loopexit, label %vec.epilog.scalar.ph91.preheader

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph.preheader, %vec.epilog.scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %vec.epilog.scalar.ph ], [ %indvars.iv.ph, %vec.epilog.scalar.ph.preheader ]
  %61 = trunc nuw i64 %indvars.iv to i32
  %62 = add i32 %11, %61
  %63 = and i32 %62, %14
  %64 = icmp eq i32 %63, 0
  %spec.select = select i1 %64, i8 1, i8 2
  %65 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
  store i8 %spec.select, ptr %65, align 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %vec.epilog.scalar.ph, !llvm.loop !15

vec.epilog.scalar.ph91:                           ; preds = %vec.epilog.scalar.ph91.prol.loopexit, %vec.epilog.scalar.ph91
  %indvars.iv45 = phi i64 [ %indvars.iv.next46.1, %vec.epilog.scalar.ph91 ], [ %indvars.iv45.unr, %vec.epilog.scalar.ph91.prol.loopexit ]
  %66 = trunc nuw i64 %indvars.iv45 to i32
  %67 = sub i32 %0, %66
  %68 = add i32 %11, %66
  %69 = and i32 %68, %29
  %70 = icmp eq i32 %69, 0
  %71 = zext i32 %67 to i64
  %72 = getelementptr inbounds i8, ptr %1, i64 %71
  %. = select i1 %70, i8 1, i8 2
  store i8 %., ptr %72, align 1, !tbaa !5
  %73 = trunc i64 %indvars.iv45 to i32
  %74 = add i32 %73, 1
  %75 = sub i32 %0, %74
  %76 = add i32 %11, %74
  %77 = and i32 %76, %29
  %78 = icmp eq i32 %77, 0
  %79 = zext i32 %75 to i64
  %80 = getelementptr inbounds i8, ptr %1, i64 %79
  %..1 = select i1 %78, i8 1, i8 2
  store i8 %..1, ptr %80, align 1, !tbaa !5
  %indvars.iv.next46.1 = add nuw nsw i64 %indvars.iv45, 2
  %exitcond49.not.1 = icmp eq i64 %indvars.iv.next46.1, %wide.trip.count48
  br i1 %exitcond49.not.1, label %.loopexit, label %vec.epilog.scalar.ph91, !llvm.loop !16

.loopexit:                                        ; preds = %vec.epilog.scalar.ph91.prol.loopexit, %vec.epilog.scalar.ph91, %middle.block68, %vec.epilog.middle.block90, %.preheader38, %.preheader, %4
  %.0 = phi i32 [ %5, %4 ], [ 0, %.preheader ], [ 0, %.preheader38 ], [ 0, %vec.epilog.middle.block90 ], [ 0, %middle.block68 ], [ 0, %vec.epilog.scalar.ph91 ], [ 0, %vec.epilog.scalar.ph91.prol.loopexit ]
  ret i32 %.0
}

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass