; LLVM IR from vczh/herodb :: Kernel/Source/Vlpp.ll (ZN2vl14regex_internal18EscapeTextForRegexERKNS_12ObjectStringIwEE)

; 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.vl::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::Object" = type { ptr }

@.str.68 = external hidden unnamed_addr constant [3 x i32], align 4
@.str.69 = external hidden unnamed_addr constant [3 x i32], align 4
@.str.70 = external hidden unnamed_addr constant [3 x i32], align 4
@.str.548 = external hidden unnamed_addr constant [2 x i32], align 4

; 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 i64 @_ZNK2vl12ObjectStringIwE6LengthEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i1 noundef zeroext) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2vl12ObjectStringIwEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.vl::ObjectString") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2ERKw(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i32 @_ZNK2vl12ObjectStringIwEixEl(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl14regex_internal18EscapeTextForRegexERKNS_12ObjectStringIwEE(ptr dead_on_unwind noalias writable sret(%"class.vl::ObjectString") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.vl::ObjectString", align 8
  %11 = alloca %"class.vl::ObjectString", align 8
  %12 = alloca %"class.vl::ObjectString", align 8
  %13 = alloca %"class.vl::ObjectString", align 8
  %14 = alloca %"class.vl::ObjectString", align 8
  %15 = alloca %"class.vl::ObjectString", align 8
  %16 = alloca %"class.vl::ObjectString", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZN2vl12ObjectStringIwEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %107, %2
  %18 = load i64, ptr %6, align 8, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = invoke noundef i64 @_ZNK2vl12ObjectStringIwE6LengthEv(ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %21 unwind label %24

21:                                               ; preds = %17
  %22 = icmp slt i64 %18, %20
  br i1 %22, label %28, label %23

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

24:                                               ; preds = %17
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %7, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %8, align 4
  br label %120

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i64, ptr %6, align 8, !tbaa !9
  %31 = invoke noundef signext i32 @_ZNK2vl12ObjectStringIwEixEl(ptr noundef nonnull align 8 dereferenceable(48) %29, i64 noundef %30)
          to label %32 unwind label %34

32:                                               ; preds = %28
  store i32 %31, ptr %9, align 4, !tbaa !11
  %33 = load i32, ptr %9, align 4, !tbaa !11
  switch i32 %33, label %102 [
    i32 92, label %38
    i32 47, label %38
    i32 40, label %38
    i32 41, label %38
    i32 43, label %38
    i32 42, label %38
    i32 63, label %38
    i32 124, label %38
    i32 123, label %38
    i32 125, label %38
    i32 91, label %38
    i32 93, label %38
    i32 60, label %38
    i32 62, label %38
    i32 94, label %38
    i32 36, label %38
    i32 33, label %38
    i32 61, label %38
    i32 13, label %63
    i32 10, label %76
    i32 9, label %89
  ]

34:                                               ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %7, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %8, align 4
  br label %119

38:                                               ; preds = %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef @.str.548, i1 noundef zeroext true)
          to label %39 unwind label %44

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #3
  invoke void @_ZN2vl12ObjectStringIwEC2ERKw(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %40 unwind label %48

40:                                               ; preds = %39
  invoke void @_ZNK2vl12ObjectStringIwEplERKS1_(ptr dead_on_unwind writable sret(%"class.vl::ObjectString") align 8 %10, ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %41 unwind label %52

41:                                               ; preds = %40
  %42 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %43 unwind label %56

43:                                               ; preds = %41
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #3
  br label %106

44:                                               ; preds = %38
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %62

48:                                               ; preds = %39
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  br label %61

52:                                               ; preds = %40
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %7, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %8, align 4
  br label %60

56:                                               ; preds = %41
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %7, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %8, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #3
  br label %60

60:                                               ; preds = %56, %52
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #3
  br label %61

61:                                               ; preds = %60, %48
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #3
  br label %62

62:                                               ; preds = %61, %44
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #3
  br label %119

63:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef @.str.69, i1 noundef zeroext true)
          to label %64 unwind label %67

64:                                               ; preds = %63
  %65 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %13)
          to label %66 unwind label %71

66:                                               ; preds = %64
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #3
  br label %106

67:                                               ; preds = %63
  %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
  br label %75

71:                                               ; preds = %64
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #3
  br label %75

75:                                               ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #3
  br label %119

76:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef @.str.68, i1 noundef zeroext true)
          to label %77 unwind label %80

77:                                               ; preds = %76
  %78 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %79 unwind label %84

79:                                               ; preds = %77
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #3
  br label %106

80:                                               ; preds = %76
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %7, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %8, align 4
  br label %88

84:                                               ; preds = %77
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %8, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #3
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #3
  br label %119

89:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef @.str.70, i1 noundef zeroext true)
          to label %90 unwind label %93

90:                                               ; preds = %89
  %91 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %92 unwind label %97

92:                                               ; preds = %90
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #3
  br label %106

93:                                               ; preds = %89
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  br label %101

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #3
  br label %101

101:                                              ; preds = %97, %93
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #3
  br label %119

102:                                              ; preds = %32
  call void @llvm.lifetime.start.p0(i64 48, ptr %16) #3
  invoke void @_ZN2vl12ObjectStringIwEC2ERKw(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %103 unwind label %110

103:                                              ; preds = %102
  %104 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %16)
          to label %105 unwind label %114

105:                                              ; preds = %103
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #3
  br label %106

106:                                              ; preds = %105, %92, %79, %66, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %6, align 8, !tbaa !9
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %6, align 8, !tbaa !9
  br label %17, !llvm.loop !13

110:                                              ; preds = %102
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %7, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %8, align 4
  br label %118

114:                                              ; preds = %103
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %7, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %8, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #3
  br label %118

118:                                              ; preds = %114, %110
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #3
  br label %119

119:                                              ; preds = %118, %101, %88, %75, %62, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %120

120:                                              ; preds = %119, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  br label %125

121:                                              ; preds = %23
  store i1 true, ptr %5, align 1
  %122 = load i1, ptr %5, align 1
  br i1 %122, label %124, label %123

123:                                              ; preds = %121
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  br label %124

124:                                              ; preds = %123, %121
  ret void

125:                                              ; preds = %120
  %126 = load ptr, ptr %7, align 8
  %127 = load i32, ptr %8, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129
}

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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"wchar_t", !7, i64 0}
!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"

%"class.vl::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::Object" = type { ptr }

@.str.68 = external hidden unnamed_addr constant [3 x i32], align 4
@.str.69 = external hidden unnamed_addr constant [3 x i32], align 4
@.str.70 = external hidden unnamed_addr constant [3 x i32], align 4
@.str.548 = external hidden unnamed_addr constant [2 x i32], align 4

; 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 i64 @_ZNK2vl12ObjectStringIwE6LengthEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef, i1 noundef zeroext) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2vl12ObjectStringIwEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.vl::ObjectString") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2vl12ObjectStringIwEC2ERKw(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i32 @_ZNK2vl12ObjectStringIwEixEl(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl14regex_internal18EscapeTextForRegexERKNS_12ObjectStringIwEE(ptr dead_on_unwind noalias nonnull writable sret(%"class.vl::ObjectString") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.vl::ObjectString", align 8
  %5 = alloca %"class.vl::ObjectString", align 8
  %6 = alloca %"class.vl::ObjectString", align 8
  %7 = alloca %"class.vl::ObjectString", align 8
  %8 = alloca %"class.vl::ObjectString", align 8
  %9 = alloca %"class.vl::ObjectString", align 8
  %10 = alloca %"class.vl::ObjectString", align 8
  tail call void @_ZN2vl12ObjectStringIwEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %11 = tail call noundef i64 @_ZNK2vl12ObjectStringIwE6LengthEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %12 = icmp sgt i64 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %65
  %.01528 = phi i64 [ %66, %65 ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %13 = invoke noundef signext i32 @_ZNK2vl12ObjectStringIwEixEl(ptr noundef nonnull align 8 dereferenceable(48) %1, i64 noundef %.01528)
          to label %14 unwind label %15

14:                                               ; preds = %.lr.ph
  store i32 %13, ptr %3, align 4, !tbaa !5
  switch i32 %13, label %61 [
    i32 92, label %17
    i32 47, label %17
    i32 40, label %17
    i32 41, label %17
    i32 43, label %17
    i32 42, label %17
    i32 63, label %17
    i32 124, label %17
    i32 123, label %17
    i32 125, label %17
    i32 91, label %17
    i32 93, label %17
    i32 60, label %17
    i32 62, label %17
    i32 94, label %17
    i32 36, label %17
    i32 33, label %17
    i32 61, label %17
    i32 13, label %34
    i32 10, label %43
    i32 9, label %52
  ]

15:                                               ; preds = %.lr.ph
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %74

17:                                               ; preds = %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14, %14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull @.str.548, i1 noundef zeroext true)
          to label %18 unwind label %23

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #3
  invoke void @_ZN2vl12ObjectStringIwEC2ERKw(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %19 unwind label %25

19:                                               ; preds = %18
  invoke void @_ZNK2vl12ObjectStringIwEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.vl::ObjectString") align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %20 unwind label %27

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %4)
          to label %22 unwind label %29

22:                                               ; preds = %20
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #3
  br label %65

23:                                               ; preds = %17
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %33

25:                                               ; preds = %18
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %32

27:                                               ; preds = %19
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %31

29:                                               ; preds = %20
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #3
  br label %31

31:                                               ; preds = %29, %27
  %.pn21 = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #3
  br label %32

32:                                               ; preds = %31, %25
  %.pn21.pn = phi { ptr, i32 } [ %.pn21, %31 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #3
  br label %33

33:                                               ; preds = %32, %23
  %.pn21.pn.pn = phi { ptr, i32 } [ %.pn21.pn, %32 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #3
  br label %74

34:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull @.str.69, i1 noundef zeroext true)
          to label %35 unwind label %38

35:                                               ; preds = %34
  %36 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %37 unwind label %40

37:                                               ; preds = %35
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #3
  br label %65

38:                                               ; preds = %34
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %35
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #3
  br label %42

42:                                               ; preds = %40, %38
  %.pn19 = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #3
  br label %74

43:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull @.str.68, i1 noundef zeroext true)
          to label %44 unwind label %47

44:                                               ; preds = %43
  %45 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %46 unwind label %49

46:                                               ; preds = %44
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #3
  br label %65

47:                                               ; preds = %43
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %44
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #3
  br label %51

51:                                               ; preds = %49, %47
  %.pn17 = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #3
  br label %74

52:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #3
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull @.str.70, i1 noundef zeroext true)
          to label %53 unwind label %56

53:                                               ; preds = %52
  %54 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %55 unwind label %58

55:                                               ; preds = %53
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #3
  br label %65

56:                                               ; preds = %52
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %53
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  br label %60

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #3
  br label %74

61:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #3
  invoke void @_ZN2vl12ObjectStringIwEC2ERKw(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %62 unwind label %69

62:                                               ; preds = %61
  %63 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN2vl12ObjectStringIwEpLERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %64 unwind label %71

64:                                               ; preds = %62
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #3
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #3
  br label %65

65:                                               ; preds = %64, %55, %46, %37, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  %66 = add nuw nsw i64 %.01528, 1
  %67 = call noundef i64 @_ZNK2vl12ObjectStringIwE6LengthEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %68 = icmp slt i64 %66, %67
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !9

69:                                               ; preds = %61
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %62
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #3
  br label %73

73:                                               ; preds = %71, %69
  %.pn25 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #3
  br label %74

74:                                               ; preds = %73, %60, %51, %42, %33, %15
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %73 ], [ %.pn, %60 ], [ %.pn17, %51 ], [ %.pn19, %42 ], [ %.pn21.pn.pn, %33 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #3
  resume { ptr, i32 } %.pn25.pn

._crit_edge:                                      ; preds = %65, %2
  ret void
}

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 = !{!6, !6, i64 0}
!6 = !{!"wchar_t", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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