	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ariadne_close
_ariadne_close:                         ## @ariadne_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	callq	_netif_stop_queue
	movq	_CSR112@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movl	(%r14), %edi
	callq	_swapw
	movl	%eax, (%rbx)
	movq	_CSR0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	_ariadne_debug@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_2
## %bb.1:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_dbg
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_dbg
LBB0_2:
	movq	_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_IRQ_AMIGA_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_free_irq
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR112,4,2                     ## @CSR112
	.comm	_CSR0,4,2                       ## @CSR0
	.comm	_ariadne_debug,4,2              ## @ariadne_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Shutting down ethercard, status was %02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"%lu packets missed\n"

	.comm	_STOP,4,2                       ## @STOP
	.comm	_IRQ_AMIGA_PORTS,4,2            ## @IRQ_AMIGA_PORTS
	.no_dead_strip	_ariadne_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ariadne_close
_ariadne_close:                         ; @ariadne_close
	.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
	ldr	x20, [x0, #8]
	bl	_netif_stop_queue
Lloh0:
	adrp	x8, _CSR112@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSR112@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	ldr	w0, [x20]
	bl	_swapw
	str	w0, [x19]
Lloh3:
	adrp	x8, _CSR0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CSR0@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #4]
Lloh6:
	adrp	x8, _ariadne_debug@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ariadne_debug@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	w2, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	ldr	w2, [x19]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
LBB0_2:
Lloh13:
	adrp	x8, _STOP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _STOP@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh16:
	adrp	x8, _IRQ_AMIGA_PORTS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_AMIGA_PORTS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_free_irq
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR112,4,2                     ; @CSR112
	.comm	_CSR0,4,2                       ; @CSR0
	.comm	_ariadne_debug,4,2              ; @ariadne_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Shutting down ethercard, status was %02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"%lu packets missed\n"

	.comm	_STOP,4,2                       ; @STOP
	.comm	_IRQ_AMIGA_PORTS,4,2            ; @IRQ_AMIGA_PORTS
	.no_dead_strip	_ariadne_close
.subsections_via_symbols
