	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axienet_stop
_axienet_stop:                          ## @axienet_stop
	.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
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movl	48(%r12), %edi
	callq	_phylink_stop
	movl	48(%r12), %edi
	callq	_phylink_disconnect_phy
	movq	_XAE_OPTION_TXEN@GOTPCREL(%rip), %rax
	movq	_XAE_OPTION_RXEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	(%r12), %esi
	movq	%r14, %rdi
	callq	_axienet_setoptions
	movq	_XAXIDMA_RX_CR_OFFSET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_in32
	movq	_XAXIDMA_CR_RUNSTOP_MASK@GOTPCREL(%rip), %r15
	movq	_XAXIDMA_IRQ_ALL_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	orl	(%r15), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_out32
	movq	_XAXIDMA_TX_CR_OFFSET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_in32
	movl	(%r13), %edx
	orl	(%r15), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_out32
	movq	_XAE_IE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_axienet_iow
	movq	_XAXIDMA_RX_SR_OFFSET@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_in32
	movq	_XAXIDMA_SR_HALT_MASK@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	jne	LBB0_3
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%rbx), %eax
	cmpl	$4, %ebx
	movl	%eax, %ebx
	jae	LBB0_3
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_in32
	testl	%eax, (%r15)
	je	LBB0_2
LBB0_3:
	movq	_XAXIDMA_TX_SR_OFFSET@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_in32
	testl	%eax, (%r15)
	jne	LBB0_7
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_axienet_dma_in32
	testl	%eax, (%r15)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%rbx), %eax
	cmpl	$4, %ebx
	movl	%eax, %ebx
	jb	LBB0_5
LBB0_7:
	movq	40(%r12), %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_axienet_mdio_disable
	movq	%r12, %rdi
	callq	___axienet_device_reset
	movq	%r12, %rdi
	callq	_axienet_mdio_enable
	movq	40(%r12), %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	addq	$32, %rdi
	callq	_tasklet_kill
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	jle	LBB0_9
## %bb.8:
	movq	%r14, %rsi
	callq	_free_irq
LBB0_9:
	movq	16(%r12), %rdi
	movq	%r14, %rsi
	callq	_free_irq
	movq	24(%r12), %rdi
	movq	%r14, %rsi
	callq	_free_irq
	movq	%r14, %rdi
	callq	_axienet_dma_bd_release
	xorl	%eax, %eax
	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	"axienet_close()\n"

	.comm	_XAE_OPTION_TXEN,4,2            ## @XAE_OPTION_TXEN
	.comm	_XAE_OPTION_RXEN,4,2            ## @XAE_OPTION_RXEN
	.comm	_XAXIDMA_RX_CR_OFFSET,4,2       ## @XAXIDMA_RX_CR_OFFSET
	.comm	_XAXIDMA_CR_RUNSTOP_MASK,4,2    ## @XAXIDMA_CR_RUNSTOP_MASK
	.comm	_XAXIDMA_IRQ_ALL_MASK,4,2       ## @XAXIDMA_IRQ_ALL_MASK
	.comm	_XAXIDMA_TX_CR_OFFSET,4,2       ## @XAXIDMA_TX_CR_OFFSET
	.comm	_XAE_IE_OFFSET,4,2              ## @XAE_IE_OFFSET
	.comm	_XAXIDMA_RX_SR_OFFSET,4,2       ## @XAXIDMA_RX_SR_OFFSET
	.comm	_XAXIDMA_SR_HALT_MASK,4,2       ## @XAXIDMA_SR_HALT_MASK
	.comm	_XAXIDMA_TX_SR_OFFSET,4,2       ## @XAXIDMA_TX_SR_OFFSET
	.no_dead_strip	_axienet_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axienet_stop
