	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mga_freelist_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mga_freelist_init:                     ## @mga_freelist_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	addq	$24, %rax
	movq	_MGA_BUFFER_USED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_SET_AGE
	cmpl	$0, (%r15)
	jle	LBB0_11
## %bb.3:
	xorl	%r13d, %r13d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, 16(%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	%rbx, (%rax)
	incq	%r13
	movslq	(%r15), %rax
	cmpq	%rax, %r13
	jge	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r13,8), %r15
	movq	(%r15), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	addq	$24, %rdi
	movq	_MGA_BUFFER_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_SET_AGE
	movq	%r15, 16(%rbx)
	movq	(%r14), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, 8(%rcx)
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rbx)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, 8(%rcx)
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %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	"count=%d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MGA_BUFFER_USED,4,2            ## @MGA_BUFFER_USED
	.comm	_MGA_BUFFER_FREE,4,2            ## @MGA_BUFFER_FREE
	.no_dead_strip	_mga_freelist_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_freelist_init
_mga_freelist_init:                     ; @mga_freelist_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	ldr	x21, [x0]
	ldr	w1, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh2:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #32
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_9
; %bb.1:
	add	x0, x0, #24
Lloh4:
	adrp	x8, _MGA_BUFFER_USED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MGA_BUFFER_USED@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_SET_AGE
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x23, #0
Lloh7:
	adrp	x24, _MGA_BUFFER_FREE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _MGA_BUFFER_FREE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	stp	xzr, x20, [x25, #8]
	str	xzr, [x25]
	str	x20, [x8]
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.ge	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x26, [x8, x23, lsl #3]
	ldr	x25, [x26]
	ldr	w1, [x22]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x8]
	stp	x9, x8, [x0], #24
	ldr	w1, [x24]
	mov	w2, #0
	bl	_SET_AGE
	str	x26, [x20, #16]
	ldr	x8, [x19]
	ldr	x9, [x8]
	cbz	x9, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x20, [x9, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20]
	cbnz	x9, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x20, [x19, #8]
	b	LBB0_3
LBB0_9:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"count=%d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MGA_BUFFER_USED,4,2            ; @MGA_BUFFER_USED
	.comm	_MGA_BUFFER_FREE,4,2            ; @MGA_BUFFER_FREE
	.no_dead_strip	_mga_freelist_init
.subsections_via_symbols
