	.file	"extr_ipw2200.c_ipw_wx_set_rate.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"fixed"
.LC1:
	.string	"sub-rates"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"invalid rate specified, returning error\n"
	.align 8
.LC3:
	.string	"Setting rate mask to 0x%08X [%s]\n"
	.section	.rodata.str1.1
.LC4:
	.string	"Mask set to current mask.\n"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"[re]association triggered due to rates change.\n"
	.text
	.p2align 4
	.type	ipw_wx_set_rate, @function
ipw_wx_set_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdx
	call	libipw_priv@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR [rbx]
	cmp	eax, -1
	je	.L88
	mov	edx, DWORD PTR 4[rbx]
	cmp	eax, 1000000
	je	.L38
	test	edx, edx
	je	.L38
	cmp	eax, 2000000
	je	.L8
	cmp	eax, 5500000
	je	.L9
	cmp	eax, 6000000
	je	.L10
	cmp	eax, 9000000
	je	.L11
	cmp	eax, 11000000
	je	.L12
	cmp	eax, 12000000
	je	.L13
	cmp	eax, 18000000
	je	.L14
	cmp	eax, 24000000
	je	.L15
	cmp	eax, 36000000
	je	.L16
	cmp	eax, 48000000
	je	.L17
	cmp	eax, 54000000
	jne	.L19
	mov	ecx, DWORD PTR LIBIPW_OFDM_RATE_54MB_MASK[rip]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L25:
	or	ebx, ecx
	.p2align 4,,10
	.p2align 3
.L6:
	test	edx, edx
	lea	rax, .LC1[rip]
	lea	rdx, .LC0[rip]
	cmove	rdx, rax
.L3:
	mov	esi, ebx
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	IPW_DEBUG_WX@PLT
	lea	r12, 4[rbp]
	mov	rdi, r12
	call	mutex_lock@PLT
	cmp	DWORD PTR LIBIPW_DEFAULT_RATES_MASK[rip], ebx
	mov	eax, DWORD PTR CFG_FIXED_RATE[rip]
	je	.L89
	or	DWORD PTR 8[rbp], eax
.L22:
	cmp	DWORD PTR 0[rbp], ebx
	je	.L90
	mov	DWORD PTR 0[rbp], ebx
	lea	rdi, .LC5[rip]
	call	IPW_DEBUG_ASSOC@PLT
	mov	rdi, rbp
	call	ipw_disassociate@PLT
	test	eax, eax
	je	.L91
.L24:
	mov	rdi, r12
	call	mutex_unlock@PLT
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	ebx, DWORD PTR LIBIPW_CCK_RATE_1MB_MASK[rip]
	cmp	eax, 1000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_CCK_RATE_2MB_MASK[rip]
	cmp	eax, 2000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_CCK_RATE_5MB_MASK[rip]
	cmp	eax, 5500000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_6MB_MASK[rip]
	cmp	eax, 6000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_9MB_MASK[rip]
	cmp	eax, 9000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_CCK_RATE_11MB_MASK[rip]
	cmp	eax, 11000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_12MB_MASK[rip]
	cmp	eax, 12000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_18MB_MASK[rip]
	cmp	eax, 18000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_24MB_MASK[rip]
	cmp	eax, 24000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_36MB_MASK[rip]
	cmp	eax, 36000000
	je	.L6
	or	ebx, DWORD PTR LIBIPW_OFDM_RATE_48MB_MASK[rip]
	cmp	eax, 48000000
	je	.L6
	mov	ecx, DWORD PTR LIBIPW_OFDM_RATE_54MB_MASK[rip]
	cmp	eax, 54000000
	je	.L25
