	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_allocate_int_sta       ## -- Begin function iwl_mvm_allocate_int_sta
	.p2align	4, 0x90
_iwl_mvm_allocate_int_sta:              ## @iwl_mvm_allocate_int_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_IWL_MVM_STATUS_IN_HW_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_2:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_iwl_mvm_find_free_sta_id
	movq	%rax, (%rbx)
	movq	_IWL_MVM_INVALID_STA@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movq	(%rbx), %rax
LBB0_4:
	movl	%r12d, 12(%rbx)
	movl	%r14d, 8(%rbx)
	movq	(%r15), %rcx
	movl	(%rcx,%rax,4), %r14d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_rcu_assign_pointer
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_MVM_STATUS_IN_HW_RESTART,4,2 ## @IWL_MVM_STATUS_IN_HW_RESTART
	.comm	_IWL_MVM_INVALID_STA,8,3        ## @IWL_MVM_INVALID_STA
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_mvm_allocate_int_sta       ; -- Begin function iwl_mvm_allocate_int_sta
	.p2align	2
_iwl_mvm_allocate_int_sta:              ; @iwl_mvm_allocate_int_sta
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	add	x1, x0, #8
Lloh0:
	adrp	x8, _IWL_MVM_STATUS_IN_HW_RESTART@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_MVM_STATUS_IN_HW_RESTART@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_test_bit
Lloh3:
	adrp	x24, _IWL_MVM_INVALID_STA@GOTPAGE
Lloh4:
	ldr	x24, [x24, _IWL_MVM_INVALID_STA@GOTPAGEOFF]
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_2:
	mov	x0, x20
	mov	x1, x23
	bl	_iwl_mvm_find_free_sta_id
	str	x0, [x21]
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	ldr	x8, [x21]
LBB0_5:
	stp	w19, w22, [x21, #8]
	ldr	x9, [x20]
	ldr	w19, [x9, x8, lsl #2]
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x1, x0
	mov	x0, x19
	bl	_rcu_assign_pointer
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_MVM_STATUS_IN_HW_RESTART,4,2 ; @IWL_MVM_STATUS_IN_HW_RESTART
	.comm	_IWL_MVM_INVALID_STA,8,3        ; @IWL_MVM_INVALID_STA
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
