	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_alloc_rx_buffers
_atl1_alloc_rx_buffers:                 ## @atl1_alloc_rx_buffers
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	leaq	32(%rdi), %r15
	movq	%r15, %rdi
	callq	_atomic_read
	movq	40(%rbx), %rcx
	movq	%rax, %r14
	shlq	$5, %r14
	cmpl	$0, (%rcx,%r14)
	je	LBB0_2
LBB0_15:
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_2:
	movq	%rax, %rdx
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	addq	%rcx, %r14
	movq	%rax, %r15
	incq	%r15
	xorl	%r12d, %r12d
	cmpq	24(%rbx), %r15
	cmoveq	%r12, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	24(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rax
	shlq	$5, %rax
	addq	%rcx, %rax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	40(%rbx), %rcx
	movq	%r13, %rdx
	shlq	$5, %rdx
	leaq	(%rcx,%rdx), %r14
	movq	%r15, %rax
	shlq	$5, %rax
	addq	%rcx, %rax
	incq	%r12
	cmpl	$0, (%rcx,%rdx)
	movq	%r13, %rdx
	jne	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rax)
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %r13
	cmpq	$0, 24(%r14)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, (%r14)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, %rbx
	movq	%rdx, %rsi
	callq	_ATL1_RFD_DESC
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	12(%r15), %edi
	movq	(%r15), %rsi
	callq	_netdev_alloc_skb_ip_align
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, (%r14)
	movq	%r12, 24(%r14)
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	movl	(%r12), %edi
	callq	_virt_to_page
	movq	%rax, %rbx
	movl	(%r12), %edi
	callq	_offset_in_page
	movq	(%r15), %rcx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_pci_map_page
	movl	%eax, 16(%r14)
	movl	%eax, %edi
	callq	_cpu_to_le64
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 12(%rbx)
	movq	(%r15), %rdi
	callq	_cpu_to_le16
	movl	%eax, 8(%rbx)
	movq	$0, (%rbx)
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, %rbx
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%r13), %r15
	xorl	%edi, %edi
	cmpq	24(%rbx), %r15
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r15d, %r15d
	jmp	LBB0_3
LBB0_11:
	movq	%rdx, %r13
LBB0_12:
	testq	%r12, %r12
	je	LBB0_15
LBB0_13:
	xorl	%eax, %eax
	callq	_wmb
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_atomic_set
LBB0_16:
	movq	%r12, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	incl	8(%r15)
	movq	%rbx, %r13
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	jne	LBB0_13
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.no_dead_strip	_atl1_alloc_rx_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1_alloc_rx_buffers
_atl1_alloc_rx_buffers:                 ; @atl1_alloc_rx_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x0
	ldr	x22, [x0, #16]
	add	x19, x0, #32
	mov	x0, x19
	bl	_atomic_read
	ldr	x9, [x21, #40]
	add	x20, x9, x0, lsl #5
	ldr	w8, [x20]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x19, #0
	b	LBB0_12
LBB0_2:
	mov	x25, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x19, #0
	add	x23, x21, #24
	add	x8, x0, #1
	ldr	x10, [x21, #24]
	cmp	x8, x10
	csinc	x8, xzr, x0, eq
	add	x9, x9, x8, lsl #5
	mov	w28, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w28, [x20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x24, #1
	ldr	x9, [x21, #24]
	cmp	x8, x9
	cset	w0, eq
	bl	_unlikely
	cmp	x0, #0
	csinc	x8, xzr, x24, ne
	ldr	x9, [x21, #40]
	add	x20, x9, x24, lsl #5
	add	x9, x9, x8, lsl #5
	add	x19, x19, #1
	ldr	w10, [x20]
	mov	x25, x24
	cbnz	w10, LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x24, x8
	ldr	w8, [x9]
	cbnz	w8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	mov	x1, x25
	bl	_ATL1_RFD_DESC
	mov	x26, x0
	ldr	w0, [x21, #12]
	ldr	x1, [x21]
	bl	_netdev_alloc_skb_ip_align
	mov	x27, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w28, [x20]
	str	x27, [x20, #24]
	ldr	x8, [x21]
	str	x8, [x20, #8]
	ldr	w0, [x27]
	bl	_virt_to_page
	mov	x25, x0
	ldr	w0, [x27]
	bl	_offset_in_page
	mov	x2, x0
	ldr	x3, [x21]
Lloh0:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, x25
	bl	_pci_map_page
	str	w0, [x20, #16]
	bl	_cpu_to_le64
	str	w0, [x26, #12]
	ldr	x0, [x21]
	bl	_cpu_to_le16
	str	w0, [x26, #8]
	str	xzr, [x26]
	b	LBB0_4
LBB0_9:
	mov	x24, x25
LBB0_10:
	cbz	x19, LBB0_12
LBB0_11:
	bl	_wmb
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x24
	bl	_atomic_set
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
	mov	x24, x25
	cbnz	x19, LBB0_11
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.no_dead_strip	_atl1_alloc_rx_buffers
.subsections_via_symbols
