; LLVM IR from jgaeddert/liquid-dsp :: sandbox (fec_g2412product_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"

%struct.g2412p_s = type { [576 x i8], [24 x i8], i32, i32 }

@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [1 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 @printf(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 void @g2412p_print(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  %5 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %6

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

9:                                                ; preds = %6
  %10 = load i32, ptr %3, align 4, !tbaa !9
  %11 = icmp eq i32 %10, 12
  br i1 %11, label %12, label %14

12:                                               ; preds = %9
  %13 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %14

14:                                               ; preds = %12, %9
  %15 = load i32, ptr %3, align 4, !tbaa !9
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %15)
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %36, %14
  %18 = load i32, ptr %4, align 4, !tbaa !9
  %19 = icmp ult i32 %18, 24
  br i1 %19, label %20, label %39

20:                                               ; preds = %17
  %21 = load i32, ptr %4, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 12
  %23 = zext i1 %22 to i64
  %24 = select i1 %22, ptr @.str.12, ptr @.str.13
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.g2412p_s, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = mul i32 24, %27
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = add i32 %28, %29
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds [576 x i8], ptr %26, i64 0, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = zext i8 %33 to i32
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %24, i32 noundef %34)
  br label %36

36:                                               ; preds = %20
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = add i32 %37, 1
  store i32 %38, ptr %4, align 4, !tbaa !9
  br label %17, !llvm.loop !12

39:                                               ; preds = %17
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %41

41:                                               ; preds = %39
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = add i32 %42, 1
  store i32 %43, ptr %3, align 4, !tbaa !9
  br label %6, !llvm.loop !14

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

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 = !{!"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"}
!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.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [1 x i8], align 1

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @g2412p_print(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %3

3:                                                ; preds = %1, %7
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %7 ]
  %4 = icmp eq i64 %indvars.iv, 12
  br i1 %4, label %5, label %7

5:                                                ; preds = %3
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %7

7:                                                ; preds = %5, %3
  %8 = trunc nuw nsw i64 %indvars.iv to i32
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %8)
  %10 = mul nuw nsw i64 %indvars.iv, 24
  %11 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %10
  %12 = load i8, ptr %11, align 1, !tbaa !5
  %13 = zext i8 %12 to i32
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %13)
  %15 = or disjoint i64 %10, 1
  %16 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %15
  %17 = load i8, ptr %16, align 1, !tbaa !5
  %18 = zext i8 %17 to i32
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %18)
  %20 = or disjoint i64 %10, 2
  %21 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %20
  %22 = load i8, ptr %21, align 1, !tbaa !5
  %23 = zext i8 %22 to i32
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %23)
  %25 = or disjoint i64 %10, 3
  %26 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %25
  %27 = load i8, ptr %26, align 1, !tbaa !5
  %28 = zext i8 %27 to i32
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %28)
  %30 = or disjoint i64 %10, 4
  %31 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %30
  %32 = load i8, ptr %31, align 1, !tbaa !5
  %33 = zext i8 %32 to i32
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %33)
  %35 = or disjoint i64 %10, 5
  %36 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !5
  %38 = zext i8 %37 to i32
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %38)
  %40 = or disjoint i64 %10, 6
  %41 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !5
  %43 = zext i8 %42 to i32
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %43)
  %45 = or disjoint i64 %10, 7
  %46 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = zext i8 %47 to i32
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %48)
  %50 = add nuw nsw i64 %10, 8
  %51 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !5
  %53 = zext i8 %52 to i32
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %53)
  %55 = add nuw nsw i64 %10, 9
  %56 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %55
  %57 = load i8, ptr %56, align 1, !tbaa !5
  %58 = zext i8 %57 to i32
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %58)
  %60 = add nuw nsw i64 %10, 10
  %61 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !5
  %63 = zext i8 %62 to i32
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %63)
  %65 = add nuw nsw i64 %10, 11
  %66 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %65
  %67 = load i8, ptr %66, align 1, !tbaa !5
  %68 = zext i8 %67 to i32
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %68)
  %70 = add nuw nsw i64 %10, 12
  %71 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %70
  %72 = load i8, ptr %71, align 1, !tbaa !5
  %73 = zext i8 %72 to i32
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.12, i32 noundef %73)
  %75 = add nuw nsw i64 %10, 13
  %76 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %75
  %77 = load i8, ptr %76, align 1, !tbaa !5
  %78 = zext i8 %77 to i32
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %78)
  %80 = add nuw nsw i64 %10, 14
  %81 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !5
  %83 = zext i8 %82 to i32
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %83)
  %85 = add nuw nsw i64 %10, 15
  %86 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !5
  %88 = zext i8 %87 to i32
  %89 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %88)
  %90 = add nuw nsw i64 %10, 16
  %91 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !5
  %93 = zext i8 %92 to i32
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %93)
  %95 = add nuw nsw i64 %10, 17
  %96 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !5
  %98 = zext i8 %97 to i32
  %99 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %98)
  %100 = add nuw nsw i64 %10, 18
  %101 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !5
  %103 = zext i8 %102 to i32
  %104 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %103)
  %105 = add nuw nsw i64 %10, 19
  %106 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %105
  %107 = load i8, ptr %106, align 1, !tbaa !5
  %108 = zext i8 %107 to i32
  %109 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %108)
  %110 = add nuw nsw i64 %10, 20
  %111 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %110
  %112 = load i8, ptr %111, align 1, !tbaa !5
  %113 = zext i8 %112 to i32
  %114 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %113)
  %115 = add nuw nsw i64 %10, 21
  %116 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %115
  %117 = load i8, ptr %116, align 1, !tbaa !5
  %118 = zext i8 %117 to i32
  %119 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %118)
  %120 = add nuw nsw i64 %10, 22
  %121 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %120
  %122 = load i8, ptr %121, align 1, !tbaa !5
  %123 = zext i8 %122 to i32
  %124 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %123)
  %125 = add nuw nsw i64 %10, 23
  %126 = getelementptr inbounds [576 x i8], ptr %0, i64 0, i64 %125
  %127 = load i8, ptr %126, align 1, !tbaa !5
  %128 = zext i8 %127 to i32
  %129 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.13, i32 noundef %128)
  %130 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 24
  br i1 %exitcond.not, label %131, label %3, !llvm.loop !8

131:                                              ; preds = %7
  ret void
}

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree 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" }

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


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