	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7615_set_key
_mt7615_set_key:                        ## @mt7615_set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%esi, %r14d
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	(%rcx), %r15
	jmp	LBB0_3
LBB0_2:
	movq	8(%rdx), %r15
LBB0_3:
	movq	(%rdi), %r12
	movl	(%rbx), %eax
	movl	4(%rbx), %ecx
	movq	(%rdx), %rdx
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_5
## %bb.4:
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_5
LBB0_9:
	leal	-128(%rcx), %edx
	cmpl	$8, %edx
	jb	LBB0_12
## %bb.10:
	cmpl	$136, %ecx
	je	LBB0_11
	jmp	LBB0_17
LBB0_5:
	leal	-128(%rcx), %edx
	cmpl	$8, %edx
	ja	LBB0_17
## %bb.6:
	movl	$123, %esi
	btl	%edx, %esi
	jb	LBB0_12
## %bb.7:
	movl	$132, %esi
	btl	%edx, %esi
	jae	LBB0_11
## %bb.8:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rbx)
	jne	LBB0_9
LBB0_17:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_IEEE80211_KEY_FLAG_GENERATE_MMIE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 8(%rbx)
LBB0_12:
	movq	_SET_KEY@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_14
## %bb.13:
	movl	4(%r15), %edx
	movl	%edx, 12(%rbx)
	movl	%eax, (%r15)
	jmp	LBB0_16
LBB0_14:
	cmpl	(%r15), %eax
	jne	LBB0_16
## %bb.15:
	movl	$-1, (%r15)
LBB0_16:
	xorl	%edx, %edx
	cmpl	%r14d, (%rcx)
	cmoveq	%rbx, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mt76_wcid_key_setup
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7615_mac_wtbl_set_key        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ## @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ## @NL80211_IFTYPE_MESH_POINT
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ## @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIE,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_MMIE
	.comm	_SET_KEY,4,2                    ## @SET_KEY
	.no_dead_strip	_mt7615_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7615_set_key
_mt7615_set_key:                        ; @mt7615_set_key
	.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, x4
	mov	x20, x1
	cbz	x3, LBB0_2
; %bb.1:
	ldr	x21, [x3]
	b	LBB0_3
LBB0_2:
	ldr	x21, [x2, #8]
LBB0_3:
	ldr	x22, [x0]
	ldr	x10, [x2]
Lloh0:
	adrp	x8, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh2:
	adrp	x9, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x8]
Lloh5:
	ldr	x12, [x9]
	ldp	w8, w9, [x19]
	cmp	x10, x11
	ccmp	x10, x12, #4, ne
	b.ne	LBB0_8
; %bb.4:
	sub	w10, w9, #128
	cmp	w10, #8
	b.hi	LBB0_17
; %bb.5:
	mov	w11, #1
	lsl	w10, w11, w10
	mov	w11, #123
	tst	w10, w11
	b.ne	LBB0_9
; %bb.6:
	mov	w11, #132
	tst	w10, w11
	b.eq	LBB0_16
; %bb.7:
	ldr	w10, [x19, #8]
Lloh6:
	adrp	x11, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_17
LBB0_8:
	sub	w10, w9, #128
	cmp	w10, #8
	b.hs	LBB0_15
LBB0_9:
Lloh9:
	adrp	x9, _SET_KEY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SET_KEY@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, w20
	b.ne	LBB0_11
; %bb.10:
	ldr	w10, [x21, #4]
	str	w10, [x19, #12]
	b	LBB0_13
LBB0_11:
	ldr	w10, [x21]
	cmp	w8, w10
	b.ne	LBB0_14
; %bb.12:
	mov	w8, #-1
LBB0_13:
	str	w8, [x21]
LBB0_14:
	ldr	w8, [x9]
	cmp	w8, w20
	csel	x2, x19, xzr, eq
	mov	x0, x22
	mov	x1, x21
	bl	_mt76_wcid_key_setup
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	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
	b	_mt7615_mac_wtbl_set_key
LBB0_15:
	cmp	w9, #136
	b.ne	LBB0_17
LBB0_16:
Lloh11:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_MMIE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_MMIE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldr	w10, [x19, #8]
	orr	w9, w10, w9
	str	w9, [x19, #8]
	b	LBB0_9
LBB0_17:
Lloh14:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_IFTYPE_ADHOC,8,3       ; @NL80211_IFTYPE_ADHOC
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ; @NL80211_IFTYPE_MESH_POINT
	.comm	_IEEE80211_KEY_FLAG_PAIRWISE,4,2 ; @IEEE80211_KEY_FLAG_PAIRWISE
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_IEEE80211_KEY_FLAG_GENERATE_MMIE,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_MMIE
	.comm	_SET_KEY,4,2                    ; @SET_KEY
	.no_dead_strip	_mt7615_set_key
.subsections_via_symbols
