; LLVM IR from humz2k/sugaryc :: ext/bdwgc/extra (gc)

; 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.obj_kind = type { ptr, ptr, i64, i32, i32 }
%struct.hblkhdr = type { ptr, ptr, ptr, i8, i8, i16, i64, i64, ptr, i64, [5 x i64] }

@GC_all_interior_pointers = external dso_local global i32, align 4
@GC_non_gc_bytes = external dso_local global i64, align 8
@GC_obj_kinds = external hidden global <{ %struct.obj_kind, %struct.obj_kind, %struct.obj_kind, [13 x %struct.obj_kind] }>, align 16

; 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: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @GC_find_header(ptr noundef) #2

; Function Attrs: nounwind allocsize(0) uwtable
declare dso_local noalias ptr @GC_malloc(i64 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nounwind uwtable
declare dso_local void @GC_free(ptr noundef) #2

; Function Attrs: nounwind allocsize(1) uwtable
define dso_local ptr @GC_realloc(ptr noundef %0, i64 noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %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 i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = ptrtoint ptr %16 to i64
  store i64 %17, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = icmp eq ptr null, %18
  br i1 %19, label %20, label %23

20:                                               ; preds = %2
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = call noalias ptr @GC_malloc(i64 noundef %21) #8
  store ptr %22, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %156

23:                                               ; preds = %2
  %24 = load i64, ptr %5, align 8, !tbaa !9
  %25 = icmp eq i64 0, %24
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  call void @GC_free(ptr noundef %27)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %156

28:                                               ; preds = %23
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = ptrtoint ptr %29 to i64
  %31 = and i64 %30, -4096
  %32 = inttoptr i64 %31 to ptr
  store ptr %32, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call ptr @GC_find_header(ptr noundef %33)
  store ptr %34, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.hblkhdr, ptr %35, i32 0, i32 6
  %37 = load i64, ptr %36, align 8, !tbaa !11
  store i64 %37, ptr %10, align 8, !tbaa !9
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.hblkhdr, ptr %38, i32 0, i32 3
  %40 = load i8, ptr %39, align 8, !tbaa !14
  %41 = zext i8 %40 to i32
  store i32 %41, ptr %12, align 4, !tbaa !15
  %42 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %42, ptr %11, align 8, !tbaa !9
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = icmp ugt i64 %43, 2048
  br i1 %44, label %45, label %97

45:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %46 = load i32, ptr %12, align 4, !tbaa !15
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [16 x %struct.obj_kind], ptr @GC_obj_kinds, i64 0, i64 %47
  store ptr %48, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.obj_kind, ptr %49, i32 0, i32 2
  %51 = load i64, ptr %50, align 8, !tbaa !17
  store i64 %51, ptr %15, align 8, !tbaa !9
  %52 = load i64, ptr %10, align 8, !tbaa !9
  %53 = add i64 %52, 4096
  %54 = sub i64 %53, 1
  %55 = and i64 %54, -4096
  store i64 %55, ptr %10, align 8, !tbaa !9
  %56 = load i32, ptr @GC_all_interior_pointers, align 4, !tbaa !15
  %57 = sext i32 %56 to i64
  %58 = icmp ne i64 %57, 0
  br i1 %58, label %59, label %72

59:                                               ; preds = %45
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.hblkhdr, ptr %60, i32 0, i32 4
  %62 = load i8, ptr %61, align 1, !tbaa !19
  %63 = zext i8 %62 to i32
  %64 = and i32 %63, 1
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %72

66:                                               ; preds = %59
  %67 = load i32, ptr %12, align 4, !tbaa !15
  %68 = icmp eq i32 %67, 1
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = load i64, ptr %15, align 8, !tbaa !9
  %71 = add i64 %70, 8
  store i64 %71, ptr %15, align 8, !tbaa !9
  br label %72

72:                                               ; preds = %69, %66, %59, %45
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.obj_kind, ptr %73, i32 0, i32 3
  %75 = load i32, ptr %74, align 8, !tbaa !20
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %81

77:                                               ; preds = %72
  %78 = load i64, ptr %10, align 8, !tbaa !9
  %79 = load i64, ptr %15, align 8, !tbaa !9
  %80 = add i64 %79, %78
  store i64 %80, ptr %15, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %77, %72
  %82 = load i64, ptr %10, align 8, !tbaa !9
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.hblkhdr, ptr %83, i32 0, i32 6
  store i64 %82, ptr %84, align 8, !tbaa !11
  %85 = load i64, ptr %15, align 8, !tbaa !9
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.hblkhdr, ptr %86, i32 0, i32 7
  store i64 %85, ptr %87, align 8, !tbaa !21
  %88 = load i32, ptr %12, align 4, !tbaa !15
  %89 = icmp eq i32 %88, 2
  br i1 %89, label %90, label %96

90:                                               ; preds = %81
  %91 = load i64, ptr %10, align 8, !tbaa !9
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = sub i64 %91, %92
  %94 = load i64, ptr @GC_non_gc_bytes, align 8, !tbaa !9
  %95 = add i64 %94, %93
  store i64 %95, ptr @GC_non_gc_bytes, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %90, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %97

97:                                               ; preds = %96, %28
  %98 = load i64, ptr %5, align 8, !tbaa !9
  %99 = load i32, ptr @GC_all_interior_pointers, align 4, !tbaa !15
  %100 = sext i32 %99 to i64
  %101 = sub i64 -1, %100
  %102 = icmp ult i64 %98, %101
  %103 = zext i1 %102 to i32
  %104 = sext i32 %103 to i64
  %105 = call i64 @llvm.expect.i64(i64 %104, i64 1)
  %106 = icmp ne i64 %105, 0
  br i1 %106, label %107, label %112

107:                                              ; preds = %97
  %108 = load i64, ptr %5, align 8, !tbaa !9
  %109 = load i32, ptr @GC_all_interior_pointers, align 4, !tbaa !15
  %110 = sext i32 %109 to i64
  %111 = add i64 %108, %110
  br label %113

112:                                              ; preds = %97
  br label %113

113:                                              ; preds = %112, %107
  %114 = phi i64 [ %111, %107 ], [ -1, %112 ]
  %115 = load i64, ptr %10, align 8, !tbaa !9
  %116 = icmp ule i64 %114, %115
  br i1 %116, label %117, label %138

117:                                              ; preds = %113
  %118 = load i64, ptr %5, align 8, !tbaa !9
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = lshr i64 %119, 1
  %121 = icmp uge i64 %118, %120
  br i1 %121, label %122, label %136

122:                                              ; preds = %117
  %123 = load i64, ptr %11, align 8, !tbaa !9
  %124 = load i64, ptr %5, align 8, !tbaa !9
  %125 = icmp ugt i64 %123, %124
  br i1 %125, label %126, label %134

126:                                              ; preds = %122
  %127 = load i64, ptr %9, align 8, !tbaa !9
  %128 = inttoptr i64 %127 to ptr
  %129 = load i64, ptr %5, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %128, i64 %129
  %131 = load i64, ptr %11, align 8, !tbaa !9
  %132 = load i64, ptr %5, align 8, !tbaa !9
  %133 = sub i64 %131, %132
  call void @llvm.memset.p0.i64(ptr align 1 %130, i8 0, i64 %133, i1 false)
  br label %134

134:                                              ; preds = %126, %122
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %135, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %156

136:                                              ; preds = %117
  %137 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %137, ptr %10, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %136, %113
  %139 = load i64, ptr %5, align 8, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !15
  %141 = call noalias ptr @GC_generic_or_special_malloc(i64 noundef %139, i32 noundef %140) #8
  store ptr %141, ptr %8, align 8, !tbaa !5
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  %144 = zext i1 %143 to i32
  %145 = sext i32 %144 to i64
  %146 = call i64 @llvm.expect.i64(i64 %145, i64 1)
  %147 = icmp ne i64 %146, 0
  br i1 %147, label %148, label %154

148:                                              ; preds = %138
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = load i64, ptr %10, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %149, ptr align 1 %150, i64 %151, i1 false)
  %152 = load i64, ptr %9, align 8, !tbaa !9
  %153 = inttoptr i64 %152 to ptr
  call void @GC_free(ptr noundef %153)
  br label %154

154:                                              ; preds = %148, %138
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %155, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %156

156:                                              ; preds = %154, %134, %26, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %157 = load ptr, ptr %3, align 8
  ret ptr %157
}

; Function Attrs: nounwind allocsize(0) uwtable
declare dso_local noalias ptr @GC_generic_or_special_malloc(i64 noundef, i32 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #2 = { 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 #3 = { nounwind allocsize(0) 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind allocsize(1) 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { allocsize(0) }

!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, !10, i64 32}
!12 = !{!"hblkhdr", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 25, !13, i64 26, !10, i64 32, !10, i64 40, !6, i64 48, !10, i64 56, !7, i64 64}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !7, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !10, i64 16}
!18 = !{!"obj_kind", !6, i64 0, !6, i64 8, !10, i64 16, !16, i64 24, !16, i64 28}
!19 = !{!12, !7, i64 25}
!20 = !{!18, !16, i64 24}
!21 = !{!12, !10, i64 40}


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

@GC_all_interior_pointers = external dso_local local_unnamed_addr global i32, align 4
@GC_non_gc_bytes = external dso_local local_unnamed_addr global i64, align 8
@GC_obj_kinds = external hidden local_unnamed_addr global <{ %struct.obj_kind, %struct.obj_kind, %struct.obj_kind, [13 x %struct.obj_kind] }>, align 16

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

; Function Attrs: nounwind allocsize(0) uwtable
declare dso_local noalias ptr @GC_malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local void @GC_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind allocsize(1) uwtable
define dso_local ptr @GC_realloc(ptr noundef %0, i64 noundef %1) local_unnamed_addr #3 {
  %3 = ptrtoint ptr %0 to i64
  %4 = icmp eq ptr %0, null
  br i1 %4, label %5, label %7

5:                                                ; preds = %2
  %6 = tail call noalias ptr @GC_malloc(i64 noundef %1) #6
  br label %57

7:                                                ; preds = %2
  %8 = icmp eq i64 %1, 0
  br i1 %8, label %9, label %10

9:                                                ; preds = %7
  tail call void @GC_free(ptr noundef nonnull %0)
  br label %57

10:                                               ; preds = %7
  %11 = and i64 %3, -4096
  %12 = inttoptr i64 %11 to ptr
  %13 = tail call ptr @GC_find_header(ptr noundef %12)
  %14 = getelementptr inbounds i8, ptr %13, i64 32
  %15 = load i64, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %13, i64 24
  %17 = load i8, ptr %16, align 8, !tbaa !12
  %18 = zext i8 %17 to i32
  %19 = icmp ugt i64 %15, 2048
  %.pre = load i32, ptr @GC_all_interior_pointers, align 4
  br i1 %19, label %20, label %44

20:                                               ; preds = %10
  %21 = zext i8 %17 to i64
  %22 = getelementptr inbounds [16 x %struct.obj_kind], ptr @GC_obj_kinds, i64 0, i64 %21
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load i64, ptr %23, align 16, !tbaa !13
  %25 = add i64 %15, 4095
  %26 = and i64 %25, -4096
  %.not = icmp eq i32 %.pre, 0
  br i1 %.not, label %34, label %27

27:                                               ; preds = %20
  %28 = getelementptr inbounds i8, ptr %13, i64 25
  %29 = load i8, ptr %28, align 1, !tbaa !16
  %30 = and i8 %29, 1
  %31 = icmp ne i8 %30, 0
  %32 = icmp eq i8 %17, 1
  %or.cond = select i1 %31, i1 %32, i1 false
  %33 = add i64 %24, 8
  %spec.select = select i1 %or.cond, i64 %33, i64 %24
  br label %34

34:                                               ; preds = %27, %20
  %.0 = phi i64 [ %24, %20 ], [ %spec.select, %27 ]
  %35 = getelementptr inbounds i8, ptr %22, i64 24
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %.not57 = icmp eq i32 %36, 0
  %37 = select i1 %.not57, i64 0, i64 %26
  %spec.select61 = add i64 %37, %.0
  store i64 %26, ptr %14, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %13, i64 40
  store i64 %spec.select61, ptr %38, align 8, !tbaa !18
  %39 = icmp eq i8 %17, 2
  br i1 %39, label %40, label %44

40:                                               ; preds = %34
  %41 = sub i64 %26, %15
  %42 = load i64, ptr @GC_non_gc_bytes, align 8, !tbaa !19
  %43 = add i64 %41, %42
  store i64 %43, ptr @GC_non_gc_bytes, align 8, !tbaa !19
  br label %44

44:                                               ; preds = %34, %40, %10
  %.050 = phi i64 [ %15, %10 ], [ %26, %40 ], [ %26, %34 ]
  %45 = sext i32 %.pre to i64
  %46 = tail call i64 @llvm.uadd.sat.i64(i64 %45, i64 %1)
  %.not58 = icmp ugt i64 %46, %.050
  br i1 %.not58, label %54, label %47

47:                                               ; preds = %44
  %48 = lshr i64 %.050, 1
  %.not59 = icmp ugt i64 %48, %1
  br i1 %.not59, label %54, label %49

49:                                               ; preds = %47
  %50 = icmp ugt i64 %15, %1
  br i1 %50, label %51, label %57

51:                                               ; preds = %49
  %52 = getelementptr inbounds i8, ptr %0, i64 %1
  %53 = sub i64 %15, %1
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %52, i8 0, i64 %53, i1 false)
  br label %57

54:                                               ; preds = %47, %44
  %.151 = phi i64 [ %.050, %44 ], [ %1, %47 ]
  %55 = tail call noalias ptr @GC_generic_or_special_malloc(i64 noundef %1, i32 noundef %18) #6
  %.not60 = icmp eq ptr %55, null
  br i1 %.not60, label %57, label %56, !prof !20

56:                                               ; preds = %54
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %55, ptr nonnull align 1 %0, i64 %.151, i1 false)
  tail call void @GC_free(ptr noundef nonnull %0)
  br label %57

57:                                               ; preds = %54, %56, %49, %51, %9, %5
  %.049 = phi ptr [ %6, %5 ], [ null, %9 ], [ %0, %51 ], [ %0, %49 ], [ %55, %56 ], [ null, %54 ]
  ret ptr %.049
}

; Function Attrs: nounwind allocsize(0) uwtable
declare dso_local noalias ptr @GC_generic_or_special_malloc(i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.uadd.sat.i64(i64, i64) #5

attributes #0 = { 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 = { nounwind allocsize(0) 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(1) 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { allocsize(0) }

!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, !11, i64 32}
!6 = !{!"hblkhdr", !7, i64 0, !7, i64 8, !7, i64 16, !8, i64 24, !8, i64 25, !10, i64 26, !11, i64 32, !11, i64 40, !7, i64 48, !11, i64 56, !8, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !8, i64 24}
!13 = !{!14, !11, i64 16}
!14 = !{!"obj_kind", !7, i64 0, !7, i64 8, !11, i64 16, !15, i64 24, !15, i64 28}
!15 = !{!"int", !8, i64 0}
!16 = !{!6, !8, i64 25}
!17 = !{!14, !15, i64 24}
!18 = !{!6, !11, i64 40}
!19 = !{!11, !11, i64 0}
!20 = !{!"branch_weights", !"expected", i32 1, i32 2000}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass