; LLVM IR from ohler55/agoo :: ext/agoo (domain)

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

%struct.regmatch_t = type { i32, i32 }
%struct._domain = type { ptr, ptr, ptr, %struct.re_pattern_buffer }
%struct.re_pattern_buffer = type { ptr, i64, i64, i64, ptr, ptr, i64, i8 }

@domains = external hidden global ptr, align 8

; 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

; Function Attrs: nounwind uwtable
define dso_local ptr @agoo_domain_resolve(ptr noundef %0, ptr noundef %1, i64 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca [8 x %struct.regmatch_t], align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %19 = load ptr, ptr @domains, align 8, !tbaa !5
  store ptr %19, ptr %8, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %148, %3
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp ne ptr null, %21
  br i1 %22, label %23, label %152

23:                                               ; preds = %20
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._domain, ptr %24, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = icmp ne ptr null, %26
  br i1 %27, label %28, label %40

28:                                               ; preds = %23
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._domain, ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = call i32 @strcmp(ptr noundef %29, ptr noundef %32) #6
  %34 = icmp eq i32 0, %33
  br i1 %34, label %35, label %39

35:                                               ; preds = %28
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._domain, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  store ptr %38, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %153

39:                                               ; preds = %28
  br label %147

40:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load i64, ptr %7, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %41, i64 %42
  %44 = getelementptr inbounds i8, ptr %43, i64 -1
  store ptr %44, ptr %11, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._domain, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds [8 x %struct.regmatch_t], ptr %10, i64 0, i64 0
  %49 = call i32 @regexec(ptr noundef %46, ptr noundef %47, i64 noundef 8, ptr noundef %48, i32 noundef 0)
  %50 = icmp eq i32 0, %49
  br i1 %50, label %51, label %143

51:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %52, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._domain, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  store ptr %55, ptr %13, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %137, %51
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = load i8, ptr %57, align 1, !tbaa !16
  %59 = sext i8 %58 to i32
  %60 = icmp ne i32 0, %59
  br i1 %60, label %61, label %140

61:                                               ; preds = %56
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = load i8, ptr %62, align 1, !tbaa !16
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 36, %64
  br i1 %65, label %66, label %131

66:                                               ; preds = %61
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 1
  %69 = load i8, ptr %68, align 1, !tbaa !16
  %70 = sext i8 %69 to i32
  %71 = icmp eq i32 40, %70
  br i1 %71, label %72, label %131

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 2
  store ptr %74, ptr %13, align 8, !tbaa !5
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = call i64 @strtol(ptr noundef %75, ptr noundef %15, i32 noundef 10) #5
  store i64 %76, ptr %16, align 8, !tbaa !9
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  %78 = load i8, ptr %77, align 1, !tbaa !16
  %79 = sext i8 %78 to i32
  %80 = icmp ne i32 41, %79
  br i1 %80, label %84, label %81

81:                                               ; preds = %72
  %82 = load i64, ptr %16, align 8, !tbaa !9
  %83 = icmp sle i64 8, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %81, %72
  store i32 7, ptr %9, align 4
  br label %128

85:                                               ; preds = %81
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %86, ptr %13, align 8, !tbaa !5
  %87 = load i64, ptr %16, align 8, !tbaa !9
  %88 = getelementptr inbounds [8 x %struct.regmatch_t], ptr %10, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.regmatch_t, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !17
  store i32 %90, ptr %17, align 4, !tbaa !19
  %91 = icmp sgt i32 0, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  store i32 7, ptr %9, align 4
  br label %128

93:                                               ; preds = %85
  %94 = load i64, ptr %16, align 8, !tbaa !9
  %95 = getelementptr inbounds [8 x %struct.regmatch_t], ptr %10, i64 0, i64 %94
  %96 = getelementptr inbounds %struct.regmatch_t, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = load i32, ptr %17, align 4, !tbaa !19
  %99 = sub nsw i32 %97, %98
  store i32 %99, ptr %18, align 4, !tbaa !19
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = ptrtoint ptr %100 to i64
  %103 = ptrtoint ptr %101 to i64
  %104 = sub i64 %102, %103
  %105 = load i32, ptr %18, align 4, !tbaa !19
  %106 = sext i32 %105 to i64
  %107 = icmp sle i64 %104, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %93
  store i32 7, ptr %9, align 4
  br label %128

109:                                              ; preds = %93
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load i32, ptr %17, align 4, !tbaa !19
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %110, i64 %112
  store ptr %113, ptr %14, align 8, !tbaa !5
  br label %114

114:                                              ; preds = %124, %109
  %115 = load i32, ptr %18, align 4, !tbaa !19
  %116 = icmp slt i32 0, %115
  br i1 %116, label %117, label %127

117:                                              ; preds = %114
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i32 1
  store ptr %119, ptr %14, align 8, !tbaa !5
  %120 = load i8, ptr %118, align 1, !tbaa !16
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i32 1
  store ptr %122, ptr %12, align 8, !tbaa !5
  store i8 %120, ptr %121, align 1, !tbaa !16
  %123 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 0, ptr %123, align 1, !tbaa !16
  br label %124

124:                                              ; preds = %117
  %125 = load i32, ptr %18, align 4, !tbaa !19
  %126 = add nsw i32 %125, -1
  store i32 %126, ptr %18, align 4, !tbaa !19
  br label %114, !llvm.loop !21

127:                                              ; preds = %114
  store i32 0, ptr %9, align 4
  br label %128

128:                                              ; preds = %127, %108, %92, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %129 = load i32, ptr %9, align 4
  switch i32 %129, label %155 [
    i32 0, label %130
    i32 7, label %137
  ]

130:                                              ; preds = %128
  br label %136

131:                                              ; preds = %66, %61
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = load i8, ptr %132, align 1, !tbaa !16
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i32 1
  store ptr %135, ptr %12, align 8, !tbaa !5
  store i8 %133, ptr %134, align 1, !tbaa !16
  br label %136

136:                                              ; preds = %131, %130
  br label %137

137:                                              ; preds = %136, %128
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i32 1
  store ptr %139, ptr %13, align 8, !tbaa !5
  br label %56, !llvm.loop !23

140:                                              ; preds = %56
  %141 = load ptr, ptr %12, align 8, !tbaa !5
  store i8 0, ptr %141, align 1, !tbaa !16
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %142, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %144

143:                                              ; preds = %40
  store i32 0, ptr %9, align 4
  br label %144

144:                                              ; preds = %143, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #5
  %145 = load i32, ptr %9, align 4
  switch i32 %145, label %153 [
    i32 0, label %146
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146, %39
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._domain, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !24
  store ptr %151, ptr %8, align 8, !tbaa !5
  br label %20, !llvm.loop !25

152:                                              ; preds = %20
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %153

153:                                              ; preds = %152, %144, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %154 = load ptr, ptr %4, align 8
  ret ptr %154

155:                                              ; preds = %128
  unreachable
}

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

declare i32 @regexec(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind
declare i64 @strtol(ptr noundef, ptr noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_domain", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24}
!13 = !{!"re_pattern_buffer", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !10, i64 48, !14, i64 56, !14, i64 56, !14, i64 56, !14, i64 56, !14, i64 56, !14, i64 56, !14, i64 56}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !6, i64 16}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !14, i64 0}
!18 = !{!"", !14, i64 0, !14, i64 4}
!19 = !{!14, !14, i64 0}
!20 = !{!18, !14, i64 4}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!12, !6, i64 0}
!25 = distinct !{!25, !22}


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

%struct.regmatch_t = type { i32, i32 }

@domains = external hidden local_unnamed_addr global ptr, align 8

; 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

; Function Attrs: nounwind uwtable
define dso_local ptr @agoo_domain_resolve(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #1 {
  %4 = alloca [8 x %struct.regmatch_t], align 16
  %5 = alloca ptr, align 8
  %.03963 = load ptr, ptr @domains, align 8, !tbaa !5
  %.not64 = icmp eq ptr %.03963, null
  br i1 %.not64, label %.loopexit58, label %.lr.ph67

.lr.ph67:                                         ; preds = %3
  %6 = getelementptr inbounds i8, ptr %1, i64 %2
  %7 = getelementptr inbounds i8, ptr %6, i64 -1
  %8 = ptrtoint ptr %7 to i64
  br label %9

9:                                                ; preds = %.lr.ph67, %60
  %.03966 = phi ptr [ %.03963, %.lr.ph67 ], [ %.039, %60 ]
  %10 = getelementptr inbounds i8, ptr %.03966, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %.not53 = icmp eq ptr %11, null
  br i1 %.not53, label %18, label %12

12:                                               ; preds = %9
  %13 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) %11) #5
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %60

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %.03966, i64 16
  %17 = load ptr, ptr %16, align 8, !tbaa !14
  br label %.loopexit58

18:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #6
  %19 = getelementptr inbounds i8, ptr %.03966, i64 24
  %20 = call i32 @regexec(ptr noundef nonnull %19, ptr noundef %0, i64 noundef 8, ptr noundef nonnull %4, i32 noundef 0) #6
  %.not55 = icmp eq i32 %20, 0
  br i1 %.not55, label %21, label %.thread

.thread:                                          ; preds = %18
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  br label %60

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %.03966, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  br label %24

24:                                               ; preds = %58, %21
  %.044 = phi ptr [ %1, %21 ], [ %.347, %58 ]
  %.041 = phi ptr [ %23, %21 ], [ %59, %58 ]
  %25 = load i8, ptr %.041, align 1, !tbaa !15
  switch i8 %25, label %56 [
    i8 0, label %..loopexit58_crit_edge
    i8 36, label %26
  ]

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %.041, i64 1
  %28 = load i8, ptr %27, align 1, !tbaa !15
  %29 = icmp eq i8 %28, 40
  br i1 %29, label %30, label %56

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %31 = getelementptr inbounds i8, ptr %.041, i64 2
  %32 = call i64 @strtol(ptr noundef nonnull %31, ptr noundef nonnull %5, i32 noundef 10) #6
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !15
  %35 = icmp ne i8 %34, 41
  %36 = icmp sgt i64 %32, 7
  %or.cond = select i1 %35, i1 true, i1 %36
  br i1 %or.cond, label %.loopexit, label %37

37:                                               ; preds = %30
  %38 = getelementptr inbounds [8 x %struct.regmatch_t], ptr %4, i64 0, i64 %32
  %39 = load i32, ptr %38, align 8, !tbaa !16
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %.loopexit, label %41

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %38, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !18
  %44 = sub nsw i32 %43, %39
  %45 = ptrtoint ptr %.044 to i64
  %46 = sub i64 %8, %45
  %47 = sext i32 %44 to i64
  %.not56 = icmp sgt i64 %46, %47
  %48 = icmp sgt i32 %44, 0
  %or.cond73 = and i1 %.not56, %48
  br i1 %or.cond73, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %41
  %49 = zext nneg i32 %39 to i64
  %50 = getelementptr inbounds i8, ptr %0, i64 %49
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.062 = phi i32 [ %54, %.lr.ph ], [ %44, %.lr.ph.preheader ]
  %.04061 = phi ptr [ %51, %.lr.ph ], [ %50, %.lr.ph.preheader ]
  %.14560 = phi ptr [ %53, %.lr.ph ], [ %.044, %.lr.ph.preheader ]
  %51 = getelementptr inbounds i8, ptr %.04061, i64 1
  %52 = load i8, ptr %.04061, align 1, !tbaa !15
  %53 = getelementptr inbounds i8, ptr %.14560, i64 1
  store i8 %52, ptr %.14560, align 1, !tbaa !15
  store i8 0, ptr %53, align 1, !tbaa !15
  %54 = add nsw i32 %.062, -1
  %55 = icmp ugt i32 %.062, 1
  br i1 %55, label %.lr.ph, label %.loopexit, !llvm.loop !19

.loopexit:                                        ; preds = %.lr.ph, %41, %37, %30
  %.246 = phi ptr [ %.044, %30 ], [ %.044, %37 ], [ %.044, %41 ], [ %53, %.lr.ph ]
  %.142 = phi ptr [ %31, %30 ], [ %33, %37 ], [ %33, %41 ], [ %33, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %58

56:                                               ; preds = %24, %26
  %57 = getelementptr inbounds i8, ptr %.044, i64 1
  store i8 %25, ptr %.044, align 1, !tbaa !15
  br label %58

58:                                               ; preds = %.loopexit, %56
  %.347 = phi ptr [ %.246, %.loopexit ], [ %57, %56 ]
  %.243 = phi ptr [ %.142, %.loopexit ], [ %.041, %56 ]
  %59 = getelementptr inbounds i8, ptr %.243, i64 1
  br label %24, !llvm.loop !21

..loopexit58_crit_edge:                           ; preds = %24
  store i8 0, ptr %.044, align 1, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  br label %.loopexit58

60:                                               ; preds = %.thread, %12
  %.039 = load ptr, ptr %.03966, align 8, !tbaa !5
  %.not = icmp eq ptr %.039, null
  br i1 %.not, label %.loopexit58, label %9, !llvm.loop !22

.loopexit58:                                      ; preds = %60, %3, %..loopexit58_crit_edge, %15
  %.3 = phi ptr [ %17, %15 ], [ %1, %..loopexit58_crit_edge ], [ null, %3 ], [ null, %60 ]
  ret ptr %.3
}

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

declare i32 @regexec(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind willreturn memory(read) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_domain", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24}
!11 = !{!"re_pattern_buffer", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !13, i64 56, !13, i64 56, !13, i64 56, !13, i64 56, !13, i64 56, !13, i64 56, !13, i64 56}
!12 = !{!"long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!10, !6, i64 16}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !13, i64 0}
!17 = !{!"", !13, i64 0, !13, i64 4}
!18 = !{!17, !13, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass