; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/utils/sc_string.ll (ZNK5sc_dt13sc_string_old10fmt_lengthEv)

; 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"

%"class.sc_dt::sc_string_old" = type { ptr }
%"class.sc_dt::sc_string_rep" = type { i32, i32, ptr }

@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNK5sc_dt13sc_string_oldixEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK5sc_dt13sc_string_old10fmt_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.sc_dt::sc_string_old", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.sc_dt::sc_string_old", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.sc_dt::sc_string_old", align 8
  %12 = alloca %"class.sc_dt::sc_string_old", align 8
  %13 = alloca %"class.sc_dt::sc_string_old", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !9
  %15 = call noundef signext i8 @_ZNK5sc_dt13sc_string_oldixEi(ptr noundef nonnull align 8 dereferenceable(8) %14, i32 noundef 0)
  %16 = sext i8 %15 to i32
  %17 = icmp ne i32 %16, 37
  br i1 %17, label %18, label %19

18:                                               ; preds = %1
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %105

19:                                               ; preds = %1
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = add i32 %20, 1
  store i32 %21, ptr %4, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef @.str.5)
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %23)
          to label %25 unwind label %29

25:                                               ; preds = %22
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br i1 %24, label %26, label %33

26:                                               ; preds = %25
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = add i32 %27, 1
  store i32 %28, ptr %4, align 4, !tbaa !9
  br label %33

29:                                               ; preds = %22
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %7, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %8, align 4
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %107

33:                                               ; preds = %26, %25
  br label %34

34:                                               ; preds = %38, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @.str.6)
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef %35)
          to label %37 unwind label %41

37:                                               ; preds = %34
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br i1 %36, label %38, label %45

38:                                               ; preds = %37
  %39 = load i32, ptr %4, align 4, !tbaa !9
  %40 = add i32 %39, 1
  store i32 %40, ptr %4, align 4, !tbaa !9
  br label %34, !llvm.loop !11

41:                                               ; preds = %34
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %107

45:                                               ; preds = %37
  %46 = getelementptr inbounds %"class.sc_dt::sc_string_old", ptr %14, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = getelementptr inbounds %"class.sc_dt::sc_string_rep", ptr %47, i32 0, i32 2
  %49 = load ptr, ptr %48, align 8, !tbaa !15
  %50 = load i32, ptr %4, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %49, i64 %51
  %53 = load i8, ptr %52, align 1, !tbaa !17
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 46
  br i1 %55, label %56, label %80

56:                                               ; preds = %45
  %57 = load i32, ptr %4, align 4, !tbaa !9
  %58 = add i32 %57, 1
  store i32 %58, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %59 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %59, ptr %10, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %64, %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef @.str.6)
  %61 = load i32, ptr %4, align 4, !tbaa !9
  %62 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %61)
          to label %63 unwind label %67

63:                                               ; preds = %60
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br i1 %62, label %64, label %71

64:                                               ; preds = %63
  %65 = load i32, ptr %4, align 4, !tbaa !9
  %66 = add i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !9
  br label %60, !llvm.loop !18

67:                                               ; preds = %60
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %107

71:                                               ; preds = %63
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %4, align 4, !tbaa !9
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %71
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %77

76:                                               ; preds = %71
  store i32 0, ptr %5, align 4
  br label %77

77:                                               ; preds = %76, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %78 = load i32, ptr %5, align 4
  switch i32 %78, label %105 [
    i32 0, label %79
  ]

79:                                               ; preds = %77
  br label %80

80:                                               ; preds = %79, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.7)
  %81 = load i32, ptr %4, align 4, !tbaa !9
  %82 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef %81)
          to label %83 unwind label %87

83:                                               ; preds = %80
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br i1 %82, label %84, label %91

84:                                               ; preds = %83
  %85 = load i32, ptr %4, align 4, !tbaa !9
  %86 = add i32 %85, 1
  store i32 %86, ptr %4, align 4, !tbaa !9
  br label %91

87:                                               ; preds = %80
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %107

91:                                               ; preds = %84, %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.8)
  %92 = load i32, ptr %4, align 4, !tbaa !9
  %93 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %92)
          to label %94 unwind label %98

94:                                               ; preds = %91
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br i1 %93, label %95, label %102

95:                                               ; preds = %94
  %96 = load i32, ptr %4, align 4, !tbaa !9
  %97 = add i32 %96, 1
  store i32 %97, ptr %4, align 4, !tbaa !9
  br label %103

98:                                               ; preds = %91
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %7, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %8, align 4
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %107

102:                                              ; preds = %94
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %105

103:                                              ; preds = %95
  %104 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %104, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %105

105:                                              ; preds = %103, %102, %77, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %106 = load i32, ptr %2, align 4
  ret i32 %106

107:                                              ; preds = %98, %87, %67, %41, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %7, align 8
  %110 = load i32, ptr %8, align 4
  %111 = insertvalue { ptr, i32 } poison, ptr %109, 0
  %112 = insertvalue { ptr, i32 } %111, i32 %110, 1
  resume { ptr, i32 } %112
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

declare void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr, ptr)

declare void @_ZN5sc_dt13sc_string_oldD1Ev(ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN5sc_dt13sc_string_oldE", !6, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSN5sc_dt13sc_string_repE", !10, i64 0, !10, i64 4, !6, i64 8}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !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"

%"class.sc_dt::sc_string_old" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNK5sc_dt13sc_string_oldixEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK5sc_dt13sc_string_old10fmt_lengthEv(ptr noundef nonnull align 8 dereferenceable(8) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.sc_dt::sc_string_old", align 8
  %3 = alloca %"class.sc_dt::sc_string_old", align 8
  %4 = alloca %"class.sc_dt::sc_string_old", align 8
  %5 = alloca %"class.sc_dt::sc_string_old", align 8
  %6 = alloca %"class.sc_dt::sc_string_old", align 8
  %7 = tail call noundef signext i8 @_ZNK5sc_dt13sc_string_oldixEi(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0)
  %.not = icmp eq i8 %7, 37
  br i1 %.not, label %8, label %49

8:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @.str.5)
  %9 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef 1)
          to label %10 unwind label %11

10:                                               ; preds = %8
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  %spec.select = select i1 %9, i32 2, i32 1
  br label %13

11:                                               ; preds = %8
  %12 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  br label %50

13:                                               ; preds = %16, %10
  %.125 = phi i32 [ %spec.select, %10 ], [ %17, %16 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull @.str.6)
  %14 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %.125)
          to label %15 unwind label %18

15:                                               ; preds = %13
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br i1 %14, label %16, label %20

16:                                               ; preds = %15
  %17 = add i32 %.125, 1
  br label %13, !llvm.loop !5

18:                                               ; preds = %13
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %50

20:                                               ; preds = %15
  %21 = load ptr, ptr %0, align 8, !tbaa !7
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = zext i32 %.125 to i64
  %25 = getelementptr inbounds i8, ptr %23, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !15
  %27 = icmp eq i8 %26, 46
  br i1 %27, label %28, label %38

28:                                               ; preds = %20
  %29 = add i32 %.125, 1
  br label %30

30:                                               ; preds = %33, %28
  %.2 = phi i32 [ %29, %28 ], [ %34, %33 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.6)
  %31 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef %.2)
          to label %32 unwind label %35

32:                                               ; preds = %30
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %31, label %33, label %37

33:                                               ; preds = %32
  %34 = add i32 %.2, 1
  br label %30, !llvm.loop !16

35:                                               ; preds = %30
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br label %50

37:                                               ; preds = %32
  %.not26 = icmp eq i32 %29, %.2
  br i1 %.not26, label %49, label %38

38:                                               ; preds = %37, %20
  %.3 = phi i32 [ %.2, %37 ], [ %.125, %20 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.7)
  %39 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %.3)
          to label %40 unwind label %43

40:                                               ; preds = %38
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  %41 = zext i1 %39 to i32
  %spec.select28 = add i32 %.3, %41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @.str.8)
  %42 = invoke noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %spec.select28)
          to label %45 unwind label %47

43:                                               ; preds = %38
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  br label %50

45:                                               ; preds = %40
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  %46 = add i32 %spec.select28, 1
  %spec.select29 = select i1 %42, i32 %46, i32 0
  br label %49

47:                                               ; preds = %40
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %50

49:                                               ; preds = %45, %1, %37
  %.1 = phi i32 [ 0, %37 ], [ 0, %1 ], [ %spec.select29, %45 ]
  ret i32 %.1

50:                                               ; preds = %47, %43, %35, %18, %11
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %44, %43 ], [ %36, %35 ], [ %19, %18 ], [ %12, %11 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt13sc_string_old12is_delimiterERKS0_j(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

declare void @_ZN5sc_dt13sc_string_oldC1EPKc(ptr, ptr) local_unnamed_addr

declare void @_ZN5sc_dt13sc_string_oldD1Ev(ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTSN5sc_dt13sc_string_oldE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!13, !9, i64 8}
!13 = !{!"_ZTSN5sc_dt13sc_string_repE", !14, i64 0, !14, i64 4, !9, i64 8}
!14 = !{!"int", !10, i64 0}
!15 = !{!10, !10, i64 0}
!16 = distinct !{!16, !6}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass