	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __cw1200_flush
___cw1200_flush:                        ## @__cw1200_flush
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_HZ@GOTPCREL(%rip), %r12
	testl	%r14d, %r14d
	je	LBB0_5
	.p2align	4, 0x90
LBB0_2:
	movq	8(%rbx), %rdi
	callq	_cw1200_queue_clear
	movq	8(%rbx), %rdi
	addq	$4, %rdi
	callq	_cw1200_queue_clear
	movq	8(%rbx), %rdi
	addq	$8, %rdi
	callq	_cw1200_queue_clear
	movq	8(%rbx), %rdi
	addq	$12, %rdi
	callq	_cw1200_queue_clear
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:
	movl	(%rbx), %r15d
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_cw1200_queue_stats_is_empty
	movl	(%r12), %edx
	addl	%edx, %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_wait_event_timeout
	testl	%eax, %eax
	jle	LBB0_6
LBB0_3:
	movq	%rbx, %rdi
	callq	_wsm_lock_tx
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_cw1200_queue_stats_is_empty
	testl	%eax, %eax
	jne	LBB0_4
## %bb.8:
	movq	%rbx, %rdi
	callq	_wsm_unlock_tx
	testl	%r14d, %r14d
	jne	LBB0_2
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	___cw1200_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __cw1200_flush
___cw1200_flush:                        ; @__cw1200_flush
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _HZ@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HZ@GOTPAGEOFF]
	cbz	w19, LBB0_2
LBB0_1:
	ldr	x0, [x20, #8]
	bl	_cw1200_queue_clear
	ldr	x8, [x20, #8]
	add	x0, x8, #4
	bl	_cw1200_queue_clear
	ldr	x8, [x20, #8]
	add	x0, x8, #8
	bl	_cw1200_queue_clear
	ldr	x8, [x20, #8]
	add	x0, x8, #12
	bl	_cw1200_queue_clear
	b	LBB0_3
LBB0_2:
	ldr	w21, [x20]
	mov	x0, x20
	mov	w1, #-1
	bl	_cw1200_queue_stats_is_empty
	mov	x1, x0
	ldr	w8, [x22]
	lsl	w2, w8, #1
	mov	x0, x21
	bl	_wait_event_timeout
	cmp	w0, #0
	b.le	LBB0_6
LBB0_3:
	mov	x0, x20
	bl	_wsm_lock_tx
	mov	x0, x20
	mov	w1, #-1
	bl	_cw1200_queue_stats_is_empty
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_wsm_unlock_tx
	cbnz	w19, LBB0_1
	b	LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	___cw1200_flush
.subsections_via_symbols
