	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsi108_close
_tsi108_close:                          ## @tsi108_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_netif_stop_queue
	leaq	76(%rbx), %rdi
	callq	_napi_disable
	movq	%rbx, %rdi
	addq	$72, %rdi
	callq	_del_timer_sync
	movq	%r14, %rdi
	callq	_tsi108_stop_ethernet
	movq	%r14, %rdi
	callq	_tsi108_kill_phy
	movq	_TSI108_EC_INTMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-1, %esi
	callq	_TSI_WRITE
	movq	_TSI108_MAC_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_TSI_WRITE
	movq	_TSI108_TXRING_LEN@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %eax
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	64(%rbx), %rdx
	cltq
	movq	(%rdx,%rax,8), %rdi
	incl	%eax
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	(%r15)
	movl	%edx, 4(%rbx)
	incl	%ecx
	movl	%ecx, 60(%rbx)
	callq	_dev_kfree_skb
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	60(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %eax
	cmpl	%eax, (%rbx)
	jne	LBB0_4
## %bb.5:
	movl	56(%rbx), %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	40(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.6:
	movq	_TSI108_RXRING_LEN@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	8(%rbx), %rax
	movq	48(%rbx), %rdx
	movq	(%rdx,%rax,8), %rdi
	incl	%eax
	cltd
	idivl	(%r14)
	movl	%edx, 8(%rbx)
	decq	%rcx
	movq	%rcx, 40(%rbx)
	callq	_dev_kfree_skb
	movq	40(%rbx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_7
LBB0_8:
	movq	24(%rbx), %rdi
	movq	_TSI108_RXRING_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	movl	36(%rbx), %edx
	movl	32(%rbx), %ecx
	callq	_dma_free_coherent
	movq	24(%rbx), %rdi
	movl	(%r15), %esi
	shll	$2, %esi
	movl	12(%rbx), %ecx
	movl	16(%rbx), %edx
	callq	_dma_free_coherent
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TSI108_EC_INTMASK,4,2          ## @TSI108_EC_INTMASK
	.comm	_TSI108_MAC_CFG1,4,2            ## @TSI108_MAC_CFG1
	.comm	_TSI108_TXRING_LEN,4,2          ## @TSI108_TXRING_LEN
	.comm	_TSI108_RXRING_LEN,4,2          ## @TSI108_RXRING_LEN
	.no_dead_strip	_tsi108_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsi108_close
_tsi108_close:                          ; @tsi108_close
	.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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x20
	bl	_netif_stop_queue
	add	x0, x19, #76
	bl	_napi_disable
	add	x0, x19, #72
	bl	_del_timer_sync
	mov	x0, x20
	bl	_tsi108_stop_ethernet
	mov	x0, x20
	bl	_tsi108_kill_phy
Lloh0:
	adrp	x8, _TSI108_EC_INTMASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSI108_EC_INTMASK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #-1
	bl	_TSI_WRITE
Lloh3:
	adrp	x8, _TSI108_MAC_CFG1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TSI108_MAC_CFG1@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_TSI_WRITE
Lloh6:
	adrp	x21, _TSI108_TXRING_LEN@GOTPAGE
Lloh7:
	ldr	x21, [x21, _TSI108_TXRING_LEN@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x19, #4]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x19, #64]
	ldr	x0, [x10, w9, sxtw #3]
	add	w9, w9, #1
	ldr	w10, [x21]
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	str	w9, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #60]
	bl	_dev_kfree_skb
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #60]
	cbz	w8, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w10, w9, [x19]
	cmp	w10, w9
	b.ne	LBB0_2
; %bb.5:
	ldr	w0, [x19, #56]
	mov	x1, x20
	bl	_free_irq
	ldr	x8, [x19, #40]
Lloh8:
	adrp	x20, _TSI108_RXRING_LEN@GOTPAGE
Lloh9:
	ldr	x20, [x20, _TSI108_RXRING_LEN@GOTPAGEOFF]
	cbz	x8, LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x9, [x19, #8]
	ldr	x10, [x19, #48]
	ldr	x0, [x10, x9, lsl #3]
	add	w9, w9, #1
	ldr	w10, [x20]
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	str	w9, [x19, #8]
	sub	x8, x8, #1
	str	x8, [x19, #40]
	bl	_dev_kfree_skb
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_6
LBB0_7:
	ldr	x0, [x19, #24]
	ldr	w8, [x20]
	lsl	w1, w8, #2
	ldp	w3, w2, [x19, #32]
	bl	_dma_free_coherent
	ldr	x0, [x19, #24]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	ldp	w3, w2, [x19, #12]
	bl	_dma_free_coherent
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TSI108_EC_INTMASK,4,2          ; @TSI108_EC_INTMASK
	.comm	_TSI108_MAC_CFG1,4,2            ; @TSI108_MAC_CFG1
	.comm	_TSI108_TXRING_LEN,4,2          ; @TSI108_TXRING_LEN
	.comm	_TSI108_RXRING_LEN,4,2          ; @TSI108_RXRING_LEN
	.no_dead_strip	_tsi108_close
.subsections_via_symbols
