	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emac_dev_stop
_emac_dev_stop:                         ## @emac_dev_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, %rbx
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_netif_stop_queue
	leaq	16(%r12), %rdi
	callq	_napi_disable
	movq	%rbx, %rdi
	callq	_netif_carrier_off
	movq	%r12, %rdi
	callq	_emac_int_disable
	movl	12(%r12), %edi
	callq	_cpdma_ctlr_stop
	movq	_EMAC_SOFTRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_emac_write
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_phy_disconnect
LBB0_2:
	movq	(%r12), %rdi
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r15d
	movq	(%r12), %rdi
	movl	(%r14), %esi
	movl	%r15d, %edx
	callq	_platform_get_resource
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	(%r13), %ebx
	cmpl	4(%r13), %ebx
	jg	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	8(%r12), %esi
	movl	%ebx, %edi
	callq	_free_irq
	leal	1(%rbx), %eax
	cmpl	4(%r13), %ebx
	movl	%eax, %ebx
	jl	LBB0_5
	jmp	LBB0_6
LBB0_7:
	movq	%r12, %rdi
	callq	_netif_msg_drv
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %edx
	addq	$16, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_notice
LBB0_9:
	movq	(%r12), %rdi
	callq	_pm_runtime_put
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMAC_SOFTRESET,4,2             ## @EMAC_SOFTRESET
	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DaVinci EMAC: %s stopped\n"

	.no_dead_strip	_emac_dev_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emac_dev_stop
_emac_dev_stop:                         ; @emac_dev_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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_netif_stop_queue
	add	x0, x19, #16
	bl	_napi_disable
	mov	x0, x20
	bl	_netif_carrier_off
	mov	x0, x19
	bl	_emac_int_disable
	ldr	w0, [x19, #12]
	bl	_cpdma_ctlr_stop
Lloh0:
	adrp	x8, _EMAC_SOFTRESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMAC_SOFTRESET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_emac_write
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_phy_disconnect
LBB0_2:
	ldr	x0, [x19]
Lloh3:
	adrp	x24, _IORESOURCE_IRQ@GOTPAGE
Lloh4:
	ldr	x24, [x24, _IORESOURCE_IRQ@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_7
; %bb.3:
	mov	x22, x0
	mov	w21, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	ldr	x0, [x19]
	ldr	w1, [x24]
	mov	x2, x21
	bl	_platform_get_resource
	mov	x22, x0
	cbz	x0, LBB0_7
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldp	w23, w8, [x22]
	cmp	w23, w8
	b.gt	LBB0_4
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x19, #8]
	mov	x0, x23
	bl	_free_irq
	add	w8, w23, #1
	ldr	w9, [x22, #4]
	cmp	w23, w9
	mov	x23, x8
	b.lt	LBB0_6
	b	LBB0_4
LBB0_7:
	mov	x0, x19
	bl	_netif_msg_drv
	cbz	x0, LBB0_9
; %bb.8:
	add	x0, x20, #16
	ldr	w2, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_notice
LBB0_9:
	ldr	x0, [x19]
	bl	_pm_runtime_put
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EMAC_SOFTRESET,4,2             ; @EMAC_SOFTRESET
	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DaVinci EMAC: %s stopped\n"

	.no_dead_strip	_emac_dev_stop
.subsections_via_symbols
