	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm10k_down                     ## -- Begin function fm10k_down
	.p2align	4, 0x90
_fm10k_down:                            ## @fm10k_down
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	48(%rdi), %r14
	movq	___FM10K_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r12), %esi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.22:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_netif_carrier_off
	movq	%r14, %rdi
	callq	_netif_tx_stop_all_queues
	movq	%r14, %rdi
	callq	_netif_tx_disable
	movq	%r12, %rdi
	callq	_fm10k_reset_rx_state
	movq	%r12, %rdi
	callq	_fm10k_napi_disable_all
	movq	%r12, %rdi
	callq	_fm10k_update_stats
	movq	___FM10K_UPDATING_STATS@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	24(%r12), %esi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	jmp	LBB0_3
LBB0_4:
	leaq	32(%r12), %r14
	movl	40(%r12), %edi
	callq	_FM10K_REMOVED
	testq	%rax, %rax
	jne	LBB0_17
## %bb.5:
	movq	%r14, %rdi
	callq	*(%r14)
	movq	_FM10K_ERR_REQUESTS_PENDING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.6:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jge	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movslq	%ebx, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	xorl	%esi, %esi
	callq	_fm10k_get_tx_pending
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %eax
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%eax, %ebx
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	incl	%r15d
	cmpl	$25, %r15d
	jne	LBB0_7
## %bb.14:
	movl	$25, %r15d
	jmp	LBB0_16
LBB0_15:
	cmpl	$25, %r15d
	jb	LBB0_17
LBB0_16:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_17:
	movq	%r14, %rdi
	callq	*(%r14)
	movq	_FM10K_ERR_REQUESTS_PENDING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_19
## %bb.18:
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_19:
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_21:
	movq	%r12, %rdi
	callq	_fm10k_clean_all_tx_rings
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fm10k_clean_all_rx_rings       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	___FM10K_DOWN,4,2               ## @__FM10K_DOWN
	.comm	___FM10K_UPDATING_STATS,4,2     ## @__FM10K_UPDATING_STATS
	.comm	_FM10K_ERR_REQUESTS_PENDING,4,2 ## @FM10K_ERR_REQUESTS_PENDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tx queues failed to drain after %d tries. Tx DMA is probably hung.\n"

L_.str.1:                               ## @.str.1
	.asciz	"due to pending requests hw was not shut down gracefully\n"

L_.str.2:                               ## @.str.2
	.asciz	"stop_hw failed: %d\n"

	.comm	_TX_DMA_DRAIN_RETRIES,4,2       ## @TX_DMA_DRAIN_RETRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fm10k_down                     ; -- Begin function fm10k_down
	.p2align	2
_fm10k_down:                            ; @fm10k_down
	.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	x19, x0
	ldr	x20, [x0, #48]
Lloh0:
	adrp	x8, ___FM10K_DOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___FM10K_DOWN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #24]
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x0, x20
	bl	_netif_carrier_off
	mov	x0, x20
	bl	_netif_tx_stop_all_queues
	mov	x0, x20
	bl	_netif_tx_disable
	mov	x0, x19
	bl	_fm10k_reset_rx_state
	mov	x0, x19
	bl	_fm10k_napi_disable_all
	mov	x0, x19
	bl	_fm10k_update_stats
Lloh3:
	adrp	x20, ___FM10K_UPDATING_STATS@GOTPAGE
Lloh4:
	ldr	x20, [x20, ___FM10K_UPDATING_STATS@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	w1, [x19, #24]
	bl	_test_and_set_bit
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	b	LBB0_3
LBB0_5:
	add	x20, x19, #32
	ldr	w0, [x19, #40]
	bl	_FM10K_REMOVED
Lloh5:
	adrp	x21, _FM10K_ERR_REQUESTS_PENDING@GOTPAGE
Lloh6:
	ldr	x21, [x21, _FM10K_ERR_REQUESTS_PENDING@GOTPAGEOFF]
	cbnz	x0, LBB0_18
; %bb.6:
	ldr	x8, [x20]
	mov	x0, x20
	blr	x8
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_18
; %bb.7:
	mov	w22, #0
	mov	w23, #0
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	ldr	w8, [x19]
	cmp	w23, w8
	b.ge	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sxtw	x23, w23
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x23, lsl #2]
	mov	w1, #0
	bl	_fm10k_get_tx_pending
	cbnz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_10
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x19]
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	w23, w8
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	add	w22, w22, #1
	cmp	w22, #25
	b.ne	LBB0_8
; %bb.15:
	mov	w22, #25
	b	LBB0_17
LBB0_16:
	cmp	w22, #25
	b.lo	LBB0_18
LBB0_17:
	ldr	x0, [x19, #8]
	str	x22, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_18:
	ldr	x8, [x20]
	mov	x0, x20
	blr	x8
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.19:
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_20:
	cbz	w0, LBB0_23
; %bb.21:
	ldr	x8, [x19, #8]
	str	x0, [sp]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
LBB0_22:
	bl	_dev_err
LBB0_23:
	mov	x0, x19
	bl	_fm10k_clean_all_tx_rings
	mov	x0, x19
	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
	b	_fm10k_clean_all_rx_rings
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	___FM10K_DOWN,4,2               ; @__FM10K_DOWN
	.comm	___FM10K_UPDATING_STATS,4,2     ; @__FM10K_UPDATING_STATS
	.comm	_FM10K_ERR_REQUESTS_PENDING,4,2 ; @FM10K_ERR_REQUESTS_PENDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tx queues failed to drain after %d tries. Tx DMA is probably hung.\n"

l_.str.1:                               ; @.str.1
	.asciz	"due to pending requests hw was not shut down gracefully\n"

l_.str.2:                               ; @.str.2
	.asciz	"stop_hw failed: %d\n"

	.comm	_TX_DMA_DRAIN_RETRIES,4,2       ; @TX_DMA_DRAIN_RETRIES
.subsections_via_symbols
