; LLVM IR from jgaeddert/liquid-dsp :: sandbox (fec_spc2216_test)

; 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.51 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @print_bitstring(i8 noundef zeroext, i8 noundef zeroext) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @spc2216_print_decoded(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %4

4:                                                ; preds = %24, %1
  %5 = load i32, ptr %3, align 4, !tbaa !9
  %6 = icmp ult i32 %5, 16
  br i1 %6, label %7, label %27

7:                                                ; preds = %4
  %8 = call i32 (ptr, ...) @printf(ptr noundef @.str.51)
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = load i32, ptr %3, align 4, !tbaa !9
  %11 = mul i32 2, %10
  %12 = add i32 %11, 0
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds i8, ptr %9, i64 %13
  %15 = load i8, ptr %14, align 1, !tbaa !11
  call void @print_bitstring(i8 noundef zeroext %15, i8 noundef zeroext 8)
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = mul i32 2, %17
  %19 = add i32 %18, 1
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds i8, ptr %16, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !11
  call void @print_bitstring(i8 noundef zeroext %22, i8 noundef zeroext 8)
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.52)
  br label %24

24:                                               ; preds = %7
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = add i32 %25, 1
  store i32 %26, ptr %3, align 4, !tbaa !9
  br label %4, !llvm.loop !12

27:                                               ; preds = %4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret void
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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.51 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @print_bitstring(i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @spc2216_print_decoded(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %3 = load i8, ptr %0, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %3, i8 noundef zeroext 8)
  %4 = getelementptr inbounds i8, ptr %0, i64 1
  %5 = load i8, ptr %4, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %5, i8 noundef zeroext 8)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %8 = getelementptr inbounds i8, ptr %0, i64 2
  %9 = load i8, ptr %8, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %9, i8 noundef zeroext 8)
  %10 = getelementptr inbounds i8, ptr %0, i64 3
  %11 = load i8, ptr %10, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %11, i8 noundef zeroext 8)
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = load i8, ptr %14, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %15, i8 noundef zeroext 8)
  %16 = getelementptr inbounds i8, ptr %0, i64 5
  %17 = load i8, ptr %16, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %17, i8 noundef zeroext 8)
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %20 = getelementptr inbounds i8, ptr %0, i64 6
  %21 = load i8, ptr %20, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %21, i8 noundef zeroext 8)
  %22 = getelementptr inbounds i8, ptr %0, i64 7
  %23 = load i8, ptr %22, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %23, i8 noundef zeroext 8)
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = load i8, ptr %26, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %27, i8 noundef zeroext 8)
  %28 = getelementptr inbounds i8, ptr %0, i64 9
  %29 = load i8, ptr %28, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %29, i8 noundef zeroext 8)
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %32 = getelementptr inbounds i8, ptr %0, i64 10
  %33 = load i8, ptr %32, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %33, i8 noundef zeroext 8)
  %34 = getelementptr inbounds i8, ptr %0, i64 11
  %35 = load i8, ptr %34, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %35, i8 noundef zeroext 8)
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %38 = getelementptr inbounds i8, ptr %0, i64 12
  %39 = load i8, ptr %38, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %39, i8 noundef zeroext 8)
  %40 = getelementptr inbounds i8, ptr %0, i64 13
  %41 = load i8, ptr %40, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %41, i8 noundef zeroext 8)
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %44 = getelementptr inbounds i8, ptr %0, i64 14
  %45 = load i8, ptr %44, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %45, i8 noundef zeroext 8)
  %46 = getelementptr inbounds i8, ptr %0, i64 15
  %47 = load i8, ptr %46, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %47, i8 noundef zeroext 8)
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %50 = getelementptr inbounds i8, ptr %0, i64 16
  %51 = load i8, ptr %50, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %51, i8 noundef zeroext 8)
  %52 = getelementptr inbounds i8, ptr %0, i64 17
  %53 = load i8, ptr %52, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %53, i8 noundef zeroext 8)
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %56 = getelementptr inbounds i8, ptr %0, i64 18
  %57 = load i8, ptr %56, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %57, i8 noundef zeroext 8)
  %58 = getelementptr inbounds i8, ptr %0, i64 19
  %59 = load i8, ptr %58, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %59, i8 noundef zeroext 8)
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %62 = getelementptr inbounds i8, ptr %0, i64 20
  %63 = load i8, ptr %62, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %63, i8 noundef zeroext 8)
  %64 = getelementptr inbounds i8, ptr %0, i64 21
  %65 = load i8, ptr %64, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %65, i8 noundef zeroext 8)
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %68 = getelementptr inbounds i8, ptr %0, i64 22
  %69 = load i8, ptr %68, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %69, i8 noundef zeroext 8)
  %70 = getelementptr inbounds i8, ptr %0, i64 23
  %71 = load i8, ptr %70, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %71, i8 noundef zeroext 8)
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %73 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %74 = getelementptr inbounds i8, ptr %0, i64 24
  %75 = load i8, ptr %74, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %75, i8 noundef zeroext 8)
  %76 = getelementptr inbounds i8, ptr %0, i64 25
  %77 = load i8, ptr %76, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %77, i8 noundef zeroext 8)
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %80 = getelementptr inbounds i8, ptr %0, i64 26
  %81 = load i8, ptr %80, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %81, i8 noundef zeroext 8)
  %82 = getelementptr inbounds i8, ptr %0, i64 27
  %83 = load i8, ptr %82, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %83, i8 noundef zeroext 8)
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %85 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %86 = getelementptr inbounds i8, ptr %0, i64 28
  %87 = load i8, ptr %86, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %87, i8 noundef zeroext 8)
  %88 = getelementptr inbounds i8, ptr %0, i64 29
  %89 = load i8, ptr %88, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %89, i8 noundef zeroext 8)
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %92 = getelementptr inbounds i8, ptr %0, i64 30
  %93 = load i8, ptr %92, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %93, i8 noundef zeroext 8)
  %94 = getelementptr inbounds i8, ptr %0, i64 31
  %95 = load i8, ptr %94, align 1, !tbaa !5
  tail call void @print_bitstring(i8 noundef zeroext %95, i8 noundef zeroext 8)
  %96 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  ret void
}

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 = { 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" }

!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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass