	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r6040_alloc_rxbufs
_r6040_alloc_rxbufs:                    ## @r6040_alloc_rxbufs
	.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
	callq	_netdev_priv
	movq	%rax, %r15
	movq	8(%rax), %rdi
	movq	%rdi, 24(%rax)
	movq	%rdi, 32(%rax)
	movl	16(%rax), %esi
	movq	_RX_DCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_r6040_init_ring_desc
	movq	8(%r15), %rbx
	movq	_MAX_BUF_SIZE@GOTPCREL(%rip), %r12
	movq	_DSC_OWNER_MAC@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, 16(%rbx)
	movl	(%r15), %edi
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_pci_map_single
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 24(%rbx)
	movl	(%r13), %eax
	movl	%eax, 8(%rbx)
	movq	(%rbx), %rbx
	cmpq	8(%r15), %rbx
	jne	LBB0_1
## %bb.4:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_r6040_free_rxbufs
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_DCNT,4,2                    ## @RX_DCNT
	.comm	_MAX_BUF_SIZE,4,2               ## @MAX_BUF_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_DSC_OWNER_MAC,4,2              ## @DSC_OWNER_MAC
	.no_dead_strip	_r6040_alloc_rxbufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r6040_alloc_rxbufs
_r6040_alloc_rxbufs:                    ; @r6040_alloc_rxbufs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x0, [x0, #8]
	stp	x0, x0, [x20, #24]
	ldr	w1, [x20, #16]
Lloh0:
	adrp	x8, _RX_DCNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RX_DCNT@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_r6040_init_ring_desc
	ldr	x21, [x20, #8]
Lloh3:
	adrp	x22, _MAX_BUF_SIZE@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_BUF_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x23, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh7:
	adrp	x24, _DSC_OWNER_MAC@GOTPAGE
Lloh8:
	ldr	x24, [x24, _DSC_OWNER_MAC@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	str	x0, [x21, #16]
	ldr	w8, [x20]
	ldr	w1, [x0]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	x0, x8
	bl	_pci_map_single
	bl	_cpu_to_le32
	str	w0, [x21, #24]
	ldr	w8, [x24]
	str	w8, [x21, #8]
	ldr	x21, [x21]
	ldr	x8, [x20, #8]
	cmp	x21, x8
	b.ne	LBB0_1
; %bb.3:
	mov	w20, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_r6040_free_rxbufs
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_DCNT,4,2                    ; @RX_DCNT
	.comm	_MAX_BUF_SIZE,4,2               ; @MAX_BUF_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_DSC_OWNER_MAC,4,2              ; @DSC_OWNER_MAC
	.no_dead_strip	_r6040_alloc_rxbufs
.subsections_via_symbols
