; LLVM IR from jgaeddert/liquid-dsp :: src/fec/tests (fec_soft_autotest)

; 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 [88 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@liquid_autotest_verbose = external global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @fec_test_soft_codec(i32 noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  %15 = load i32, ptr %4, align 4, !tbaa !5
  switch i32 %15, label %17 [
    i32 11, label %16
    i32 12, label %16
    i32 13, label %16
    i32 14, label %16
    i32 15, label %16
    i32 16, label %16
    i32 17, label %16
    i32 18, label %16
    i32 19, label %16
    i32 20, label %16
    i32 21, label %16
    i32 22, label %16
    i32 23, label %16
    i32 24, label %16
    i32 25, label %16
    i32 26, label %16
    i32 27, label %16
  ]

16:                                               ; preds = %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3, %3
  call void @liquid_autotest_warn(ptr noundef @.str, i32 noundef 53, ptr noundef @.str.1)
  br label %213

17:                                               ; preds = %3
  br label %18

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = load ptr, ptr %6, align 8, !tbaa !9
  %21 = call ptr @fec_create(i32 noundef %19, ptr noundef %20)
  store ptr %21, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = call i32 @fec_get_enc_msg_length(i32 noundef %22, i32 noundef %23)
  store i32 %24, ptr %8, align 4, !tbaa !5
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = zext i32 %25 to i64
  %27 = call ptr @llvm.stacksave.p0()
  store ptr %27, ptr %9, align 8
  %28 = alloca i8, i64 %26, align 16
  store i64 %26, ptr %10, align 8
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = alloca i8, i64 %30, align 16
  store i64 %30, ptr %11, align 8
  %32 = load i32, ptr %8, align 4, !tbaa !5
  %33 = mul i32 8, %32
  %34 = zext i32 %33 to i64
  %35 = alloca i8, i64 %34, align 16
  store i64 %34, ptr %12, align 8
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = alloca i8, i64 %37, align 16
  store i64 %37, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %53, %18
  %40 = load i32, ptr %14, align 4, !tbaa !5
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = icmp ult i32 %40, %41
  br i1 %42, label %43, label %56

43:                                               ; preds = %39
  %44 = call i32 @rand() #5
  %45 = and i32 %44, 255
  %46 = trunc i32 %45 to i8
  %47 = load i32, ptr %14, align 4, !tbaa !5
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds i8, ptr %28, i64 %48
  store i8 %46, ptr %49, align 1, !tbaa !11
  %50 = load i32, ptr %14, align 4, !tbaa !5
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %38, i64 %51
  store i8 0, ptr %52, align 1, !tbaa !11
  br label %53

53:                                               ; preds = %43
  %54 = load i32, ptr %14, align 4, !tbaa !5
  %55 = add i32 %54, 1
  store i32 %55, ptr %14, align 4, !tbaa !5
  br label %39, !llvm.loop !12

56:                                               ; preds = %39
  %57 = load ptr, ptr %7, align 8, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = call i32 @fec_encode(ptr noundef %57, i32 noundef %58, ptr noundef %28, ptr noundef %31)
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %185, %56
  %61 = load i32, ptr %14, align 4, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %64, label %188

64:                                               ; preds = %60
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i8, ptr %31, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !11
  %69 = zext i8 %68 to i32
  %70 = and i32 %69, 128
  %71 = icmp ne i32 %70, 0
  %72 = zext i1 %71 to i64
  %73 = select i1 %71, i32 255, i32 0
  %74 = trunc i32 %73 to i8
  %75 = load i32, ptr %14, align 4, !tbaa !5
  %76 = mul i32 8, %75
  %77 = add i32 %76, 0
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %35, i64 %78
  store i8 %74, ptr %79, align 1, !tbaa !11
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds i8, ptr %31, i64 %81
  %83 = load i8, ptr %82, align 1, !tbaa !11
  %84 = zext i8 %83 to i32
  %85 = and i32 %84, 64
  %86 = icmp ne i32 %85, 0
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, i32 255, i32 0
  %89 = trunc i32 %88 to i8
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = mul i32 8, %90
  %92 = add i32 %91, 1
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %35, i64 %93
  store i8 %89, ptr %94, align 1, !tbaa !11
  %95 = load i32, ptr %14, align 4, !tbaa !5
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds i8, ptr %31, i64 %96
  %98 = load i8, ptr %97, align 1, !tbaa !11
  %99 = zext i8 %98 to i32
  %100 = and i32 %99, 32
  %101 = icmp ne i32 %100, 0
  %102 = zext i1 %101 to i64
  %103 = select i1 %101, i32 255, i32 0
  %104 = trunc i32 %103 to i8
  %105 = load i32, ptr %14, align 4, !tbaa !5
  %106 = mul i32 8, %105
  %107 = add i32 %106, 2
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %35, i64 %108
  store i8 %104, ptr %109, align 1, !tbaa !11
  %110 = load i32, ptr %14, align 4, !tbaa !5
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %31, i64 %111
  %113 = load i8, ptr %112, align 1, !tbaa !11
  %114 = zext i8 %113 to i32
  %115 = and i32 %114, 16
  %116 = icmp ne i32 %115, 0
  %117 = zext i1 %116 to i64
  %118 = select i1 %116, i32 255, i32 0
  %119 = trunc i32 %118 to i8
  %120 = load i32, ptr %14, align 4, !tbaa !5
  %121 = mul i32 8, %120
  %122 = add i32 %121, 3
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds i8, ptr %35, i64 %123
  store i8 %119, ptr %124, align 1, !tbaa !11
  %125 = load i32, ptr %14, align 4, !tbaa !5
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds i8, ptr %31, i64 %126
  %128 = load i8, ptr %127, align 1, !tbaa !11
  %129 = zext i8 %128 to i32
  %130 = and i32 %129, 8
  %131 = icmp ne i32 %130, 0
  %132 = zext i1 %131 to i64
  %133 = select i1 %131, i32 255, i32 0
  %134 = trunc i32 %133 to i8
  %135 = load i32, ptr %14, align 4, !tbaa !5
  %136 = mul i32 8, %135
  %137 = add i32 %136, 4
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %35, i64 %138
  store i8 %134, ptr %139, align 1, !tbaa !11
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds i8, ptr %31, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !11
  %144 = zext i8 %143 to i32
  %145 = and i32 %144, 4
  %146 = icmp ne i32 %145, 0
  %147 = zext i1 %146 to i64
  %148 = select i1 %146, i32 255, i32 0
  %149 = trunc i32 %148 to i8
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = mul i32 8, %150
  %152 = add i32 %151, 5
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds i8, ptr %35, i64 %153
  store i8 %149, ptr %154, align 1, !tbaa !11
  %155 = load i32, ptr %14, align 4, !tbaa !5
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds i8, ptr %31, i64 %156
  %158 = load i8, ptr %157, align 1, !tbaa !11
  %159 = zext i8 %158 to i32
  %160 = and i32 %159, 2
  %161 = icmp ne i32 %160, 0
  %162 = zext i1 %161 to i64
  %163 = select i1 %161, i32 255, i32 0
  %164 = trunc i32 %163 to i8
  %165 = load i32, ptr %14, align 4, !tbaa !5
  %166 = mul i32 8, %165
  %167 = add i32 %166, 6
  %168 = zext i32 %167 to i64
  %169 = getelementptr inbounds i8, ptr %35, i64 %168
  store i8 %164, ptr %169, align 1, !tbaa !11
  %170 = load i32, ptr %14, align 4, !tbaa !5
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds i8, ptr %31, i64 %171
  %173 = load i8, ptr %172, align 1, !tbaa !11
  %174 = zext i8 %173 to i32
  %175 = and i32 %174, 1
  %176 = icmp ne i32 %175, 0
  %177 = zext i1 %176 to i64
  %178 = select i1 %176, i32 255, i32 0
  %179 = trunc i32 %178 to i8
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = mul i32 8, %180
  %182 = add i32 %181, 7
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds i8, ptr %35, i64 %183
  store i8 %179, ptr %184, align 1, !tbaa !11
  br label %185

185:                                              ; preds = %64
  %186 = load i32, ptr %14, align 4, !tbaa !5
  %187 = add i32 %186, 1
  store i32 %187, ptr %14, align 4, !tbaa !5
  br label %60, !llvm.loop !14

188:                                              ; preds = %60
  %189 = getelementptr inbounds i8, ptr %35, i64 0
  %190 = load i8, ptr %189, align 16, !tbaa !11
  %191 = zext i8 %190 to i32
  %192 = sub nsw i32 255, %191
  %193 = trunc i32 %192 to i8
  %194 = getelementptr inbounds i8, ptr %35, i64 0
  store i8 %193, ptr %194, align 16, !tbaa !11
  %195 = load ptr, ptr %7, align 8, !tbaa !9
  %196 = load i32, ptr %5, align 4, !tbaa !5
  %197 = call i32 @fec_decode_soft(ptr noundef %195, i32 noundef %196, ptr noundef %35, ptr noundef %38)
  %198 = load i32, ptr %5, align 4, !tbaa !5
  %199 = call i32 @liquid_autotest_same_data(ptr noundef %28, ptr noundef %38, i32 noundef %198)
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %208, label %201

201:                                              ; preds = %188
  call void @liquid_autotest_failed_msg(ptr noundef @.str, i32 noundef 98, ptr noundef @.str.2)
  %202 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !5
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %207

204:                                              ; preds = %201
  %205 = load i32, ptr %5, align 4, !tbaa !5
  call void @liquid_autotest_print_array(ptr noundef %28, i32 noundef %205)
  %206 = load i32, ptr %5, align 4, !tbaa !5
  call void @liquid_autotest_print_array(ptr noundef %38, i32 noundef %206)
  br label %207

207:                                              ; preds = %204, %201
  br label %209

208:                                              ; preds = %188
  call void (...) @liquid_autotest_passed()
  br label %209

209:                                              ; preds = %208, %207
  %210 = load ptr, ptr %7, align 8, !tbaa !9
  %211 = call i32 @fec_destroy(ptr noundef %210)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %212 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %212)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %213

213:                                              ; preds = %209, %16
  ret void
}

