	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emac_mac_rx_tx_rings_alloc_all ## -- Begin function emac_mac_rx_tx_rings_alloc_all
	.p2align	4, 0x90
_emac_mac_rx_tx_rings_alloc_all:        ## @emac_mac_rx_tx_rings_alloc_all
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	(%rax), %r14
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	movl	%eax, 32(%rdi)
	movl	%ecx, 40(%rdi)
	movl	%ecx, 36(%rdi)
	imull	8(%rdi), %eax
	movl	16(%rdi), %edx
	addl	12(%rdi), %edx
	imull	%ecx, %edx
	addl	%eax, %edx
	leal	24(,%rdx,4), %esi
	movl	%esi, 48(%rdi)
	movq	$0, 56(%rdi)
	leaq	64(%rdi), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, 72(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	32(%rbx), %r15
	movq	64(%rbx), %rdi
	movl	$8, %esi
	callq	_ALIGN
	subq	64(%rbx), %rax
	movq	%rax, 56(%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_emac_tx_q_desc_alloc
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movq	24(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	callq	_emac_rx_descs_alloc
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r15d
	movq	24(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	movq	%rbx, %rdi
	callq	_emac_tx_q_bufs_free
LBB0_7:
	leaq	56(%rbx), %r12
	movl	48(%rbx), %esi
	movq	72(%rbx), %rdx
	movq	64(%rbx), %rcx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	movl	$0, 48(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 16(%r12)
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: Tx Queue alloc failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"error: Rx Queue alloc failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emac_mac_rx_tx_rings_alloc_all ; -- Begin function emac_mac_rx_tx_rings_alloc_all
	.p2align	2
_emac_mac_rx_tx_rings_alloc_all:        ; @emac_mac_rx_tx_rings_alloc_all
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x0]
	mov	x21, x0
	str	w8, [x21, #32]!
	ldur	x9, [x21, #-8]
	ldr	x20, [x9]
	ldp	w9, w10, [x21, #-28]
	stp	w9, w9, [x21, #4]
	mul	w8, w10, w8
	ldp	w10, w11, [x21, #-20]
	add	w10, w11, w10
	madd	w8, w10, w9, w8
	lsl	w8, w8, #2
	add	w1, w8, #24
	str	w1, [x21, #16]
	mov	x22, x21
	str	xzr, [x22, #24]!
	add	x2, x21, #32
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dma_alloc_coherent
	str	x0, [x21, #40]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x0, [x19, #64]
	mov	w1, #8
	bl	_ALIGN
	ldr	x8, [x19, #64]
	sub	x8, x0, x8
	str	x8, [x19, #56]
	mov	x0, x19
	mov	x1, x21
	bl	_emac_tx_q_desc_alloc
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x0, [x19, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_emac_rx_descs_alloc
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	x0, [x19, #24]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	mov	x0, x19
	bl	_emac_tx_q_bufs_free
LBB0_6:
	ldr	w1, [x19, #48]
	ldp	x3, x2, [x19, #64]
	mov	x0, x20
	bl	_dma_free_coherent
	str	wzr, [x19, #48]
	stp	xzr, xzr, [x22, #8]
	str	xzr, [x22]
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: Tx Queue alloc failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"error: Rx Queue alloc failed\n"

.subsections_via_symbols
