	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1c_alloc_rx_buffer
_atl1c_alloc_rx_buffer:                 ## @atl1c_alloc_rx_buffer
	.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	24(%rdi), %r14
	leaq	1(%r14), %rax
	xorl	%ebx, %ebx
	cmpq	32(%rdi), %rax
	cmoveq	%rbx, %rax
	movq	40(%rdi), %rcx
	leaq	(%rax,%rax,2), %rdx
	movq	_ATL1C_BUFFER_FREE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rcx,%rdx,8)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r12
	leaq	24(%rdi), %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r14,2), %rdx
	leaq	(%rcx,%rdx,8), %r13
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	40(%r12), %rcx
	leaq	(%r15,%r15,2), %rdx
	leaq	(%rcx,%rdx,8), %r13
	incq	%rbx
	leaq	(%rax,%rax,2), %rdx
	movq	_ATL1C_BUFFER_FREE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	%r15, %r14
	testl	%esi, (%rcx,%rdx,8)
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_ATL1C_RFD_DESC
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_atl1c_alloc_skb
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %r14
	movq	_ATL1C_BUFFER_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ATL1C_SET_BUFFER_STATE
	movq	%r15, 16(%r13)
	movq	8(%r12), %rdx
	movq	%rdx, 8(%r13)
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pci_map_single
	movq	%r12, %r14
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, 4(%r13)
	movq	_ATL1C_PCIMAP_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ATL1C_PCIMAP_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_ATL1C_SET_PCIMAP_TYPE
	movl	4(%r13), %edi
	callq	_cpu_to_le64
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	leaq	1(%r15), %rax
	cmpq	32(%r14), %rax
	movq	%r14, %r12
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_2
LBB0_7:
	movq	%r12, %rdi
	callq	_netif_msg_rx_err
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
LBB0_12:
	movq	%r14, %r15
	testq	%rbx, %rbx
	jne	LBB0_11
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_9:
	movq	%r15, %rdi
	callq	_dev_kfree_skb
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r13)
	movq	_ATL1C_BUFFER_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ATL1C_SET_BUFFER_STATE
	movq	_rx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_warn
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%r14, %r12
LBB0_10:
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_11:
	xorl	%eax, %eax
	callq	_wmb
	movq	%r15, 24(%r12)
	movq	_REG_MB_RFD0_PROD_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MB_RFDX_PROD_IDX_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_AT_WRITE_REG
LBB0_14:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATL1C_BUFFER_FREE,4,2          ## @ATL1C_BUFFER_FREE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc rx buffer failed\n"

	.comm	_ATL1C_BUFFER_BUSY,4,2          ## @ATL1C_BUFFER_BUSY
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_rx_err,4,2                     ## @rx_err
L_.str.1:                               ## @.str.1
	.asciz	"RX pci_map_single failed"

	.comm	_ATL1C_PCIMAP_SINGLE,4,2        ## @ATL1C_PCIMAP_SINGLE
	.comm	_ATL1C_PCIMAP_FROMDEVICE,4,2    ## @ATL1C_PCIMAP_FROMDEVICE
	.comm	_REG_MB_RFD0_PROD_IDX,4,2       ## @REG_MB_RFD0_PROD_IDX
	.comm	_MB_RFDX_PROD_IDX_MASK,4,2      ## @MB_RFDX_PROD_IDX_MASK
	.no_dead_strip	_atl1c_alloc_rx_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1c_alloc_rx_buffer
_atl1c_alloc_rx_buffer:                 ; @atl1c_alloc_rx_buffer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
	ldp	x28, x10, [x22, #24]!
	add	x8, x28, #1
	ldr	x9, [x22, #16]
	cmp	x8, x10
	csinc	x8, xzr, x28, eq
	mov	w10, #24
	mul	x10, x8, x10
	ldr	w10, [x9, x10]
Lloh0:
	adrp	x11, _ATL1C_BUFFER_FREE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _ATL1C_BUFFER_FREE@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	ldur	x23, [x22, #-8]
	mov	w10, #24
	madd	x24, x28, x10, x9
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x8
	mov	x0, x22
	mov	x1, x28
	bl	_ATL1C_RFD_DESC
	mov	x25, x0
	mov	x0, x19
	bl	_atl1c_alloc_skb
	mov	x26, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x27, [x26]
Lloh3:
	adrp	x8, _ATL1C_BUFFER_BUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATL1C_BUFFER_BUSY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_ATL1C_SET_BUFFER_STATE
	ldr	x2, [x19, #8]
	stp	x2, x26, [x24, #8]
Lloh6:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x1, x27
	bl	_pci_map_single
	mov	x27, x0
	mov	x0, x23
	mov	x1, x27
	bl	_pci_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w27, [x24, #4]
Lloh9:
	adrp	x8, _ATL1C_PCIMAP_SINGLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATL1C_PCIMAP_SINGLE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _ATL1C_PCIMAP_FROMDEVICE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATL1C_PCIMAP_FROMDEVICE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x24
	bl	_ATL1C_SET_PCIMAP_TYPE
	ldr	w0, [x24, #4]
	bl	_cpu_to_le64
	str	w0, [x25]
	add	x8, x21, #1
	ldp	x9, x10, [x19, #32]
	cmp	x8, x9
	csinc	x8, xzr, x21, eq
	mov	w9, #24
	madd	x24, x21, x9, x10
	add	x20, x20, #1
	mul	x9, x8, x9
	ldr	w9, [x10, x9]
Lloh15:
	adrp	x10, _ATL1C_BUFFER_FREE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ATL1C_BUFFER_FREE@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	mov	x28, x21
	tst	w10, w9
	b.ne	LBB0_2
	b	LBB0_9
LBB0_5:
	mov	x20, #0
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_netif_msg_rx_err
	cbz	x0, LBB0_12
; %bb.7:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_warn
	mov	x21, x28
	cbnz	x20, LBB0_10
	b	LBB0_11
LBB0_8:
	mov	x0, x26
	bl	_dev_kfree_skb
	stp	xzr, xzr, [x24, #8]
Lloh20:
	adrp	x8, _ATL1C_BUFFER_FREE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATL1C_BUFFER_FREE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_ATL1C_SET_BUFFER_STATE
Lloh23:
	adrp	x8, _rx_err@GOTPAGE
Lloh24:
	ldr	x8, [x8, _rx_err@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
Lloh26:
	adrp	x3, l_.str.1@PAGE
Lloh27:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_warn
	mov	x21, x28
LBB0_9:
	cbz	x20, LBB0_11
LBB0_10:
	bl	_wmb
Lloh28:
	adrp	x8, _REG_MB_RFD0_PROD_IDX@GOTPAGE
Lloh29:
	ldr	x8, [x8, _REG_MB_RFD0_PROD_IDX@GOTPAGEOFF]
	str	x21, [x19, #24]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _MB_RFDX_PROD_IDX_MASK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MB_RFDX_PROD_IDX_MASK@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	and	w2, w8, w21
	mov	x0, x19
	bl	_AT_WRITE_REG
LBB0_11:
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x21, x28
	cbnz	x20, LBB0_10
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ATL1C_BUFFER_FREE,4,2          ; @ATL1C_BUFFER_FREE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc rx buffer failed\n"

	.comm	_ATL1C_BUFFER_BUSY,4,2          ; @ATL1C_BUFFER_BUSY
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_rx_err,4,2                     ; @rx_err
l_.str.1:                               ; @.str.1
	.asciz	"RX pci_map_single failed"

	.comm	_ATL1C_PCIMAP_SINGLE,4,2        ; @ATL1C_PCIMAP_SINGLE
	.comm	_ATL1C_PCIMAP_FROMDEVICE,4,2    ; @ATL1C_PCIMAP_FROMDEVICE
	.comm	_REG_MB_RFD0_PROD_IDX,4,2       ; @REG_MB_RFD0_PROD_IDX
	.comm	_MB_RFDX_PROD_IDX_MASK,4,2      ; @MB_RFDX_PROD_IDX_MASK
	.no_dead_strip	_atl1c_alloc_rx_buffer
.subsections_via_symbols