.L19:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	IPW_DEBUG_WX@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L91:
	mov	rdi, rbp
	call	ipw_associate@PLT
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L88:
	mov	ebx, DWORD PTR LIBIPW_DEFAULT_RATES_MASK[rip]
	lea	rdx, .LC1[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L90:
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	IPW_DEBUG_WX@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L89:
	.cfi_restore_state
	not	eax
	and	DWORD PTR 8[rbp], eax
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, rbp
	mov	esi, DWORD PTR [rax]
	call	ipw_set_fixed_rate@PLT
	jmp	.L22
.L8:
	mov	ebx, DWORD PTR LIBIPW_CCK_RATE_2MB_MASK[rip]
.L36:
	lea	rdx, .LC0[rip]
	jmp	.L3
.L9:
	mov	ebx, DWORD PTR LIBIPW_CCK_RATE_5MB_MASK[rip]
	jmp	.L36
.L10:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_6MB_MASK[rip]
	jmp	.L36
.L14:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_18MB_MASK[rip]
	jmp	.L36
.L13:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_12MB_MASK[rip]
	jmp	.L36
.L12:
	mov	ebx, DWORD PTR LIBIPW_CCK_RATE_11MB_MASK[rip]
	jmp	.L36
.L11:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_9MB_MASK[rip]
	jmp	.L36
.L16:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_36MB_MASK[rip]
	jmp	.L36
.L15:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_24MB_MASK[rip]
	jmp	.L36
.L17:
	mov	ebx, DWORD PTR LIBIPW_OFDM_RATE_48MB_MASK[rip]
	jmp	.L36
	.cfi_endproc
.LFE0:
	.size	ipw_wx_set_rate, .-ipw_wx_set_rate
	.comm	LIBIPW_OFDM_RATE_9MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_6MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_54MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_48MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_36MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_24MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_18MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_12MB_MASK,4,4
	.comm	LIBIPW_DEFAULT_RATES_MASK,4,4
	.comm	LIBIPW_CCK_RATE_5MB_MASK,4,4
	.comm	LIBIPW_CCK_RATE_2MB_MASK,4,4
	.comm	LIBIPW_CCK_RATE_1MB_MASK,4,4
	.comm	LIBIPW_CCK_RATE_11MB_MASK,4,4
	.comm	EINVAL,4,4
	.comm	CFG_FIXED_RATE,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_rate.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"fixed\000"
	.align	2
.LC1:
	.ascii	"sub-rates\000"
	.align	2
.LC2:
	.ascii	"invalid rate specified, returning error\012\000"
	.align	2
.LC3:
	.ascii	"Setting rate mask to 0x%08X [%s]\012\000"
	.align	2
.LC4:
	.ascii	"Mask set to current mask.\012\000"
	.align	2
.LC5:
	.ascii	"[re]association triggered due to rates change.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipw_wx_set_rate, %function
ipw_wx_set_rate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	bl	libipw_priv
	ldr	r3, [r5]
	mov	r4, r0
	cmn	r3, #1
	beq	.L50
	ldr	r0, [r5, #4]
	ldr	r1, .L54
	cmp	r0, #0
	cmpne	r3, r1
	bne	.L4
	ldr	r2, .L54+4
	cmp	r3, r1
	ldr	r5, [r2]
	beq	.L5
	ldr	r2, .L54+8
	ldr	r1, .L54+12
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+16
	ldr	r1, .L54+20
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+24
	ldr	r1, .L54+28
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+32
	ldr	r1, .L54+36
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+40
	ldr	r1, .L54+44
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+48
	ldr	r1, .L54+52
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+56
	ldr	r1, .L54+60
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+64
	ldr	r1, .L54+68
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+72
	ldr	r1, .L54+76
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r2, .L54+80
	ldr	r1, .L54+84
	ldr	r2, [r2]
	cmp	r3, r1
	orr	r5, r5, r2
	beq	.L5
	ldr	r1, .L54+88
	ldr	r2, .L54+92
	cmp	r3, r1
	ldr	r3, [r2]
	beq	.L24
.L18:
	ldr	r0, .L54+96
	bl	IPW_DEBUG_WX
	ldr	r3, .L54+100
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r2, .L54+12
	cmp	r3, r2
	beq	.L7
	ldr	r2, .L54+20
	cmp	r3, r2
	beq	.L8
	add	r2, r2, #499712
	add	r2, r2, #288
	cmp	r3, r2
	beq	.L9
	add	r2, r2, #2998272
	add	r2, r2, #1728
	cmp	r3, r2
	beq	.L10
	ldr	r2, .L54+44
	cmp	r3, r2
	beq	.L11
	ldr	r2, .L54+52
	cmp	r3, r2
	beq	.L12
	ldr	r2, .L54+60
	cmp	r3, r2
	beq	.L13
	ldr	r2, .L54+68
	cmp	r3, r2
	beq	.L14
	add	r2, r2, #11993088
	add	r2, r2, #6912
	cmp	r3, r2
	beq	.L15
	ldr	r2, .L54+84
	cmp	r3, r2
	beq	.L16
	ldr	r2, .L54+88
	cmp	r3, r2
	bne	.L18
	mov	r5, #0
	ldr	r3, .L54+92
	ldr	r3, [r3]
.L24:
	orr	r5, r5, r3
.L5:
	ldr	r3, .L54+104
	cmp	r0, #0
	ldr	r2, .L54+108
	moveq	r2, r3
	ldr	r7, .L54+112
.L3:
	mov	r1, r5
	ldr	r0, .L54+116
	add	r6, r4, #4
	bl	IPW_DEBUG_WX
	mov	r0, r6
	bl	mutex_lock
	ldr	r3, [r7]
	ldr	r2, .L54+120
	cmp	r3, r5
	ldr	r3, [r4, #8]
	beq	.L51
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r4, #8]
.L21:
	ldr	r3, [r4]
	cmp	r3, r5
	beq	.L52
	ldr	r0, .L54+124
	str	r5, [r4]
	bl	IPW_DEBUG_ASSOC
	mov	r0, r4
	bl	ipw_disassociate
	cmp	r0, #0
	beq	.L53
.L23:
	mov	r0, r6
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L53:
	mov	r0, r4
	bl	ipw_associate
	b	.L23
.L50:
	ldr	r7, .L54+112
	ldr	r2, .L54+104
	ldr	r5, [r7]
	b	.L3
.L52:
	ldr	r0, .L54+128
	bl	IPW_DEBUG_WX
	mov	r0, r6
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L51:
	ldr	r1, [r2]
	ldr	r2, [r4, #12]
	bic	r3, r3, r1
	mov	r0, r4
	ldr	r1, [r2]
	str	r3, [r4, #8]
	bl	ipw_set_fixed_rate
	b	.L21
.L9:
	ldr	r3, .L54+24
	ldr	r5, [r3]
.L35:
	ldr	r2, .L54+108
	ldr	r7, .L54+112
	b	.L3
.L7:
	ldr	r3, .L54+8
	ldr	r5, [r3]
	b	.L35
.L8:
	ldr	r3, .L54+16
	ldr	r5, [r3]
	b	.L35
.L13:
	ldr	r3, .L54+56
	ldr	r5, [r3]
	b	.L35
.L12:
	ldr	r3, .L54+48
	ldr	r5, [r3]
	b	.L35
.L11:
	ldr	r3, .L54+40
	ldr	r5, [r3]
	b	.L35
.L10:
	ldr	r3, .L54+32
	ldr	r5, [r3]
	b	.L35
.L15:
	ldr	r3, .L54+72
	ldr	r5, [r3]
	b	.L35
.L14:
	ldr	r3, .L54+64
	ldr	r5, [r3]
	b	.L35
.L16:
	ldr	r3, .L54+80
	ldr	r5, [r3]
	b	.L35
.L55:
	.align	2
.L54:
	.word	1000000
	.word	LIBIPW_CCK_RATE_1MB_MASK
	.word	LIBIPW_CCK_RATE_2MB_MASK
	.word	2000000
	.word	LIBIPW_CCK_RATE_5MB_MASK
	.word	5500000
	.word	LIBIPW_OFDM_RATE_6MB_MASK
	.word	6000000
	.word	LIBIPW_OFDM_RATE_9MB_MASK
	.word	9000000
	.word	LIBIPW_CCK_RATE_11MB_MASK
	.word	11000000
	.word	LIBIPW_OFDM_RATE_12MB_MASK
	.word	12000000
	.word	LIBIPW_OFDM_RATE_18MB_MASK
	.word	18000000
	.word	LIBIPW_OFDM_RATE_24MB_MASK
	.word	24000000
	.word	LIBIPW_OFDM_RATE_36MB_MASK
	.word	36000000
	.word	LIBIPW_OFDM_RATE_48MB_MASK
	.word	48000000
	.word	54000000
	.word	LIBIPW_OFDM_RATE_54MB_MASK
	.word	.LC2
	.word	EINVAL
	.word	.LC1
	.word	.LC0
	.word	LIBIPW_DEFAULT_RATES_MASK
	.word	.LC3
	.word	CFG_FIXED_RATE
	.word	.LC5
	.word	.LC4
	.size	ipw_wx_set_rate, .-ipw_wx_set_rate
	.comm	LIBIPW_OFDM_RATE_9MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_6MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_54MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_48MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_36MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_24MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_18MB_MASK,4,4
	.comm	LIBIPW_OFDM_RATE_12MB_MASK,4,4
	.comm	LIBIPW_DEFAULT_RATES_MASK,4,4
	.comm	LIBIPW_CCK_RATE_5MB_MASK,4,4
	.comm	LIBIPW_CCK_RATE_2MB_MASK,4,4
	.comm	LIBIPW_CCK_RATE_1MB_MASK,4,4
	.comm	LIBIPW_CCK_RATE_11MB_MASK,4,4
	.comm	EINVAL,4,4
	.comm	CFG_FIXED_RATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
