	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_queue_remove            ## -- Begin function cw1200_queue_remove
	.p2align	4, 0x90
_cw1200_queue_remove:                   ## @cw1200_queue_remove
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movq	%rdi, %rbx
	movq	56(%rdi), %r12
	leaq	-88(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movl	%eax, %edi
	callq	_cw1200_queue_parse_id
	movq	48(%rbx), %r13
	movq	-56(%rbp), %r15
	leaq	28(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	-80(%rbp), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setne	%dil
	callq	_BUG_ON
	movq	-88(%rbp), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_1
## %bb.2:
	movl	16(%rbx), %eax
	cmpq	%rax, -56(%rbp)
	jae	LBB0_3
## %bb.6:
	shlq	$5, %r15
	movq	(%r13,%r15), %rax
	cmpq	-72(%rbp), %rax
	jne	LBB0_7
## %bb.8:
	movl	24(%r13,%r15), %ecx
	movl	%ecx, -48(%rbp)
	movq	16(%r13,%r15), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	$0, 16(%r13,%r15)
	decl	40(%rbx)
	decl	20(%rbx)
	leaq	(%r15,%r13), %rcx
	incl	36(%rbx)
	incq	%rax
	movq	%rax, (%rcx)
	leaq	(%r15,%r13), %rdi
	addq	$8, %rdi
	leaq	32(%rbx), %rsi
	callq	_list_move
	cmpl	$0, 24(%rbx)
	je	LBB0_11
## %bb.9:
	movl	16(%rbx), %eax
	sarl	%eax
	cmpl	%eax, 20(%rbx)
	jg	LBB0_11
## %bb.10:
	movl	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	___cw1200_queue_unlock
LBB0_11:
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	xorl	%ebx, %ebx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movl	(%r12), %edi
	leaq	-48(%rbp), %rdx
	callq	*8(%r12)
	jmp	LBB0_13
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %r15
	jmp	LBB0_5
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %r15
	jmp	LBB0_4
LBB0_7:
	movq	_ENOENT@GOTPCREL(%rip), %r15
LBB0_4:
	movl	$1, %edi
	callq	_WARN_ON
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_bh
LBB0_13:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cw1200_queue_remove
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cw1200_queue_remove
	.p2align	2
_cw1200_queue_remove:                   ; @cw1200_queue_remove
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x8, x1
	mov	x20, x0
	ldr	x22, [x0, #56]
	add	x1, sp, #40
	add	x2, sp, #32
	add	x3, sp, #24
	add	x4, sp, #16
	mov	x0, x8
	bl	_cw1200_queue_parse_id
	ldr	x21, [x20, #48]
	ldr	x23, [sp, #16]
	add	x19, x20, #28
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	x8, [sp, #32]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUG_ON
	ldr	x8, [sp, #40]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [sp, #16]
	ldr	w9, [x20, #16]
	cmp	x8, x9
	b.hs	LBB0_10
; %bb.2:
	add	x8, x21, x23, lsl #5
	ldr	x9, [x8]
	ldr	x10, [sp, #24]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.3:
	ldr	w10, [x8, #24]
	str	w10, [sp, #8]
	ldr	x21, [x8, #16]
	str	xzr, [x8, #16]
	ldr	w10, [x20, #20]
	sub	w10, w10, #1
	str	w10, [x20, #20]
	ldur	d0, [x20, #36]
Lloh0:
	adrp	x10, lCPI0_0@PAGE
Lloh1:
	ldr	d1, [x10, lCPI0_0@PAGEOFF]
	add.2s	v0, v0, v1
	stur	d0, [x20, #36]
	add	x9, x9, #1
	str	x9, [x8]
	add	x0, x8, #8
	add	x1, x20, #32
	bl	_list_move
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_6
; %bb.4:
	ldp	w9, w8, [x20, #16]
	cmp	w8, w9, asr #1
	b.gt	LBB0_6
; %bb.5:
	str	wzr, [x20, #24]
	mov	x0, x20
	bl	___cw1200_queue_unlock
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock_bh
	cbz	x21, LBB0_8
; %bb.7:
	ldr	x8, [x22, #8]
	ldr	w0, [x22]
	add	x2, sp, #8
	mov	x1, x21
	blr	x8
LBB0_8:
	mov	w20, #0
	b	LBB0_14
LBB0_9:
Lloh2:
	adrp	x20, _ENOENT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _ENOENT@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
Lloh4:
	adrp	x20, _EINVAL@GOTPAGE
Lloh5:
	ldr	x20, [x20, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh6:
	adrp	x20, _ENOENT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ENOENT@GOTPAGEOFF]
LBB0_12:
	mov	w0, #1
	bl	_WARN_ON
LBB0_13:
	ldr	w8, [x20]
	neg	w20, w8
	mov	x0, x19
	bl	_spin_unlock_bh
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
