	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_pci_init_rx_ring
_rtw_pci_init_rx_ring:                  ## @rtw_pci_init_rx_ring
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %rdi
	movl	%r14d, %r15d
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	imull	%r12d, %r15d
	movq	_RTK_PCI_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	-44(%rbp), %rdx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%r15d, %esi
	callq	_pci_zalloc_consistent
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	testl	%r14d, %r14d
	movl	%r14d, %r15d
	jle	LBB0_15
## %bb.3:
	movl	%r15d, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_dev_alloc_skb
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r14
	movl	8(%rax), %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	%r14, (%rax,%r12,8)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r12d, %ecx
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	callq	_rtw_pci_reset_rx_desc
	testl	%eax, %eax
	jne	LBB0_7
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	cmpq	%r12, -104(%rbp)                ## 8-byte Folded Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	jne	LBB0_4
LBB0_15:
	movl	-44(%rbp), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 40(%rcx)
	movl	%r15d, 16(%rcx)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 20(%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rcx)
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_rtw_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_16
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_dev_kfree_skb_any
LBB0_8:
	testl	%r12d, %r12d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rax
	movq	(%rax,%rbx,8), %r14
	testq	%r14, %r14
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	%esi, -44(%rbp)
	movl	(%r15), %ecx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_pci_unmap_single
	movq	%r14, %rdi
	callq	_dev_kfree_skb_any
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	movq	$0, (%rax,%rbx,8)
	jmp	LBB0_12
LBB0_13:
	movl	-44(%rbp), %ecx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_pci_free_consistent
	leaq	L_.str.1(%rip), %rsi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_rtw_err
LBB0_16:
	movl	%r13d, %eax
	addq	$72, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate rx ring\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
L_.str.1:                               ## @.str.1
	.asciz	"failed to init rx buffer\n"

	.no_dead_strip	_rtw_pci_init_rx_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_pci_init_rx_ring
_rtw_pci_init_rx_ring:                  ; @rtw_pci_init_rx_ring
	.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	x28, x3
	mov	x27, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_to_pci_dev
	mov	x21, x0
	mul	w22, w28, w27
Lloh0:
	adrp	x8, _RTK_PCI_RX_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTK_PCI_RX_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	add	x2, sp, #12
	mov	x1, x22
	bl	_pci_zalloc_consistent
	cbz	x0, LBB0_7
; %bb.1:
	str	w22, [sp, #8]                   ; 4-byte Folded Spill
	str	x0, [sp]                        ; 8-byte Folded Spill
	str	x0, [x20, #8]
	cmp	w28, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x25, #0
	mov	w24, w28
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	bl	_dev_alloc_skb
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldr	w0, [x0, #8]
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	ldr	x8, [x20]
	str	x22, [x8, x25, lsl #3]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	mov	x3, x25
	mov	x4, x27
	bl	_rtw_pci_reset_rx_desc
	cbnz	w0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	cmp	x24, x25
	b.ne	LBB0_3
LBB0_6:
	mov	w26, #0
	ldr	w8, [sp, #12]
	str	w8, [x20, #40]
	stp	w28, w27, [x20, #16]
	stp	xzr, xzr, [x20, #24]
	b	LBB0_15
LBB0_7:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_rtw_err
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_15
LBB0_8:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w26, w8
	cbnz	w25, LBB0_10
	b	LBB0_14
LBB0_9:
	mov	x26, x0
	mov	x0, x22
	bl	_dev_kfree_skb_any
	cbz	w25, LBB0_14
LBB0_10:
	mov	x24, #0
Lloh11:
	adrp	x27, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x24, x24, #1
	cmp	x25, x24
	b.eq	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x22, [x8, x24, lsl #3]
	cbz	x22, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x22]
	ldr	w1, [x8]
	str	w1, [sp, #12]
	ldr	w3, [x27]
	mov	x0, x21
	mov	x2, x23
	bl	_pci_unmap_single
	mov	x0, x22
	bl	_dev_kfree_skb_any
	ldr	x8, [x20]
	str	xzr, [x8, x24, lsl #3]
	b	LBB0_11
LBB0_14:
	ldp	w1, w3, [sp, #8]                ; 4-byte Folded Reload
	mov	x0, x21
	ldr	x2, [sp]                        ; 8-byte Folded Reload
	bl	_pci_free_consistent
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_rtw_err
LBB0_15:
	mov	x0, x26
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RTK_PCI_RX_BUF_SIZE,4,2        ; @RTK_PCI_RX_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate rx ring\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
l_.str.1:                               ; @.str.1
	.asciz	"failed to init rx buffer\n"

	.no_dead_strip	_rtw_pci_init_rx_ring
.subsections_via_symbols
