	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7603_set_key
_mt7603_set_key:                        ## @mt7603_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	(%rcx), %r14
	jmp	LBB0_3
LBB0_2:
	movq	8(%rdx), %r14
LBB0_3:
	movl	4(%rbx), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_13
## %bb.4:
	movq	(%rdi), %r15
	movl	(%rbx), %eax
	movq	(%rdx), %rcx
	movq	_NL80211_IFTYPE_ADHOC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_6
## %bb.5:
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
LBB0_6:
	movq	_IEEE80211_KEY_FLAG_PAIRWISE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rbx)
	je	LBB0_13
LBB0_7:
	movq	_SET_KEY@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jne	LBB0_9
## %bb.8:
	movl	4(%r14), %ecx
	movl	%ecx, 12(%rbx)
	movl	%eax, (%r14)
	jmp	LBB0_12
LBB0_13:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	(%r14), %eax
	jne	LBB0_11
## %bb.10:
	movl	$-1, (%r14)
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_mt76_wcid_key_setup
	movl	4(%r14), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7603_wtbl_set_key            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.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	_SET_KEY,4,2                    ## @SET_KEY
	.no_dead_strip	_mt7603_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7603_set_key
_mt7603_set_key:                        ; @mt7603_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
	cbz	x3, LBB0_2
; %bb.1:
	ldr	x20, [x3]
	b	LBB0_3
LBB0_2:
	ldr	x20, [x2, #8]
LBB0_3:
	ldr	w8, [x19, #4]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.4:
	ldr	x21, [x0]
	ldr	w8, [x19]
	ldr	x9, [x2]
Lloh0:
	adrp	x10, _NL80211_IFTYPE_ADHOC@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NL80211_IFTYPE_ADHOC@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
Lloh3:
	adrp	x11, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w9, [x19, #8]
Lloh6:
	adrp	x10, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IEEE80211_KEY_FLAG_PAIRWISE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_8
LBB0_6:
Lloh9:
	adrp	x9, _SET_KEY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SET_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w9, w1
	b.ne	LBB0_9
; %bb.7:
	ldr	w9, [x20, #4]
	str	w9, [x19, #12]
	b	LBB0_11
LBB0_8:
Lloh12:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh14:
	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
LBB0_9:
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.10:
	mov	x19, #0
	mov	w8, #-1
LBB0_11:
	str	w8, [x20]
	b	LBB0_13
LBB0_12:
	mov	x19, #0
LBB0_13:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_mt76_wcid_key_setup
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	x2, x19
	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	_mt7603_wtbl_set_key
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.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	_SET_KEY,4,2                    ; @SET_KEY
	.no_dead_strip	_mt7603_set_key
.subsections_via_symbols
