	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlcore_op_set_key
_wlcore_op_set_key:                     ## @wlcore_op_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	%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
	movq	%r8, %r15
	movq	%rcx, %r13
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	(%r8), %rax
	movq	_WL1271_CIPHER_SUITE_GEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_WLAN_CIPHER_SUITE_TKIP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movq	(%rdi), %rbx
	sete	%r12b
	orb	%cl, %r12b
	cmpb	$1, %r12b
	jne	LBB0_2
## %bb.1:
	movq	_WLCORE_QUEUE_STOP_REASON_SPARE_BLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wlcore_stop_queues
	movq	%rbx, %rdi
	callq	_wl1271_tx_flush
LBB0_2:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_WLCORE_STATE_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	testb	%r12b, %r12b
	jne	LBB0_8
	jmp	LBB0_9
LBB0_4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	12(%rbx), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, %r8
	callq	_wlcore_hw_set_key
	movl	%eax, %r13d
	movl	12(%rbx), %edi
	callq	_pm_runtime_mark_last_busy
	movl	12(%rbx), %edi
	callq	_pm_runtime_put_autosuspend
	testb	%r12b, %r12b
	je	LBB0_9
LBB0_8:
	movq	_WLCORE_QUEUE_STOP_REASON_SPARE_BLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wlcore_wake_queues
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%eax, %r13d
	movl	12(%rbx), %edi
	callq	_pm_runtime_put_noidle
	testb	%r12b, %r12b
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_WL1271_CIPHER_SUITE_GEM,8,3    ## @WL1271_CIPHER_SUITE_GEM
	.comm	_WLAN_CIPHER_SUITE_TKIP,8,3     ## @WLAN_CIPHER_SUITE_TKIP
	.comm	_WLCORE_QUEUE_STOP_REASON_SPARE_BLK,4,2 ## @WLCORE_QUEUE_STOP_REASON_SPARE_BLK
	.comm	_WLCORE_STATE_ON,8,3            ## @WLCORE_STATE_ON
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_wlcore_op_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlcore_op_set_key
_wlcore_op_set_key:                     ; @wlcore_op_set_key
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	ldr	x8, [x4]
Lloh0:
	adrp	x9, _WL1271_CIPHER_SUITE_GEM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WL1271_CIPHER_SUITE_GEM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _WLAN_CIPHER_SUITE_TKIP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WLAN_CIPHER_SUITE_TKIP@GOTPAGEOFF]
	ldr	x19, [x0]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w27, eq
Lloh6:
	adrp	x26, _WLCORE_QUEUE_STOP_REASON_SPARE_BLK@GOTPAGE
Lloh7:
	ldr	x26, [x26, _WLCORE_QUEUE_STOP_REASON_SPARE_BLK@GOTPAGEOFF]
	b.ne	LBB0_2
; %bb.1:
	ldr	w1, [x26]
	mov	x0, x19
	bl	_wlcore_stop_queues
	mov	x0, x19
	bl	_wl1271_tx_flush
LBB0_2:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _WLCORE_STATE_ON@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WLCORE_STATE_ON@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w25, w8
	cbnz	w27, LBB0_6
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	bl	_wlcore_hw_set_key
	mov	x25, x0
	ldr	w0, [x19, #12]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_autosuspend
	cbz	w27, LBB0_7
LBB0_6:
	ldr	w1, [x26]
	mov	x0, x19
	bl	_wlcore_wake_queues
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x25, x0
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_noidle
	cbnz	w27, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_WL1271_CIPHER_SUITE_GEM,8,3    ; @WL1271_CIPHER_SUITE_GEM
	.comm	_WLAN_CIPHER_SUITE_TKIP,8,3     ; @WLAN_CIPHER_SUITE_TKIP
	.comm	_WLCORE_QUEUE_STOP_REASON_SPARE_BLK,4,2 ; @WLCORE_QUEUE_STOP_REASON_SPARE_BLK
	.comm	_WLCORE_STATE_ON,8,3            ; @WLCORE_STATE_ON
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_wlcore_op_set_key
.subsections_via_symbols
