	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl_pci_init_rx_ring
__rtl_pci_init_rx_ring:                 ## @_rtl_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_rtl_pcipriv
	movl	%eax, %edi
	callq	_rtl_pcidev
	movq	%rax, %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_rtl_priv
	cmpq	$0, 8(%rax)
	je	LBB0_10
## %bb.1:
	movl	16(%r14), %edi
	movl	(%r14), %esi
	shll	$2, %esi
	movq	8(%r14), %rax
	movslq	%r15d, %r12
	shlq	$5, %r12
	leaq	(%rax,%r12), %rdx
	addq	$16, %rdx
	callq	_pci_zalloc_consistent
	movq	8(%r14), %rcx
	movq	%rax, 24(%rcx,%r12)
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movzbl	%al, %edx
	testq	%rdx, %rdx
	jne	LBB0_3
## %bb.4:
	movq	$0, 8(%rcx,%r12)
	cmpl	$0, (%r14)
	jle	LBB0_15
## %bb.5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	%rax, %rdx
	movl	%r15d, %r13d
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	__rtl_pci_init_one_rxdesc
	testl	%eax, %eax
	je	LBB0_9
## %bb.6:
	movl	$4, %r15d
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r14), %rax
	movq	24(%rax,%r12), %rdx
	addq	%r15, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	%r13d, %ecx
	movl	%ebx, %r8d
	callq	__rtl_pci_init_one_rxdesc
	addq	$4, %r15
	incq	%rbx
	testl	%eax, %eax
	jne	LBB0_7
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, %eax
	jmp	LBB0_21
LBB0_10:
	movq	%rax, %r12
	movl	$1, -56(%rbp)
	movl	16(%r14), %edi
	movl	(%r14), %esi
	shll	$2, %esi
	movq	8(%r14), %rax
	movslq	%r15d, %rbx
	shlq	$5, %rbx
	leaq	(%rax,%rbx), %rdx
	addq	$16, %rdx
	callq	_pci_zalloc_consistent
	movq	%rax, %r13
	movq	8(%r14), %rax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, (%rax,%rbx)
	testq	%r13, %r13
	je	LBB0_3
## %bb.11:
	movzbl	%r13b, %ecx
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.12:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	$0, 8(%rax,%rcx)
	cmpl	$0, (%r14)
	jle	LBB0_13
## %bb.16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	%r13, %rdx
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	__rtl_pci_init_one_rxdesc
	testl	%eax, %eax
	je	LBB0_20
## %bb.17:
	movl	$4, %r15d
	movl	$1, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r14), %rax
	cmpq	%rax, %r12
	jge	LBB0_14
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	incq	%rbx
	movq	8(%r14), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx), %rdx
	leaq	(%rdx,%rbx,4), %r13
	addq	%r15, %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	callq	__rtl_pci_init_one_rxdesc
	addq	$4, %r15
	incq	%r12
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_20
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_13:
	xorl	%r13d, %r13d
LBB0_14:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_HW_DESC_RXERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	-56(%rbp), %r8
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	*(%rax)
LBB0_15:
	xorl	%eax, %eax
LBB0_21:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot allocate RX ring\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HW_DESC_RXERO,4,2              ## @HW_DESC_RXERO
	.no_dead_strip	__rtl_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 _rtl_pci_init_rx_ring
__rtl_pci_init_rx_ring:                 ; @_rtl_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	x20, x1
	mov	x19, x0
	bl	_rtl_pcipriv
	bl	_rtl_pcidev
	mov	x21, x0
	mov	x0, x19
	bl	_rtl_priv
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w0, [x21, #16]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	ldr	x8, [x21, #8]
	sbfiz	x22, x20, #5, #32
	add	x8, x8, x22
	add	x2, x8, #16
	bl	_pci_zalloc_consistent
	ldr	x8, [x21, #8]
	add	x9, x8, x22
	str	x0, [x9, #24]
	and	x9, x0, #0xff
	cmp	x0, #0
	ccmp	x9, #0, #0, ne
	b.ne	LBB0_8
; %bb.2:
	sxtw	x23, w20
	add	x8, x8, x23, lsl #5
	str	xzr, [x8, #8]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.3:
	mov	x2, x0
	mov	x0, x19
	mov	x1, #0
	mov	x3, x20
	mov	w4, #0
	bl	__rtl_pci_init_one_rxdesc
	cbz	w0, LBB0_9
; %bb.4:
	mov	w24, #4
	mov	w22, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	add	x8, x8, x23, lsl #5
	ldr	x8, [x8, #24]
	add	x2, x8, x24
	mov	x0, x19
	mov	x1, #0
	mov	x3, x20
	mov	x4, x22
	bl	__rtl_pci_init_one_rxdesc
	add	x24, x24, #4
	add	x22, x22, #1
	cbnz	w0, LBB0_5
	b	LBB0_9
LBB0_7:
	mov	x22, x0
	mov	w8, #1
	str	w8, [sp, #12]
	ldr	w0, [x21, #16]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	ldr	x8, [x21, #8]
	mov	x24, x20
	sbfiz	x25, x24, #5, #32
	add	x8, x8, x25
	add	x2, x8, #16
	bl	_pci_zalloc_consistent
	ldr	x8, [x21, #8]
	str	x0, [x8, x25]
	and	x9, x0, #0xff
	cmp	x0, #0
	ccmp	x9, #0, #0, ne
	b.eq	LBB0_10
LBB0_8:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_9:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_10:
	sxtw	x27, w24
	add	x8, x8, x27, lsl #5
	str	xzr, [x8, #8]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x23, x0
	mov	x0, x19
	mov	x1, #0
	mov	x2, x23
	mov	x3, x20
	mov	w4, #0
	bl	__rtl_pci_init_one_rxdesc
	cbz	w0, LBB0_9
; %bb.12:
	mov	x25, #0
	mov	w26, #4
	mov	w24, #1
	lsl	x27, x27, #5
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x21]
	cmp	x24, x8
	b.ge	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x25, x25, #1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x27]
	add	x23, x8, x25, lsl #2
	add	x2, x8, x26
	mov	x0, x19
	mov	x1, #0
	mov	x3, x20
	mov	x4, x24
	bl	__rtl_pci_init_one_rxdesc
	add	x26, x26, #4
	add	x24, x24, #1
	cbnz	w0, LBB0_13
	b	LBB0_9
LBB0_15:
	mov	x23, #0
LBB0_16:
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _HW_DESC_RXERO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HW_DESC_RXERO@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x9]
	add	x4, sp, #12
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	blr	x8
LBB0_17:
	mov	w0, #0
LBB0_18:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate RX ring\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HW_DESC_RXERO,4,2              ; @HW_DESC_RXERO
	.no_dead_strip	__rtl_pci_init_rx_ring
.subsections_via_symbols
