	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_op_set_default_key_idx
_wl1271_op_set_default_key_idx:         ## @wl1271_op_set_default_key_idx
	.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
	movl	%edx, %ebx
	movq	(%rdi), %r15
	movq	%rsi, %rdi
	callq	_wl12xx_vif_to_data
	movq	%rax, %r12
	movq	_DEBUG_MAC80211@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_wl1271_debug
	cmpl	$-1, %ebx
	je	LBB0_8
## %bb.1:
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r15), %rax
	movq	_WLCORE_STATE_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	movl	12(%r15), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%ebx, (%r12)
	movq	8(%r12), %rax
	movq	_KEY_WEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movl	16(%r12), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_wl12xx_cmd_set_default_wep_key
LBB0_6:
	movl	12(%r15), %edi
	callq	_pm_runtime_mark_last_busy
	movl	12(%r15), %edi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	12(%r15), %edi
	callq	_pm_runtime_put_noidle
LBB0_7:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_MAC80211,4,2             ## @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac80211 set default key idx %d"

	.comm	_WLCORE_STATE_ON,8,3            ## @WLCORE_STATE_ON
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_KEY_WEP,8,3                    ## @KEY_WEP
	.no_dead_strip	_wl1271_op_set_default_key_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_op_set_default_key_idx
_wl1271_op_set_default_key_idx:         ; @wl1271_op_set_default_key_idx
	.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	x21, x2
	ldr	x19, [x0]
	mov	x0, x1
	bl	_wl12xx_vif_to_data
	mov	x22, x0
Lloh0:
	adrp	x8, _DEBUG_MAC80211@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_MAC80211@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_wl1271_debug
	cmn	w21, #1
	b.eq	LBB0_6
; %bb.1:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _WLCORE_STATE_ON@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WLCORE_STATE_ON@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_7
; %bb.3:
	str	w21, [x22]
	ldr	x8, [x22, #8]
Lloh8:
	adrp	x9, _KEY_WEP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _KEY_WEP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w2, [x22, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_wl12xx_cmd_set_default_wep_key
LBB0_5:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_8
LBB0_6:
	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_7:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_noidle
LBB0_8:
	mov	x0, 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	_mutex_unlock
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_MAC80211,4,2             ; @DEBUG_MAC80211
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac80211 set default key idx %d"

	.comm	_WLCORE_STATE_ON,8,3            ; @WLCORE_STATE_ON
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_KEY_WEP,8,3                    ; @KEY_WEP
	.no_dead_strip	_wl1271_op_set_default_key_idx
.subsections_via_symbols
