	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __iwl_mvm_set_sta_key
___iwl_mvm_set_sta_key:                 ## @__iwl_mvm_set_sta_key
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	movl	%r9d, -84(%rbp)                 ## 4-byte Spill
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_iwl_mvm_sta_from_mac80211
	movl	(%rbx), %r10d
LBB0_5:
	movl	(%rax), %r15d
	movl	4(%r13), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_8
## %bb.6:
	cmpl	$2, %eax
	je	LBB0_7
LBB0_8:
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r10
LBB0_9:
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	$0
	callq	_iwl_mvm_send_sta_key
	addq	$32, %rsp
	jmp	LBB0_10
LBB0_2:
	movq	(%r14), %rax
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.3:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_4
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.11:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r10, -104(%rbp)                ## 8-byte Spill
	callq	_iwl_mvm_get_mac_addr
	movq	%rax, %rbx
	leaq	-88(%rbp), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_ieee80211_get_key_rx_seq
	movl	-88(%rbp), %edx
	leaq	-80(%rbp), %r14
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	callq	_ieee80211_get_tkip_rx_p1k
	movl	-88(%rbp), %r8d
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r9
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	jmp	LBB0_9
LBB0_4:
	movl	%r9d, -84(%rbp)                 ## 4-byte Spill
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	movq	%r14, %rdi
	callq	_iwl_mvm_vif_from_mac80211
	xorl	%r10d, %r10d
	jmp	LBB0_5
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_AP,8,3          ## @NL80211_IFTYPE_AP
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find station id\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	___iwl_mvm_set_sta_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __iwl_mvm_set_sta_key
___iwl_mvm_set_sta_key:                 ; @__iwl_mvm_set_sta_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x5
	mov	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	cbz	x2, LBB0_6
; %bb.1:
	mov	x0, x23
	bl	_iwl_mvm_sta_from_mac80211
	ldr	w26, [x23]
LBB0_2:
	ldr	w25, [x0]
	ldr	w8, [x21, #4]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_4
; %bb.3:
	cmp	w8, #2
	b.eq	LBB0_11
LBB0_4:
	str	w26, [sp]
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	mov	x3, x20
	mov	w4, #0
	mov	x5, #0
LBB0_5:
	mov	w6, #0
	mov	x7, x19
	bl	_iwl_mvm_send_sta_key
	b	LBB0_9
LBB0_6:
	ldr	x8, [x24]
Lloh3:
	adrp	x9, _NL80211_IFTYPE_AP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [x21]
Lloh6:
	adrp	x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_8:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_IWL_ERR
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldr	x8, [sp, #40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_iwl_mvm_get_mac_addr
	mov	x23, x0
	add	x2, sp, #16
	mov	x0, x21
	mov	w1, #0
	bl	_ieee80211_get_key_rx_seq
	ldr	w2, [sp, #16]
	add	x3, sp, #20
	mov	x0, x21
	mov	x1, x23
	bl	_ieee80211_get_tkip_rx_p1k
	ldr	w4, [sp, #16]
	str	w26, [sp]
	add	x5, sp, #20
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	mov	x3, x20
	b	LBB0_5
LBB0_12:
	mov	x0, x24
	bl	_iwl_mvm_vif_from_mac80211
	mov	w26, #0
	b	LBB0_2
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_AP,8,3          ; @NL80211_IFTYPE_AP
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find station id\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	___iwl_mvm_set_sta_key
.subsections_via_symbols
