	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_freelist_put               ## -- Begin function mga_freelist_put
	.p2align	4, 0x90
_mga_freelist_put:                      ## @mga_freelist_put
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movq	(%rsi), %rbx
	movq	(%rbx), %rax
	movslq	16(%rax), %rsi
	movq	16(%r14), %rcx
	movslq	(%rcx), %rcx
	subq	%rcx, %rsi
	movl	20(%rax), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%rbx), %rbx
	movl	16(%rbx), %eax
	movq	_MGA_BUFFER_USED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	leaq	16(%rbx), %rdi
	movq	_MGA_BUFFER_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_SET_AGE
	movq	(%r14), %rax
	movq	%rax, %rcx
	jmp	LBB0_3
LBB0_2:
	movq	8(%r14), %rcx
	movq	(%rcx), %r15
	movq	%rbx, (%rcx)
	leaq	8(%r15), %rax
LBB0_3:
	movq	%rbx, (%rax)
	movq	%rcx, 8(%rbx)
	movq	%r15, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"age=0x%06lx wrap=%d\n"

	.comm	_MGA_BUFFER_USED,4,2            ## @MGA_BUFFER_USED
	.comm	_MGA_BUFFER_FREE,4,2            ## @MGA_BUFFER_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mga_freelist_put               ; -- Begin function mga_freelist_put
	.p2align	2
_mga_freelist_put:                      ; @mga_freelist_put
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x20, [x0]
	ldr	x19, [x1]
	ldr	x8, [x19]
	ldr	x9, [x20, #16]
	ldrsw	x9, [x9]
	ldp	w10, w2, [x8, #16]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	sub	x1, x10, x9
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x19, [x19]
	mov	x0, x19
	ldr	w8, [x0, #16]!
Lloh2:
	adrp	x9, _MGA_BUFFER_USED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MGA_BUFFER_USED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _MGA_BUFFER_FREE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MGA_BUFFER_FREE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_SET_AGE
	mov	x8, #0
	ldr	x10, [x20]
	mov	x9, x10
	b	LBB0_3
LBB0_2:
	ldr	x9, [x20, #8]
	ldr	x8, [x9]
	str	x19, [x9]
	add	x10, x8, #8
LBB0_3:
	str	x19, [x10]
	stp	x8, x9, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"age=0x%06lx wrap=%d\n"

	.comm	_MGA_BUFFER_USED,4,2            ; @MGA_BUFFER_USED
	.comm	_MGA_BUFFER_FREE,4,2            ; @MGA_BUFFER_FREE
.subsections_via_symbols
