	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iflib_device_deregister        ## -- Begin function iflib_device_deregister
	.p2align	4, 0x90
_iflib_device_deregister:               ## @iflib_device_deregister
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	16(%rdi), %ebx
	movl	64(%rdi), %r14d
	movl	%r14d, %edi
	callq	_if_vlantrunkinuse
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	callq	_device_printf
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_24
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_STATE_LOCK
	movq	_IFC_IN_DETACH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_STATE_UNLOCK
	movq	%r15, %rdi
	callq	_iflib_unregister_vlan_handlers
	movl	%r14d, %edi
	callq	_iflib_netmap_detach
	movl	%r14d, %edi
	callq	_ether_ifdetach
	movq	%r15, %rdi
	callq	_CTX_LOCK
	movq	%r15, %rdi
	callq	_iflib_stop
	movq	%r15, %rdi
	callq	_CTX_UNLOCK
	movq	%r15, %rdi
	callq	_iflib_rem_pfil
	movq	56(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_led_destroy
LBB0_4:
	movq	_qgroup_if_io_tqg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	48(%r15), %rbx
	movq	%r15, %rdi
	callq	_NTXQSETS
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r14d
	addq	$16, %rbx
	movq	%r15, %rdi
	callq	_NTXQSETS
	cmpl	%eax, %r14d
	jge	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	8(%rbx), %rdi
	callq	_callout_drain
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_taskqgroup_detach
	jmp	LBB0_8
LBB0_9:
	movq	40(%r15), %rbx
	movq	%r15, %rdi
	callq	_NRXQSETS
	testl	%eax, %eax
	jle	LBB0_17
## %bb.10:
	xorl	%r13d, %r13d
	movq	_M_IFLIB@GOTPCREL(%rip), %r14
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	incl	%r13d
	addq	$24, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_NRXQSETS
	cmpl	%eax, %r13d
	jge	LBB0_17
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	cmpq	$0, 16(%rbx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	16(%rbx), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_taskqgroup_detach
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$0, (%rbx)
	jle	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%rbx), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15,%r12,8), %rdi
	movl	(%r14), %esi
	callq	_free
	incq	%r12
	cmpl	(%rbx), %r12d
	jl	LBB0_15
	jmp	LBB0_16
LBB0_17:
	movq	_qgroup_if_config_tqg@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	$0, 32(%r15)
	je	LBB0_19
## %bb.18:
	leaq	32(%r15), %rsi
	movq	%rbx, %rdi
	callq	_taskqgroup_detach
LBB0_19:
	cmpq	$0, 24(%r15)
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_21
## %bb.20:
	leaq	24(%r15), %rsi
	movq	%rbx, %rdi
	callq	_taskqgroup_detach
LBB0_21:
	movq	%r15, %rdi
	callq	_CTX_LOCK
	movq	%r15, %rdi
	callq	_IFDI_DETACH
	movq	%r15, %rdi
	callq	_CTX_UNLOCK
	movq	%r15, %rdi
	callq	_iflib_free_intr_mem
	movl	%r14d, %edi
	callq	_bus_generic_detach
	movq	%r15, %rdi
	callq	_iflib_tx_structures_free
	movq	%r15, %rdi
	callq	_iflib_rx_structures_free
	movq	%r15, %rdi
	callq	_iflib_deregister
	movl	16(%r15), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_device_set_softc
	movq	_IFC_SC_ALLOCATED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_23
## %bb.22:
	movq	8(%r15), %rdi
	movq	_M_IFLIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
LBB0_23:
	movq	%r15, %rdi
	callq	_unref_ctx_core_offset
	movq	_M_IFLIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_free
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Vlan in use, detach first\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IFC_IN_DETACH,4,2              ## @IFC_IN_DETACH
	.comm	_qgroup_if_io_tqg,8,3           ## @qgroup_if_io_tqg
	.comm	_M_IFLIB,4,2                    ## @M_IFLIB
	.comm	_qgroup_if_config_tqg,8,3       ## @qgroup_if_config_tqg
	.comm	_IFC_SC_ALLOCATED,4,2           ## @IFC_SC_ALLOCATED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iflib_device_deregister        ; -- Begin function iflib_device_deregister
	.p2align	2
