	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_net_stop
_ks_net_stop:                           ## @ks_net_stop
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_netif_msg_ifdown
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ks_info
LBB0_2:
	movq	%r14, %rdi
	callq	_netif_stop_queue
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_KS_IER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ks_wrreg16
	movq	_KS_ISR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_ks_wrreg16
	movq	%rbx, %rdi
	callq	_ks_disable_qmu
	movq	_PMECR_PM_SOFTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ks_set_powermode
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	callq	_free_irq
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: shutting down\n"

	.comm	_KS_IER,4,2                     ## @KS_IER
	.comm	_KS_ISR,4,2                     ## @KS_ISR
	.comm	_PMECR_PM_SOFTDOWN,4,2          ## @PMECR_PM_SOFTDOWN
	.no_dead_strip	_ks_net_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks_net_stop
_ks_net_stop:                           ; @ks_net_stop
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	bl	_netif_msg_ifdown
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w2, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ks_info
LBB0_2:
	mov	x0, x19
	bl	_netif_stop_queue
	mov	x0, x20
	bl	_mutex_lock
Lloh2:
	adrp	x8, _KS_IER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KS_IER@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_ks_wrreg16
Lloh5:
	adrp	x8, _KS_ISR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KS_ISR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #65535
	bl	_ks_wrreg16
	mov	x0, x20
	bl	_ks_disable_qmu
Lloh8:
	adrp	x8, _PMECR_PM_SOFTDOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PMECR_PM_SOFTDOWN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ks_set_powermode
	ldr	w0, [x20, #4]
	mov	x1, x19
	bl	_free_irq
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: shutting down\n"

	.comm	_KS_IER,4,2                     ; @KS_IER
	.comm	_KS_ISR,4,2                     ; @KS_ISR
	.comm	_PMECR_PM_SOFTDOWN,4,2          ; @PMECR_PM_SOFTDOWN
	.no_dead_strip	_ks_net_stop
.subsections_via_symbols
