	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ks8695_shutdown
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ks8695_shutdown:                       ## @ks8695_shutdown
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_KS8695_DTXC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_ks8695_readreg
	movl	(%rbx), %esi
	movq	_DTXC_TE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r15, %rdi
	callq	_ks8695_writereg
	movq	_KS8695_DRXC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_ks8695_readreg
	movl	(%rbx), %esi
	movq	_DRXC_RE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r15, %rdi
	callq	_ks8695_writereg
	movl	(%r15), %edi
	movl	56(%r15), %esi
	callq	_free_irq
	movl	4(%r15), %edi
	movl	56(%r15), %esi
	callq	_free_irq
	movl	8(%r15), %edi
	cmpl	$-1, %edi
	je	LBB0_2
## %bb.1:
	movl	56(%r15), %esi
	callq	_free_irq
LBB0_2:
	movq	_MAX_TX_DESC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:
	movq	40(%r15), %rax
	xorl	%r13d, %r13d
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movslq	%ecx, %rdx
	addq	$16, %rbx
	addq	$24, %r13
	cmpq	%rdx, %r14
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax,%rbx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	48(%r15), %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rcx,%r13)
	movq	$0, 16(%rcx,%r13)
	movl	24(%r15), %edi
	movl	8(%rax,%rbx), %edx
	movl	12(%rax,%rbx), %esi
	movl	(%r12), %ecx
	callq	_dma_unmap_single
	movq	40(%r15), %rax
	movq	(%rax,%rbx), %rdi
	callq	_dev_kfree_skb_irq
	movq	40(%r15), %rax
	movq	$0, (%rax,%rbx)
	movq	_MAX_TX_DESC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_6
LBB0_7:
	movq	_MAX_RX_DESC@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_12
## %bb.8:
	movq	16(%r15), %rax
	xorl	%ebx, %ebx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	movslq	%ecx, %rdx
	addq	$16, %rbx
	cmpq	%rdx, %r13
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax,%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	32(%r15), %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rcx,%rbx)
	movl	24(%r15), %edi
	movl	8(%rax,%rbx), %edx
	movl	12(%rax,%rbx), %esi
	movl	(%r12), %ecx
	callq	_dma_unmap_single
	movq	16(%r15), %rax
	movq	(%rax,%rbx), %rdi
	callq	_dev_kfree_skb_irq
	movq	16(%r15), %rax
	movq	$0, (%rax,%rbx)
	movl	(%r14), %ecx
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KS8695_DTXC,4,2                ## @KS8695_DTXC
	.comm	_DTXC_TE,4,2                    ## @DTXC_TE
	.comm	_KS8695_DRXC,4,2                ## @KS8695_DRXC
	.comm	_DRXC_RE,4,2                    ## @DRXC_RE
	.comm	_MAX_TX_DESC,4,2                ## @MAX_TX_DESC
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MAX_RX_DESC,4,2                ## @MAX_RX_DESC
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_ks8695_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks8695_shutdown
_ks8695_shutdown:                       ; @ks8695_shutdown
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x20, _KS8695_DTXC@GOTPAGE
Lloh1:
	ldr	x20, [x20, _KS8695_DTXC@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_ks8695_readreg
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _DTXC_TE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DTXC_TE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_ks8695_writereg
Lloh5:
	adrp	x20, _KS8695_DRXC@GOTPAGE
Lloh6:
	ldr	x20, [x20, _KS8695_DRXC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ks8695_readreg
	ldr	w1, [x20]
Lloh7:
	adrp	x8, _DRXC_RE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DRXC_RE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	bl	_ks8695_writereg
	ldr	w0, [x19]
	ldr	w1, [x19, #56]
	bl	_free_irq
	ldr	w0, [x19, #4]
	ldr	w1, [x19, #56]
	bl	_free_irq
	ldr	w0, [x19, #8]
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x19, #56]
	bl	_free_irq
LBB0_2:
Lloh10:
	adrp	x20, _MAX_TX_DESC@GOTPAGE
Lloh11:
	ldr	x20, [x20, _MAX_TX_DESC@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x21, #0
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x19, #40]
Lloh12:
	adrp	x24, _DMA_TO_DEVICE@GOTPAGE
Lloh13:
	ldr	x24, [x24, _DMA_TO_DEVICE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	add	x22, x22, #16
	add	x21, x21, #24
	cmp	x23, w9, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8, x22]
	cbz	x10, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #48]
	add	x9, x9, x21
	stp	xzr, xzr, [x9]
	str	xzr, [x9, #16]
	ldr	w0, [x19, #24]
	add	x8, x8, x22
	ldp	w2, w1, [x8, #8]
	ldr	w3, [x24]
	bl	_dma_unmap_single
	ldr	x8, [x19, #40]
	ldr	x0, [x8, x22]
	bl	_dev_kfree_skb_irq
	ldr	x8, [x19, #40]
	str	xzr, [x8, x22]
	ldr	w9, [x20]
	b	LBB0_4
LBB0_7:
Lloh14:
	adrp	x20, _MAX_RX_DESC@GOTPAGE
Lloh15:
	ldr	x20, [x20, _MAX_RX_DESC@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.8:
	mov	x21, #0
	mov	x22, #0
	ldr	x8, [x19, #16]
Lloh16:
	adrp	x23, _DMA_FROM_DEVICE@GOTPAGE
Lloh17:
	ldr	x23, [x23, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x22, x22, #1
	add	x21, x21, #16
	cmp	x22, w9, sxtw
	b.ge	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8, x21]
	cbz	x10, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x19, #32]
	add	x9, x9, x21
	stp	xzr, xzr, [x9]
	ldr	w0, [x19, #24]
	add	x8, x8, x21
	ldp	w2, w1, [x8, #8]
	ldr	w3, [x23]
	bl	_dma_unmap_single
	ldr	x8, [x19, #16]
	ldr	x0, [x8, x21]
	bl	_dev_kfree_skb_irq
	ldr	x8, [x19, #16]
	str	xzr, [x8, x21]
	ldr	w9, [x20]
	b	LBB0_9
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_KS8695_DTXC,4,2                ; @KS8695_DTXC
	.comm	_DTXC_TE,4,2                    ; @DTXC_TE
	.comm	_KS8695_DRXC,4,2                ; @KS8695_DRXC
	.comm	_DRXC_RE,4,2                    ; @DRXC_RE
	.comm	_MAX_TX_DESC,4,2                ; @MAX_TX_DESC
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MAX_RX_DESC,4,2                ; @MAX_RX_DESC
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_ks8695_shutdown
.subsections_via_symbols
