	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _rtl_pci_init_tx_ring
__rtl_pci_init_tx_ring:                 ## @_rtl_pci_init_tx_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	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_rtl_pcipriv
	movl	%eax, %edi
	callq	_rtl_pcidev
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_rtl_priv
	movq	%rax, %r13
	cmpq	$0, 8(%rax)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movl	8(%r15), %edi
	leal	(,%rbx,4), %ebx
	leaq	-72(%rbp), %rdx
	movl	%ebx, %esi
	callq	_pci_zalloc_consistent
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movzbl	%al, %ecx
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.4:
	movq	(%r15), %rcx
	movl	%r12d, %edx
	shlq	$6, %rdx
	movq	%rax, 56(%rcx,%rdx)
	movq	-72(%rbp), %rax
	movq	%rax, 48(%rcx,%rdx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rcx,%rdx)
	jmp	LBB0_5
LBB0_1:
	leal	(,%rbx,4), %ebx
LBB0_5:
	movl	8(%r15), %edi
	leaq	-56(%rbp), %rdx
	movl	%ebx, %esi
	callq	_pci_zalloc_consistent
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movzbl	%al, %ecx
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.7:
	movq	(%r15), %rsi
	movl	%r12d, %ecx
	shlq	$6, %rcx
	movq	%rax, 24(%rsi,%rcx)
	movq	-56(%rbp), %rdx
	movq	%rdx, 16(%rsi,%rcx)
	movq	$0, 8(%rsi,%rcx)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, (%rsi,%rcx)
	leaq	(%rsi,%rcx), %rdi
	addq	$4, %rdi
	movq	%rax, %rbx
	callq	_skb_queue_head_init
	movq	_COMP_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DBG_LOUD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r13, %rdi
	movl	%r12d, %r8d
	movq	%rbx, %r12
	movq	%rbx, %r9
	callq	_RT_TRACE
	xorl	%eax, %eax
	cmpq	$0, 8(%r13)
	jne	LBB0_13
## %bb.8:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.9:
	movl	%r15d, %r15d
	leaq	-4(,%r15,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shlq	$2, %r15
	xorl	%esi, %esi
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leaq	4(%rsi), %r13
	cmpq	%rsi, -48(%rbp)                 ## 8-byte Folded Reload
	movl	$0, %eax
	cmovneq	%r13, %rax
	addq	-56(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	(%rbx), %rax
	movq	(%rax), %rax
	addq	%r12, %rsi
	movq	_HW_DESC_TX_NEXTDESC_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	movl	$1, %edx
	leaq	-64(%rbp), %r8
	callq	*(%rax)
	movq	%r13, %rsi
	cmpq	%r13, %r15
	jne	LBB0_10
## %bb.11:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
                                        ## 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 TX ring (prio = %d)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_COMP_INIT,4,2                  ## @COMP_INIT
	.comm	_DBG_LOUD,4,2                   ## @DBG_LOUD
L_.str.1:                               ## @.str.1
	.asciz	"queue:%d, ring_addr:%p\n"

	.comm	_HW_DESC_TX_NEXTDESC_ADDR,4,2   ## @HW_DESC_TX_NEXTDESC_ADDR
	.no_dead_strip	__rtl_pci_init_tx_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_tx_ring
__rtl_pci_init_tx_ring:                 ; @_rtl_pci_init_tx_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_rtl_pcipriv
	bl	_rtl_pcidev
	mov	x24, x0
	mov	x0, x19
	bl	_rtl_priv
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x24, #8]
	lsl	w23, w21, #2
	add	x2, sp, #24
	mov	x1, x23
	bl	_pci_zalloc_consistent
	and	x8, x0, #0xff
	cmp	x0, #0
	ccmp	x8, #0, #0, ne
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x24]
	mov	w9, w22
	add	x8, x8, x9, lsl #6
	str	x0, [x8, #56]
	ldr	x9, [sp, #24]
	stp	xzr, x9, [x8, #40]
	str	xzr, [x8, #32]
	b	LBB0_4
LBB0_3:
	lsl	w23, w21, #2
LBB0_4:
	ldr	w0, [x24, #8]
	add	x2, sp, #16
	mov	x1, x23
	bl	_pci_zalloc_consistent
	and	x8, x0, #0xff
	cmp	x0, #0
	ccmp	x8, #0, #0, ne
	b.eq	LBB0_6
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_pr_err
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_6:
	mov	x23, x0
	ldr	x8, [x24]
	mov	w9, w22
	add	x8, x8, x9, lsl #6
	str	x0, [x8, #24]
	ldr	x9, [sp, #16]
	stp	xzr, x9, [x8, #8]
	str	w21, [x8]
	add	x0, x8, #4
	bl	_skb_queue_head_init
Lloh5:
	adrp	x8, _COMP_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _COMP_INIT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _DBG_LOUD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DBG_LOUD@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x4, x22
	mov	x5, x23
	bl	_RT_TRACE
	mov	w0, #0
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_11
; %bb.7:
	cbz	w21, LBB0_11
; %bb.8:
	mov	x8, #0
	mov	w9, w21
	lsl	x21, x9, #2
	sub	x22, x21, #4
Lloh13:
	adrp	x24, _HW_DESC_TX_NEXTDESC_ADDR@GOTPAGE
Lloh14:
	ldr	x24, [x24, _HW_DESC_TX_NEXTDESC_ADDR@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [sp, #16]
	add	x25, x8, #4
	cmp	x22, x8
	csel	x10, xzr, x25, eq
	add	x9, x10, x9
	str	x9, [sp, #8]
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x1, x23, x8
	ldr	w3, [x24]
	add	x4, sp, #8
	mov	x0, x19
	mov	w2, #1
	blr	x9
	mov	x8, x25
	cmp	x21, x25
	b.ne	LBB0_9
; %bb.10:
	mov	w0, #0
LBB0_11:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot allocate TX ring (prio = %d)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_COMP_INIT,4,2                  ; @COMP_INIT
	.comm	_DBG_LOUD,4,2                   ; @DBG_LOUD
l_.str.1:                               ; @.str.1
	.asciz	"queue:%d, ring_addr:%p\n"

	.comm	_HW_DESC_TX_NEXTDESC_ADDR,4,2   ; @HW_DESC_TX_NEXTDESC_ADDR
	.no_dead_strip	__rtl_pci_init_tx_ring
.subsections_via_symbols
