	.file	"extr_if_rtwn.c_rtwn_wme_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rtwn_wme_update, @function
rtwn_wme_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbp, QWORD PTR [rdi]
	mov	r15, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	rsi, 20[rsp]
	mov	rbx, QWORD PTR 0[rbp]
	call	ieee80211_wme_ic_getparams@PLT
	mov	rdi, r12
	call	IEEE80211_LOCK@PLT
	mov	rdi, rbp
	call	RTWN_LOCK@PLT
	mov	esi, DWORD PTR 20[rsp]
	mov	edx, 8
	mov	rdi, rbx
	call	memcpy@PLT
	mov	rdi, rbp
	call	RTWN_UNLOCK@PLT
	mov	rdi, r12
	call	IEEE80211_UNLOCK@PLT
	mov	rdi, r12
	call	IEEE80211_GET_SLOTTIME@PLT
	mov	rdi, rbp
	mov	DWORD PTR 8[rsp], eax
	call	RTWN_LOCK@PLT
	mov	r9d, DWORD PTR WME_AC_BE[rip]
	cmp	r9d, DWORD PTR WME_NUM_AC[rip]
	jge	.L2
	movsx	r12, r9d
	mov	DWORD PTR 12[rsp], 0
	lea	rax, [r12+r12*4]
	lea	r14, [rbx+rax*4]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r15
	mov	r13d, DWORD PTR 8[rsp]
	mov	DWORD PTR 4[rsp], r12d
	imul	r13d, DWORD PTR [r14]
	call	IEEE80211_IS_CHAN_5GHZ@PLT
	mov	r10d, DWORD PTR IEEE80211_DUR_OFDM_SIFS[rip]
	mov	esi, DWORD PTR 4[r14]
	test	rax, rax
	mov	edi, DWORD PTR R92C_EDCA_PARAM_TXOP[rip]
	cmove	r10d, DWORD PTR IEEE80211_DUR_SIFS[rip]
	add	r13d, r10d
	call	SM@PLT
	mov	esi, DWORD PTR 8[r14]
	mov	edi, DWORD PTR R92C_EDCA_PARAM_ECWMIN[rip]
	mov	ebx, eax
	call	SM@PLT
	mov	esi, DWORD PTR 12[r14]
	mov	edi, DWORD PTR R92C_EDCA_PARAM_ECWMAX[rip]
	or	ebx, eax
	call	SM@PLT
	mov	edi, DWORD PTR R92C_EDCA_PARAM_AIFS[rip]
	mov	esi, r13d
	or	ebx, eax
	call	SM@PLT
	mov	edx, ebx
	mov	rdi, rbp
	or	edx, eax
	mov	rax, QWORD PTR wme2reg[rip]
	mov	esi, DWORD PTR [rax+r12*4]
	call	rtwn_write_4@PLT
	cmp	DWORD PTR WME_AC_BE[rip], r12d
	je	.L5
	mov	eax, DWORD PTR 16[r14]
	movzx	ecx, BYTE PTR 4[rsp]
	sal	eax, cl
	or	DWORD PTR 12[rsp], eax
.L5:
	add	r12, 1
	add	r14, 20
	cmp	DWORD PTR WME_NUM_AC[rip], r12d
	jg	.L6
	mov	eax, DWORD PTR 12[rsp]
	test	eax, eax
	je	.L2
	mov	ecx, DWORD PTR R92C_ACMHWCTRL_EN[rip]
	or	ecx, eax
.L8:
	mov	edx, DWORD PTR R92C_ACMHWCTRL_ACM_MASK[rip]
	mov	esi, DWORD PTR R92C_ACMHWCTRL[rip]
	mov	rdi, rbp
	call	rtwn_setbits_1@PLT
	mov	rdi, rbp
	call	RTWN_UNLOCK@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xor	ecx, ecx
	jmp	.L8
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rtwn_wme_update, .-rtwn_wme_update
	.comm	wme2reg,8,8
	.comm	WME_NUM_AC,4,4
	.comm	WME_AC_BE,4,4
	.comm	R92C_EDCA_PARAM_TXOP,4,4
	.comm	R92C_EDCA_PARAM_ECWMIN,4,4
	.comm	R92C_EDCA_PARAM_ECWMAX,4,4
	.comm	R92C_EDCA_PARAM_AIFS,4,4
	.comm	R92C_ACMHWCTRL_EN,4,4
	.comm	R92C_ACMHWCTRL_ACM_MASK,4,4
	.comm	R92C_ACMHWCTRL,4,4
	.comm	IEEE80211_DUR_SIFS,4,4
	.comm	IEEE80211_DUR_OFDM_SIFS,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_if_rtwn.c_rtwn_wme_update.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtwn_wme_update, %function
rtwn_wme_update:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L18
	sub	sp, sp, #28
	ldr	r7, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r3, [r0, #4]
	add	r1, sp, #16
	str	r3, [sp, #8]
	ldr	r6, [r7]
	bl	ieee80211_wme_ic_getparams
	mov	r0, r4
	bl	IEEE80211_LOCK
	mov	r0, r7
	bl	RTWN_LOCK
	mov	r2, #4
	ldr	r1, [sp, #16]
	mov	r0, r6
	bl	memcpy
	mov	r0, r7
	bl	RTWN_UNLOCK
	mov	r0, r4
	bl	IEEE80211_UNLOCK
	mov	r0, r4
	bl	IEEE80211_GET_SLOTTIME
	mov	r3, r0
	ldr	r9, .L18+4
	ldr	r8, .L18+8
	mov	r0, r7
	str	r3, [sp, #12]
	bl	RTWN_LOCK
	ldr	r5, [r9]
	ldr	r3, [r8]
	cmp	r5, r3
	bge	.L2
	mov	r3, #0
	add	r4, r5, r5, lsl #2
	ldr	fp, .L18+12
	str	r3, [sp, #4]
	add	r4, r6, r4, lsl #2
.L6:
	ldr	r6, [r4]
	ldr	r3, [sp, #12]
	ldr	r0, [sp, #8]
	mul	r3, r6, r3
	mov	r6, r3
	bl	IEEE80211_IS_CHAN_5GHZ
	cmp	r0, #0
	ldrne	r3, .L18+16
	ldreq	r3, .L18+20
	ldr	r0, .L18+24
	ldr	r2, [r3]
	ldr	r3, [fp]
	ldr	r1, [r4, #4]
	ldr	r0, [r0]
	ldr	r10, [r3, r5, lsl #2]
	add	r6, r6, r2
	bl	SM
	mov	r2, r0
	ldr	r3, .L18+28
	ldr	r1, [r4, #8]
	ldr	r0, [r3]
	str	r2, [sp]
	bl	SM
	mov	ip, r0
	ldr	r3, .L18+32
	ldr	r2, [sp]
	ldr	r1, [r4, #12]
	orr	r2, r2, ip
	ldr	r0, [r3]
	str	r2, [sp]
	bl	SM
	mov	ip, r0
	ldr	r3, .L18+36
	ldr	r2, [sp]
	mov	r1, r6
	ldr	r0, [r3]
	orr	r6, r2, ip
	bl	SM
	mov	r1, r10
	orr	r2, r6, r0
	mov	r0, r7
	bl	rtwn_write_4
	ldr	r3, [r9]
	add	r4, r4, #20
	cmp	r3, r5
	ldrne	r3, [r4, #-4]
	ldrne	r2, [sp, #4]
	orrne	r3, r2, r3, lsl r5
	strne	r3, [sp, #4]
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L6
	ldr	r2, [sp, #4]
	cmp	r2, #0
	beq	.L2
	ldr	r3, .L18+40
	ldr	r3, [r3]
	orr	r3, r2, r3
.L8:
	ldr	r2, .L18+44
	ldr	r1, .L18+48
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r7
	bl	rtwn_setbits_1
	mov	r0, r7
	bl	RTWN_UNLOCK
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, #0
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r3, #0
	b	.L8
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	WME_AC_BE
	.word	WME_NUM_AC
	.word	wme2reg
	.word	IEEE80211_DUR_OFDM_SIFS
	.word	IEEE80211_DUR_SIFS
	.word	R92C_EDCA_PARAM_TXOP
	.word	R92C_EDCA_PARAM_ECWMIN
	.word	R92C_EDCA_PARAM_ECWMAX
	.word	R92C_EDCA_PARAM_AIFS
	.word	R92C_ACMHWCTRL_EN
	.word	R92C_ACMHWCTRL_ACM_MASK
	.word	R92C_ACMHWCTRL
	.size	rtwn_wme_update, .-rtwn_wme_update
	.comm	wme2reg,4,4
	.comm	WME_NUM_AC,4,4
	.comm	WME_AC_BE,4,4
	.comm	R92C_EDCA_PARAM_TXOP,4,4
	.comm	R92C_EDCA_PARAM_ECWMIN,4,4
	.comm	R92C_EDCA_PARAM_ECWMAX,4,4
	.comm	R92C_EDCA_PARAM_AIFS,4,4
	.comm	R92C_ACMHWCTRL_EN,4,4
	.comm	R92C_ACMHWCTRL_ACM_MASK,4,4
	.comm	R92C_ACMHWCTRL,4,4
	.comm	IEEE80211_DUR_SIFS,4,4
	.comm	IEEE80211_DUR_OFDM_SIFS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
