	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_wx_set_txpow
_ipw2100_wx_set_txpow:                  ## @ipw2100_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	callq	_libipw_priv
	movq	%rax, %r15
	movl	20(%r12), %esi
	movq	%rax, %rdi
	callq	_ipw_radio_kill_sw
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINPROGRESS@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	_IW_MODE_ADHOC@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.4:
	movq	_IW_TXPOW_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12), %eax
	movq	_IW_TXPOW_DBM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.6:
	movq	%r15, %r14
	cmpq	$0, 8(%r12)
	je	LBB0_7
## %bb.8:
	movl	16(%r12), %r12d
	movq	_IPW_TX_POWER_MIN_DBM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_5
## %bb.9:
	movq	_IPW_TX_POWER_MAX_DBM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_10
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_IPW_TX_POWER_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_10:
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_STATUS_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.12:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_ipw2100_set_tx_power
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_IPW_DEBUG_WX
	jmp	LBB0_13
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINPROGRESS,4,2                ## @EINPROGRESS
	.comm	_IW_MODE_ADHOC,8,3              ## @IW_MODE_ADHOC
	.comm	_IW_TXPOW_TYPE,4,2              ## @IW_TXPOW_TYPE
	.comm	_IW_TXPOW_DBM,4,2               ## @IW_TXPOW_DBM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPW_TX_POWER_DEFAULT,4,2       ## @IPW_TX_POWER_DEFAULT
	.comm	_IPW_TX_POWER_MIN_DBM,4,2       ## @IPW_TX_POWER_MIN_DBM
	.comm	_IPW_TX_POWER_MAX_DBM,4,2       ## @IPW_TX_POWER_MAX_DBM
	.comm	_STATUS_INITIALIZED,4,2         ## @STATUS_INITIALIZED
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SET TX Power -> %d\n"

	.no_dead_strip	_ipw2100_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 ipw2100_wx_set_txpow
_ipw2100_wx_set_txpow:                  ; @ipw2100_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	x20, x2
	bl	_libipw_priv
	mov	x19, x0
	ldr	w1, [x20, #20]
	bl	_ipw_radio_kill_sw
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINPROGRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINPROGRESS@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_14
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _IW_MODE_ADHOC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IW_MODE_ADHOC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _IW_TXPOW_TYPE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IW_TXPOW_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _IW_TXPOW_DBM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IW_TXPOW_DBM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.5:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
; %bb.6:
	ldr	w20, [x20, #16]
Lloh11:
	adrp	x8, _IPW_TX_POWER_MIN_DBM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IPW_TX_POWER_MIN_DBM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _IPW_TX_POWER_MAX_DBM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IPW_TX_POWER_MAX_DBM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w20, w8
	ccmp	w20, w9, #0, ge
	b.le	LBB0_10
LBB0_7:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	mov	w19, #0
	b	LBB0_14
LBB0_9:
Lloh19:
	adrp	x8, _IPW_TX_POWER_DEFAULT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IPW_TX_POWER_DEFAULT@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
LBB0_10:
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	w8, [x19]
Lloh22:
	adrp	x9, _STATUS_INITIALIZED@GOTPAGE
Lloh23:
	ldr	x9, [x9, _STATUS_INITIALIZED@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	_ipw2100_set_tx_power
	mov	x19, x0
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_IPW_DEBUG_WX
	b	LBB0_13
LBB0_12:
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_13:
	mov	x0, x21
	bl	_mutex_unlock
LBB0_14:
	mov	x0, 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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINPROGRESS,4,2                ; @EINPROGRESS
	.comm	_IW_MODE_ADHOC,8,3              ; @IW_MODE_ADHOC
	.comm	_IW_TXPOW_TYPE,4,2              ; @IW_TXPOW_TYPE
	.comm	_IW_TXPOW_DBM,4,2               ; @IW_TXPOW_DBM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPW_TX_POWER_DEFAULT,4,2       ; @IPW_TX_POWER_DEFAULT
	.comm	_IPW_TX_POWER_MIN_DBM,4,2       ; @IPW_TX_POWER_MIN_DBM
	.comm	_IPW_TX_POWER_MAX_DBM,4,2       ; @IPW_TX_POWER_MAX_DBM
	.comm	_STATUS_INITIALIZED,4,2         ; @STATUS_INITIALIZED
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SET TX Power -> %d\n"

	.no_dead_strip	_ipw2100_wx_set_txpow
.subsections_via_symbols
