	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_drain_sta              ## -- Begin function iwl_mvm_drain_sta
	.p2align	4, 0x90
_iwl_mvm_drain_sta:                     ## @iwl_mvm_drain_sta
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_lockdep_assert_held
	movl	4(%r14), %edi
	callq	_cpu_to_le32
	movq	%rax, -40(%rbp)
	movl	(%r14), %eax
	movl	%eax, -44(%rbp)
	movq	_STA_MODE_MODIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movq	_STA_FLG_DRAIN_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	%rax, -56(%rbp)
	movq	_STA_FLG_DRAIN_FLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, -64(%rbp)
	movl	$128, -28(%rbp)
	movq	_ADD_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_iwl_mvm_add_sta_cmd_size
	leaq	-64(%rbp), %rcx
	leaq	-28(%rbp), %r8
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_iwl_mvm_send_cmd_pdu_status
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_IWL_ADD_STA_STATUS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-28(%rbp), %eax
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_DEBUG_INFO
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_IWL_ERR
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STA_MODE_MODIFY,4,2            ## @STA_MODE_MODIFY
	.comm	_STA_FLG_DRAIN_FLOW,4,2         ## @STA_FLG_DRAIN_FLOW
	.comm	_ADD_STA,4,2                    ## @ADD_STA
	.comm	_IWL_ADD_STA_STATUS_MASK,4,2    ## @IWL_ADD_STA_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Frames for staid %d will drained in fw\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't drain frames for staid %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_drain_sta              ; -- Begin function iwl_mvm_drain_sta
	.p2align	2
_iwl_mvm_drain_sta:                     ; @iwl_mvm_drain_sta
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_lockdep_assert_held
	ldr	w0, [x20, #4]
	bl	_cpu_to_le32
	str	x0, [sp, #40]
Lloh0:
	adrp	x8, _STA_MODE_MODIFY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STA_MODE_MODIFY@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w9, [sp, #32]
Lloh3:
	adrp	x22, _STA_FLG_DRAIN_FLOW@GOTPAGE
Lloh4:
	ldr	x22, [x22, _STA_FLG_DRAIN_FLOW@GOTPAGEOFF]
	cbz	w21, LBB0_2
; %bb.1:
	ldr	w0, [x22]
	bl	_cpu_to_le32
	b	LBB0_3
LBB0_2:
	mov	x0, #0
LBB0_3:
	str	x0, [sp, #24]
	ldr	w0, [x22]
	bl	_cpu_to_le32
	str	x0, [sp, #16]
	mov	w8, #128
	str	w8, [sp, #12]
Lloh5:
	adrp	x8, _ADD_STA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADD_STA@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_iwl_mvm_add_sta_cmd_size
	mov	x2, x0
	add	x3, sp, #16
	add	x4, sp, #12
	mov	x0, x19
	mov	x1, x21
	bl	_iwl_mvm_send_cmd_pdu_status
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _IWL_ADD_STA_STATUS_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IWL_ADD_STA_STATUS_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.5:
	ldr	w2, [x20]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_INFO
	mov	w21, #0
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	w2, [x20]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_STA_MODE_MODIFY,4,2            ; @STA_MODE_MODIFY
	.comm	_STA_FLG_DRAIN_FLOW,4,2         ; @STA_FLG_DRAIN_FLOW
	.comm	_ADD_STA,4,2                    ; @ADD_STA
	.comm	_IWL_ADD_STA_STATUS_MASK,4,2    ; @IWL_ADD_STA_STATUS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Frames for staid %d will drained in fw\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't drain frames for staid %d\n"

.subsections_via_symbols
