; LLVM IR from pmwkaa/monotone :: monotone/engine/storage (pipeline)

; 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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.List = type { ptr, ptr }
%struct.Exception = type { ptr, i8, ptr, [1 x %struct.__jmp_buf_tag] }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.Tier = type { ptr, ptr, %struct.List }
%struct.Pipeline = type { %struct.List, i32, ptr }

@mn_runtime = external thread_local global %struct.Runtime, align 8

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @list_init(ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @pipeline_reset(ptr 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @tier_allocate(ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @list_append(ptr noundef, ptr noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @tier_resolve(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @pipeline_alter(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.List, align 8
  %6 = alloca %struct.Exception, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %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 ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  call void @pipeline_alter_validate(ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @list_init(ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 224, ptr %6) #7
  %18 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %19 = getelementptr inbounds %struct.Runtime, ptr %18, i32 0, i32 0
  %20 = getelementptr inbounds %struct.ExceptionMgr, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 0
  store ptr %21, ptr %22, align 8, !tbaa !14
  %23 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 1
  store i8 0, ptr %23, align 8, !tbaa !17
  %24 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 2
  store ptr null, ptr %24, align 8, !tbaa !18
  %25 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %26 = getelementptr inbounds %struct.Runtime, ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds %struct.ExceptionMgr, ptr %26, i32 0, i32 0
  store ptr %6, ptr %27, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct.Exception, ptr %6, i32 0, i32 3
  %29 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %28, i64 0, i64 0
  %30 = call i32 @_setjmp(ptr noundef %29) #8
  %31 = icmp eq i32 %30, 0
  %32 = zext i1 %31 to i32
  store i32 %32, ptr %7, align 4, !tbaa !19
  %33 = load i32, ptr %7, align 4, !tbaa !19
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %60

35:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.List, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !20
  store ptr %38, ptr %8, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %55, %35
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = icmp ne ptr %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %59

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 -56
  store ptr %46, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call ptr @tier_allocate(ptr noundef %47)
  store ptr %48, ptr %10, align 8, !tbaa !5
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Tier, ptr %49, i32 0, i32 2
  call void @list_append(ptr noundef %5, ptr noundef %50)
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Pipeline, ptr %52, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !22
  call void @tier_resolve(ptr noundef %51, ptr noundef %54)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %55

55:                                               ; preds = %44
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.List, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  store ptr %58, ptr %8, align 8, !tbaa !5
  br label %39, !llvm.loop !24

59:                                               ; preds = %43
  br label %60

60:                                               ; preds = %59, %2
  %61 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %62 = getelementptr inbounds %struct.Runtime, ptr %61, i32 0, i32 0
  %63 = call zeroext i1 @exception_mgr_leave(ptr noundef %62, ptr noundef %6)
  br i1 %63, label %64, label %87

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %65 = getelementptr inbounds %struct.List, ptr %5, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  store ptr %66, ptr %12, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %82, %64
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = icmp ne ptr %68, %5
  br i1 %69, label %70, label %75

70:                                               ; preds = %67
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.List, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !20
  store ptr %73, ptr %11, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br label %75

75:                                               ; preds = %70, %67
  %76 = phi i1 [ false, %67 ], [ %74, %70 ]
  br i1 %76, label %78, label %77

77:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %84

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i64 -16
  store ptr %80, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  call void @tier_free(ptr noundef %81)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %82

82:                                               ; preds = %78
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %83, ptr %12, align 8, !tbaa !5
  br label %67, !llvm.loop !26

84:                                               ; preds = %77
  %85 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %86 = getelementptr inbounds %struct.Runtime, ptr %85, i32 0, i32 0
  call void @exception_mgr_throw(ptr noundef %86) #9
  unreachable

87:                                               ; preds = %60
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  call void @pipeline_reset(ptr noundef %88)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %89 = getelementptr inbounds %struct.List, ptr %5, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !20
  store ptr %90, ptr %15, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %115, %87
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = icmp ne ptr %92, %5
  br i1 %93, label %94, label %99

94:                                               ; preds = %91
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.List, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !20
  store ptr %97, ptr %14, align 8, !tbaa !5
  %98 = icmp ne ptr %97, null
  br label %99

99:                                               ; preds = %94, %91
  %100 = phi i1 [ false, %91 ], [ %98, %94 ]
  br i1 %100, label %102, label %101

101:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %117

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %103 = load ptr, ptr %15, align 8, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %103, i64 -16
  store ptr %104, ptr %16, align 8, !tbaa !5
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.Tier, ptr %105, i32 0, i32 2
  call void @list_init(ptr noundef %106)
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.Pipeline, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %16, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.Tier, ptr %109, i32 0, i32 2
  call void @list_append(ptr noundef %108, ptr noundef %110)
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Pipeline, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 8, !tbaa !27
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %115

115:                                              ; preds = %102
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %116, ptr %15, align 8, !tbaa !5
  br label %91, !llvm.loop !28

117:                                              ; preds = %101
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  call void @pipeline_save(ptr noundef %118)
  call void @llvm.lifetime.end.p0(i64 224, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @pipeline_alter_validate(ptr noundef) #3

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden zeroext i1 @exception_mgr_leave(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @tier_free(ptr noundef) #0

; Function Attrs: inlinehint noreturn nounwind uwtable
declare hidden void @exception_mgr_throw(ptr noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @pipeline_save(ptr noundef) #0

attributes #0 = { inlinehint 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = { nounwind returns_twice "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 = { alwaysinline 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 #6 = { inlinehint noreturn 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 = { nounwind returns_twice }
attributes #9 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"Runtime", !11, i64 0, !12, i64 8, !6, i64 312}
!11 = !{!"ExceptionMgr", !6, i64 0}
!12 = !{!"Error", !7, i64 0, !13, i64 256, !6, i64 264, !6, i64 272, !13, i64 280, !6, i64 288, !6, i64 296}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"Exception", !6, i64 0, !16, i64 8, !6, i64 16, !7, i64 24}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!15, !16, i64 8}
!18 = !{!15, !6, i64 16}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"List", !6, i64 0, !6, i64 8}
!22 = !{!23, !6, i64 24}
!23 = !{!"Pipeline", !21, i64 0, !13, i64 16, !6, i64 24}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!23, !13, i64 16}
!28 = distinct !{!28, !25}


; 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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.List = type { ptr, ptr }
%struct.Exception = type { ptr, i8, ptr, [1 x %struct.__jmp_buf_tag] }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }

@mn_runtime = external thread_local global %struct.Runtime, align 8

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @list_init(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @pipeline_reset(ptr 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @tier_allocate(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @list_append(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @tier_resolve(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @pipeline_alter(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca %struct.List, align 8
  %4 = alloca %struct.Exception, align 8
  call void @pipeline_alter_validate(ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @list_init(ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %4) #7
  %5 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %6, ptr %4, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %4, i64 8
  store i8 0, ptr %7, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr null, ptr %8, align 8, !tbaa !17
  store ptr %4, ptr %5, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %4, i64 24
  %10 = call i32 @_setjmp(ptr noundef nonnull %9) #8
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %2
  %.035 = load ptr, ptr %1, align 8, !tbaa !18
  %.not36 = icmp eq ptr %.035, %1
  br i1 %.not36, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  br label %13

13:                                               ; preds = %.lr.ph, %13
  %.037 = phi ptr [ %.035, %.lr.ph ], [ %.0, %13 ]
  %14 = getelementptr inbounds i8, ptr %.037, i64 -56
  %15 = call ptr @tier_allocate(ptr noundef nonnull %14)
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  call void @list_append(ptr noundef nonnull %3, ptr noundef nonnull %16)
  %17 = load ptr, ptr %12, align 8, !tbaa !20
  call void @tier_resolve(ptr noundef %15, ptr noundef %17)
  %.0 = load ptr, ptr %.037, align 8, !tbaa !18
  %.not = icmp eq ptr %.0, %1
  br i1 %.not, label %.loopexit, label %13, !llvm.loop !22

.loopexit:                                        ; preds = %13, %.preheader, %2
  %18 = call zeroext i1 @exception_mgr_leave(ptr noundef nonnull %5, ptr noundef nonnull %4)
  br i1 %18, label %19, label %24

19:                                               ; preds = %.loopexit
  %20 = load ptr, ptr %3, align 8, !tbaa !18
  %.not3342 = icmp eq ptr %20, %3
  br i1 %.not3342, label %.critedge, label %.lr.ph44

.lr.ph44:                                         ; preds = %19, %22
  %.02843 = phi ptr [ %21, %22 ], [ %20, %19 ]
  %21 = load ptr, ptr %.02843, align 8, !tbaa !18
  %.not34 = icmp eq ptr %21, null
  br i1 %.not34, label %.critedge, label %22

.critedge:                                        ; preds = %.lr.ph44, %22, %19
  call void @exception_mgr_throw(ptr noundef nonnull %5) #9
  unreachable

22:                                               ; preds = %.lr.ph44
  %23 = getelementptr inbounds i8, ptr %.02843, i64 -16
  call void @tier_free(ptr noundef nonnull %23)
  %.not33 = icmp eq ptr %21, %3
  br i1 %.not33, label %.critedge, label %.lr.ph44, !llvm.loop !24

24:                                               ; preds = %.loopexit
  call void @pipeline_reset(ptr noundef %0)
  %25 = load ptr, ptr %3, align 8, !tbaa !18
  %.not3138 = icmp eq ptr %25, %3
  br i1 %.not3138, label %.critedge2, label %.lr.ph40

.lr.ph40:                                         ; preds = %24
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  br label %27

27:                                               ; preds = %.lr.ph40, %29
  %.02739 = phi ptr [ %25, %.lr.ph40 ], [ %28, %29 ]
  %28 = load ptr, ptr %.02739, align 8, !tbaa !18
  %.not32 = icmp eq ptr %28, null
  br i1 %.not32, label %.critedge2, label %29

.critedge2:                                       ; preds = %27, %29, %24
  call void @pipeline_save(ptr noundef %0)
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void

29:                                               ; preds = %27
  call void @list_init(ptr noundef nonnull %.02739)
  call void @list_append(ptr noundef %0, ptr noundef nonnull %.02739)
  %30 = load i32, ptr %26, align 8, !tbaa !25
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %26, align 8, !tbaa !25
  %.not31 = icmp eq ptr %28, %3
  br i1 %.not31, label %.critedge2, label %27, !llvm.loop !26
}

; Function Attrs: nounwind uwtable
declare hidden void @pipeline_alter_validate(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden zeroext i1 @exception_mgr_leave(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @tier_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint noreturn nounwind uwtable
declare hidden void @exception_mgr_throw(ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @pipeline_save(ptr noundef) local_unnamed_addr #0

attributes #0 = { inlinehint 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = { nounwind returns_twice "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 = { alwaysinline 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 #6 = { inlinehint noreturn 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 = { nounwind returns_twice }
attributes #9 = { 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, !8, i64 0}
!6 = !{!"Runtime", !7, i64 0, !11, i64 8, !8, i64 312}
!7 = !{!"ExceptionMgr", !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"Error", !9, i64 0, !12, i64 256, !8, i64 264, !8, i64 272, !12, i64 280, !8, i64 288, !8, i64 296}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !8, i64 0}
!14 = !{!"Exception", !8, i64 0, !15, i64 8, !8, i64 16, !9, i64 24}
!15 = !{!"_Bool", !9, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{!14, !8, i64 16}
!18 = !{!19, !8, i64 0}
!19 = !{!"List", !8, i64 0, !8, i64 8}
!20 = !{!21, !8, i64 24}
!21 = !{!"Pipeline", !19, i64 0, !12, i64 16, !8, i64 24}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!21, !12, i64 16}
!26 = distinct !{!26, !23}


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