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

; 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::Ptr.1097" = type { ptr, ptr, ptr, ptr }
%"class.vl::ObjectString" = type { %"class.vl::Object", ptr, ptr, i64, i64, i64 }
%"class.vl::Object" = type { ptr }
%"class.vl::regex_internal::LoopExpression" = type <{ %"class.vl::regex_internal::Expression", %"class.vl::Ptr.1009", i64, i64, i8, [7 x i8] }>
%"class.vl::regex_internal::Expression" = type { %"class.vl::Object" }
%"class.vl::Ptr.1009" = type { ptr, ptr, ptr, ptr }

@.str.519 = external hidden unnamed_addr constant [58 x i32], align 4
@.str.520 = external hidden unnamed_addr constant [30 x i32], align 4
@.str.521 = external hidden unnamed_addr constant [6 x i32], align 4
@_ZTIN2vl17ArgumentExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

; 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 #3 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef signext) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl14regex_internal17IsPositiveIntegerERPKwRl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

19:                                               ; preds = %2
  call void @_ZN2vl3PtrINS_14regex_internal14LoopExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null)
  store i32 1, ptr %7, align 4
  br label %108

20:                                               ; preds = %2
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef signext 43)
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  store i64 1, ptr %5, align 8, !tbaa !9
  store i64 -1, ptr %6, align 8, !tbaa !9
  br label %59

24:                                               ; preds = %20
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef signext 42)
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  store i64 0, ptr %5, align 8, !tbaa !9
  store i64 -1, ptr %6, align 8, !tbaa !9
  br label %58

28:                                               ; preds = %24
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %29, i32 noundef signext 63)
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  store i64 0, ptr %5, align 8, !tbaa !9
  store i64 1, ptr %6, align 8, !tbaa !9
  br label %57

32:                                               ; preds = %28
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef signext 123)
  br i1 %34, label %35, label %55

35:                                               ; preds = %32
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN2vl14regex_internal17IsPositiveIntegerERPKwRl(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %5)
  br i1 %37, label %38, label %53

38:                                               ; preds = %35
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef signext 44)
  br i1 %40, label %41, label %46

41:                                               ; preds = %38
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN2vl14regex_internal17IsPositiveIntegerERPKwRl(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  store i64 -1, ptr %6, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %44, %41
  br label %48

46:                                               ; preds = %38
  %47 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %47, ptr %6, align 8, !tbaa !9
  br label %48

48:                                               ; preds = %46, %45
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %49, i32 noundef signext 125)
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  br label %80

52:                                               ; preds = %48
  br label %54

53:                                               ; preds = %35
  br label %80

54:                                               ; preds = %52
  br label %56

55:                                               ; preds = %32
  call void @_ZN2vl3PtrINS_14regex_internal14LoopExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null)
  store i32 1, ptr %7, align 4
  br label %108

56:                                               ; preds = %54
  br label %57

57:                                               ; preds = %56, %31
  br label %58

58:                                               ; preds = %57, %27
  br label %59

59:                                               ; preds = %58, %23
  br label %60

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %61 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #8
  invoke void @_ZN2vl14regex_internal14LoopExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57) %61)
          to label %62 unwind label %76

62:                                               ; preds = %60
  store ptr %61, ptr %8, align 8, !tbaa !5
  %63 = load i64, ptr %5, align 8, !tbaa !9
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.vl::regex_internal::LoopExpression", ptr %64, i32 0, i32 2
  store i64 %63, ptr %65, align 8, !tbaa !13
  %66 = load i64, ptr %6, align 8, !tbaa !9
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.vl::regex_internal::LoopExpression", ptr %67, i32 0, i32 3
  store i64 %66, ptr %68, align 8, !tbaa !19
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %69, i32 noundef signext 63)
  %71 = xor i1 %70, true
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.vl::regex_internal::LoopExpression", ptr %72, i32 0, i32 4
  %74 = zext i1 %71 to i8
  store i8 %74, ptr %73, align 8, !tbaa !20
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN2vl3PtrINS_14regex_internal14LoopExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %75)
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %108

76:                                               ; preds = %60
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %61, i64 noundef 64) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %109

80:                                               ; preds = %53, %51
  store i1 true, ptr %14, align 1
  %81 = call ptr @__cxa_allocate_exception(i64 152) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #7
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef @.str.519, i1 noundef zeroext true)
          to label %82 unwind label %86

82:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #7
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef @.str.520, i1 noundef zeroext true)
          to label %83 unwind label %90

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #7
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef @.str.521, i1 noundef zeroext true)
          to label %84 unwind label %94

84:                                               ; preds = %83
  invoke void @_ZN2vl17ArgumentExceptionC1ERKNS_12ObjectStringIwEES4_S4_(ptr noundef nonnull align 8 dereferenceable(152) %81, ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 8 dereferenceable(48) %13)
          to label %85 unwind label %98

85:                                               ; preds = %84
  store i1 false, ptr %14, align 1
  invoke void @__cxa_throw(ptr %81, ptr @_ZTIN2vl17ArgumentExceptionE, ptr @_ZN2vl17ArgumentExceptionD2Ev) #10
          to label %115 unwind label %98

86:                                               ; preds = %80
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %10, align 4
  br label %104

90:                                               ; preds = %82
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  br label %103

94:                                               ; preds = %83
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %102

98:                                               ; preds = %85, %84
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %9, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %10, align 4
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  br label %102

102:                                              ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #7
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #7
  br label %103

103:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #7
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  br label %104

104:                                              ; preds = %103, %86
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  %105 = load i1, ptr %14, align 1
  br i1 %105, label %106, label %107

106:                                              ; preds = %104
  call void @__cxa_free_exception(ptr %81) #7
  br label %107

107:                                              ; preds = %106, %104
  br label %109

108:                                              ; preds = %62, %55, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

109:                                              ; preds = %107, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %9, align 8
  %112 = load i32, ptr %10, align 4
  %113 = insertvalue { ptr, i32 } poison, ptr %111, 0
  %114 = insertvalue { ptr, i32 } %113, i32 %112, 1
  resume { ptr, i32 } %114

115:                                              ; preds = %85
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl14regex_internal14LoopExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2vl17ArgumentExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #6 align 2

declare void @_ZN2vl17ArgumentExceptionC1ERKNS_12ObjectStringIwEES4_S4_(ptr, ptr, ptr, ptr)

attributes #0 = { nobuiltin 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nobuiltin allocsize(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 = { inlinehint 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 #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { noreturn }

!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 = !{!14, !10, i64 40}
!14 = !{!"_ZTSN2vl14regex_internal14LoopExpressionE", !15, i64 0, !17, i64 8, !10, i64 40, !10, i64 48, !18, i64 56}
!15 = !{!"_ZTSN2vl14regex_internal10ExpressionE", !16, i64 0}
!16 = !{!"_ZTSN2vl6ObjectE"}
!17 = !{!"_ZTSN2vl3PtrINS_14regex_internal10ExpressionEEE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"bool", !7, i64 0}
!19 = !{!14, !10, i64 48}
!20 = !{!14, !18, i64 56}


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

@.str.519 = external hidden unnamed_addr constant [58 x i32], align 4
@.str.520 = external hidden unnamed_addr constant [30 x i32], align 4
@.str.521 = external hidden unnamed_addr constant [6 x i32], align 4
@_ZTIN2vl17ArgumentExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

; 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 #3 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef signext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2vl14regex_internal17IsPositiveIntegerERPKwRl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2vl14regex_internal9ParseLoopERPKw(ptr dead_on_unwind noalias writable sret(%"class.vl::Ptr.1097") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.vl::ObjectString", align 8
  %6 = alloca %"class.vl::ObjectString", align 8
  %7 = alloca %"class.vl::ObjectString", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i64 0, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %1, align 8, !tbaa !9
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %11

10:                                               ; preds = %2
  tail call void @_ZN2vl3PtrINS_14regex_internal14LoopExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null)
  br label %61

11:                                               ; preds = %2
  %12 = tail call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 43)
  br i1 %12, label %13, label %14

13:                                               ; preds = %11
  store i64 1, ptr %3, align 8, !tbaa !5
  store i64 -1, ptr %4, align 8, !tbaa !5
  br label %34

14:                                               ; preds = %11
  %15 = tail call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 42)
  br i1 %15, label %16, label %17

16:                                               ; preds = %14
  store i64 0, ptr %3, align 8, !tbaa !5
  store i64 -1, ptr %4, align 8, !tbaa !5
  br label %34

17:                                               ; preds = %14
  %18 = tail call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 63)
  br i1 %18, label %19, label %20

19:                                               ; preds = %17
  store i64 0, ptr %3, align 8, !tbaa !5
  store i64 1, ptr %4, align 8, !tbaa !5
  br label %34

20:                                               ; preds = %17
  %21 = tail call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 123)
  br i1 %21, label %22, label %33

22:                                               ; preds = %20
  %23 = call noundef zeroext i1 @_ZN2vl14regex_internal17IsPositiveIntegerERPKwRl(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br i1 %23, label %24, label %47

24:                                               ; preds = %22
  %25 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 44)
  br i1 %25, label %26, label %29

26:                                               ; preds = %24
  %27 = call noundef zeroext i1 @_ZN2vl14regex_internal17IsPositiveIntegerERPKwRl(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %4)
  br i1 %27, label %31, label %28

28:                                               ; preds = %26
  store i64 -1, ptr %4, align 8, !tbaa !5
  br label %31

29:                                               ; preds = %24
  %30 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %30, ptr %4, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %26, %28, %29
  %32 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 125)
  br i1 %32, label %34, label %47

33:                                               ; preds = %20
  tail call void @_ZN2vl3PtrINS_14regex_internal14LoopExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef null)
  br label %61

34:                                               ; preds = %13, %19, %31, %16
  %35 = call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
  invoke void @_ZN2vl14regex_internal14LoopExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57) %35)
          to label %36 unwind label %45

36:                                               ; preds = %34
  %37 = load i64, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %35, i64 40
  store i64 %37, ptr %38, align 8, !tbaa !13
  %39 = load i64, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %35, i64 48
  store i64 %39, ptr %40, align 8, !tbaa !19
  %41 = call noundef zeroext i1 @_ZN2vl14regex_internal6IsCharERPKww(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef signext 63)
  %42 = xor i1 %41, true
  %43 = getelementptr inbounds i8, ptr %35, i64 56
  %44 = zext i1 %42 to i8
  store i8 %44, ptr %43, align 8, !tbaa !20
  call void @_ZN2vl3PtrINS_14regex_internal14LoopExpressionEEC2EPS2_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull %35)
  br label %61

45:                                               ; preds = %34
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %35, i64 noundef 64) #9
  br label %62

47:                                               ; preds = %22, %31
  %48 = call ptr @__cxa_allocate_exception(i64 152) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #7
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull @.str.519, i1 noundef zeroext true)
          to label %49 unwind label %.thread

49:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull @.str.520, i1 noundef zeroext true)
          to label %50 unwind label %.thread32

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #7
  invoke void @_ZN2vl12ObjectStringIwEC2EPKwb(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull @.str.521, i1 noundef zeroext true)
          to label %51 unwind label %55

51:                                               ; preds = %50
  invoke void @_ZN2vl17ArgumentExceptionC1ERKNS_12ObjectStringIwEES4_S4_(ptr noundef nonnull align 8 dereferenceable(152) %48, ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %52 unwind label %57

52:                                               ; preds = %51
  invoke void @__cxa_throw(ptr %48, ptr nonnull @_ZTIN2vl17ArgumentExceptionE, ptr nonnull @_ZN2vl17ArgumentExceptionD2Ev) #10
          to label %63 unwind label %57

.thread:                                          ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  br label %60

.thread32:                                        ; preds = %49
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  br label %60

55:                                               ; preds = %50
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %52, %51
  %.0 = phi i1 [ false, %52 ], [ true, %51 ]
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #7
  br label %59

59:                                               ; preds = %55, %57
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  %.1 = phi i1 [ %.0, %57 ], [ true, %55 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #7
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @_ZN2vl12ObjectStringIwED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  br i1 %.1, label %60, label %62

60:                                               ; preds = %.thread32, %.thread, %59
  %.pn.pn.pn31 = phi { ptr, i32 } [ %53, %.thread ], [ %.pn, %59 ], [ %54, %.thread32 ]
  call void @__cxa_free_exception(ptr %48) #7
  br label %62

61:                                               ; preds = %36, %33, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret void

62:                                               ; preds = %59, %60, %45
  %.pn27 = phi { ptr, i32 } [ %46, %45 ], [ %.pn.pn.pn31, %60 ], [ %.pn, %59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn27

63:                                               ; preds = %52
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2vl14regex_internal14LoopExpressionC2Ev(ptr noundef nonnull align 8 dereferenceable(57)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN2vl17ArgumentExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #6 align 2

declare void @_ZN2vl17ArgumentExceptionC1ERKNS_12ObjectStringIwEES4_S4_(ptr, ptr, ptr, ptr) local_unnamed_addr

attributes #0 = { nobuiltin 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nobuiltin allocsize(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 = { inlinehint 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 #6 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { noreturn }

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"wchar_t", !7, i64 0}
!13 = !{!14, !6, i64 40}
!14 = !{!"_ZTSN2vl14regex_internal14LoopExpressionE", !15, i64 0, !17, i64 8, !6, i64 40, !6, i64 48, !18, i64 56}
!15 = !{!"_ZTSN2vl14regex_internal10ExpressionE", !16, i64 0}
!16 = !{!"_ZTSN2vl6ObjectE"}
!17 = !{!"_ZTSN2vl3PtrINS_14regex_internal10ExpressionEEE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!18 = !{!"bool", !7, i64 0}
!19 = !{!14, !6, i64 48}
!20 = !{!14, !18, i64 56}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass