	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function myri10ge_close
_myri10ge_close:                        ## @myri10ge_close
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	_MYRI10GE_ETH_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.1:
	movq	32(%r12), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_14
## %bb.2:
	movq	%r12, %rdi
	addq	$44, %rdi
	callq	_del_timer_sync
	movq	_MYRI10GE_ETH_STOPPING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	cmpl	$0, 8(%r12)
	jle	LBB0_5
## %bb.3:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rdi
	addq	%r15, %rdi
	callq	_napi_disable
	incq	%rbx
	movslq	8(%r12), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	%r14, %rdi
	callq	_netif_tx_stop_all_queues
	cmpq	$0, 16(%r12)
	jne	LBB0_10
## %bb.6:
	movl	24(%r12), %r15d
	xorl	%eax, %eax
	callq	_mb
	movq	_MXGEFW_CMD_ETHERNET_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_myri10ge_send_cmd
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_8:
	xorl	%esi, %esi
	cmpl	24(%r12), %r15d
	movl	40(%r12), %edi
	setne	%sil
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_wait_event_timeout
	cmpl	24(%r12), %r15d
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_10:
	movq	%r14, %rdi
	callq	_netif_tx_disable
	movq	%r12, %rdi
	callq	_myri10ge_free_irq
	cmpl	$0, 8(%r12)
	jle	LBB0_13
## %bb.11:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rdi
	addq	%r14, %rdi
	callq	_myri10ge_free_rings
	incq	%rbx
	movslq	8(%r12), %rax
	addq	$16, %r14
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	_MYRI10GE_ETH_STOPPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_14:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MYRI10GE_ETH_RUNNING,8,3       ## @MYRI10GE_ETH_RUNNING
	.comm	_MYRI10GE_ETH_STOPPING,8,3      ## @MYRI10GE_ETH_STOPPING
	.comm	_MXGEFW_CMD_ETHERNET_DOWN,4,2   ## @MXGEFW_CMD_ETHERNET_DOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't bring down link\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.1:                               ## @.str.1
	.asciz	"never got down irq\n"

	.comm	_MYRI10GE_ETH_STOPPED,8,3       ## @MYRI10GE_ETH_STOPPED
	.no_dead_strip	_myri10ge_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function myri10ge_close
_myri10ge_close:                        ; @myri10ge_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_netdev_priv
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MYRI10GE_ETH_RUNNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MYRI10GE_ETH_RUNNING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
; %bb.2:
	add	x0, x19, #44
	bl	_del_timer_sync
Lloh3:
	adrp	x8, _MYRI10GE_ETH_STOPPING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MYRI10GE_ETH_STOPPING@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x0, x8, x21
	bl	_napi_disable
	add	x22, x22, #1
	ldrsw	x8, [x19, #8]
	add	x21, x21, #16
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x20
	bl	_netif_carrier_off
	mov	x0, x20
	bl	_netif_tx_stop_all_queues
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_10
; %bb.6:
	ldr	w21, [x19, #24]
	bl	_mb
Lloh6:
	adrp	x8, _MXGEFW_CMD_ETHERNET_DOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MXGEFW_CMD_ETHERNET_DOWN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_myri10ge_send_cmd
	cbz	w0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_8:
	ldr	w0, [x19, #40]
	ldr	w8, [x19, #24]
	cmp	w21, w8
	cset	w1, ne
Lloh11:
	adrp	x8, _HZ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_wait_event_timeout
	ldr	w8, [x19, #24]
	cmp	w21, w8
	b.ne	LBB0_10
; %bb.9:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_10:
	mov	x0, x20
	bl	_netif_tx_disable
	mov	x0, x19
	bl	_myri10ge_free_irq
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x20, #0
	mov	x21, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x0, x8, x20
	bl	_myri10ge_free_rings
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	add	x20, x20, #16
	cmp	x21, x8
	b.lt	LBB0_12
LBB0_13:
Lloh16:
	adrp	x8, _MYRI10GE_ETH_STOPPED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MYRI10GE_ETH_STOPPED@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_14:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MYRI10GE_ETH_RUNNING,8,3       ; @MYRI10GE_ETH_RUNNING
	.comm	_MYRI10GE_ETH_STOPPING,8,3      ; @MYRI10GE_ETH_STOPPING
	.comm	_MXGEFW_CMD_ETHERNET_DOWN,4,2   ; @MXGEFW_CMD_ETHERNET_DOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't bring down link\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.1:                               ; @.str.1
	.asciz	"never got down irq\n"

	.comm	_MYRI10GE_ETH_STOPPED,8,3       ; @MYRI10GE_ETH_STOPPED
	.no_dead_strip	_myri10ge_close
.subsections_via_symbols
