	.file	"extr_altq_subr.c_altq_pfdetach.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	altq_pfdetach
	.type	altq_pfdetach, @function
altq_pfdetach:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 8[rdi]
	call	ifunit@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	test	rax, rax
	je	.L1
	mov	rbp, rax
	mov	rax, QWORD PTR [rbx]
	xor	r12d, r12d
	test	rax, rax
	je	.L1
	cmp	rax, QWORD PTR 0[rbp]
	je	.L15
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	xor	eax, eax
	call	splnet@PLT
	mov	rdi, rbp
	mov	r13d, eax
	call	ALTQ_IS_ENABLED@PLT
	test	rax, rax
	je	.L6
	mov	rdi, rbp
	call	altq_disable@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
.L6:
	mov	rdi, rbp
	call	altq_detach@PLT
	mov	r12d, eax
.L5:
	mov	edi, r13d
	call	splx@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	altq_pfdetach, .-altq_pfdetach
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_altq_subr.c_altq_pfdetach.c"
	.text
	.align	2
	.global	altq_pfdetach
	.syntax unified
	.arm
	.fpu softvfp
	.type	altq_pfdetach, %function
altq_pfdetach:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r0, [r0, #4]
	bl	ifunit
	subs	r4, r0, #0
	beq	.L16
	ldr	r5, [r5]
	cmp	r5, #0
	beq	.L1
	ldr	r3, [r4]
	cmp	r5, r3
	movne	r5, #0
	beq	.L17
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L17:
	bl	splnet
	mov	r6, r0
	mov	r0, r4
	bl	ALTQ_IS_ENABLED
	cmp	r0, #0
	beq	.L6
	mov	r0, r4
	bl	altq_disable
	subs	r5, r0, #0
	bne	.L5
.L6:
	mov	r0, r4
	bl	altq_detach
	mov	r5, r0
.L5:
	mov	r0, r6
	bl	splx
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L16:
	ldr	r3, .L18
	ldr	r5, [r3]
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L19:
	.align	2
.L18:
	.word	EINVAL
	.size	altq_pfdetach, .-altq_pfdetach
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
