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

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

27:                                               ; preds = %164, %3
  %28 = load i16, ptr %7, align 2, !tbaa !18
  %29 = sext i16 %28 to i32
  %30 = icmp sge i32 %29, 0
  br i1 %30, label %31, label %165

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

50:                                               ; preds = %31
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load i8, ptr %51, align 1, !tbaa !20
  %53 = icmp ne i8 %52, 0
  br i1 %53, label %54, label %71

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

71:                                               ; preds = %54, %50
  %72 = load ptr, ptr %4, 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 !19
  %75 = load i16, ptr %7, align 2, !tbaa !18
  %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 !24
  store i16 %79, ptr %7, align 2, !tbaa !18
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = load i8, ptr %80, align 1, !tbaa !20
  %82 = icmp ne i8 %81, 0
  br i1 %82, label %83, label %86

83:                                               ; preds = %71
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i32 1
  store ptr %85, ptr %5, align 8, !tbaa !5
  br label %86

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

87:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %88 = load ptr, ptr %4, 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 !19
  %91 = load i16, ptr %7, align 2, !tbaa !18
  %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 !25
  store i8 %95, ptr %9, align 1, !tbaa !20
  %96 = load i8, ptr %9, align 1, !tbaa !20
  %97 = zext i8 %96 to i32
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = sext i32 %97 to i64
  %100 = sub i64 0, %99
  %101 = getelementptr inbounds i8, ptr %98, i64 %100
  store ptr %101, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.tpre_re_t, ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = load i16, ptr %7, align 2, !tbaa !18
  %106 = sext i16 %105 to i64
  %107 = getelementptr inbounds %struct.tpre_re_node_t, ptr %104, i64 %106
  %108 = getelementptr inbounds %struct.tpre_re_node_t, ptr %107, i32 0, i32 4
  %109 = load i8, ptr %108, align 1, !tbaa !21
  store i8 %109, ptr %10, align 1, !tbaa !20
  %110 = load i8, ptr %9, align 1, !tbaa !20
  %111 = zext i8 %110 to i32
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %113, label %155

113:                                              ; preds = %87
  %114 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !16
  %116 = load i8, ptr %10, align 1, !tbaa !20
  %117 = zext i8 %116 to i64
  %118 = getelementptr inbounds %struct.tpre_group_t, ptr %115, i64 %117
  %119 = getelementptr inbounds %struct.tpre_group_t, ptr %118, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !26
  %121 = load i8, ptr %9, align 1, !tbaa !20
  %122 = zext i8 %121 to i64
  %123 = icmp uge i64 %120, %122
  br i1 %123, label %124, label %154

124:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %125 = load i8, ptr %9, align 1, !tbaa !20
  %126 = zext i8 %125 to i64
  store i64 %126, ptr %11, align 8, !tbaa !29
  %127 = load i64, ptr %11, align 8, !tbaa !29
  %128 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !16
  %130 = load i8, ptr %10, align 1, !tbaa !20
  %131 = zext i8 %130 to i64
  %132 = getelementptr inbounds %struct.tpre_group_t, ptr %129, i64 %131
  %133 = getelementptr inbounds %struct.tpre_group_t, ptr %132, i32 0, i32 1
  %134 = load i64, ptr %133, align 8, !tbaa !26
  %135 = icmp ugt i64 %127, %134
  br i1 %135, label %136, label %144

136:                                              ; preds = %124
  %137 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %138 = load ptr, ptr %137, align 8, !tbaa !16
  %139 = load i8, ptr %10, align 1, !tbaa !20
  %140 = zext i8 %139 to i64
  %141 = getelementptr inbounds %struct.tpre_group_t, ptr %138, i64 %140
  %142 = getelementptr inbounds %struct.tpre_group_t, ptr %141, i32 0, i32 1
  %143 = load i64, ptr %142, align 8, !tbaa !26
  store i64 %143, ptr %11, align 8, !tbaa !29
  br label %144

144:                                              ; preds = %136, %124
  %145 = load i64, ptr %11, align 8, !tbaa !29
  %146 = getelementptr inbounds %struct.tpre_match_t, ptr %0, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !16
  %148 = load i8, ptr %10, align 1, !tbaa !20
  %149 = zext i8 %148 to i64
  %150 = getelementptr inbounds %struct.tpre_group_t, ptr %147, i64 %149
  %151 = getelementptr inbounds %struct.tpre_group_t, ptr %150, i32 0, i32 1
  %152 = load i64, ptr %151, align 8, !tbaa !26
  %153 = sub i64 %152, %145
  store i64 %153, ptr %151, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %154

154:                                              ; preds = %144, %113
  br label %155

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

164:                                              ; preds = %155, %86
  br label %27, !llvm.loop !31

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !7, i64 6}
!10 = !{!"", !11, i64 0, !12, i64 2, !12, i64 4, !7, i64 6, !6, i64 8}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !15, i64 8}
!14 = !{!"", !11, i64 0, !15, i64 8, !6, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !6, i64 16}
!17 = !{!10, !12, i64 4}
!18 = !{!12, !12, i64 0}
!19 = !{!10, !6, i64 8}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !7, i64 9}
!22 = !{!"", !23, i64 0, !12, i64 4, !12, i64 6, !7, i64 8, !7, i64 9}
!23 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!24 = !{!22, !12, i64 4}
!25 = !{!22, !7, i64 8}
!26 = !{!27, !15, i64 8}
!27 = !{!"", !28, i64 0, !15, i64 8}
!28 = !{!"int", !7, i64 0}
!29 = !{!15, !15, i64 0}
!30 = !{!22, !12, i64 6}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!14, !11, 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: nounwind uwtable
define dso_local void @tpre_match(ptr dead_on_unwind noalias writable sret(%struct.tpre_match_t) align 8 %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %1, i64 6
  %5 = load i8, ptr %4, align 2, !tbaa !5
  %6 = zext i8 %5 to i64
  %7 = add nuw nsw i64 %6, 1
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %7, ptr %8, align 8, !tbaa !12
  %9 = tail call noalias ptr @calloc(i64 noundef 16, i64 noundef %7) #2
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %9, ptr %10, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %1, i64 4
  %.03948 = load i16, ptr %11, align 2, !tbaa !16
  %12 = icmp sgt i16 %.03948, -1
  br i1 %12, label %.lr.ph, label %._crit_edge

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

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

23:                                               ; preds = %15
  %24 = load i8, ptr %.03849, align 1, !tbaa !18
  %.not46 = icmp eq i8 %24, 0
  br i1 %.not46, label %32, label %25

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

32:                                               ; preds = %25, %23
  %33 = phi i8 [ %.pre52, %25 ], [ 0, %23 ]
  %34 = load ptr, ptr %13, align 8, !tbaa !17
  %35 = getelementptr inbounds %struct.tpre_re_node_t, ptr %34, i64 %17, i32 1
  %.not47 = icmp ne i8 %33, 0
  %spec.select.idx = zext i1 %.not47 to i64
  br label %54

36:                                               ; preds = %15
  %37 = load ptr, ptr %13, 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 nsw i64 0, %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 %10, 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
  %.not45 = icmp ult i64 %49, %41
  br i1 %.not45, 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 = %32, %52
  %55 = phi ptr [ %37, %52 ], [ %34, %32 ]
  %.140.in = phi ptr [ %53, %52 ], [ %35, %32 ]
  %.pn = phi i64 [ %42, %52 ], [ %spec.select.idx, %32 ]
  %.1 = getelementptr inbounds i8, ptr %.03849, i64 %.pn
  %.039 = load i16, ptr %.140.in, align 2, !tbaa !16
  %56 = icmp sgt i16 %.039, -1
  br i1 %56, label %15, label %._crit_edge, !llvm.loop !26

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

; 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 #1

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

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

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 = { 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 #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