; LLVM IR from lolosssss/leetcode :: c (30_substring_with_concatenation_of_all_words)

; 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 [19 x i8], align 1
@__const.main.words = external hidden unnamed_addr constant [2 x ptr], align 16
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@__const.main.words2 = external hidden unnamed_addr constant [3 x ptr], align 16
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@__const.main.words3 = external hidden unnamed_addr constant [4 x ptr], align 16
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.main.words4 = external hidden unnamed_addr constant [4 x ptr], align 16
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@__const.main.words5 = external hidden unnamed_addr constant [2 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @findSubstring(ptr noundef, ptr noundef, i32 noundef, ptr 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: 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 i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca [2 x ptr], align 16
  %4 = alloca ptr, align 8
  %5 = alloca [3 x ptr], align 16
  %6 = alloca ptr, align 8
  %7 = alloca [4 x ptr], align 16
  %8 = alloca ptr, align 8
  %9 = alloca [4 x ptr], align 16
  %10 = alloca ptr, align 8
  %11 = alloca [2 x ptr], align 16
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store ptr @.str, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.main.words, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store ptr @.str.3, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.main.words2, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr @.str.5, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.main.words3, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr @.str.9, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.main.words4, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr @.str.12, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 @__const.main.words5, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds [2 x ptr], ptr %3, i64 0, i64 0
  %21 = call ptr @findSubstring(ptr noundef %19, ptr noundef %20, i32 noundef 2, ptr noundef %13)
  store ptr %21, ptr %12, align 8, !tbaa !5
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %35, %0
  %24 = load i32, ptr %14, align 4, !tbaa !9
  %25 = load i32, ptr %13, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %38

28:                                               ; preds = %23
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  %30 = load i32, ptr %14, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i32, ptr %29, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %33)
  br label %35

35:                                               ; preds = %28
  %36 = load i32, ptr %14, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %14, align 4, !tbaa !9
  br label %23, !llvm.loop !11

38:                                               ; preds = %27
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %40) #5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds [3 x ptr], ptr %5, i64 0, i64 0
  %43 = call ptr @findSubstring(ptr noundef %41, ptr noundef %42, i32 noundef 3, ptr noundef %13)
  store ptr %43, ptr %12, align 8, !tbaa !5
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %57, %38
  %46 = load i32, ptr %15, align 4, !tbaa !9
  %47 = load i32, ptr %13, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %60

50:                                               ; preds = %45
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load i32, ptr %15, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %55)
  br label %57

57:                                               ; preds = %50
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %15, align 4, !tbaa !9
  br label %45, !llvm.loop !13

60:                                               ; preds = %49
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %62) #5
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds [4 x ptr], ptr %7, i64 0, i64 0
  %65 = call ptr @findSubstring(ptr noundef %63, ptr noundef %64, i32 noundef 4, ptr noundef %13)
  store ptr %65, ptr %12, align 8, !tbaa !5
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %79, %60
  %68 = load i32, ptr %16, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %82

72:                                               ; preds = %67
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = load i32, ptr %16, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %77)
  br label %79

79:                                               ; preds = %72
  %80 = load i32, ptr %16, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %16, align 4, !tbaa !9
  br label %67, !llvm.loop !14

82:                                               ; preds = %71
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %84) #5
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds [4 x ptr], ptr %9, i64 0, i64 0
  %87 = call ptr @findSubstring(ptr noundef %85, ptr noundef %86, i32 noundef 4, ptr noundef %13)
  store ptr %87, ptr %12, align 8, !tbaa !5
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %101, %82
  %90 = load i32, ptr %17, align 4, !tbaa !9
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %104

94:                                               ; preds = %89
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = load i32, ptr %17, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr %95, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %99)
  br label %101

101:                                              ; preds = %94
  %102 = load i32, ptr %17, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %17, align 4, !tbaa !9
  br label %89, !llvm.loop !15

104:                                              ; preds = %93
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %106) #5
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds [2 x ptr], ptr %11, i64 0, i64 0
  %109 = call ptr @findSubstring(ptr noundef %107, ptr noundef %108, i32 noundef 2, ptr noundef %13)
  store ptr %109, ptr %12, align 8, !tbaa !5
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %123, %104
  %112 = load i32, ptr %18, align 4, !tbaa !9
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %126

116:                                              ; preds = %111
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %121)
  br label %123

123:                                              ; preds = %116
  %124 = load i32, ptr %18, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %18, align 4, !tbaa !9
  br label %111, !llvm.loop !16

126:                                              ; preds = %115
  %127 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %128) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  ret i32 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) #2

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

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: readwrite) }
attributes #3 = { "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 = { 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 }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; 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 [19 x i8], align 1
@__const.main.words = external hidden unnamed_addr constant [2 x ptr], align 16
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@__const.main.words2 = external hidden unnamed_addr constant [3 x ptr], align 16
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@__const.main.words3 = external hidden unnamed_addr constant [4 x ptr], align 16
@.str.9 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.main.words4 = external hidden unnamed_addr constant [4 x ptr], align 16
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@__const.main.words5 = external hidden unnamed_addr constant [2 x ptr], align 16
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @findSubstring(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [2 x ptr], align 16
  %2 = alloca [3 x ptr], align 16
  %3 = alloca [4 x ptr], align 16
  %4 = alloca [4 x ptr], align 16
  %5 = alloca [2 x ptr], align 16
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %1, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.words, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %2, ptr noundef nonnull align 16 dereferenceable(24) @__const.main.words2, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %3, ptr noundef nonnull align 16 dereferenceable(32) @__const.main.words3, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %4, ptr noundef nonnull align 16 dereferenceable(32) @__const.main.words4, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.words5, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  %7 = call ptr @findSubstring(ptr noundef nonnull @.str, ptr noundef nonnull %1, i32 noundef 2, ptr noundef nonnull %6)
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %9 = load i32, ptr %6, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  call void @free(ptr noundef %7) #5
  %12 = call ptr @findSubstring(ptr noundef nonnull @.str.3, ptr noundef nonnull %2, i32 noundef 3, ptr noundef nonnull %6)
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph36, label %._crit_edge37

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %16 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %indvars.iv.next, %20
  br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge37:                                    ; preds = %.lr.ph36, %._crit_edge
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  call void @free(ptr noundef %12) #5
  %23 = call ptr @findSubstring(ptr noundef nonnull @.str.5, ptr noundef nonnull %3, i32 noundef 4, ptr noundef nonnull %6)
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph40, label %._crit_edge41

.lr.ph36:                                         ; preds = %._crit_edge, %.lr.ph36
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph36 ], [ 0, %._crit_edge ]
  %27 = getelementptr inbounds i32, ptr %12, i64 %indvars.iv51
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %28)
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next52, %31
  br i1 %32, label %.lr.ph36, label %._crit_edge37, !llvm.loop !11

._crit_edge41:                                    ; preds = %.lr.ph40, %._crit_edge37
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  call void @free(ptr noundef %23) #5
  %34 = call ptr @findSubstring(ptr noundef nonnull @.str.9, ptr noundef nonnull %4, i32 noundef 4, ptr noundef nonnull %6)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph44, label %._crit_edge45

.lr.ph40:                                         ; preds = %._crit_edge37, %.lr.ph40
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.lr.ph40 ], [ 0, %._crit_edge37 ]
  %38 = getelementptr inbounds i32, ptr %23, i64 %indvars.iv54
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %39)
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next55, %42
  br i1 %43, label %.lr.ph40, label %._crit_edge41, !llvm.loop !12

._crit_edge45:                                    ; preds = %.lr.ph44, %._crit_edge41
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  call void @free(ptr noundef %34) #5
  %45 = call ptr @findSubstring(ptr noundef nonnull @.str.12, ptr noundef nonnull %5, i32 noundef 2, ptr noundef nonnull %6)
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph48, label %._crit_edge49

.lr.ph44:                                         ; preds = %._crit_edge41, %.lr.ph44
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %.lr.ph44 ], [ 0, %._crit_edge41 ]
  %49 = getelementptr inbounds i32, ptr %34, i64 %indvars.iv57
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %50)
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next58, %53
  br i1 %54, label %.lr.ph44, label %._crit_edge45, !llvm.loop !13

._crit_edge49:                                    ; preds = %.lr.ph48, %._crit_edge45
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  call void @free(ptr noundef %45) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #5
  ret i32 0

.lr.ph48:                                         ; preds = %._crit_edge45, %.lr.ph48
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %.lr.ph48 ], [ 0, %._crit_edge45 ]
  %56 = getelementptr inbounds i32, ptr %45, i64 %indvars.iv60
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %57)
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next61, %60
  br i1 %61, label %.lr.ph48, label %._crit_edge49, !llvm.loop !14
}

; Function Attrs: mustprogress 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) #2

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass