; LLVM IR from tezc/sc :: string (str_test)

; 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.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__.test6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare ptr @sc_str_create(ptr noundef) #1

declare ptr @sc_str_token_begin(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare void @sc_str_token_end(ptr noundef, ptr noundef) #1

declare void @sc_str_destroy(ptr noundef) #1

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

declare zeroext i1 @sc_str_set(ptr noundef, ptr noundef) #1

declare zeroext i1 @sc_str_set_fmt(ptr noundef, ptr noundef, ...) #1

declare zeroext i1 @sc_str_append(ptr noundef, ptr noundef) #1

declare zeroext i1 @sc_str_substring(ptr noundef, i32 noundef, i32 noundef) #1

declare zeroext i1 @sc_str_trim(ptr noundef, ptr noundef) #1

declare zeroext i1 @sc_str_replace(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test6() #4 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  %6 = call ptr @sc_str_create(ptr noundef null)
  store ptr %6, ptr %1, align 8, !tbaa !5
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %0
  br label %11

10:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.4, i32 noundef 530, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

11:                                               ; preds = %9
  call void @sc_str_destroy(ptr noundef %1)
  %12 = call ptr @sc_str_create_len(ptr noundef null, i32 noundef 100)
  store ptr %12, ptr %1, align 8, !tbaa !5
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %11
  br label %17

16:                                               ; preds = %11
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.4, i32 noundef 534, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

17:                                               ; preds = %15
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  %18 = call zeroext i1 @sc_str_set(ptr noundef %1, ptr noundef @.str.33)
  %19 = zext i1 %18 to i8
  store i8 %19, ptr %5, align 1, !tbaa !9
  %20 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  br label %24

23:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.106, ptr noundef @.str.4, i32 noundef 539, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

24:                                               ; preds = %22
  %25 = load ptr, ptr %1, align 8, !tbaa !5
  %26 = call i32 @strcmp(ptr noundef %25, ptr noundef @.str.33) #7
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %24
  br label %30

29:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.4, i32 noundef 540, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

30:                                               ; preds = %28
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  %31 = call zeroext i1 (ptr, ptr, ...) @sc_str_set_fmt(ptr noundef %1, ptr noundef @.str.33)
  %32 = zext i1 %31 to i8
  store i8 %32, ptr %5, align 1, !tbaa !9
  %33 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %36

35:                                               ; preds = %30
  br label %37

36:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.106, ptr noundef @.str.4, i32 noundef 545, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

37:                                               ; preds = %35
  %38 = load ptr, ptr %1, align 8, !tbaa !5
  %39 = call i32 @strcmp(ptr noundef %38, ptr noundef @.str.33) #7
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  br label %43

42:                                               ; preds = %37
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.4, i32 noundef 546, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

43:                                               ; preds = %41
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  %44 = call zeroext i1 @sc_str_append(ptr noundef %1, ptr noundef @.str.33)
  %45 = zext i1 %44 to i8
  store i8 %45, ptr %5, align 1, !tbaa !9
  %46 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %49

48:                                               ; preds = %43
  br label %50

49:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.106, ptr noundef @.str.4, i32 noundef 551, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

50:                                               ; preds = %48
  %51 = load ptr, ptr %1, align 8, !tbaa !5
  %52 = call i32 @strcmp(ptr noundef %51, ptr noundef @.str.33) #7
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  br label %56

55:                                               ; preds = %50
  call void @__assert_fail(ptr noundef @.str.34, ptr noundef @.str.4, i32 noundef 552, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

56:                                               ; preds = %54
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  %57 = call zeroext i1 @sc_str_trim(ptr noundef %1, ptr noundef @.str.78)
  %58 = zext i1 %57 to i8
  store i8 %58, ptr %5, align 1, !tbaa !9
  %59 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  br label %63

62:                                               ; preds = %56
  call void @__assert_fail(ptr noundef @.str.106, ptr noundef @.str.4, i32 noundef 557, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

63:                                               ; preds = %61
  %64 = load ptr, ptr %1, align 8, !tbaa !5
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  br label %68

67:                                               ; preds = %63
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.4, i32 noundef 558, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

68:                                               ; preds = %66
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  %69 = call zeroext i1 @sc_str_substring(ptr noundef %1, i32 noundef 0, i32 noundef 0)
  %70 = zext i1 %69 to i8
  store i8 %70, ptr %5, align 1, !tbaa !9
  %71 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %72 = trunc i8 %71 to i1
  br i1 %72, label %74, label %73

73:                                               ; preds = %68
  br label %75

74:                                               ; preds = %68
  call void @__assert_fail(ptr noundef @.str.107, ptr noundef @.str.4, i32 noundef 563, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

75:                                               ; preds = %73
  %76 = load ptr, ptr %1, align 8, !tbaa !5
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %79

78:                                               ; preds = %75
  br label %80

79:                                               ; preds = %75
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.4, i32 noundef 564, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

80:                                               ; preds = %78
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  %81 = call zeroext i1 @sc_str_replace(ptr noundef %1, ptr noundef @.str.108, ptr noundef @.str.84)
  %82 = zext i1 %81 to i8
  store i8 %82, ptr %5, align 1, !tbaa !9
  %83 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %86

85:                                               ; preds = %80
  br label %87

86:                                               ; preds = %80
  call void @__assert_fail(ptr noundef @.str.106, ptr noundef @.str.4, i32 noundef 569, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

87:                                               ; preds = %85
  %88 = load ptr, ptr %1, align 8, !tbaa !5
  %89 = icmp eq ptr %88, null
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  br label %92

91:                                               ; preds = %87
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.4, i32 noundef 570, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

92:                                               ; preds = %90
  call void @sc_str_destroy(ptr noundef %1)
  store ptr null, ptr %1, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %97, %92
  %94 = load ptr, ptr %1, align 8, !tbaa !5
  %95 = call ptr @sc_str_token_begin(ptr noundef %94, ptr noundef %3, ptr noundef @.str.1)
  store ptr %95, ptr %4, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %99

97:                                               ; preds = %93
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  br label %93, !llvm.loop !13

99:                                               ; preds = %93
  %100 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sc_str_token_end(ptr noundef %100, ptr noundef %3)
  call void @sc_str_destroy(ptr noundef %1)
  %101 = call ptr @sc_str_create(ptr noundef @.str.109)
  store ptr %101, ptr %1, align 8, !tbaa !5
  %102 = call ptr @sc_str_create(ptr noundef @.str.110)
  store ptr %102, ptr %2, align 8, !tbaa !5
  %103 = load ptr, ptr %1, align 8, !tbaa !5
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = call zeroext i1 @sc_str_cmp(ptr noundef %103, ptr noundef %104)
  br i1 %105, label %107, label %106

106:                                              ; preds = %99
  br label %108

107:                                              ; preds = %99
  call void @__assert_fail(ptr noundef @.str.111, ptr noundef @.str.4, i32 noundef 584, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

108:                                              ; preds = %106
  %109 = call zeroext i1 @sc_str_set(ptr noundef %1, ptr noundef @.str.112)
  %110 = load ptr, ptr %1, align 8, !tbaa !5
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = call zeroext i1 @sc_str_cmp(ptr noundef %110, ptr noundef %111)
  br i1 %112, label %114, label %113

113:                                              ; preds = %108
  br label %115

114:                                              ; preds = %108
  call void @__assert_fail(ptr noundef @.str.111, ptr noundef @.str.4, i32 noundef 586, ptr noundef @__PRETTY_FUNCTION__.test6) #6
  unreachable

115:                                              ; preds = %113
  call void @sc_str_destroy(ptr noundef %1)
  call void @sc_str_destroy(ptr noundef %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

declare ptr @sc_str_create_len(ptr noundef, i32 noundef) #1

declare zeroext i1 @sc_str_cmp(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { noreturn 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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!"_Bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__.test6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.106 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.107 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.108 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.109 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.110 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.111 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.112 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare ptr @sc_str_create(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare void @sc_str_token_end(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @sc_str_destroy(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test6() local_unnamed_addr #4 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store ptr null, ptr %3, align 8, !tbaa !5
  %4 = tail call ptr @sc_str_create(ptr noundef null) #5
  store ptr %4, ptr %1, align 8, !tbaa !5
  %5 = icmp eq ptr %4, null
  br i1 %5, label %7, label %6

6:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.4, i32 noundef 530, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

7:                                                ; preds = %0
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  %8 = call ptr @sc_str_create_len(ptr noundef null, i32 noundef 100) #5
  store ptr %8, ptr %1, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %11, label %10

10:                                               ; preds = %7
  call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.4, i32 noundef 534, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

11:                                               ; preds = %7
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  %12 = call zeroext i1 @sc_str_set(ptr noundef nonnull %1, ptr noundef nonnull @.str.33) #5
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  call void @__assert_fail(ptr noundef nonnull @.str.106, ptr noundef nonnull @.str.4, i32 noundef 539, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

14:                                               ; preds = %11
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  %16 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.33) #7
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.4, i32 noundef 540, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

19:                                               ; preds = %14
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  %20 = call zeroext i1 (ptr, ptr, ...) @sc_str_set_fmt(ptr noundef nonnull %1, ptr noundef nonnull @.str.33) #5
  br i1 %20, label %22, label %21

21:                                               ; preds = %19
  call void @__assert_fail(ptr noundef nonnull @.str.106, ptr noundef nonnull @.str.4, i32 noundef 545, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

22:                                               ; preds = %19
  %23 = load ptr, ptr %1, align 8, !tbaa !5
  %24 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %23, ptr noundef nonnull dereferenceable(1) @.str.33) #7
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.4, i32 noundef 546, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

27:                                               ; preds = %22
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  %28 = call zeroext i1 @sc_str_append(ptr noundef nonnull %1, ptr noundef nonnull @.str.33) #5
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str.106, ptr noundef nonnull @.str.4, i32 noundef 551, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

30:                                               ; preds = %27
  %31 = load ptr, ptr %1, align 8, !tbaa !5
  %32 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %31, ptr noundef nonnull dereferenceable(1) @.str.33) #7
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @__assert_fail(ptr noundef nonnull @.str.34, ptr noundef nonnull @.str.4, i32 noundef 552, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

35:                                               ; preds = %30
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  %36 = call zeroext i1 @sc_str_trim(ptr noundef nonnull %1, ptr noundef nonnull @.str.78) #5
  br i1 %36, label %38, label %37

37:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.106, ptr noundef nonnull @.str.4, i32 noundef 557, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

38:                                               ; preds = %35
  %39 = load ptr, ptr %1, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.4, i32 noundef 558, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

42:                                               ; preds = %38
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  %43 = call zeroext i1 @sc_str_substring(ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0) #5
  br i1 %43, label %44, label %45

44:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str.107, ptr noundef nonnull @.str.4, i32 noundef 563, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

45:                                               ; preds = %42
  %46 = load ptr, ptr %1, align 8, !tbaa !5
  %47 = icmp eq ptr %46, null
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.4, i32 noundef 564, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

49:                                               ; preds = %45
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  %50 = call zeroext i1 @sc_str_replace(ptr noundef nonnull %1, ptr noundef nonnull @.str.108, ptr noundef nonnull @.str.84) #5
  br i1 %50, label %52, label %51

51:                                               ; preds = %49
  call void @__assert_fail(ptr noundef nonnull @.str.106, ptr noundef nonnull @.str.4, i32 noundef 569, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

52:                                               ; preds = %49
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.4, i32 noundef 570, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

56:                                               ; preds = %52
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %57, %56
  %58 = load ptr, ptr %1, align 8, !tbaa !5
  %59 = call ptr @sc_str_token_begin(ptr noundef %58, ptr noundef nonnull %3, ptr noundef nonnull @.str.1) #5
  %.not = icmp eq ptr %59, null
  br i1 %.not, label %60, label %57, !llvm.loop !9

60:                                               ; preds = %57
  %61 = load ptr, ptr %1, align 8, !tbaa !5
  call void @sc_str_token_end(ptr noundef %61, ptr noundef nonnull %3) #5
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  %62 = call ptr @sc_str_create(ptr noundef nonnull @.str.109) #5
  store ptr %62, ptr %1, align 8, !tbaa !5
  %63 = call ptr @sc_str_create(ptr noundef nonnull @.str.110) #5
  store ptr %63, ptr %2, align 8, !tbaa !5
  %64 = load ptr, ptr %1, align 8, !tbaa !5
  %65 = call zeroext i1 @sc_str_cmp(ptr noundef %64, ptr noundef %63) #5
  br i1 %65, label %66, label %67

66:                                               ; preds = %60
  call void @__assert_fail(ptr noundef nonnull @.str.111, ptr noundef nonnull @.str.4, i32 noundef 584, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

67:                                               ; preds = %60
  %68 = call zeroext i1 @sc_str_set(ptr noundef nonnull %1, ptr noundef nonnull @.str.112) #5
  %69 = load ptr, ptr %1, align 8, !tbaa !5
  %70 = call zeroext i1 @sc_str_cmp(ptr noundef %69, ptr noundef %63) #5
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  call void @__assert_fail(ptr noundef nonnull @.str.111, ptr noundef nonnull @.str.4, i32 noundef 586, ptr noundef nonnull @__PRETTY_FUNCTION__.test6) #6
  unreachable

72:                                               ; preds = %67
  call void @sc_str_destroy(ptr noundef nonnull %1) #5
  call void @sc_str_destroy(ptr noundef nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void
}

declare ptr @sc_str_create_len(ptr noundef, i32 noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { noreturn 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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass