	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8180_init_tx_ring
_rtl8180_init_tx_ring:                  ## @rtl8180_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movl	8(%rbx), %edi
	leal	(,%r14,4), %esi
	leaq	-48(%rbp), %rdx
	callq	_pci_zalloc_consistent
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %r13
	movzbl	%r13b, %eax
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	(%rbx), %rax
	movl	%r15d, %ecx
	shlq	$5, %rcx
	movq	%r13, 24(%rax,%rcx)
	movq	-48(%rbp), %rdx
	movq	%rdx, 16(%rax,%rcx)
	movq	$0, 8(%rax,%rcx)
	movl	%r14d, (%rax,%rcx)
	leaq	(%rax,%rcx), %rdi
	addq	$4, %rdi
	callq	_skb_queue_head_init
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.4:
	movl	%r14d, %r12d
	leaq	-4(,%r12,4), %r15
	shlq	$2, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	4(%rbx), %r14
	cmpq	%rbx, %r15
	movl	$0, %edi
	cmovneq	%r14, %rdi
	addq	-48(%rbp), %rdi
	callq	_cpu_to_le32
	movl	%eax, (%r13,%rbx)
	movq	%r14, %rbx
	cmpq	%r14, %r12
	jne	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_wiphy_err
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %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
	.no_dead_strip	_rtl8180_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 rtl8180_init_tx_ring
_rtl8180_init_tx_ring:                  ; @rtl8180_init_tx_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x23, [x0, #8]
	ldr	w0, [x23, #8]
	lsl	w1, w2, #2
	add	x2, sp, #8
	bl	_pci_zalloc_consistent
	and	x8, x0, #0xff
	cmp	x0, #0
	ccmp	x8, #0, #0, ne
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x22]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_wiphy_err
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x0
	ldr	x8, [x23]
	mov	w9, w21
	add	x8, x8, x9, lsl #5
	str	x0, [x8, #24]
	ldr	x9, [sp, #8]
	stp	xzr, x9, [x8, #8]
	str	w20, [x8]
	add	x0, x8, #4
	bl	_skb_queue_head_init
	cbz	w20, LBB0_5
; %bb.3:
	mov	x21, #0
	mov	w8, w20
	lsl	x20, x8, #2
	sub	x22, x20, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]
	add	x23, x21, #4
	cmp	x22, x21
	csel	x9, xzr, x23, eq
	add	x0, x9, x8
	bl	_cpu_to_le32
	str	w0, [x19, x21]
	mov	x21, x23
	cmp	x20, x23
	b.ne	LBB0_4
LBB0_5:
	mov	w0, #0
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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.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
	.no_dead_strip	_rtl8180_init_tx_ring
.subsections_via_symbols
