; LLVM IR from wrnlb666/yet-another-string-library-in-c :: example (main)

; 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
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i32], align 4

; Function Attrs: nounwind uwtable
declare dso_local i32 @compar(ptr 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

declare i64 @str_strlen(ptr 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 i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  %11 = call ptr (ptr, ...) @str_new_format(ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5)
  store ptr %11, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call ptr @str_split(ptr noundef %12, ptr noundef @.str.6)
  store ptr %13, ptr %3, align 8, !tbaa !5
  %14 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %15

15:                                               ; preds = %34, %0
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = load i64, ptr %4, align 8, !tbaa !9
  %18 = getelementptr inbounds ptr, ptr %16, i64 %17
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %22, label %21

21:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  br label %37

22:                                               ; preds = %15
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load i64, ptr %4, align 8, !tbaa !9
  %25 = getelementptr inbounds ptr, ptr %23, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = call i64 @str_strlen(ptr noundef %26)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = load i64, ptr %4, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %28, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !5
  %32 = call ptr @str_cstr(ptr noundef %31)
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %27, ptr noundef %32)
  br label %34

34:                                               ; preds = %22
  %35 = load i64, ptr %4, align 8, !tbaa !9
  %36 = add i64 %35, 1
  store i64 %36, ptr %4, align 8, !tbaa !9
  br label %15, !llvm.loop !11

37:                                               ; preds = %21
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = call ptr (ptr, i64, ptr, ...) @str_sort(ptr noundef %38, i64 noundef 0, ptr noundef @.str.9, ptr noundef @compar)
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %41, ptr %5, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %55, %37
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %58

47:                                               ; preds = %42
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = call i64 @str_strlen(ptr noundef %49)
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load ptr, ptr %51, align 8, !tbaa !5
  %53 = call ptr @str_cstr(ptr noundef %52)
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %50, ptr noundef %53)
  br label %55

55:                                               ; preds = %47
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds ptr, ptr %56, i32 1
  store ptr %57, ptr %5, align 8, !tbaa !5
  br label %42, !llvm.loop !13

58:                                               ; preds = %46
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  call void @str_free_arr(ptr noundef %59)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = call ptr @str_replaced(ptr noundef %60, ptr noundef @.str.6, ptr noundef @.str.11)
  store ptr %61, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = call ptr @str_substr(ptr noundef %62, i64 noundef 3, i64 noundef 8)
  store ptr %63, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call ptr (ptr, ...) @str_appended_cstrs(ptr noundef %64, ptr noundef @.str.11, ptr noundef @.str.12, ptr noundef @.str.13, ptr noundef null)
  store ptr %65, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call ptr @str_inserted_cstr(ptr noundef %66, i64 noundef 2, ptr noundef @.str.14)
  store ptr %67, ptr %9, align 8, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = call i64 @str_strlen(ptr noundef %69)
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = call ptr @str_cstr(ptr noundef %71)
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %70, ptr noundef %72)
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = call i64 @str_strlen(ptr noundef %74)
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = call ptr @str_cstr(ptr noundef %76)
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %75, ptr noundef %77)
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = call i64 @str_strlen(ptr noundef %79)
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = call ptr @str_cstr(ptr noundef %81)
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %80, ptr noundef %82)
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = call i64 @str_strlen(ptr noundef %84)
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = call ptr @str_cstr(ptr noundef %86)
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %85, ptr noundef %87)
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = call i64 @str_strlen(ptr noundef %89)
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = call ptr @str_cstr(ptr noundef %91)
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i64 noundef %90, ptr noundef %92)
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = call zeroext i1 @str_start_with(ptr noundef %94, ptr noundef @.str.17)
  %96 = zext i1 %95 to i64
  %97 = select i1 %95, ptr @.str.18, ptr @.str.19
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = call zeroext i1 @str_end_with(ptr noundef %98, ptr noundef @.str.20)
  %100 = zext i1 %99 to i64
  %101 = select i1 %99, ptr @.str.18, ptr @.str.19
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, ptr noundef %97, ptr noundef %101)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = call ptr @str_wstr(ptr noundef %103)
  store ptr %104, ptr %10, align 8, !tbaa !5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = call i32 (ptr, ...) @wprintf(ptr noundef @.str.21, ptr noundef %105)
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  call void @str_free(ptr noundef %107)
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, ...) @str_frees(ptr noundef %108, ptr noundef %109, ptr noundef %110, ptr noundef %111, ptr noundef %112, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  ret i32 0
}

declare ptr @str_new_format(ptr noundef, ...) #2

declare ptr @str_split(ptr noundef, ptr noundef) #2

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

declare ptr @str_cstr(ptr noundef) #2

declare ptr @str_sort(ptr noundef, i64 noundef, ptr noundef, ...) #2

declare void @str_free_arr(ptr noundef) #2

declare ptr @str_replaced(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @str_substr(ptr noundef, i64 noundef, i64 noundef) #2

declare ptr @str_appended_cstrs(ptr noundef, ...) #2

declare ptr @str_inserted_cstr(ptr noundef, i64 noundef, ptr noundef) #2

declare zeroext i1 @str_start_with(ptr noundef, ptr noundef) #2

declare zeroext i1 @str_end_with(ptr noundef, ptr noundef) #2

declare ptr @str_wstr(ptr noundef) #2

declare i32 @wprintf(ptr noundef, ...) #2

declare void @str_free(ptr noundef) #2

declare void @str_frees(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !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
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i32], align 4

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

declare i64 @str_strlen(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call ptr (ptr, ...) @str_new_format(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5) #3
  %2 = tail call ptr @str_split(ptr noundef %1, ptr noundef nonnull @.str.6) #3
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %4 = load ptr, ptr %2, align 8, !tbaa !5
  %.not42 = icmp eq ptr %4, null
  br i1 %.not42, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %5 = tail call ptr (ptr, i64, ptr, ...) @str_sort(ptr noundef nonnull %2, i64 noundef 0, ptr noundef nonnull @.str.9, ptr noundef nonnull @compar) #3
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %.not4144 = icmp eq ptr %7, null
  br i1 %.not4144, label %._crit_edge48, label %.lr.ph47

.lr.ph:                                           ; preds = %0, %.lr.ph
  %8 = phi ptr [ %16, %.lr.ph ], [ %4, %0 ]
  %.043 = phi i64 [ %14, %.lr.ph ], [ 0, %0 ]
  %9 = getelementptr inbounds ptr, ptr %2, i64 %.043
  %10 = tail call i64 @str_strlen(ptr noundef nonnull %8) #3
  %11 = load ptr, ptr %9, align 8, !tbaa !5
  %12 = tail call ptr @str_cstr(ptr noundef %11) #3
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %10, ptr noundef %12)
  %14 = add i64 %.043, 1
  %15 = getelementptr inbounds ptr, ptr %2, i64 %14
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %.not = icmp eq ptr %16, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge48:                                    ; preds = %.lr.ph47, %._crit_edge
  tail call void @str_free_arr(ptr noundef nonnull %2) #3
  %17 = tail call ptr @str_replaced(ptr noundef %1, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.11) #3
  %18 = tail call ptr @str_substr(ptr noundef %17, i64 noundef 3, i64 noundef 8) #3
  %19 = tail call ptr (ptr, ...) @str_appended_cstrs(ptr noundef %17, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13, ptr noundef null) #3
  %20 = tail call ptr @str_inserted_cstr(ptr noundef %18, i64 noundef 2, ptr noundef nonnull @.str.14) #3
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %22 = tail call i64 @str_strlen(ptr noundef %1) #3
  %23 = tail call ptr @str_cstr(ptr noundef %1) #3
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %22, ptr noundef %23)
  %25 = tail call i64 @str_strlen(ptr noundef %17) #3
  %26 = tail call ptr @str_cstr(ptr noundef %17) #3
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %25, ptr noundef %26)
  %28 = tail call i64 @str_strlen(ptr noundef %18) #3
  %29 = tail call ptr @str_cstr(ptr noundef %18) #3
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %28, ptr noundef %29)
  %31 = tail call i64 @str_strlen(ptr noundef %19) #3
  %32 = tail call ptr @str_cstr(ptr noundef %19) #3
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %31, ptr noundef %32)
  %34 = tail call i64 @str_strlen(ptr noundef %20) #3
  %35 = tail call ptr @str_cstr(ptr noundef %20) #3
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %34, ptr noundef %35)
  %37 = tail call zeroext i1 @str_start_with(ptr noundef %20, ptr noundef nonnull @.str.17) #3
  %38 = select i1 %37, ptr @.str.18, ptr @.str.19
  %39 = tail call zeroext i1 @str_end_with(ptr noundef %20, ptr noundef nonnull @.str.20) #3
  %40 = select i1 %39, ptr @.str.18, ptr @.str.19
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef nonnull %38, ptr noundef nonnull %40)
  %42 = tail call ptr @str_wstr(ptr noundef %1) #3
  %43 = tail call i32 (ptr, ...) @wprintf(ptr noundef nonnull @.str.21, ptr noundef %42) #3
  tail call void @str_free(ptr noundef %42) #3
  tail call void (ptr, ...) @str_frees(ptr noundef %1, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef null) #3
  ret i32 0

.lr.ph47:                                         ; preds = %._crit_edge, %.lr.ph47
  %44 = phi ptr [ %50, %.lr.ph47 ], [ %7, %._crit_edge ]
  %.03845 = phi ptr [ %49, %.lr.ph47 ], [ %2, %._crit_edge ]
  %45 = tail call i64 @str_strlen(ptr noundef nonnull %44) #3
  %46 = load ptr, ptr %.03845, align 8, !tbaa !5
  %47 = tail call ptr @str_cstr(ptr noundef %46) #3
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i64 noundef %45, ptr noundef %47)
  %49 = getelementptr inbounds i8, ptr %.03845, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  %.not41 = icmp eq ptr %50, null
  br i1 %.not41, label %._crit_edge48, label %.lr.ph47, !llvm.loop !11
}

declare ptr @str_new_format(ptr noundef, ...) local_unnamed_addr #1

declare ptr @str_split(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @str_cstr(ptr noundef) local_unnamed_addr #1

declare ptr @str_sort(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #1

declare void @str_free_arr(ptr noundef) local_unnamed_addr #1

declare ptr @str_replaced(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @str_substr(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

declare ptr @str_appended_cstrs(ptr noundef, ...) local_unnamed_addr #1

declare ptr @str_inserted_cstr(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i1 @str_start_with(ptr noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i1 @str_end_with(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @str_wstr(ptr noundef) local_unnamed_addr #1

declare i32 @wprintf(ptr noundef, ...) local_unnamed_addr #1

declare void @str_free(ptr noundef) local_unnamed_addr #1

declare void @str_frees(ptr noundef, ...) local_unnamed_addr #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 = { "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 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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