; LLVM IR from ritikbanger/Hacktoberfest2022-DSA :: 09. String (kmpStringMatching)

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

; Function Attrs: nounwind uwtable
define dso_local void @kmp_match(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [50 x i32], align 16
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 200, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 16 %11, i8 0, i64 200, i1 false)
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = call i64 @strlen(ptr noundef %13) #6
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr %10, align 4, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call i64 @strlen(ptr noundef %16) #6
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = icmp ult i64 %17, %19
  br i1 %20, label %21, label %23

21:                                               ; preds = %2
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 1, ptr %12, align 4
  br label %126

23:                                               ; preds = %2
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %59, %23
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %62

28:                                               ; preds = %24
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i8, ptr %29, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = sext i8 %33 to i32
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i8, ptr %35, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = sext i8 %39 to i32
  %41 = icmp eq i32 %34, %40
  br i1 %41, label %42, label %54

42:                                               ; preds = %28
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [50 x i32], ptr %11, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [50 x i32], ptr %11, i64 0, i64 %50
  store i32 %48, ptr %51, align 4, !tbaa !9
  %52 = load i32, ptr %6, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !9
  br label %58

54:                                               ; preds = %28
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [50 x i32], ptr %11, i64 0, i64 %56
  store i32 0, ptr %57, align 4, !tbaa !9
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %54, %42
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !9
  br label %24, !llvm.loop !12

62:                                               ; preds = %24
  store i32 0, ptr %5, align 4, !tbaa !9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %122, %62
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = call i64 @strlen(ptr noundef %66) #6
  %68 = icmp ule i64 %65, %67
  br i1 %68, label %69, label %123

69:                                               ; preds = %63
  store i32 1, ptr %9, align 4, !tbaa !9
  %70 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %70, ptr %6, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %104, %69
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %107

75:                                               ; preds = %71
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !11
  %81 = sext i8 %80 to i32
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %82, i64 %84
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = sext i8 %86 to i32
  %88 = icmp eq i32 %81, %87
  br i1 %88, label %89, label %92

89:                                               ; preds = %75
  %90 = load i32, ptr %5, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %5, align 4, !tbaa !9
  br label %103

92:                                               ; preds = %75
  %93 = load i32, ptr %6, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [50 x i32], ptr %11, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !9
  store i32 %96, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %102

99:                                               ; preds = %92
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %5, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %99, %92
  br label %107

103:                                              ; preds = %89
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %6, align 4, !tbaa !9
  br label %71, !llvm.loop !14

107:                                              ; preds = %102, %71
  %108 = load i32, ptr %9, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 1
  br i1 %109, label %110, label %122

110:                                              ; preds = %107
  %111 = load i32, ptr %5, align 4, !tbaa !9
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = sub nsw i32 %111, %112
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %113)
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = sub nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [50 x i32], ptr %11, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !9
  store i32 %119, ptr %7, align 4, !tbaa !9
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %8, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %110, %107
  br label %63, !llvm.loop !15

123:                                              ; preds = %63
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %124)
  store i32 0, ptr %12, align 4
  br label %126

126:                                              ; preds = %123, %21
  call void @llvm.lifetime.end.p0(i64 200, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %127 = load i32, ptr %12, align 4
  switch i32 %127, label %129 [
    i32 0, label %128
    i32 1, label %128
  ]

128:                                              ; preds = %126, %126
  ret void

129:                                              ; preds = %126
  unreachable
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nounwind willreturn memory(read) "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 = { "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 }
attributes #6 = { nounwind willreturn memory(read) }

!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}
!15 = distinct !{!15, !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 [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local void @kmp_match(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [50 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %3) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(200) %3, i8 0, i64 200, i1 false)
  %4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %5 = trunc i64 %4 to i32
  %6 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #6
  %sext = shl i64 %4, 32
  %7 = ashr exact i64 %sext, 32
  %8 = icmp ult i64 %6, %7
  br i1 %8, label %12, label %.preheader49

.preheader49:                                     ; preds = %2
  %9 = icmp sgt i32 %5, 1
  br i1 %9, label %.lr.ph.preheader, label %.preheader48

.lr.ph.preheader:                                 ; preds = %.preheader49
  %wide.trip.count = and i64 %4, 2147483647
  %10 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %10, 1
  %11 = icmp eq i64 %wide.trip.count, 2
  br i1 %11, label %.preheader48.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %10, -2
  br label %.lr.ph

12:                                               ; preds = %2
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %62

.preheader48.loopexit.unr-lcssa.loopexit:         ; preds = %.lr.ph
  %14 = sext i32 %.140.1 to i64
  %15 = add nsw i32 %.sink.1, 1
  br label %.preheader48.loopexit.unr-lcssa

.preheader48.loopexit.unr-lcssa:                  ; preds = %.preheader48.loopexit.unr-lcssa.loopexit, %.lr.ph.preheader
  %.unr = phi i32 [ 1, %.lr.ph.preheader ], [ %15, %.preheader48.loopexit.unr-lcssa.loopexit ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.preheader48.loopexit.unr-lcssa.loopexit ]
  %.03952.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %14, %.preheader48.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader48, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader48.loopexit.unr-lcssa
  %16 = getelementptr inbounds i8, ptr %1, i64 %.03952.unr
  %17 = load i8, ptr %16, align 1, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.unr
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = icmp eq i8 %17, %19
  %.sink.epil = select i1 %20, i32 %.unr, i32 0
  %21 = getelementptr inbounds [50 x i32], ptr %3, i64 0, i64 %indvars.iv.unr
  store i32 %.sink.epil, ptr %21, align 4
  br label %.preheader48

.preheader48:                                     ; preds = %.lr.ph.epil, %.preheader48.loopexit.unr-lcssa, %.preheader49
  %sext44 = add i64 %sext, -4294967296
  %22 = ashr exact i64 %sext44, 32
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %23 = phi i32 [ 0, %.lr.ph.preheader.new ], [ %.sink.1, %.lr.ph ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %.03952 = phi i32 [ 0, %.lr.ph.preheader.new ], [ %.140.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %24 = sext i32 %.03952 to i64
  %25 = getelementptr inbounds i8, ptr %1, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
  %28 = load i8, ptr %27, align 1, !tbaa !5
  %29 = icmp eq i8 %26, %28
  %30 = add nsw i32 %23, 1
  %31 = add nsw i32 %.03952, 1
  %.sink = select i1 %29, i32 %30, i32 0
  %.140 = select i1 %29, i32 %31, i32 0
  %32 = getelementptr inbounds [50 x i32], ptr %3, i64 0, i64 %indvars.iv
  store i32 %.sink, ptr %32, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = sext i32 %.140 to i64
  %34 = getelementptr inbounds i8, ptr %1, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv.next
  %37 = load i8, ptr %36, align 1, !tbaa !5
  %38 = icmp eq i8 %35, %37
  %39 = add nsw i32 %.sink, 1
  %40 = add nsw i32 %.140, 1
  %.sink.1 = select i1 %38, i32 %39, i32 0
  %.140.1 = select i1 %38, i32 %40, i32 0
  %41 = getelementptr inbounds [50 x i32], ptr %3, i64 0, i64 %indvars.iv.next
  store i32 %.sink.1, ptr %41, align 4
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader48.loopexit.unr-lcssa.loopexit, label %.lr.ph, !llvm.loop !8

.preheader:                                       ; preds = %.preheader48, %57
  %.160 = phi i32 [ 0, %.preheader48 ], [ %.347, %57 ]
  %.03459 = phi i32 [ 0, %.preheader48 ], [ %.135, %57 ]
  %.03658 = phi i32 [ 0, %.preheader48 ], [ %.238, %57 ]
  %.not4354 = icmp slt i32 %.03658, %5
  br i1 %.not4354, label %.lr.ph57.preheader, label %._crit_edge

.lr.ph57.preheader:                               ; preds = %.preheader
  %42 = sext i32 %.160 to i64
  %43 = sext i32 %.03658 to i64
  br label %.lr.ph57

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %49
  %indvars.iv68 = phi i64 [ %43, %.lr.ph57.preheader ], [ %indvars.iv.next69, %49 ]
  %indvars.iv66 = phi i64 [ %42, %.lr.ph57.preheader ], [ %indvars.iv.next67, %49 ]
  %44 = getelementptr inbounds i8, ptr %0, i64 %indvars.iv66
  %45 = load i8, ptr %44, align 1, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv68
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = icmp eq i8 %45, %47
  br i1 %48, label %49, label %.thread

49:                                               ; preds = %.lr.ph57
  %indvars.iv.next67 = add nsw i64 %indvars.iv66, 1
  %indvars.iv.next69 = add nsw i64 %indvars.iv68, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next69 to i32
  %exitcond73.not = icmp eq i32 %lftr.wideiv, %5
  br i1 %exitcond73.not, label %._crit_edge.loopexit, label %.lr.ph57, !llvm.loop !10

.thread:                                          ; preds = %.lr.ph57
  %50 = trunc nsw i64 %indvars.iv66 to i32
  %51 = icmp eq i64 %indvars.iv68, 0
  %52 = zext i1 %51 to i32
  %spec.select = add nsw i32 %50, %52
  br label %57

._crit_edge.loopexit:                             ; preds = %49
  %53 = trunc nsw i64 %indvars.iv.next67 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.2.lcssa = phi i32 [ %.160, %.preheader ], [ %53, %._crit_edge.loopexit ]
  %54 = sub nsw i32 %.2.lcssa, %5
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %54)
  %56 = add nsw i32 %.03459, 1
  br label %57

57:                                               ; preds = %.thread, %._crit_edge
  %.347 = phi i32 [ %.2.lcssa, %._crit_edge ], [ %spec.select, %.thread ]
  %.pn = phi i64 [ %22, %._crit_edge ], [ %indvars.iv68, %.thread ]
  %.135 = phi i32 [ %56, %._crit_edge ], [ %.03459, %.thread ]
  %.238.in = getelementptr inbounds [50 x i32], ptr %3, i64 0, i64 %.pn
  %.238 = load i32, ptr %.238.in, align 4, !tbaa !11
  %58 = sext i32 %.347 to i64
  %59 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #6
  %.not = icmp ult i64 %59, %58
  br i1 %.not, label %60, label %.preheader, !llvm.loop !13

60:                                               ; preds = %57
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.135)
  br label %62

62:                                               ; preds = %60, %12
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %3) #5
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

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

attributes #0 = { 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" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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, !12, i64 0}
!12 = !{!"int", !6, i64 0}
!13 = distinct !{!13, !9}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass