	.file	"extr_rtw_ioctl_set.c_rtw_get_cur_max_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rtw_get_cur_max_rate
	.type	rtw_get_cur_max_rate, @function
rtw_get_cur_max_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 8[rdi]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdi, r12
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR _FW_LINKED[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	call	check_fwstate@PLT
	cmp	eax, 1
	je	.L5
	mov	esi, DWORD PTR WIFI_ADHOC_MASTER_STATE[rip]
	mov	rdi, r12
	call	check_fwstate@PLT
	cmp	eax, 1
	je	.L5
.L14:
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L33
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.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
.L5:
	.cfi_restore_state
	mov	rdi, r12
	call	get_bssid@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	rtw_get_stainfo@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L14
	mov	rdi, rax
	call	query_ra_short_GI@PLT
	mov	edi, DWORD PTR 12[rbx]
	mov	r12, rax
	call	IsSupportedHT@PLT
	test	rax, rax
	jne	.L7
	mov	rdx, QWORD PTR 8[rbp]
	mov	eax, DWORD PTR [rdx]
	test	eax, eax
	je	.L14
	cmp	eax, 255
	setne	sil
	add	rdx, 4
	xor	ecx, ecx
	test	sil, sil
	je	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	and	eax, 127
	cmp	ecx, eax
	cmovl	ecx, eax
	mov	eax, DWORD PTR [rdx]
	add	rdx, 4
	test	eax, eax
	je	.L15
	cmp	eax, 255
	jne	.L11
.L15:
	lea	eax, [rcx+rcx*4]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR HW_VAR_RF_TYPE[rip]
	mov	rdx, rsp
	mov	rdi, rbp
	call	rtw_hal_get_hwreg@PLT
	xor	esi, esi
	mov	ecx, DWORD PTR 8[rbx]
	mov	rdi, QWORD PTR [rsp]
	mov	rax, QWORD PTR CHANNEL_WIDTH_40[rip]
	cmp	QWORD PTR [rbx], rax
	mov	rdx, r12
	sete	sil
	call	rtw_mcs_rate@PLT
	jmp	.L1
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rtw_get_cur_max_rate, .-rtw_get_cur_max_rate
	.comm	_FW_LINKED,4,4
	.comm	WIFI_ADHOC_MASTER_STATE,4,4
	.comm	HW_VAR_RF_TYPE,4,4
	.comm	CHANNEL_WIDTH_40,8,8
	.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_rtw_ioctl_set.c_rtw_get_cur_max_rate.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	rtw_get_cur_max_rate
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtw_get_cur_max_rate, %function
rtw_get_cur_max_rate:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, lr}
	ldr	r2, .L23
	add	r5, r0, #4
	ldr	r1, [r2]
	ldr	r2, .L23+4
	sub	sp, sp, #8
	mov	r4, r0
	mov	r0, r5
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	str	r3, [sp]
	bl	check_fwstate
	cmp	r0, #1
	beq	.L5
	ldr	r3, .L23+8
	mov	r0, r5
	ldr	r1, [r3]
	bl	check_fwstate
	cmp	r0, #1
	beq	.L5
.L3:
	mov	r0, #0
.L1:
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L5:
	mov	r0, r5
	bl	get_bssid
	mov	r1, r0
	mov	r0, r4
	bl	rtw_get_stainfo
	subs	r5, r0, #0
	beq	.L3
	bl	query_ra_short_GI
	mov	r6, r0
	ldr	r0, [r5, #8]
	bl	IsSupportedHT
	cmp	r0, #0
	bne	.L7
	ldr	r1, [r4, #4]
	ldr	r3, [r1]
	cmp	r3, #0
	cmpne	r3, #255
	beq	.L1
.L10:
	and	r2, r3, #127
	ldr	r3, [r1, #4]!
	cmp	r0, r2
	movlt	r0, r2
	cmp	r3, #0
	cmpne	r3, #255
	bne	.L10
	add	r0, r0, r0, lsl #2
	b	.L1
.L7:
	ldr	r3, .L23+12
	mov	r2, sp
	ldr	r1, [r3]
	mov	r0, r4
	bl	rtw_hal_get_hwreg
	ldr	r3, .L23+16
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r2, r6
	sub	r1, r1, r3
	clz	r1, r1
	ldr	r3, [r5, #4]
	ldr	r0, [sp]
	lsr	r1, r1, #5
	bl	rtw_mcs_rate
	b	.L1
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	_FW_LINKED
	.word	.LC0
	.word	WIFI_ADHOC_MASTER_STATE
	.word	HW_VAR_RF_TYPE
	.word	CHANNEL_WIDTH_40
	.size	rtw_get_cur_max_rate, .-rtw_get_cur_max_rate
	.comm	_FW_LINKED,4,4
	.comm	WIFI_ADHOC_MASTER_STATE,4,4
	.comm	HW_VAR_RF_TYPE,4,4
	.comm	CHANNEL_WIDTH_40,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