declare void @liquid_autotest_warn(ptr noundef, i32 noundef, ptr noundef) #1

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

declare ptr @fec_create(i32 noundef, ptr noundef) #1

declare i32 @fec_get_enc_msg_length(i32 noundef, i32 noundef) #1

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

; Function Attrs: nounwind
declare i32 @rand() #4

declare i32 @fec_encode(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare i32 @fec_decode_soft(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare i32 @liquid_autotest_same_data(ptr noundef, ptr noundef, i32 noundef) #1

declare void @liquid_autotest_failed_msg(ptr noundef, i32 noundef, ptr noundef) #1

declare void @liquid_autotest_print_array(ptr noundef, i32 noundef) #1

declare void @liquid_autotest_passed(...) #1

declare i32 @fec_destroy(ptr noundef) #1

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #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 = !{!"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}


; 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 [88 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@liquid_autotest_verbose = external local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @fec_test_soft_codec(i32 noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %.off = add i32 %0, -11
  %switch = icmp ult i32 %.off, 17
  br i1 %switch, label %4, label %5

4:                                                ; preds = %3
  tail call void @liquid_autotest_warn(ptr noundef nonnull @.str, i32 noundef 53, ptr noundef nonnull @.str.1) #4
  br label %124

5:                                                ; preds = %3
  %6 = tail call ptr @fec_create(i32 noundef %0, ptr noundef %2) #4
  %7 = tail call i32 @fec_get_enc_msg_length(i32 noundef %0, i32 noundef %1) #4
  %8 = zext i32 %1 to i64
  %9 = tail call ptr @llvm.stacksave.p0()
  %10 = alloca i8, i64 %8, align 16
  %11 = zext i32 %7 to i64
  %12 = alloca i8, i64 %11, align 16
  %13 = shl i32 %7, 3
  %14 = zext i32 %13 to i64
  %15 = alloca i8, i64 %14, align 16
  %16 = alloca i8, i64 %8, align 16
  %.not62 = icmp eq i32 %1, 0
  br i1 %.not62, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %5, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %5 ]
  %17 = tail call i32 @rand() #4
  %18 = trunc i32 %17 to i8
  %19 = getelementptr inbounds i8, ptr %10, i64 %indvars.iv
  store i8 %18, ptr %19, align 1, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %16, i64 %indvars.iv
  store i8 0, ptr %20, align 1, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %8
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

._crit_edge:                                      ; preds = %.lr.ph, %5
  %21 = call i32 @fec_encode(ptr noundef %6, i32 noundef %1, ptr noundef nonnull %10, ptr noundef nonnull %12) #4
  %.not63 = icmp eq i32 %7, 0
  br i1 %.not63, label %._crit_edge61, label %.lr.ph60.preheader

.lr.ph60.preheader:                               ; preds = %._crit_edge
  %min.iters.check = icmp ult i32 %7, 144
  br i1 %min.iters.check, label %.lr.ph60.preheader97, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph60.preheader
  %22 = add nsw i64 %11, -1
  %23 = icmp ugt i64 %22, 4294967295
  %24 = insertelement <4 x ptr> poison, ptr %15, i64 0
  %25 = shufflevector <4 x ptr> %24, <4 x ptr> poison, <4 x i32> zeroinitializer
  %26 = getelementptr i8, <4 x ptr> %25, <4 x i64> <i64 6, i64 7, i64 5, i64 4>
  %mul.result = shl nsw i64 %22, 3
  %scevgep = getelementptr i8, ptr %15, i64 6
  %27 = getelementptr i8, ptr %scevgep, i64 %mul.result
  %mul.result72 = shl nsw i64 %22, 3
  %scevgep70 = getelementptr i8, ptr %15, i64 7
  %28 = getelementptr i8, ptr %scevgep70, i64 %mul.result72
  %mul.result76 = shl nsw i64 %22, 3
  %scevgep74 = getelementptr i8, ptr %15, i64 5
  %29 = getelementptr i8, ptr %scevgep74, i64 %mul.result76
  %mul.result80 = shl nsw i64 %22, 3
  %scevgep78 = getelementptr i8, ptr %15, i64 4
  %30 = getelementptr i8, ptr %scevgep78, i64 %mul.result80
  %31 = insertelement <2 x ptr> poison, ptr %15, i64 0
  %32 = shufflevector <2 x ptr> %31, <2 x ptr> poison, <2 x i32> zeroinitializer
  %33 = getelementptr i8, <2 x ptr> %32, <2 x i64> <i64 3, i64 2>
  %mul.result84 = shl nsw i64 %22, 3
  %scevgep82 = getelementptr i8, ptr %15, i64 3
  %34 = getelementptr i8, ptr %scevgep82, i64 %mul.result84
  %mul.result88 = shl nsw i64 %22, 3
  %scevgep86 = getelementptr i8, ptr %15, i64 2
  %35 = getelementptr i8, ptr %scevgep86, i64 %mul.result88
  %scevgep90 = getelementptr i8, ptr %15, i64 1
  %mul.result92 = shl nsw i64 %22, 3
  %36 = getelementptr i8, ptr %scevgep90, i64 %mul.result92
  %mul.result95 = shl nsw i64 %22, 3
  %37 = getelementptr i8, ptr %15, i64 %mul.result95
  %38 = insertelement <8 x ptr> poison, ptr %27, i64 0
  %39 = insertelement <8 x ptr> %38, ptr %28, i64 1
  %40 = insertelement <8 x ptr> %39, ptr %29, i64 2
  %41 = insertelement <8 x ptr> %40, ptr %30, i64 3
  %42 = insertelement <8 x ptr> %41, ptr %34, i64 4
  %43 = insertelement <8 x ptr> %42, ptr %35, i64 5
  %44 = insertelement <8 x ptr> %43, ptr %36, i64 6
  %45 = insertelement <8 x ptr> %44, ptr %37, i64 7
  %46 = shufflevector <4 x ptr> %26, <4 x ptr> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison, i32 poison, i32 poison>
  %47 = insertelement <8 x ptr> %46, ptr %15, i64 7
  %48 = shufflevector <2 x ptr> %33, <2 x ptr> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %49 = shufflevector <8 x ptr> %47, <8 x ptr> %48, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 poison, i32 7>
  %50 = insertelement <8 x ptr> %49, ptr %scevgep90, i64 6
  %51 = icmp ult <8 x ptr> %45, %50
  %52 = bitcast <8 x i1> %51 to i8
  %53 = icmp ne i8 %52, 0
  %op.rdx = or i1 %53, %23
  br i1 %op.rdx, label %.lr.ph60.preheader97, label %vector.ph

vector.ph:                                        ; preds = %vector.scevcheck
  %n.vec = and i64 %11, 4294967280
  %invariant.gep = getelementptr i8, ptr %15, i64 -7
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %54 = getelementptr inbounds i8, ptr %12, i64 %index
  %wide.load = load <16 x i8>, ptr %54, align 16, !tbaa !5
  %55 = ashr <16 x i8> %wide.load, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %56 = shl i64 %index, 3
  %57 = shl <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>
  %58 = ashr <16 x i8> %57, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %59 = shl <16 x i8> %wide.load, <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>
  %60 = ashr <16 x i8> %59, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %61 = shl <16 x i8> %wide.load, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
  %62 = ashr <16 x i8> %61, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %63 = shl <16 x i8> %wide.load, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
  %64 = ashr <16 x i8> %63, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %65 = shl <16 x i8> %wide.load, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
  %66 = ashr <16 x i8> %65, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %67 = shl <16 x i8> %wide.load, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
  %68 = ashr <16 x i8> %67, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  %69 = and <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>
  %70 = sub nsw <16 x i8> zeroinitializer, %69
  %71 = and i64 %56, 4294967168
  %72 = or disjoint i64 %71, 7
  %gep = getelementptr i8, ptr %invariant.gep, i64 %72
  %73 = shufflevector <16 x i8> %55, <16 x i8> %58, <32 x i32> <i32 0, 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, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
  %74 = shufflevector <16 x i8> %60, <16 x i8> %62, <32 x i32> <i32 0, 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, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
  %75 = shufflevector <16 x i8> %64, <16 x i8> %66, <32 x i32> <i32 0, 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, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
  %76 = shufflevector <16 x i8> %68, <16 x i8> %70, <32 x i32> <i32 0, 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, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
  %77 = shufflevector <32 x i8> %73, <32 x i8> %74, <64 x i32> <i32 0, 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, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 45, i32 46, i32 47, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>
  %78 = shufflevector <32 x i8> %75, <32 x i8> %76, <64 x i32> <i32 0, 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, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 45, i32 46, i32 47, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>
  %interleaved.vec = shufflevector <64 x i8> %77, <64 x i8> %78, <128 x i32> <i32 0, i32 16, i32 32, i32 48, i32 64, i32 80, i32 96, i32 112, i32 1, i32 17, i32 33, i32 49, i32 65, i32 81, i32 97, i32 113, i32 2, i32 18, i32 34, i32 50, i32 66, i32 82, i32 98, i32 114, i32 3, i32 19, i32 35, i32 51, i32 67, i32 83, i32 99, i32 115, i32 4, i32 20, i32 36, i32 52, i32 68, i32 84, i32 100, i32 116, i32 5, i32 21, i32 37, i32 53, i32 69, i32 85, i32 101, i32 117, i32 6, i32 22, i32 38, i32 54, i32 70, i32 86, i32 102, i32 118, i32 7, i32 23, i32 39, i32 55, i32 71, i32 87, i32 103, i32 119, i32 8, i32 24, i32 40, i32 56, i32 72, i32 88, i32 104, i32 120, i32 9, i32 25, i32 41, i32 57, i32 73, i32 89, i32 105, i32 121, i32 10, i32 26, i32 42, i32 58, i32 74, i32 90, i32 106, i32 122, i32 11, i32 27, i32 43, i32 59, i32 75, i32 91, i32 107, i32 123, i32 12, i32 28, i32 44, i32 60, i32 76, i32 92, i32 108, i32 124, i32 13, i32 29, i32 45, i32 61, i32 77, i32 93, i32 109, i32 125, i32 14, i32 30, i32 46, i32 62, i32 78, i32 94, i32 110, i32 126, i32 15, i32 31, i32 47, i32 63, i32 79, i32 95, i32 111, i32 127>
  store <128 x i8> %interleaved.vec, ptr %gep, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 16
  %79 = icmp eq i64 %index.next, %n.vec
  br i1 %79, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %11
  br i1 %cmp.n, label %._crit_edge61.loopexit, label %.lr.ph60.preheader97

.lr.ph60.preheader97:                             ; preds = %middle.block, %vector.scevcheck, %.lr.ph60.preheader
  %indvars.iv65.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.lr.ph60.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph60

.lr.ph60:                                         ; preds = %.lr.ph60.preheader97, %.lr.ph60
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %.lr.ph60 ], [ %indvars.iv65.ph, %.lr.ph60.preheader97 ]
  %80 = getelementptr inbounds i8, ptr %12, i64 %indvars.iv65
  %81 = load i8, ptr %80, align 1, !tbaa !5
  %.lobit = ashr i8 %81, 7
  %82 = trunc nuw i64 %indvars.iv65 to i32
  %83 = shl i32 %82, 3
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %15, i64 %84
  store i8 %.lobit, ptr %85, align 8, !tbaa !5
  %86 = shl i8 %81, 1
  %sext = ashr i8 %86, 7
  %87 = or disjoint i32 %83, 1
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %15, i64 %88
  store i8 %sext, ptr %89, align 1, !tbaa !5
  %90 = shl i8 %81, 2
  %sext46 = ashr i8 %90, 7
  %91 = or disjoint i32 %83, 2
  %92 = zext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %15, i64 %92
  store i8 %sext46, ptr %93, align 2, !tbaa !5
  %94 = shl i8 %81, 3
  %sext48 = ashr i8 %94, 7
  %95 = or disjoint i32 %83, 3
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds i8, ptr %15, i64 %96
  store i8 %sext48, ptr %97, align 1, !tbaa !5
  %98 = shl i8 %81, 4
  %sext50 = ashr i8 %98, 7
  %99 = or disjoint i32 %83, 4
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %15, i64 %100
  store i8 %sext50, ptr %101, align 4, !tbaa !5
  %102 = shl i8 %81, 5
  %sext52 = ashr i8 %102, 7
  %103 = or disjoint i32 %83, 5
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %15, i64 %104
  store i8 %sext52, ptr %105, align 1, !tbaa !5
  %106 = shl i8 %81, 6
  %sext54 = ashr i8 %106, 7
  %107 = or disjoint i32 %83, 6
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %15, i64 %108
  store i8 %sext54, ptr %109, align 2, !tbaa !5
  %110 = and i8 %81, 1
  %sext56 = sub nsw i8 0, %110
  %111 = or disjoint i32 %83, 7
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %15, i64 %112
  store i8 %sext56, ptr %113, align 1, !tbaa !5
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond69.not = icmp eq i64 %indvars.iv.next66, %11
  br i1 %exitcond69.not, label %._crit_edge61.loopexit, label %.lr.ph60, !llvm.loop !13

._crit_edge61.loopexit:                           ; preds = %.lr.ph60, %middle.block
  %.pre = load i8, ptr %15, align 16, !tbaa !5
  %114 = xor i8 %.pre, -1
  br label %._crit_edge61

._crit_edge61:                                    ; preds = %._crit_edge61.loopexit, %._crit_edge
  %115 = phi i8 [ %114, %._crit_edge61.loopexit ], [ undef, %._crit_edge ]
  store i8 %115, ptr %15, align 16, !tbaa !5
  %116 = call i32 @fec_decode_soft(ptr noundef %6, i32 noundef %1, ptr noundef nonnull %15, ptr noundef nonnull %16) #4
  %117 = call i32 @liquid_autotest_same_data(ptr noundef nonnull %10, ptr noundef nonnull %16, i32 noundef %1) #4
  %.not = icmp eq i32 %117, 0
  br i1 %.not, label %118, label %121

118:                                              ; preds = %._crit_edge61
  call void @liquid_autotest_failed_msg(ptr noundef nonnull @.str, i32 noundef 98, ptr noundef nonnull @.str.2) #4
  %119 = load i32, ptr @liquid_autotest_verbose, align 4, !tbaa !14
  %.not42 = icmp eq i32 %119, 0
  br i1 %.not42, label %122, label %120

120:                                              ; preds = %118
  call void @liquid_autotest_print_array(ptr noundef nonnull %10, i32 noundef %1) #4
  call void @liquid_autotest_print_array(ptr noundef nonnull %16, i32 noundef %1) #4
  br label %122

121:                                              ; preds = %._crit_edge61
  call void (...) @liquid_autotest_passed() #4
  br label %122

122:                                              ; preds = %118, %120, %121
  %123 = call i32 @fec_destroy(ptr noundef %6) #4
  call void @llvm.stackrestore.p0(ptr %9)
  br label %124

124:                                              ; preds = %122, %4
  ret void
}

declare void @liquid_autotest_warn(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @fec_create(i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @fec_get_enc_msg_length(i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

declare i32 @fec_encode(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @fec_decode_soft(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @liquid_autotest_same_data(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @liquid_autotest_failed_msg(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @liquid_autotest_print_array(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @liquid_autotest_passed(...) local_unnamed_addr #1

declare i32 @fec_destroy(ptr noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #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}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9, !11, !12}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !9, !11}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass