	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmmac_reset_subtask
_stmmac_reset_subtask:                  ## @stmmac_reset_subtask
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_STMMAC_RESET_REQUESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	_STMMAC_DOWN@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	xorl	%eax, %eax
	callq	_rtnl_lock
	movl	4(%rbx), %edi
	callq	_netif_trans_update
	movq	_STMMAC_RESETING@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	jmp	LBB0_4
LBB0_5:
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movl	4(%rbx), %edi
	callq	_dev_close
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	callq	_dev_open
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtnl_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_STMMAC_RESET_REQUESTED,4,2     ## @STMMAC_RESET_REQUESTED
	.comm	_STMMAC_DOWN,4,2                ## @STMMAC_DOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reset adapter.\n"

	.comm	_STMMAC_RESETING,4,2            ## @STMMAC_RESETING
	.no_dead_strip	_stmmac_reset_subtask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmmac_reset_subtask
_stmmac_reset_subtask:                  ; @stmmac_reset_subtask
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
Lloh0:
	adrp	x8, _STMMAC_RESET_REQUESTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STMMAC_RESET_REQUESTED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_and_clear_bit
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x20, _STMMAC_DOWN@GOTPAGE
Lloh4:
	ldr	x20, [x20, _STMMAC_DOWN@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	bl	_rtnl_lock
	ldr	w0, [x19, #4]
	bl	_netif_trans_update
Lloh7:
	adrp	x21, _STMMAC_RESETING@GOTPAGE
Lloh8:
	ldr	x21, [x21, _STMMAC_RESETING@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x19
	bl	_test_and_set_bit
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	b	LBB0_4
LBB0_6:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_set_bit
	ldr	w0, [x19, #4]
	bl	_dev_close
	ldr	w0, [x19, #4]
	mov	x1, #0
	bl	_dev_open
	ldr	w0, [x20]
	mov	x1, x19
	bl	_clear_bit
	ldr	w0, [x21]
	mov	x1, x19
	bl	_clear_bit
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_rtnl_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_STMMAC_RESET_REQUESTED,4,2     ; @STMMAC_RESET_REQUESTED
	.comm	_STMMAC_DOWN,4,2                ; @STMMAC_DOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reset adapter.\n"

	.comm	_STMMAC_RESETING,4,2            ; @STMMAC_RESETING
	.no_dead_strip	_stmmac_reset_subtask
.subsections_via_symbols
