	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_sta_set_txpwr
_ath10k_sta_set_txpwr:                  ## @ath10k_sta_set_txpwr
	.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	%rdx, %r15
	movq	(%rdi), %r14
	movq	(%rsi), %r12
	movq	8(%rdx), %rax
	movq	_NL80211_TX_POWER_AUTOMATIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
LBB0_7:
	movq	16(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
LBB0_2:
	movq	_ATH10K_TX_POWER_MAX_VAL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jg	LBB0_8
## %bb.3:
	movq	_ATH10K_TX_POWER_MIN_VAL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jl	LBB0_8
## %bb.4:
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	_WMI_PEER_USE_FIXED_PWR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %r8
	callq	_ath10k_wmi_peer_set_param
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_ath10k_warn
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NL80211_TX_POWER_AUTOMATIC,8,3 ## @NL80211_TX_POWER_AUTOMATIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATH10K_TX_POWER_MAX_VAL,8,3    ## @ATH10K_TX_POWER_MAX_VAL
	.comm	_ATH10K_TX_POWER_MIN_VAL,8,3    ## @ATH10K_TX_POWER_MIN_VAL
	.comm	_WMI_PEER_USE_FIXED_PWR,4,2     ## @WMI_PEER_USE_FIXED_PWR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set tx power for station ret: %d\n"

	.no_dead_strip	_ath10k_sta_set_txpwr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_sta_set_txpwr
_ath10k_sta_set_txpwr:                  ; @ath10k_sta_set_txpwr
	.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	x20, x2
	ldr	x19, [x0]
	ldr	x22, [x1]
	ldr	x8, [x2, #8]
Lloh0:
	adrp	x9, _NL80211_TX_POWER_AUTOMATIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_TX_POWER_AUTOMATIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x21, #0
	b	LBB0_3
LBB0_2:
	ldr	x21, [x20, #16]
	cbz	x21, LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _ATH10K_TX_POWER_MAX_VAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH10K_TX_POWER_MAX_VAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _ATH10K_TX_POWER_MIN_VAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATH10K_TX_POWER_MIN_VAL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x21, x8
	ccmp	x21, x9, #8, le
	b.ge	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w1, [x22]
	ldr	w2, [x20]
Lloh12:
	adrp	x8, _WMI_PEER_USE_FIXED_PWR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WMI_PEER_USE_FIXED_PWR@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x4, x21
	bl	_ath10k_wmi_peer_set_param
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.6:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_ath10k_warn
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NL80211_TX_POWER_AUTOMATIC,8,3 ; @NL80211_TX_POWER_AUTOMATIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATH10K_TX_POWER_MAX_VAL,8,3    ; @ATH10K_TX_POWER_MAX_VAL
	.comm	_ATH10K_TX_POWER_MIN_VAL,8,3    ; @ATH10K_TX_POWER_MIN_VAL
	.comm	_WMI_PEER_USE_FIXED_PWR,4,2     ; @WMI_PEER_USE_FIXED_PWR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set tx power for station ret: %d\n"

	.no_dead_strip	_ath10k_sta_set_txpwr
.subsections_via_symbols
