	.file	"extr_ipw2200.c_ipw_wx_set_txpow.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ipw_wx_set_txpow, @function
ipw_wx_set_txpow:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	libipw_priv@PLT
	lea	r13, 8[rax]
	mov	rbp, rax
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	esi, DWORD PTR 20[rbx]
	mov	rdi, rbp
	call	ipw_radio_kill_sw@PLT
	mov	r12d, DWORD PTR EINPROGRESS[rip]
	neg	r12d
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR 16[rbx]
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR IPW_TX_POWER_DEFAULT[rip]
	mov	QWORD PTR [rbx], rax
.L4:
	mov	rax, QWORD PTR IW_TXPOW_DBM[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L5
.L6:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L3:
	mov	rdi, r13
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR IPW_TX_POWER_MAX[rip]
	jg	.L6
	cmp	rax, QWORD PTR IPW_TX_POWER_MIN[rip]
	jl	.L6
	mov	QWORD PTR 0[rbp], rax
	mov	rdi, rbp
	call	ipw_set_tx_power@PLT
	mov	r12d, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	ipw_wx_set_txpow, .-ipw_wx_set_txpow
	.comm	IW_TXPOW_DBM,8,8
	.comm	IPW_TX_POWER_MIN,8,8
	.comm	IPW_TX_POWER_MAX,8,8
	.comm	IPW_TX_POWER_DEFAULT,8,8
	.comm	EINVAL,4,4
	.comm	EINPROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ipw2200.c_ipw_wx_set_txpow.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipw_wx_set_txpow, %function
ipw_wx_set_txpow:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r2
	bl	libipw_priv
	mov	r5, r0
	add	r6, r0, #4
	mov	r0, r6
	bl	mutex_lock
	mov	r0, r5
	ldr	r1, [r4, #12]
	bl	ipw_radio_kill_sw
	cmp	r0, #0
	bne	.L9
	ldr	r3, [r4, #8]
	ldr	r2, [r4, #4]
	cmp	r3, #0
	ldreq	r3, .L10
	ldreq	r3, [r3]
	streq	r3, [r4]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L5
.L6:
	ldr	r3, .L10+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L3:
	mov	r0, r6
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r2, .L10+12
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	bgt	.L6
	ldr	r2, .L10+16
	ldr	r2, [r2]
	cmp	r3, r2
	blt	.L6
	mov	r0, r5
	str	r3, [r5]
	bl	ipw_set_tx_power
	mov	r4, r0
	b	.L3
.L9:
	ldr	r3, .L10+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L3
.L11:
	.align	2
.L10:
	.word	IPW_TX_POWER_DEFAULT
	.word	IW_TXPOW_DBM
	.word	EINVAL
	.word	IPW_TX_POWER_MAX
	.word	IPW_TX_POWER_MIN
	.word	EINPROGRESS
	.size	ipw_wx_set_txpow, .-ipw_wx_set_txpow
	.comm	IW_TXPOW_DBM,4,4
	.comm	IPW_TX_POWER_MIN,4,4
	.comm	IPW_TX_POWER_MAX,4,4
	.comm	IPW_TX_POWER_DEFAULT,4,4
	.comm	EINVAL,4,4
	.comm	EINPROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
