	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_wx_set_txpow
_ipw_wx_set_txpow:                      ## @ipw_wx_set_txpow
	.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	%rdx, %rbx
	callq	_libipw_priv
	movq	%rax, %r15
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	20(%rbx), %esi
	movq	%r15, %rdi
	callq	_ipw_radio_kill_sw
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	cmpl	$0, 16(%rbx)
	jne	LBB0_5
## %bb.4:
	movq	_IPW_TX_POWER_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_5:
	movq	8(%rbx), %rax
	movq	_IW_TXPOW_DBM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	(%rbx), %rax
	movq	_IPW_TX_POWER_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_6
## %bb.8:
	movq	_IPW_TX_POWER_MIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_6
## %bb.9:
	movq	%rax, (%r15)
	movq	%r15, %rdi
	callq	_ipw_set_tx_power
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_IPW_TX_POWER_DEFAULT,8,3       ## @IPW_TX_POWER_DEFAULT
	.comm	_IW_TXPOW_DBM,8,3               ## @IW_TXPOW_DBM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPW_TX_POWER_MAX,8,3           ## @IPW_TX_POWER_MAX
	.comm	_IPW_TX_POWER_MIN,8,3           ## @IPW_TX_POWER_MIN
	.no_dead_strip	_ipw_wx_set_txpow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_wx_set_txpow
_ipw_wx_set_txpow:                      ; @ipw_wx_set_txpow
	.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
	bl	_libipw_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w1, [x21, #20]
	mov	x0, x20
	bl	_ipw_radio_kill_sw
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	ldr	w8, [x21, #16]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _IPW_TX_POWER_DEFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IPW_TX_POWER_DEFAULT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_4:
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _IW_TXPOW_DBM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IW_TXPOW_DBM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _IPW_TX_POWER_MAX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IPW_TX_POWER_MAX@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _IPW_TX_POWER_MIN@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IPW_TX_POWER_MIN@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #8, le
	b.ge	LBB0_9
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	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
LBB0_9:
	str	x8, [x20]
	mov	x0, x20
	bl	_ipw_set_tx_power
	mov	x20, x0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_IPW_TX_POWER_DEFAULT,8,3       ; @IPW_TX_POWER_DEFAULT
	.comm	_IW_TXPOW_DBM,8,3               ; @IW_TXPOW_DBM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPW_TX_POWER_MAX,8,3           ; @IPW_TX_POWER_MAX
	.comm	_IPW_TX_POWER_MIN,8,3           ; @IPW_TX_POWER_MIN
	.no_dead_strip	_ipw_wx_set_txpow
.subsections_via_symbols
