	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smsc9420_alloc_tx_ring
_smsc9420_alloc_tx_ring:                ## @smsc9420_alloc_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpq	$0, 24(%r14)
	sete	%dil
	callq	_BUG_ON
	movq	_TX_RING_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kmalloc_array
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%rbx), %r8d
	movq	24(%r14), %rdx
	testl	%r8d, %r8d
	jle	LBB0_10
## %bb.2:
	leaq	-1(%r8), %rcx
	movl	%r8d, %esi
	andl	$3, %esi
	cmpq	$3, %rcx
	jae	LBB0_5
## %bb.3:
	xorl	%edi, %edi
	jmp	LBB0_7
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_5:
	movl	%r8d, %ecx
	andl	$-4, %ecx
	movl	$48, %ebx
	xorl	%edi, %edi
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movups	%xmm0, -48(%rax,%rbx)
	movups	%xmm0, -80(%rdx,%rbx,2)
	movups	%xmm0, -96(%rdx,%rbx,2)
	movups	%xmm0, -32(%rax,%rbx)
	movups	%xmm0, -48(%rdx,%rbx,2)
	movups	%xmm0, -64(%rdx,%rbx,2)
	movups	%xmm0, -16(%rax,%rbx)
	movups	%xmm0, -16(%rdx,%rbx,2)
	movups	%xmm0, -32(%rdx,%rbx,2)
	movups	%xmm0, (%rax,%rbx)
	addq	$4, %rdi
	movups	%xmm0, 16(%rdx,%rbx,2)
	movups	%xmm0, (%rdx,%rbx,2)
	addq	$64, %rbx
	cmpq	%rdi, %rcx
	jne	LBB0_6
LBB0_7:
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	movq	%rdi, %rcx
	shlq	$5, %rcx
	addq	%rdx, %rcx
	shlq	$4, %rdi
	addq	%rdi, %rax
	shlq	$4, %rsi
	xorl	%edi, %edi
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movups	%xmm0, (%rax,%rdi)
	movups	%xmm0, 16(%rcx,%rdi,2)
	movups	%xmm0, (%rcx,%rdi,2)
	addq	$16, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_9
LBB0_10:
	movq	_TDES1_TER_@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r8d, %rcx
	shlq	$5, %rcx
	movq	%rax, -32(%rcx,%rdx)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wmb
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r14)
	movq	_TX_BASE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r14, %rdi
	callq	_smsc9420_reg_write
	movq	%r14, %rdi
	callq	_smsc9420_pci_flush_write
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_RING_SIZE,4,2               ## @TX_RING_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TDES1_TER_,8,3                 ## @TDES1_TER_
	.comm	_TX_BASE_ADDR,4,2               ## @TX_BASE_ADDR
	.no_dead_strip	_smsc9420_alloc_tx_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smsc9420_alloc_tx_ring
_smsc9420_alloc_tx_ring:                ; @smsc9420_alloc_tx_ring
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
Lloh0:
	adrp	x20, _TX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _TX_RING_SIZE@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kmalloc_array
	str	x0, [x19, #32]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x20]
	ldr	x9, [x19, #24]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	movi.2d	v0, #0000000000000000
	mov	x10, x8
	mov	x11, x9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	stp	xzr, xzr, [x0], #16
	stp	q0, q0, [x11], #32
	subs	x10, x10, #1
	b.ne	LBB0_3
LBB0_4:
Lloh5:
	adrp	x10, _TDES1_TER_@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TDES1_TER_@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	sxtw	x8, w8
	add	x8, x9, x8, lsl #5
	stur	x10, [x8, #-32]
	bl	_wmb
	stp	xzr, xzr, [x19, #8]
Lloh8:
	adrp	x8, _TX_BASE_ADDR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TX_BASE_ADDR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_smsc9420_reg_write
	mov	x0, x19
	bl	_smsc9420_pci_flush_write
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_RING_SIZE,4,2               ; @TX_RING_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TDES1_TER_,8,3                 ; @TDES1_TER_
	.comm	_TX_BASE_ADDR,4,2               ; @TX_BASE_ADDR
	.no_dead_strip	_smsc9420_alloc_tx_ring
.subsections_via_symbols