_axienet_stop:                          ; @axienet_stop
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	ldr	w0, [x20, #48]
	bl	_phylink_stop
	ldr	w0, [x20, #48]
	bl	_phylink_disconnect_phy
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _XAE_OPTION_TXEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _XAE_OPTION_TXEN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _XAE_OPTION_RXEN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _XAE_OPTION_RXEN@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w1, w8, w9
	mov	x0, x19
	bl	_axienet_setoptions
Lloh8:
	adrp	x21, _XAXIDMA_RX_CR_OFFSET@GOTPAGE
Lloh9:
	ldr	x21, [x21, _XAXIDMA_RX_CR_OFFSET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_axienet_dma_in32
Lloh10:
	adrp	x22, _XAXIDMA_CR_RUNSTOP_MASK@GOTPAGE
Lloh11:
	ldr	x22, [x22, _XAXIDMA_CR_RUNSTOP_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh12:
	adrp	x23, _XAXIDMA_IRQ_ALL_MASK@GOTPAGE
Lloh13:
	ldr	x23, [x23, _XAXIDMA_IRQ_ALL_MASK@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x20
	bl	_axienet_dma_out32
Lloh14:
	adrp	x21, _XAXIDMA_TX_CR_OFFSET@GOTPAGE
Lloh15:
	ldr	x21, [x21, _XAXIDMA_TX_CR_OFFSET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x20
	bl	_axienet_dma_out32
Lloh16:
	adrp	x8, _XAE_IE_OFFSET@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XAE_IE_OFFSET@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_axienet_iow
Lloh19:
	adrp	x22, _XAXIDMA_RX_SR_OFFSET@GOTPAGE
Lloh20:
	ldr	x22, [x22, _XAXIDMA_RX_SR_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
Lloh21:
	adrp	x21, _XAXIDMA_SR_HALT_MASK@GOTPAGE
Lloh22:
	ldr	x21, [x21, _XAXIDMA_SR_HALT_MASK@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.1:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.2:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.3:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
LBB0_6:
Lloh23:
	adrp	x22, _XAXIDMA_TX_SR_OFFSET@GOTPAGE
Lloh24:
	ldr	x22, [x22, _XAXIDMA_TX_SR_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.7:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.8:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.9:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.10:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x20
	bl	_axienet_dma_in32
LBB0_12:
	ldr	x0, [x20, #40]
	bl	_mutex_lock
	mov	x0, x20
	bl	_axienet_mdio_disable
	mov	x0, x20
	bl	___axienet_device_reset
	mov	x0, x20
	bl	_axienet_mdio_enable
	ldr	x0, [x20, #40]
	bl	_mutex_unlock
	add	x0, x20, #32
	bl	_tasklet_kill
	ldr	x0, [x20, #8]
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.13:
	mov	x1, x19
	bl	_free_irq
LBB0_14:
	ldr	x0, [x20, #16]
	mov	x1, x19
	bl	_free_irq
	ldr	x0, [x20, #24]
	mov	x1, x19
	bl	_free_irq
	mov	x0, x19
	bl	_axienet_dma_bd_release
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"axienet_close()\n"

	.comm	_XAE_OPTION_TXEN,4,2            ; @XAE_OPTION_TXEN
	.comm	_XAE_OPTION_RXEN,4,2            ; @XAE_OPTION_RXEN
	.comm	_XAXIDMA_RX_CR_OFFSET,4,2       ; @XAXIDMA_RX_CR_OFFSET
	.comm	_XAXIDMA_CR_RUNSTOP_MASK,4,2    ; @XAXIDMA_CR_RUNSTOP_MASK
	.comm	_XAXIDMA_IRQ_ALL_MASK,4,2       ; @XAXIDMA_IRQ_ALL_MASK
	.comm	_XAXIDMA_TX_CR_OFFSET,4,2       ; @XAXIDMA_TX_CR_OFFSET
	.comm	_XAE_IE_OFFSET,4,2              ; @XAE_IE_OFFSET
	.comm	_XAXIDMA_RX_SR_OFFSET,4,2       ; @XAXIDMA_RX_SR_OFFSET
	.comm	_XAXIDMA_SR_HALT_MASK,4,2       ; @XAXIDMA_SR_HALT_MASK
	.comm	_XAXIDMA_TX_SR_OFFSET,4,2       ; @XAXIDMA_TX_SR_OFFSET
	.no_dead_strip	_axienet_stop
.subsections_via_symbols
