	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_close
_sky2_close:                            ## @sky2_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, %rbx
	callq	_netdev_priv
	cmpl	$0, 8(%rax)
	je	LBB0_5
## %bb.1:
	movq	%rax, %r14
	movq	16(%rax), %r15
	movq	_ifdown@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_netif_info
	cmpl	$1, (%r15)
	movq	_B0_IMSK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	jne	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	callq	_sky2_write32
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_sky2_read32
	leaq	4(%r15), %rdi
	callq	_napi_disable
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_free_irq
	movq	_SKY2_HW_IRQ_SETUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%r15)
	jmp	LBB0_4
LBB0_3:
	callq	_sky2_read32
	movq	_portirq_msk@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r14), %rdx
	movl	(%rcx,%rdx,4), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_sky2_write32
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_sky2_read32
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_synchronize_irq
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_napi_synchronize
LBB0_4:
	movq	%r14, %rdi
	callq	_sky2_hw_down
	movq	%r14, %rdi
	callq	_sky2_free_buffers
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ifdown,4,2                     ## @ifdown
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disabling interface\n"

	.comm	_B0_IMSK,4,2                    ## @B0_IMSK
	.comm	_SKY2_HW_IRQ_SETUP,4,2          ## @SKY2_HW_IRQ_SETUP
	.comm	_portirq_msk,8,3                ## @portirq_msk
	.no_dead_strip	_sky2_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_close
_sky2_close:                            ; @sky2_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	x21, x0
	bl	_netdev_priv
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x8, _ifdown@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ifdown@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	x2, x21
	bl	_netif_info
	ldr	w8, [x20]
Lloh5:
	adrp	x21, _B0_IMSK@GOTPAGE
Lloh6:
	ldr	x21, [x21, _B0_IMSK@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.2:
	mov	w2, #0
	bl	_sky2_write32
	ldr	w1, [x21]
	mov	x0, x20
	bl	_sky2_read32
	add	x0, x20, #4
	bl	_napi_disable
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_free_irq
Lloh7:
	adrp	x8, _SKY2_HW_IRQ_SETUP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SKY2_HW_IRQ_SETUP@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
	b	LBB0_4
LBB0_3:
	bl	_sky2_read32
Lloh10:
	adrp	x8, _portirq_msk@GOTPAGE
Lloh11:
	ldr	x8, [x8, _portirq_msk@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x20
	bl	_sky2_write32
	ldr	w1, [x21]
	mov	x0, x20
	bl	_sky2_read32
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_synchronize_irq
	add	x0, x20, #4
	bl	_napi_synchronize
LBB0_4:
	mov	x0, x19
	bl	_sky2_hw_down
	mov	x0, x19
	bl	_sky2_free_buffers
LBB0_5:
	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	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ifdown,4,2                     ; @ifdown
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disabling interface\n"

	.comm	_B0_IMSK,4,2                    ; @B0_IMSK
	.comm	_SKY2_HW_IRQ_SETUP,4,2          ; @SKY2_HW_IRQ_SETUP
	.comm	_portirq_msk,8,3                ; @portirq_msk
	.no_dead_strip	_sky2_close
.subsections_via_symbols
