	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fwnet_remove
_fwnet_remove:                          ## @fwnet_remove
	.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
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	(%rax), %r12
	movq	_fwnet_device_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	24(%r12), %r14
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_fwnet_remove_peer
	leaq	16(%r12), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r14, %rdi
	callq	_unregister_netdev
	movq	%r12, %rdi
	callq	_fwnet_fifo_stop
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r12)
	je	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_ssleep
	movq	8(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rbx), %eax
	cmpl	$4, %ebx
	movl	%eax, %ebx
	jb	LBB0_3
	jmp	LBB0_5
LBB0_2:
	xorl	%edi, %edi
LBB0_5:
	callq	_WARN_ON
	movq	%r12, %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_free_netdev
LBB0_6:
	movq	_fwnet_device_mutex@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fwnet_device_mutex,4,2         ## @fwnet_device_mutex
	.no_dead_strip	_fwnet_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fwnet_remove
_fwnet_remove:                          ; @fwnet_remove
	.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
	bl	_dev_get_drvdata
	mov	x21, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x0, _fwnet_device_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _fwnet_device_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x20, [x19, #24]
	mov	x0, x21
	mov	x1, x19
	bl	_fwnet_remove_peer
	add	x0, x19, #16
	bl	_list_empty
	cbz	x0, LBB0_9
; %bb.1:
	mov	x0, x20
	bl	_unregister_netdev
	mov	x0, x19
	bl	_fwnet_fifo_stop
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.2:
	mov	w0, #1
	bl	_ssleep
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.3:
	mov	w0, #1
	bl	_ssleep
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.4:
	mov	w0, #1
	bl	_ssleep
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.5:
	mov	w0, #1
	bl	_ssleep
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.6:
	mov	w0, #1
	bl	_ssleep
	ldr	x0, [x19, #8]
	b	LBB0_8
LBB0_7:
	mov	x0, #0
LBB0_8:
	bl	_WARN_ON
	mov	x0, x19
	bl	_list_del
	mov	x0, x20
	bl	_free_netdev
LBB0_9:
Lloh2:
	adrp	x0, _fwnet_device_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _fwnet_device_mutex@GOTPAGEOFF]
	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	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_fwnet_device_mutex,4,2         ; @fwnet_device_mutex
	.no_dead_strip	_fwnet_remove
.subsections_via_symbols
