	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_freelist_get
_mga_freelist_get:                      ## @mga_freelist_get
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	movq	(%r13), %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_MGA_PRIMADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MGA_READ
	movq	%rax, %r14
	movq	16(%r13), %rax
	movq	(%rax), %r15
	movq	16(%rbx), %rax
	addq	$8, %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	8(%r13), %rcx
	subq	(%rcx), %rax
	movq	%rax, %r12
LBB0_2:
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	8(%r13), %rax
	movq	%r14, %rsi
	subq	(%rax), %rsi
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_TEST_AGE
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r13), %rbx
	movq	32(%rbx), %rax
	movq	$0, 24(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	%rax, (%r13)
	leaq	8(%rbx), %rdi
	movq	_MGA_BUFFER_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_SET_AGE
	movq	(%rbx), %rbx
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_MGA_PRIMADDRESS,4,2            ## @MGA_PRIMADDRESS
L_.str.1:                               ## @.str.1
	.asciz	"   tail=0x%06lx %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"   head=0x%06lx %d\n"

	.comm	_MGA_BUFFER_USED,4,2            ## @MGA_BUFFER_USED
L_.str.3:                               ## @.str.3
	.asciz	"returning NULL!\n"

	.no_dead_strip	_mga_freelist_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_freelist_get
_mga_freelist_get:                      ; @mga_freelist_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x22, [x0]
	ldr	x23, [x22]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh2:
	adrp	x8, _MGA_PRIMADDRESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MGA_PRIMADDRESS@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_MGA_READ
	mov	x19, x0
	ldr	x8, [x22, #16]
	ldr	x20, [x8]
	add	x21, x23, #8
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x9, [x22, #8]
	ldr	x9, [x9]
	sub	x8, x8, x9
LBB0_2:
	ldr	w9, [x21]
	stp	x8, x9, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	sub	x8, x19, x8
	stp	x8, x20, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_TEST_AGE
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x19, [x22]
	ldr	x8, [x19, #32]
	str	xzr, [x8, #24]
	stp	xzr, xzr, [x19, #24]
	str	x8, [x22]
	add	x0, x19, #8
Lloh9:
	adrp	x8, _MGA_BUFFER_USED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MGA_BUFFER_USED@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_SET_AGE
	ldr	x0, [x19]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_MGA_PRIMADDRESS,4,2            ; @MGA_PRIMADDRESS
l_.str.1:                               ; @.str.1
	.asciz	"   tail=0x%06lx %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"   head=0x%06lx %d\n"

	.comm	_MGA_BUFFER_USED,4,2            ; @MGA_BUFFER_USED
l_.str.3:                               ; @.str.3
	.asciz	"returning NULL!\n"

	.no_dead_strip	_mga_freelist_get
.subsections_via_symbols
