; LLVM IR from marcobambini/gravity :: src/shared (gravity_value)

; 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.gravity_value_t = type { ptr, %union.anon }
%union.anon = type { i64 }
%struct.gravity_function_t = type { ptr, %struct.gravity_gc_s, ptr, ptr, i16, i16, i16, i16, i32, %union.anon.4 }
%struct.gravity_gc_s = type { i8, i8, ptr, ptr, ptr, ptr }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { %struct.gravity_value_r, %struct.gravity_value_r, %struct.gravity_value_r, i32, ptr, ptr, float, i8 }
%struct.gravity_value_r = type { i64, i64, ptr }

@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.gravity_function_cpool_add = external hidden unnamed_addr constant [89 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @gravity_value_equals(ptr, i64, ptr, i64) #2

declare void @gravity_vm_transfer(ptr noundef, ptr noundef) #3

; 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 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
define dso_local zeroext i16 @gravity_function_cpool_add(ptr noundef %0, ptr noundef %1, ptr %2, i64 %3) #2 {
  %5 = alloca i16, align 2
  %6 = alloca %struct.gravity_value_t, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.gravity_value_t, align 8
  %13 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  store ptr %2, ptr %13, align 8
  %14 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  store i64 %3, ptr %14, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.gravity_function_t, ptr %15, i32 0, i32 8
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %4
  br label %21

20:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 526, ptr noundef @__PRETTY_FUNCTION__.gravity_function_cpool_add) #6
  unreachable

21:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.gravity_function_t, ptr %22, i32 0, i32 9
  %24 = getelementptr inbounds %struct.anon.5, ptr %23, i32 0, i32 0
  %25 = getelementptr inbounds %struct.gravity_value_r, ptr %24, i32 0, i32 0
  %26 = load i64, ptr %25, align 8, !tbaa !15
  store i64 %26, ptr %9, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !16
  br label %27

27:                                               ; preds = %60, %21
  %28 = load i64, ptr %10, align 8, !tbaa !16
  %29 = load i64, ptr %9, align 8, !tbaa !16
  %30 = icmp ult i64 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %11, align 4
  br label %63

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.gravity_function_t, ptr %33, i32 0, i32 9
  %35 = getelementptr inbounds %struct.anon.5, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %struct.gravity_value_r, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = load i64, ptr %10, align 8, !tbaa !16
  %39 = getelementptr inbounds %struct.gravity_value_t, ptr %37, i64 %38
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %39, i64 16, i1 false), !tbaa.struct !18
  %40 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8
  %42 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  %46 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %47 = load i64, ptr %46, align 8
  %48 = call zeroext i1 @gravity_value_equals(ptr %41, i64 %43, ptr %45, i64 %47)
  br i1 %48, label %49, label %56

49:                                               ; preds = %32
  %50 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %53 = load i64, ptr %52, align 8
  call void @gravity_value_free(ptr noundef null, ptr %51, i64 %53)
  %54 = load i64, ptr %10, align 8, !tbaa !16
  %55 = trunc i64 %54 to i16
  store i16 %55, ptr %5, align 2
  store i32 1, ptr %11, align 4
  br label %57

56:                                               ; preds = %32
  store i32 0, ptr %11, align 4
  br label %57

57:                                               ; preds = %56, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  %58 = load i32, ptr %11, align 4
  switch i32 %58, label %63 [
    i32 0, label %59
  ]

59:                                               ; preds = %57
  br label %60

60:                                               ; preds = %59
  %61 = load i64, ptr %10, align 8, !tbaa !16
  %62 = add i64 %61, 1
  store i64 %62, ptr %10, align 8, !tbaa !16
  br label %27, !llvm.loop !19

63:                                               ; preds = %57, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %64 = load i32, ptr %11, align 4
  switch i32 %64, label %149 [
    i32 2, label %65
  ]

65:                                               ; preds = %63
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %78

68:                                               ; preds = %65
  %69 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %72 = load i64, ptr %71, align 8
  %73 = call zeroext i1 @gravity_value_isobject(ptr %70, i64 %72)
  br i1 %73, label %74, label %78

74:                                               ; preds = %68
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.gravity_value_t, ptr %6, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  call void @gravity_vm_transfer(ptr noundef %75, ptr noundef %77)
  br label %78

