	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwlagn_mac_sta_state
_iwlagn_mac_sta_state:                  ## @iwlagn_mac_sta_state
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_IWL_MAC80211_GET_DVM
	movq	%rax, %rbx
	movq	8(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_IWL_DEBUG_MAC80211
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	movq	_NL80211_IFTYPE_STATION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	_IEEE80211_STA_NOTEXIST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IEEE80211_STA_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r15d, %eax
	jne	LBB0_3
## %bb.2:
	cmpl	%r12d, %ecx
	jne	LBB0_3
## %bb.13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r14, %r12
	movq	%r14, %rdx
	callq	_iwlagn_mac_sta_add
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.14:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	_IWL_STA_UCODE_INPROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	movq	8(%r15), %r15
	movq	%r12, %rdi
	callq	_iwl_sta_id
	andl	%ebx, (%r15,%rax,4)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	jmp	LBB0_18
LBB0_8:
	movq	_IEEE80211_STA_AUTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IEEE80211_STA_ASSOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r15d, %eax
	jne	LBB0_10
## %bb.9:
	cmpl	%r12d, %ecx
	jne	LBB0_10
## %bb.15:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r14, %rbx
	movq	%r14, %rdx
	callq	_iwlagn_mac_sta_add
	jmp	LBB0_16
LBB0_3:
	movq	%r14, %rbx
	cmpl	%r15d, %ecx
	jne	LBB0_5
## %bb.4:
	cmpl	%r12d, %eax
	je	LBB0_12
LBB0_5:
	movq	_IEEE80211_STA_AUTH@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpl	%r15d, (%rax)
	jne	LBB0_19
## %bb.6:
	movq	_IEEE80211_STA_ASSOC@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_19
## %bb.7:
	movl	(%rdx), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_iwl_sta_update_ht
LBB0_16:
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_IWL_DEBUG_INFO
	movq	%rbx, %rdi
	callq	_iwl_sta_id
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_iwl_rs_rate_init
LBB0_18:
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_10:
	movq	%r14, %rbx
	xorl	%r14d, %r14d
	cmpl	%r15d, %ecx
	jne	LBB0_19
## %bb.11:
	cmpl	%r12d, %eax
	jne	LBB0_19
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_iwlagn_mac_sta_remove
	movl	%eax, %r14d
LBB0_19:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_iwl_is_rfkill
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%ecx, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_IWL_DEBUG_MAC80211
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"station %pM state change %d->%d\n"

	.comm	_NL80211_IFTYPE_STATION,8,3     ## @NL80211_IFTYPE_STATION
	.comm	_IEEE80211_STA_NOTEXIST,4,2     ## @IEEE80211_STA_NOTEXIST
	.comm	_IEEE80211_STA_NONE,4,2         ## @IEEE80211_STA_NONE
	.comm	_IEEE80211_STA_AUTH,4,2         ## @IEEE80211_STA_AUTH
	.comm	_IEEE80211_STA_ASSOC,4,2        ## @IEEE80211_STA_ASSOC
	.comm	_IWL_STA_UCODE_INPROGRESS,4,2   ## @IWL_STA_UCODE_INPROGRESS
L_.str.1:                               ## @.str.1
	.asciz	"Initializing rate scaling for station %pM\n"

L_.str.2:                               ## @.str.2
	.asciz	"leave\n"

	.no_dead_strip	_iwlagn_mac_sta_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwlagn_mac_sta_state
_iwlagn_mac_sta_state:                  ; @iwlagn_mac_sta_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x4
	mov	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x23, x0
	bl	_IWL_MAC80211_GET_DVM
	mov	x19, x0
	ldr	x25, [x21, #8]
	ldr	w8, [x20]
	stp	x24, x22, [sp, #8]
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_IWL_DEBUG_MAC80211
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _NL80211_IFTYPE_STATION@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NL80211_IFTYPE_STATION@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
Lloh5:
	adrp	x8, _IEEE80211_STA_NOTEXIST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IEEE80211_STA_NOTEXIST@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _IEEE80211_STA_NONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IEEE80211_STA_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w24
	ccmp	w9, w22, #0, eq
	b.eq	LBB0_8
; %bb.2:
	cmp	w9, w24
	ccmp	w8, w22, #0, eq
	b.eq	LBB0_12
; %bb.3:
Lloh11:
	adrp	x8, _IEEE80211_STA_AUTH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IEEE80211_STA_AUTH@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _IEEE80211_STA_ASSOC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IEEE80211_STA_ASSOC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w24
	ccmp	w9, w22, #0, eq
	b.ne	LBB0_7
; %bb.4:
	ldr	w1, [x25]
	mov	x0, x19
	mov	x2, x20
	bl	_iwl_sta_update_ht
	mov	x21, x0
	cbnz	w0, LBB0_13
	b	LBB0_11
LBB0_5:
Lloh17:
	adrp	x8, _IEEE80211_STA_AUTH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IEEE80211_STA_AUTH@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _IEEE80211_STA_ASSOC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _IEEE80211_STA_ASSOC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w24
	ccmp	w9, w22, #0, eq
	b.eq	LBB0_10
; %bb.6:
	cmp	w9, w24
	ccmp	w8, w22, #0, eq
	b.eq	LBB0_12
LBB0_7:
	mov	w21, #0
	b	LBB0_13
LBB0_8:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_iwlagn_mac_sta_add
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.9:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_bh
Lloh23:
	adrp	x8, _IWL_STA_UCODE_INPROGRESS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IWL_STA_UCODE_INPROGRESS@GOTPAGEOFF]
Lloh25:
	ldr	w22, [x8]
	ldr	x23, [x19, #8]
	mov	x0, x20
	bl	_iwl_sta_id
	lsl	x8, x0, #2
	ldr	w9, [x23, x8]
	bic	w9, w9, w22
	str	w9, [x23, x8]
	mov	x0, x21
	bl	_spin_unlock_bh
	mov	w21, #0
	b	LBB0_13
LBB0_10:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_iwlagn_mac_sta_add
	mov	x21, x0
	cbnz	w0, LBB0_13
LBB0_11:
	ldr	w2, [x20]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_INFO
	mov	x0, x20
	bl	_iwl_sta_id
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_iwl_rs_rate_init
	b	LBB0_13
LBB0_12:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_iwlagn_mac_sta_remove
	mov	x21, x0
LBB0_13:
	mov	x0, x19
	bl	_iwl_is_rfkill
	cmp	x0, #0
	csel	w20, w21, wzr, eq
	mov	x0, x19
	bl	_mutex_unlock
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_IWL_DEBUG_MAC80211
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"station %pM state change %d->%d\n"

	.comm	_NL80211_IFTYPE_STATION,8,3     ; @NL80211_IFTYPE_STATION
	.comm	_IEEE80211_STA_NOTEXIST,4,2     ; @IEEE80211_STA_NOTEXIST
	.comm	_IEEE80211_STA_NONE,4,2         ; @IEEE80211_STA_NONE
	.comm	_IEEE80211_STA_AUTH,4,2         ; @IEEE80211_STA_AUTH
	.comm	_IEEE80211_STA_ASSOC,4,2        ; @IEEE80211_STA_ASSOC
	.comm	_IWL_STA_UCODE_INPROGRESS,4,2   ; @IWL_STA_UCODE_INPROGRESS
l_.str.1:                               ; @.str.1
	.asciz	"Initializing rate scaling for station %pM\n"

l_.str.2:                               ; @.str.2
	.asciz	"leave\n"

	.no_dead_strip	_iwlagn_mac_sta_state
.subsections_via_symbols
