	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_pci_reset_rx_desc
_rtw_pci_reset_rx_desc:                 ## @rtw_pci_reset_rx_desc
	.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
	movl	%r8d, %r12d
	movl	%ecx, %r13d
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_to_pci_dev
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	movq	_RTK_PCI_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%rbx), %esi
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_pci_map_single
	movl	%eax, %r13d
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_5:
	movq	(%rbx), %rax
	movl	%r13d, (%rax)
	movq	(%r15), %r14
	imull	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movslq	%r12d, %r15
	leaq	(%r14,%r15), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_RTK_PCI_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	movl	%eax, 4(%r14,%r15)
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r14,%r15)
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTK_PCI_RX_BUF_SIZE,4,2        ## @RTK_PCI_RX_BUF_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_rtw_pci_reset_rx_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_pci_reset_rx_desc
_rtw_pci_reset_rx_desc:                 ; @rtw_pci_reset_rx_desc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	ldr	w0, [x0]
	bl	_to_pci_dev
	cbz	x22, LBB0_3
; %bb.1:
	mov	x24, x0
Lloh0:
	adrp	x25, _RTK_PCI_RX_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RTK_PCI_RX_BUF_SIZE@GOTPAGEOFF]
	ldr	w2, [x25]
	ldr	w1, [x22, #8]
Lloh2:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	bl	_pci_map_single
	mov	x23, x0
	mov	x0, x24
	mov	x1, x23
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x22]
	str	w23, [x8]
	ldr	x8, [x21]
	mul	w9, w19, w20
	add	x19, x8, w9, sxtw
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w0, [x25]
	bl	_cpu_to_le16
	str	w0, [x19, #4]
	mov	x0, x23
	bl	_cpu_to_le32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RTK_PCI_RX_BUF_SIZE,4,2        ; @RTK_PCI_RX_BUF_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_rtw_pci_reset_rx_desc
.subsections_via_symbols
