; LLVM IR from likle/cwalk :: src (cwalk)

; 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.cwk_segment = type { ptr, ptr, ptr, ptr, i64 }

; 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
declare dso_local void @cwk_path_get_root(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @cwk_path_terminate_output(ptr noundef, i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @cwk_path_output_sized(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @cwk_path_get_last_segment(ptr noundef, ptr noundef) #1

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

20:                                               ; preds = %4
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  call void @cwk_path_get_root(ptr noundef %21, ptr noundef %14)
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = load i64, ptr %9, align 8, !tbaa !9
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load i64, ptr %14, align 8, !tbaa !9
  %26 = call i64 @cwk_path_output_sized(ptr noundef %22, i64 noundef %23, i64 noundef 0, ptr noundef %24, i64 noundef %25)
  store i64 %26, ptr %13, align 8, !tbaa !9
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 %29, 46
  br i1 %30, label %31, label %38

31:                                               ; preds = %20
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load i64, ptr %9, align 8, !tbaa !9
  %34 = load i64, ptr %13, align 8, !tbaa !9
  %35 = call i64 @cwk_path_output_dot(ptr noundef %32, i64 noundef %33, i64 noundef %34)
  %36 = load i64, ptr %13, align 8, !tbaa !9
  %37 = add i64 %36, %35
  store i64 %37, ptr %13, align 8, !tbaa !9
  br label %38

38:                                               ; preds = %31, %20
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = load i64, ptr %9, align 8, !tbaa !9
  %41 = load i64, ptr %13, align 8, !tbaa !9
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call i64 @cwk_path_output(ptr noundef %39, i64 noundef %40, i64 noundef %41, ptr noundef %42)
  %44 = load i64, ptr %13, align 8, !tbaa !9
  %45 = add i64 %44, %43
  store i64 %45, ptr %13, align 8, !tbaa !9
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load i64, ptr %9, align 8, !tbaa !9
  %48 = load i64, ptr %13, align 8, !tbaa !9
  call void @cwk_path_terminate_output(ptr noundef %46, i64 noundef %47, i64 noundef %48)
  %49 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %49, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %122

50:                                               ; preds = %4
  %51 = getelementptr inbounds %struct.cwk_segment, ptr %10, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  store ptr %52, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.cwk_segment, ptr %10, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  store ptr %54, ptr %11, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %68, %50
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.cwk_segment, ptr %10, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !12
  %59 = icmp ult ptr %56, %58
  br i1 %59, label %60, label %71

60:                                               ; preds = %55
  %61 = load ptr, ptr %11, align 8, !tbaa !5
  %62 = load i8, ptr %61, align 1, !tbaa !11
  %63 = sext i8 %62 to i32
  %64 = icmp eq i32 %63, 46
  br i1 %64, label %65, label %67

65:                                               ; preds = %60
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %66, ptr %12, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %65, %60
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i32 1
  store ptr %70, ptr %11, align 8, !tbaa !5
  br label %55, !llvm.loop !15

71:                                               ; preds = %55
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i64, ptr %9, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.cwk_segment, ptr %10, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.cwk_segment, ptr %10, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !17
  %79 = ptrtoint ptr %76 to i64
  %80 = ptrtoint ptr %78 to i64
  %81 = sub i64 %79, %80
  %82 = call i64 @cwk_path_output_sized(ptr noundef %72, i64 noundef %73, i64 noundef 0, ptr noundef %75, i64 noundef %81)
  store i64 %82, ptr %13, align 8, !tbaa !9
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i8, ptr %83, align 1, !tbaa !11
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %85, 46
  br i1 %86, label %87, label %90

87:                                               ; preds = %71
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i32 1
  store ptr %89, ptr %7, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %87, %71
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = call i64 @strlen(ptr noundef %91) #4
  %93 = add i64 %92, 1
  store i64 %93, ptr %16, align 8, !tbaa !9
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = load i64, ptr %9, align 8, !tbaa !9
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = load i64, ptr %16, align 8, !tbaa !9
  %98 = add i64 %96, %97
  %99 = getelementptr inbounds %struct.cwk_segment, ptr %10, i32 0, i32 3
  %100 = load ptr, ptr %99, align 8, !tbaa !12
  %101 = call i64 @cwk_path_output(ptr noundef %94, i64 noundef %95, i64 noundef %98, ptr noundef %100)
  store i64 %101, ptr %15, align 8, !tbaa !9
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = load i64, ptr %9, align 8, !tbaa !9
  %104 = load i64, ptr %13, align 8, !tbaa !9
  %105 = call i64 @cwk_path_output_dot(ptr noundef %102, i64 noundef %103, i64 noundef %104)
  %106 = load i64, ptr %13, align 8, !tbaa !9
  %107 = add i64 %106, %105
  store i64 %107, ptr %13, align 8, !tbaa !9
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load i64, ptr %9, align 8, !tbaa !9
  %110 = load i64, ptr %13, align 8, !tbaa !9
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = call i64 @cwk_path_output(ptr noundef %108, i64 noundef %109, i64 noundef %110, ptr noundef %111)
  %113 = load i64, ptr %13, align 8, !tbaa !9
  %114 = add i64 %113, %112
  store i64 %114, ptr %13, align 8, !tbaa !9
  %115 = load i64, ptr %15, align 8, !tbaa !9
  %116 = load i64, ptr %13, align 8, !tbaa !9
  %117 = add i64 %116, %115
  store i64 %117, ptr %13, align 8, !tbaa !9
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i64, ptr %9, align 8, !tbaa !9
  %120 = load i64, ptr %13, align 8, !tbaa !9
  call void @cwk_path_terminate_output(ptr noundef %118, i64 noundef %119, i64 noundef %120)
  %121 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %121, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %122

122:                                              ; preds = %90, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #3
  %123 = load i64, ptr %5, align 8
  ret i64 %123
}

; Function Attrs: nounwind uwtable
declare hidden i64 @cwk_path_output_dot(ptr noundef, i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i64 @cwk_path_output(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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 = { nounwind }
attributes #4 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"cwk_segment", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!14 = !{!13, !6, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!13, !6, i64 0}


; 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.cwk_segment = type { ptr, ptr, ptr, ptr, i64 }

; 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
declare dso_local void @cwk_path_get_root(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @cwk_path_terminate_output(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @cwk_path_output_sized(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @cwk_path_get_last_segment(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i64 @cwk_path_change_extension(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #1 {
  %5 = alloca %struct.cwk_segment, align 8
  %6 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %7 = call zeroext i1 @cwk_path_get_last_segment(ptr noundef %0, ptr noundef nonnull %5)
  br i1 %7, label %18, label %8

8:                                                ; preds = %4
  call void @cwk_path_get_root(ptr noundef %0, ptr noundef nonnull %6)
  %9 = load i64, ptr %6, align 8, !tbaa !5
  %10 = call i64 @cwk_path_output_sized(ptr noundef %2, i64 noundef %3, i64 noundef 0, ptr noundef %0, i64 noundef %9)
  %11 = load i8, ptr %1, align 1, !tbaa !9
  %.not = icmp eq i8 %11, 46
  br i1 %.not, label %15, label %12

12:                                               ; preds = %8
  %13 = call i64 @cwk_path_output_dot(ptr noundef %2, i64 noundef %3, i64 noundef %10)
  %14 = add i64 %13, %10
  br label %15

15:                                               ; preds = %12, %8
  %.049 = phi i64 [ %14, %12 ], [ %10, %8 ]
  %16 = call i64 @cwk_path_output(ptr noundef %2, i64 noundef %3, i64 noundef %.049, ptr noundef nonnull %1)
  %17 = add i64 %16, %.049
  br label %72

18:                                               ; preds = %4
  %19 = getelementptr inbounds i8, ptr %5, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !10
  %21 = getelementptr inbounds i8, ptr %5, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = icmp ult ptr %22, %20
  br i1 %23, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %18
  %24 = ptrtoint ptr %22 to i64
  %25 = ptrtoint ptr %20 to i64
  %26 = sub i64 %25, %24
  %xtraiter = and i64 %26, 7
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader, %.lr.ph.prol
  %.05054.prol = phi ptr [ %spec.select.prol, %.lr.ph.prol ], [ %20, %.lr.ph.preheader ]
  %.05153.prol = phi ptr [ %29, %.lr.ph.prol ], [ %22, %.lr.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader ]
  %27 = load i8, ptr %.05153.prol, align 1, !tbaa !9
  %28 = icmp eq i8 %27, 46
  %spec.select.prol = select i1 %28, ptr %.05153.prol, ptr %.05054.prol
  %29 = getelementptr inbounds i8, ptr %.05153.prol, i64 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !14

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader
  %spec.select.lcssa.unr = phi ptr [ poison, %.lr.ph.preheader ], [ %spec.select.prol, %.lr.ph.prol ]
  %.05054.unr = phi ptr [ %20, %.lr.ph.preheader ], [ %spec.select.prol, %.lr.ph.prol ]
  %.05153.unr = phi ptr [ %22, %.lr.ph.preheader ], [ %29, %.lr.ph.prol ]
  %30 = sub i64 %24, %25
  %31 = icmp ugt i64 %30, -8
  br i1 %31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.05054 = phi ptr [ %spec.select.7, %.lr.ph ], [ %.05054.unr, %.lr.ph.prol.loopexit ]
  %.05153 = phi ptr [ %55, %.lr.ph ], [ %.05153.unr, %.lr.ph.prol.loopexit ]
  %32 = load i8, ptr %.05153, align 1, !tbaa !9
  %33 = icmp eq i8 %32, 46
  %spec.select = select i1 %33, ptr %.05153, ptr %.05054
  %34 = getelementptr inbounds i8, ptr %.05153, i64 1
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = icmp eq i8 %35, 46
  %spec.select.1 = select i1 %36, ptr %34, ptr %spec.select
  %37 = getelementptr inbounds i8, ptr %.05153, i64 2
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = icmp eq i8 %38, 46
  %spec.select.2 = select i1 %39, ptr %37, ptr %spec.select.1
  %40 = getelementptr inbounds i8, ptr %.05153, i64 3
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = icmp eq i8 %41, 46
  %spec.select.3 = select i1 %42, ptr %40, ptr %spec.select.2
  %43 = getelementptr inbounds i8, ptr %.05153, i64 4
  %44 = load i8, ptr %43, align 1, !tbaa !9
  %45 = icmp eq i8 %44, 46
  %spec.select.4 = select i1 %45, ptr %43, ptr %spec.select.3
  %46 = getelementptr inbounds i8, ptr %.05153, i64 5
  %47 = load i8, ptr %46, align 1, !tbaa !9
  %48 = icmp eq i8 %47, 46
  %spec.select.5 = select i1 %48, ptr %46, ptr %spec.select.4
  %49 = getelementptr inbounds i8, ptr %.05153, i64 6
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = icmp eq i8 %50, 46
  %spec.select.6 = select i1 %51, ptr %49, ptr %spec.select.5
  %52 = getelementptr inbounds i8, ptr %.05153, i64 7
  %53 = load i8, ptr %52, align 1, !tbaa !9
  %54 = icmp eq i8 %53, 46
  %spec.select.7 = select i1 %54, ptr %52, ptr %spec.select.6
  %55 = getelementptr inbounds i8, ptr %.05153, i64 8
  %exitcond.not.7 = icmp eq ptr %55, %20
  br i1 %exitcond.not.7, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %18
  %.pre-phi.in = phi ptr [ %20, %18 ], [ %spec.select.lcssa.unr, %.lr.ph.prol.loopexit ], [ %spec.select.7, %.lr.ph ]
  %.pre-phi = ptrtoint ptr %.pre-phi.in to i64
  %56 = load ptr, ptr %5, align 8, !tbaa !18
  %57 = ptrtoint ptr %56 to i64
  %58 = sub i64 %.pre-phi, %57
  %59 = call i64 @cwk_path_output_sized(ptr noundef %2, i64 noundef %3, i64 noundef 0, ptr noundef %56, i64 noundef %58)
  %60 = load i8, ptr %1, align 1, !tbaa !9
  %61 = icmp eq i8 %60, 46
  %spec.select52.idx = zext i1 %61 to i64
  %spec.select52 = getelementptr inbounds i8, ptr %1, i64 %spec.select52.idx
  %62 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %spec.select52) #4
  %63 = add i64 %59, 1
  %64 = add i64 %63, %62
  %65 = load ptr, ptr %19, align 8, !tbaa !10
  %66 = call i64 @cwk_path_output(ptr noundef %2, i64 noundef %3, i64 noundef %64, ptr noundef %65)
  %67 = call i64 @cwk_path_output_dot(ptr noundef %2, i64 noundef %3, i64 noundef %59)
  %68 = add i64 %67, %59
  %69 = call i64 @cwk_path_output(ptr noundef %2, i64 noundef %3, i64 noundef %68, ptr noundef nonnull %spec.select52)
  %70 = add i64 %69, %66
  %71 = add i64 %70, %68
  br label %72

72:                                               ; preds = %._crit_edge, %15
  %.sink = phi i64 [ %71, %._crit_edge ], [ %17, %15 ]
  call void @cwk_path_terminate_output(ptr noundef %2, i64 noundef %3, i64 noundef %.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  ret i64 %.sink
}

; Function Attrs: nounwind uwtable
declare hidden i64 @cwk_path_output_dot(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i64 @cwk_path_output(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

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 = { nounwind }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 24}
!11 = !{!"cwk_segment", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !6, i64 32}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!11, !12, i64 16}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!11, !12, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass