	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function macb_alloc_consistent
_macb_alloc_consistent:                 ## @macb_alloc_consistent
	.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, %r14
	cmpl	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	movq	40(%r14), %r15
	addq	$32, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_TX_RING_BYTES
	movslq	4(%r14), %rcx
	movslq	%eax, %r12
	addq	%rcx, %r12
	movq	32(%r14), %rdi
	movl	(%rbx), %ecx
	movl	%r12d, %esi
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, -8(%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%r14), %edi
	movq	(%r15), %r8
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_netdev_dbg
	movl	8(%r14), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movl	%eax, -16(%r15)
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_RX_RING_BYTES
	movl	%eax, %ebx
	addl	12(%r14), %ebx
	movq	32(%r14), %rdi
	leaq	-24(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %esi
	callq	_dma_alloc_coherent
	movq	%rax, -32(%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%r14), %edi
	movq	-24(%r15), %rcx
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_netdev_dbg
	incl	%r13d
	addq	$40, %r15
	cmpl	(%r14), %r13d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	jb	LBB0_2
LBB0_6:
	movq	%r14, %rdi
	callq	*16(%r14)
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	callq	_macb_free_consistent
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Allocated TX ring for queue %u of %d bytes at %08lx (mapped %p)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Allocated RX ring of %d bytes at %08lx (mapped %p)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_macb_alloc_consistent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function macb_alloc_consistent
_macb_alloc_consistent:                 ; @macb_alloc_consistent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_6
; %bb.1:
	mov	w20, #0
	ldr	x8, [x19, #40]
	add	x21, x8, #32
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
Lloh4:
	adrp	x23, l_.str.1@PAGE
Lloh5:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_TX_RING_BYTES
	ldrsw	x8, [x19, #4]
	add	x24, x8, w0, sxtw
	ldr	x0, [x19, #32]
	ldr	w3, [x25]
	mov	x1, x24
	mov	x2, x21
	bl	_dma_alloc_coherent
	stur	x0, [x21, #-8]
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #24]
	ldr	x4, [x21]
	str	x0, [sp]
	mov	x0, x8
	mov	x1, x22
	mov	x2, x20
	mov	x3, x24
	bl	_netdev_dbg
	ldr	w8, [x19, #8]
	lsl	w0, w8, #2
	ldr	w1, [x25]
	bl	_kmalloc
	stur	w0, [x21, #-16]
	cbz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_RX_RING_BYTES
	ldr	w8, [x19, #12]
	add	w24, w8, w0
	ldr	x0, [x19, #32]
	sub	x2, x21, #24
	ldr	w3, [x25]
	mov	x1, x24
	bl	_dma_alloc_coherent
	stur	x0, [x21, #-32]
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x4, x0
	ldr	w0, [x19, #24]
	ldur	x3, [x21, #-24]
	mov	x1, x23
	mov	x2, x24
	bl	_netdev_dbg
	add	w20, w20, #1
	ldr	w8, [x19]
	add	x21, x21, #40
	cmp	w20, w8
	b.lo	LBB0_2
LBB0_6:
	ldr	x8, [x19, #16]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_macb_free_consistent
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Allocated TX ring for queue %u of %d bytes at %08lx (mapped %p)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Allocated RX ring of %d bytes at %08lx (mapped %p)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_macb_alloc_consistent
.subsections_via_symbols