_iflib_device_deregister:               ; @iflib_device_deregister
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w21, [x0, #64]
	ldr	w20, [x0, #16]
	mov	x0, x21
	bl	_if_vlantrunkinuse
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_2:
	mov	x0, x19
	bl	_STATE_LOCK
Lloh5:
	adrp	x8, _IFC_IN_DETACH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IFC_IN_DETACH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	bl	_STATE_UNLOCK
	mov	x0, x19
	bl	_iflib_unregister_vlan_handlers
	mov	x0, x21
	bl	_iflib_netmap_detach
	mov	x0, x21
	bl	_ether_ifdetach
	mov	x0, x19
	bl	_CTX_LOCK
	mov	x0, x19
	bl	_iflib_stop
	mov	x0, x19
	bl	_CTX_UNLOCK
	mov	x0, x19
	bl	_iflib_rem_pfil
	ldr	x0, [x19, #56]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_led_destroy
LBB0_4:
Lloh8:
	adrp	x8, _qgroup_if_io_tqg@GOTPAGE
Lloh9:
	ldr	x8, [x8, _qgroup_if_io_tqg@GOTPAGEOFF]
Lloh10:
	ldr	x21, [x8]
	ldr	x22, [x19, #48]
	mov	x0, x19
	bl	_NTXQSETS
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.5:
	mov	w23, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	add	x22, x22, #16
	mov	x0, x19
	bl	_NTXQSETS
	cmp	w23, w0
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x22, #8
	bl	_callout_drain
	ldr	x8, [x22]
	cbz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_taskqgroup_detach
	b	LBB0_6
LBB0_9:
	ldr	x23, [x19, #40]
	mov	x0, x19
	bl	_NRXQSETS
Lloh11:
	adrp	x22, _M_IFLIB@GOTPAGE
Lloh12:
	ldr	x22, [x22, _M_IFLIB@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.10:
	mov	w24, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	add	x23, x23, #24
	mov	x0, x19
	bl	_NRXQSETS
	cmp	w24, w0
	b.ge	LBB0_17
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	mov	x1, x23
	ldr	x8, [x1, #16]!
	cbz	x8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x21
	bl	_taskqgroup_detach
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x25, #0
	ldr	x26, [x23, #8]
LBB0_16:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x26, x25, lsl #3]
	ldr	w1, [x22]
	bl	_free
	ldr	w8, [x23]
	add	x25, x25, #1
	cmp	w25, w8
	b.lt	LBB0_16
	b	LBB0_11
LBB0_17:
Lloh13:
	adrp	x8, _qgroup_if_config_tqg@GOTPAGE
Lloh14:
	ldr	x8, [x8, _qgroup_if_config_tqg@GOTPAGEOFF]
Lloh15:
	ldr	x21, [x8]
	mov	x1, x19
	ldr	x8, [x1, #32]!
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x21
	bl	_taskqgroup_detach
LBB0_19:
	mov	x1, x19
	ldr	x8, [x1, #24]!
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x21
	bl	_taskqgroup_detach
LBB0_21:
	mov	x0, x19
	bl	_CTX_LOCK
	mov	x0, x19
	bl	_IFDI_DETACH
	mov	x0, x19
	bl	_CTX_UNLOCK
	mov	x0, x19
	bl	_iflib_free_intr_mem
	mov	x0, x20
	bl	_bus_generic_detach
	mov	x0, x19
	bl	_iflib_tx_structures_free
	mov	x0, x19
	bl	_iflib_rx_structures_free
	mov	x0, x19
	bl	_iflib_deregister
	ldr	w0, [x19, #16]
	mov	x1, #0
	bl	_device_set_softc
	ldr	w8, [x19]
Lloh16:
	adrp	x9, _IFC_SC_ALLOCATED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IFC_SC_ALLOCATED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.22:
	ldr	x0, [x19, #8]
	ldr	w1, [x22]
	bl	_free
LBB0_23:
	mov	x0, x19
	bl	_unref_ctx_core_offset
	ldr	w1, [x22]
	mov	x0, x19
	bl	_free
	mov	w0, #0
LBB0_24:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Vlan in use, detach first\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IFC_IN_DETACH,4,2              ; @IFC_IN_DETACH
	.comm	_qgroup_if_io_tqg,8,3           ; @qgroup_if_io_tqg
	.comm	_M_IFLIB,4,2                    ; @M_IFLIB
	.comm	_qgroup_if_config_tqg,8,3       ; @qgroup_if_config_tqg
	.comm	_IFC_SC_ALLOCATED,4,2           ; @IFC_SC_ALLOCATED
.subsections_via_symbols
