	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixpdev_deinit                  ## -- Begin function ixpdev_deinit
	.p2align	4, 0x90
_ixpdev_deinit:                         ## @ixpdev_deinit
	.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	_nds_count@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_nds@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_unregister_netdev
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movl	$1, %edi
	movl	$255, %esi
	callq	_ixp2000_uengine_stop_contexts
	xorl	%edi, %edi
	movl	$255, %esi
	callq	_ixp2000_uengine_stop_contexts
	movl	$3, %edi
	callq	_ixp2000_uengine_reset
	movq	_TX_BUF_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_tx_desc@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_phys_to_virt
	movq	%rax, %rdi
	callq	_free_page
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	_RX_BUF_COUNT@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_9
## %bb.7:
	xorl	%ebx, %ebx
	movq	_rx_desc@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_phys_to_virt
	movq	%rax, %rdi
	callq	_free_page
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nds_count,4,2                  ## @nds_count
	.comm	_nds,8,3                        ## @nds
	.comm	_TX_BUF_COUNT,4,2               ## @TX_BUF_COUNT
	.comm	_tx_desc,8,3                    ## @tx_desc
	.comm	_RX_BUF_COUNT,4,2               ## @RX_BUF_COUNT
	.comm	_rx_desc,8,3                    ## @rx_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixpdev_deinit                  ; -- Begin function ixpdev_deinit
	.p2align	2
_ixpdev_deinit:                         ; @ixpdev_deinit
	.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
Lloh0:
	adrp	x19, _nds_count@GOTPAGE
Lloh1:
	ldr	x19, [x19, _nds_count@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x20, #0
Lloh2:
	adrp	x21, _nds@GOTPAGE
Lloh3:
	ldr	x21, [x21, _nds@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, x20, lsl #2]
	bl	_unregister_netdev
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_2
LBB0_3:
	mov	w0, #1
	mov	w1, #255
	bl	_ixp2000_uengine_stop_contexts
	mov	w0, #0
	mov	w1, #255
	bl	_ixp2000_uengine_stop_contexts
	mov	w0, #3
	bl	_ixp2000_uengine_reset
Lloh4:
	adrp	x19, _TX_BUF_COUNT@GOTPAGE
Lloh5:
	ldr	x19, [x19, _TX_BUF_COUNT@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x20, #0
Lloh6:
	adrp	x21, _tx_desc@GOTPAGE
Lloh7:
	ldr	x21, [x21, _tx_desc@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, x20, lsl #2]
	bl	_phys_to_virt
	bl	_free_page
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_5
LBB0_6:
Lloh8:
	adrp	x19, _RX_BUF_COUNT@GOTPAGE
Lloh9:
	ldr	x19, [x19, _RX_BUF_COUNT@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x20, #0
Lloh10:
	adrp	x21, _rx_desc@GOTPAGE
Lloh11:
	ldr	x21, [x21, _rx_desc@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, x20, lsl #2]
	bl	_phys_to_virt
	bl	_free_page
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_8
LBB0_9:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_nds_count,4,2                  ; @nds_count
	.comm	_nds,8,3                        ; @nds
	.comm	_TX_BUF_COUNT,4,2               ; @TX_BUF_COUNT
	.comm	_tx_desc,8,3                    ; @tx_desc
	.comm	_RX_BUF_COUNT,4,2               ; @RX_BUF_COUNT
	.comm	_rx_desc,8,3                    ; @rx_desc
.subsections_via_symbols