78:                                               ; preds = %74, %68, %65
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.gravity_function_t, ptr %79, i32 0, i32 9
  %81 = getelementptr inbounds %struct.anon.5, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds %struct.gravity_value_r, ptr %81, i32 0, i32 0
  %83 = load i64, ptr %82, align 8, !tbaa !15
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.gravity_function_t, ptr %84, i32 0, i32 9
  %86 = getelementptr inbounds %struct.anon.5, ptr %85, i32 0, i32 0
  %87 = getelementptr inbounds %struct.gravity_value_r, ptr %86, i32 0, i32 1
  %88 = load i64, ptr %87, align 8, !tbaa !15
  %89 = icmp eq i64 %83, %88
  br i1 %89, label %90, label %127

90:                                               ; preds = %78
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.gravity_function_t, ptr %91, i32 0, i32 9
  %93 = getelementptr inbounds %struct.anon.5, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.gravity_value_r, ptr %93, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !15
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %104

97:                                               ; preds = %90
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.gravity_function_t, ptr %98, i32 0, i32 9
  %100 = getelementptr inbounds %struct.anon.5, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds %struct.gravity_value_r, ptr %100, i32 0, i32 1
  %102 = load i64, ptr %101, align 8, !tbaa !15
  %103 = shl i64 %102, 1
  br label %105

104:                                              ; preds = %90
  br label %105

105:                                              ; preds = %104, %97
  %106 = phi i64 [ %103, %97 ], [ 8, %104 ]
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.gravity_function_t, ptr %107, i32 0, i32 9
  %109 = getelementptr inbounds %struct.anon.5, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %struct.gravity_value_r, ptr %109, i32 0, i32 1
  store i64 %106, ptr %110, align 8, !tbaa !15
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.gravity_function_t, ptr %111, i32 0, i32 9
  %113 = getelementptr inbounds %struct.anon.5, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds %struct.gravity_value_r, ptr %113, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !15
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.gravity_function_t, ptr %116, i32 0, i32 9
  %118 = getelementptr inbounds %struct.anon.5, ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds %struct.gravity_value_r, ptr %118, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !15
  %121 = mul i64 16, %120
  %122 = call ptr @realloc(ptr noundef %115, i64 noundef %121) #8
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.gravity_function_t, ptr %123, i32 0, i32 9
  %125 = getelementptr inbounds %struct.anon.5, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.gravity_value_r, ptr %125, i32 0, i32 2
  store ptr %122, ptr %126, align 8, !tbaa !15
  br label %127

127:                                              ; preds = %105, %78
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.gravity_function_t, ptr %128, i32 0, i32 9
  %130 = getelementptr inbounds %struct.anon.5, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds %struct.gravity_value_r, ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %131, align 8, !tbaa !15
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.gravity_function_t, ptr %133, i32 0, i32 9
  %135 = getelementptr inbounds %struct.anon.5, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds %struct.gravity_value_r, ptr %135, i32 0, i32 0
  %137 = load i64, ptr %136, align 8, !tbaa !15
  %138 = add i64 %137, 1
  store i64 %138, ptr %136, align 8, !tbaa !15
  %139 = getelementptr inbounds %struct.gravity_value_t, ptr %132, i64 %137
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %139, ptr align 8 %6, i64 16, i1 false), !tbaa.struct !18
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.gravity_function_t, ptr %140, i32 0, i32 9
  %142 = getelementptr inbounds %struct.anon.5, ptr %141, i32 0, i32 0
  %143 = getelementptr inbounds %struct.gravity_value_r, ptr %142, i32 0, i32 0
  %144 = load i64, ptr %143, align 8, !tbaa !15
  %145 = trunc i64 %144 to i16
  %146 = zext i16 %145 to i32
  %147 = sub nsw i32 %146, 1
  %148 = trunc i32 %147 to i16
  store i16 %148, ptr %5, align 2
  store i32 1, ptr %11, align 4
  br label %149

149:                                              ; preds = %127, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %150 = load i16, ptr %5, align 2
  ret i16 %150
}

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @gravity_value_isobject(ptr, i64) #2

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #5

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

!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, !14, i64 72}
!10 = !{!"", !6, i64 0, !11, i64 8, !6, i64 48, !6, i64 56, !13, i64 64, !13, i64 66, !13, i64 68, !13, i64 70, !14, i64 72, !7, i64 80}
!11 = !{!"gravity_gc_s", !12, i64 0, !12, i64 1, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{i64 0, i64 8, !5, i64 8, i64 8, !15}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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.gravity_value_t = type { ptr, %union.anon }
%union.anon = type { i64 }

@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__.gravity_function_cpool_add = external hidden unnamed_addr constant [89 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

declare void @gravity_vm_transfer(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i16 @gravity_function_cpool_add(ptr noundef %0, ptr nocapture noundef %1, ptr %2, i64 %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %1, i64 72
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %9, label %8

8:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 526, ptr noundef nonnull @__PRETTY_FUNCTION__.gravity_function_cpool_add) #4
  unreachable

9:                                                ; preds = %4
  %10 = getelementptr inbounds i8, ptr %1, i64 80
  %11 = load i64, ptr %10, align 8, !tbaa !14
  %.not40.not = icmp eq i64 %11, 0
  br i1 %.not40.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %9
  %12 = getelementptr inbounds i8, ptr %1, i64 96
  br label %13

13:                                               ; preds = %.lr.ph, %18
  %.02941 = phi i64 [ 0, %.lr.ph ], [ %19, %18 ]
  %14 = load ptr, ptr %12, align 8, !tbaa !14
  %15 = getelementptr inbounds %struct.gravity_value_t, ptr %14, i64 %.02941
  %.sroa.0.0.copyload = load ptr, ptr %15, align 8, !tbaa !15
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.4.0.copyload = load i64, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !14
  %16 = tail call zeroext i1 @gravity_value_equals(ptr %2, i64 %3, ptr %.sroa.0.0.copyload, i64 %.sroa.4.0.copyload)
  br i1 %16, label %.thread37, label %18

.thread37:                                        ; preds = %13
  tail call void @gravity_value_free(ptr noundef null, ptr %2, i64 %3)
  %17 = trunc i64 %.02941 to i16
  br label %43

18:                                               ; preds = %13
  %19 = add nuw i64 %.02941, 1
  %exitcond.not = icmp eq i64 %19, %11
  br i1 %exitcond.not, label %._crit_edge, label %13, !llvm.loop !16

._crit_edge:                                      ; preds = %18, %9
  %.not34 = icmp eq ptr %0, null
  br i1 %.not34, label %24, label %20

20:                                               ; preds = %._crit_edge
  %21 = tail call zeroext i1 @gravity_value_isobject(ptr %2, i64 %3)
  br i1 %21, label %22, label %24

22:                                               ; preds = %20
  %23 = inttoptr i64 %3 to ptr
  tail call void @gravity_vm_transfer(ptr noundef nonnull %0, ptr noundef %23) #5
  br label %24

24:                                               ; preds = %22, %20, %._crit_edge
  %25 = load i64, ptr %10, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %1, i64 88
  %27 = load i64, ptr %26, align 8, !tbaa !14
  %28 = icmp eq i64 %25, %27
  br i1 %28, label %29, label %._crit_edge43

._crit_edge43:                                    ; preds = %24
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 96
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !14
  br label %35

29:                                               ; preds = %24
  %.not35 = icmp eq i64 %25, 0
  %30 = shl i64 %25, 1
  %spec.select = select i1 %.not35, i64 8, i64 %30
  store i64 %spec.select, ptr %26, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %1, i64 96
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = shl i64 %spec.select, 4
  %34 = tail call ptr @realloc(ptr noundef %32, i64 noundef %33) #6
  store ptr %34, ptr %31, align 8, !tbaa !14
  %.pre44 = load i64, ptr %10, align 8, !tbaa !14
  br label %35

35:                                               ; preds = %._crit_edge43, %29
  %36 = phi i64 [ %25, %._crit_edge43 ], [ %.pre44, %29 ]
  %37 = phi ptr [ %.pre, %._crit_edge43 ], [ %34, %29 ]
  %38 = add i64 %36, 1
  store i64 %38, ptr %10, align 8, !tbaa !14
  %39 = getelementptr inbounds %struct.gravity_value_t, ptr %37, i64 %36
  store ptr %2, ptr %39, align 8, !tbaa !15
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %39, i64 8
  store i64 %3, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !14
  %40 = load i64, ptr %10, align 8, !tbaa !14
  %41 = trunc i64 %40 to i16
  %42 = add i16 %41, -1
  br label %43

43:                                               ; preds = %.thread37, %35
  %.3 = phi i16 [ %42, %35 ], [ %17, %.thread37 ]
  ret i16 %.3
}

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #3

attributes #0 = { noreturn 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 = { 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 = { "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 willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { noreturn nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(1) }

!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, !13, i64 72}
!6 = !{!"", !7, i64 0, !10, i64 8, !7, i64 48, !7, i64 56, !12, i64 64, !12, i64 66, !12, i64 68, !12, i64 70, !13, i64 72, !8, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"gravity_gc_s", !11, i64 0, !11, i64 1, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!8, !8, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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