; LLVM IR from alex-s168/tpre :: tpre (tpre_matchn)

; 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.tpre_match_t = type { i8, i64, ptr }
%struct.tpre_re_t = type { i8, i16, i16, i8, ptr }
%struct.tpre_re_node_t = type { %struct.tpre_pattern_t, i16, i16, i8, i8 }
%struct.tpre_pattern_t = type { i8, i8, i8 }
%struct.tpre_group_t = type { i32, i64 }

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @pattern_match(i24, i8 noundef signext, i1 noundef zeroext, i1 noundef zeroext) #2

; 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) #3

; Function Attrs: nounwind uwtable
declare hidden void @tpre_match_group_put(ptr noundef, i8 noundef zeroext, i8 noundef signext, i32 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 @tpre_matchn(ptr dead_on_unwind noalias writable sret(%struct.tpre_match_t) align 8 %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i16, align 2
  %10 = alloca i24, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store i64 %3, ptr %7, align 8, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.tpre_re_t, ptr %14, i32 0, i32 3
  %16 = load i8, ptr %15, align 2, !tbaa !11
  %17 = zext i8 %16 to i32
  %18 = add nsw i32 %17, 1
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 1
  store i64 %19, ptr %20, align 8, !tbaa !15
  %21 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !15
  %23 = call noalias ptr @calloc(i64 noundef 16, i64 noundef %22) #4
  %24 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  store ptr %23, ptr %24, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.tpre_re_t, ptr %25, i32 0, i32 2
  %27 = load i16, ptr %26, align 4, !tbaa !18
  store i16 %27, ptr %9, align 2, !tbaa !19
  br label %28

28:                                               ; preds = %162, %4
  %29 = load i16, ptr %9, align 2, !tbaa !19
  %30 = sext i16 %29 to i32
  %31 = icmp sge i32 %30, 0
  br i1 %31, label %32, label %163

32:                                               ; preds = %28
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.tpre_re_t, ptr %33, i32 0, i32 4
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = load i16, ptr %9, align 2, !tbaa !19
  %37 = sext i16 %36 to i64
  %38 = getelementptr inbounds %struct.tpre_re_node_t, ptr %35, i64 %37
  %39 = getelementptr inbounds %struct.tpre_re_node_t, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %40, i64 %41
  %43 = load i8, ptr %42, align 1, !tbaa !21
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = add i64 %44, 1
  %46 = load i64, ptr %7, align 8, !tbaa !9
  %47 = icmp eq i64 %45, %46
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = icmp eq i64 %48, 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 2 %39, i64 3, i1 false)
  %50 = load i24, ptr %10, align 4
  %51 = call zeroext i1 @pattern_match(i24 %50, i8 noundef signext %43, i1 noundef zeroext %47, i1 noundef zeroext %49)
  br i1 %51, label %52, label %87

52:                                               ; preds = %32
  %53 = load i64, ptr %8, align 8, !tbaa !9
  %54 = load i64, ptr %7, align 8, !tbaa !9
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %56, label %71

56:                                               ; preds = %52
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.tpre_re_t, ptr %57, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = load i16, ptr %9, align 2, !tbaa !19
  %61 = sext i16 %60 to i64
  %62 = getelementptr inbounds %struct.tpre_re_node_t, ptr %59, i64 %61
  %63 = getelementptr inbounds %struct.tpre_re_node_t, ptr %62, i32 0, i32 4
  %64 = load i8, ptr %63, align 1, !tbaa !22
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load i64, ptr %8, align 8, !tbaa !9
  %67 = getelementptr inbounds i8, ptr %65, i64 %66
  %68 = load i8, ptr %67, align 1, !tbaa !21
  %69 = load i64, ptr %8, align 8, !tbaa !9
  %70 = trunc i64 %69 to i32
  call void @tpre_match_group_put(ptr noundef %0, i8 noundef zeroext %64, i8 noundef signext %68, i32 noundef %70)
  br label %71

71:                                               ; preds = %56, %52
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.tpre_re_t, ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  %75 = load i16, ptr %9, align 2, !tbaa !19
  %76 = sext i16 %75 to i64
  %77 = getelementptr inbounds %struct.tpre_re_node_t, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct.tpre_re_node_t, ptr %77, i32 0, i32 1
  %79 = load i16, ptr %78, align 2, !tbaa !25
  store i16 %79, ptr %9, align 2, !tbaa !19
  %80 = load i64, ptr %8, align 8, !tbaa !9
  %81 = load i64, ptr %7, align 8, !tbaa !9
  %82 = icmp ult i64 %80, %81
  br i1 %82, label %83, label %86

83:                                               ; preds = %71
  %84 = load i64, ptr %8, align 8, !tbaa !9
  %85 = add i64 %84, 1
  store i64 %85, ptr %8, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %83, %71
  br label %162

87:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.tpre_re_t, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !20
  %91 = load i16, ptr %9, align 2, !tbaa !19
  %92 = sext i16 %91 to i64
  %93 = getelementptr inbounds %struct.tpre_re_node_t, ptr %90, i64 %92
  %94 = getelementptr inbounds %struct.tpre_re_node_t, ptr %93, i32 0, i32 3
  %95 = load i8, ptr %94, align 2, !tbaa !26
  store i8 %95, ptr %11, align 1, !tbaa !21
  %96 = load i8, ptr %11, align 1, !tbaa !21
  %97 = zext i8 %96 to i64
  %98 = load i64, ptr %8, align 8, !tbaa !9
  %99 = sub i64 %98, %97
  store i64 %99, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.tpre_re_t, ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !20
  %103 = load i16, ptr %9, align 2, !tbaa !19
  %104 = sext i16 %103 to i64
  %105 = getelementptr inbounds %struct.tpre_re_node_t, ptr %102, i64 %104
  %106 = getelementptr inbounds %struct.tpre_re_node_t, ptr %105, i32 0, i32 4
  %107 = load i8, ptr %106, align 1, !tbaa !22
  store i8 %107, ptr %12, align 1, !tbaa !21
  %108 = load i8, ptr %11, align 1, !tbaa !21
  %109 = zext i8 %108 to i32
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %111, label %153

111:                                              ; preds = %87
  %112 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !17
  %114 = load i8, ptr %12, align 1, !tbaa !21
  %115 = zext i8 %114 to i64
  %116 = getelementptr inbounds %struct.tpre_group_t, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.tpre_group_t, ptr %116, i32 0, i32 1
  %118 = load i64, ptr %117, align 8, !tbaa !27
  %119 = load i8, ptr %11, align 1, !tbaa !21
  %120 = zext i8 %119 to i64
  %121 = icmp uge i64 %118, %120
  br i1 %121, label %122, label %152

122:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %123 = load i8, ptr %11, align 1, !tbaa !21
  %124 = zext i8 %123 to i64
  store i64 %124, ptr %13, align 8, !tbaa !9
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !17
  %128 = load i8, ptr %12, align 1, !tbaa !21
  %129 = zext i8 %128 to i64
  %130 = getelementptr inbounds %struct.tpre_group_t, ptr %127, i64 %129
  %131 = getelementptr inbounds %struct.tpre_group_t, ptr %130, i32 0, i32 1
  %132 = load i64, ptr %131, align 8, !tbaa !27
  %133 = icmp ugt i64 %125, %132
  br i1 %133, label %134, label %142

134:                                              ; preds = %122
  %135 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i8, ptr %12, align 1, !tbaa !21
  %138 = zext i8 %137 to i64
  %139 = getelementptr inbounds %struct.tpre_group_t, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.tpre_group_t, ptr %139, i32 0, i32 1
  %141 = load i64, ptr %140, align 8, !tbaa !27
  store i64 %141, ptr %13, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %134, %122
  %143 = load i64, ptr %13, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !17
  %146 = load i8, ptr %12, align 1, !tbaa !21
  %147 = zext i8 %146 to i64
  %148 = getelementptr inbounds %struct.tpre_group_t, ptr %145, i64 %147
  %149 = getelementptr inbounds %struct.tpre_group_t, ptr %148, i32 0, i32 1
  %150 = load i64, ptr %149, align 8, !tbaa !27
  %151 = sub i64 %150, %143
  store i64 %151, ptr %149, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %152

152:                                              ; preds = %142, %111
  br label %153

153:                                              ; preds = %152, %87
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.tpre_re_t, ptr %154, i32 0, i32 4
  %156 = load ptr, ptr %155, align 8, !tbaa !20
  %157 = load i16, ptr %9, align 2, !tbaa !19
  %158 = sext i16 %157 to i64
  %159 = getelementptr inbounds %struct.tpre_re_node_t, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.tpre_re_node_t, ptr %159, i32 0, i32 2
  %161 = load i16, ptr %160, align 2, !tbaa !30
  store i16 %161, ptr %9, align 2, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %162

162:                                              ; preds = %153, %86
  br label %28, !llvm.loop !31

163:                                              ; preds = %28
  %164 = load i16, ptr %9, align 2, !tbaa !19
  %165 = sext i16 %164 to i32
  %166 = icmp eq i32 %165, -2
  %167 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 0
  %168 = zext i1 %166 to i8
  store i8 %168, ptr %167, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  ret void
}

attributes #0 = { nounwind allocsize(0,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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(0,1) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !7, i64 6}
!12 = !{!"", !13, i64 0, !14, i64 2, !14, i64 4, !7, i64 6, !6, i64 8}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !10, i64 8}
!16 = !{!"", !13, i64 0, !10, i64 8, !6, i64 16}
!17 = !{!16, !6, i64 16}
!18 = !{!12, !14, i64 4}
!19 = !{!14, !14, i64 0}
!20 = !{!12, !6, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !7, i64 9}
!23 = !{!"", !24, i64 0, !14, i64 4, !14, i64 6, !7, i64 8, !7, i64 9}
!24 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!25 = !{!23, !14, i64 4}
!26 = !{!23, !7, i64 8}
!27 = !{!28, !10, i64 8}
!28 = !{!"", !29, i64 0, !10, i64 8}
!29 = !{!"int", !7, i64 0}
!30 = !{!23, !14, i64 6}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!16, !13, i64 0}


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

%struct.tpre_match_t = type { i8, i64, ptr }
%struct.tpre_re_node_t = type { %struct.tpre_pattern_t, i16, i16, i8, i8 }
%struct.tpre_pattern_t = type { i8, i8, i8 }
%struct.tpre_group_t = type { i32, i64 }

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @pattern_match(i24, i8 noundef signext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @tpre_match_group_put(ptr noundef, i8 noundef zeroext, i8 noundef signext, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @tpre_matchn(ptr dead_on_unwind noalias writable sret(%struct.tpre_match_t) align 8 %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i64 noundef %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %1, i64 6
  %6 = load i8, ptr %5, align 2, !tbaa !5
  %7 = zext i8 %6 to i64
  %8 = add nuw nsw i64 %7, 1
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %8, ptr %9, align 8, !tbaa !12
  %10 = tail call noalias ptr @calloc(i64 noundef 16, i64 noundef %8) #2
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %10, ptr %11, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %.04147 = load i16, ptr %12, align 2, !tbaa !16
  %13 = icmp sgt i16 %.04147, -1
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %.pre = load ptr, ptr %14, align 8, !tbaa !17
  br label %15

15:                                               ; preds = %.lr.ph, %54
  %16 = phi ptr [ %.pre, %.lr.ph ], [ %55, %54 ]
  %.04149 = phi i16 [ %.04147, %.lr.ph ], [ %.041, %54 ]
  %.04048 = phi i64 [ 0, %.lr.ph ], [ %.1, %54 ]
  %17 = zext nneg i16 %.04149 to i64
  %18 = getelementptr inbounds %struct.tpre_re_node_t, ptr %16, i64 %17
  %19 = getelementptr inbounds i8, ptr %2, i64 %.04048
  %20 = load i8, ptr %19, align 1, !tbaa !18
  %21 = add i64 %.04048, 1
  %22 = icmp eq i64 %21, %3
  %23 = icmp eq i64 %.04048, 0
  %.0.copyload = load i24, ptr %18, align 2
  %24 = tail call zeroext i1 @pattern_match(i24 %.0.copyload, i8 noundef signext %20, i1 noundef zeroext %22, i1 noundef zeroext %23)
  br i1 %24, label %25, label %36

25:                                               ; preds = %15
  %26 = icmp ult i64 %.04048, %3
  br i1 %26, label %27, label %33

27:                                               ; preds = %25
  %28 = load ptr, ptr %14, align 8, !tbaa !17
  %29 = getelementptr inbounds %struct.tpre_re_node_t, ptr %28, i64 %17, i32 4
  %30 = load i8, ptr %29, align 1, !tbaa !19
  %31 = load i8, ptr %19, align 1, !tbaa !18
  %32 = trunc i64 %.04048 to i32
  tail call void @tpre_match_group_put(ptr noundef %0, i8 noundef zeroext %30, i8 noundef signext %31, i32 noundef %32)
  br label %33

33:                                               ; preds = %27, %25
  %spec.select = phi i64 [ %21, %27 ], [ %.04048, %25 ]
  %34 = load ptr, ptr %14, align 8, !tbaa !17
  %35 = getelementptr inbounds %struct.tpre_re_node_t, ptr %34, i64 %17, i32 1
  br label %54

36:                                               ; preds = %15
  %37 = load ptr, ptr %14, align 8, !tbaa !17
  %38 = getelementptr inbounds %struct.tpre_re_node_t, ptr %37, i64 %17
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load i8, ptr %39, align 2, !tbaa !22
  %41 = zext i8 %40 to i64
  %42 = sub i64 %.04048, %41
  %.not = icmp eq i8 %40, 0
  br i1 %.not, label %52, label %43

43:                                               ; preds = %36
  %44 = getelementptr inbounds i8, ptr %38, i64 9
  %45 = load i8, ptr %44, align 1, !tbaa !19
  %46 = load ptr, ptr %11, align 8, !tbaa !15
  %47 = zext i8 %45 to i64
  %48 = getelementptr inbounds %struct.tpre_group_t, ptr %46, i64 %47, i32 1
  %49 = load i64, ptr %48, align 8, !tbaa !23
  %.not46 = icmp ult i64 %49, %41
  br i1 %.not46, label %52, label %50

50:                                               ; preds = %43
  %51 = sub i64 %49, %41
  store i64 %51, ptr %48, align 8, !tbaa !23
  br label %52

52:                                               ; preds = %43, %50, %36
  %53 = getelementptr inbounds %struct.tpre_re_node_t, ptr %37, i64 %17, i32 2
  br label %54

54:                                               ; preds = %33, %52
  %55 = phi ptr [ %37, %52 ], [ %34, %33 ]
  %.142.in = phi ptr [ %53, %52 ], [ %35, %33 ]
  %.1 = phi i64 [ %42, %52 ], [ %spec.select, %33 ]
  %.041 = load i16, ptr %.142.in, align 2, !tbaa !16
  %56 = icmp sgt i16 %.041, -1
  br i1 %56, label %15, label %._crit_edge, !llvm.loop !26

._crit_edge:                                      ; preds = %54, %4
  %.041.lcssa = phi i16 [ %.04147, %4 ], [ %.041, %54 ]
  %57 = icmp eq i16 %.041.lcssa, -2
  %58 = zext i1 %57 to i8
  store i8 %58, ptr %0, align 8, !tbaa !28
  ret void
}

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind allocsize(0,1) }

!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, !8, i64 6}
!6 = !{!"", !7, i64 0, !10, i64 2, !10, i64 4, !8, i64 6, !11, i64 8}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !14, i64 8}
!13 = !{!"", !7, i64 0, !14, i64 8, !11, i64 16}
!14 = !{!"long", !8, i64 0}
!15 = !{!13, !11, i64 16}
!16 = !{!10, !10, i64 0}
!17 = !{!6, !11, i64 8}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !8, i64 9}
!20 = !{!"", !21, i64 0, !10, i64 4, !10, i64 6, !8, i64 8, !8, i64 9}
!21 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2}
!22 = !{!20, !8, i64 8}
!23 = !{!24, !14, i64 8}
!24 = !{!"", !25, i64 0, !14, i64 8}
!25 = !{!"int", !8, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!13, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass