	.file	"extr_ieee80211_ht.c_ieee80211_ht_wds_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"no HT requested"
	.text
	.p2align 4
	.globl	ieee80211_ht_wds_init
	.type	ieee80211_ht_wds_init, @function
ieee80211_ht_wds_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	lea	rsi, .LC0[rip]
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbx, QWORD PTR 56[rdi]
	mov	edi, DWORD PTR [rbx]
	and	edi, DWORD PTR IEEE80211_FHT_HT[rip]
	call	KASSERT@PLT
	mov	rdi, QWORD PTR 32[rbp]
	call	ieee80211_htchanflags@PLT
	mov	edi, DWORD PTR 52[rbp]
	mov	rsi, QWORD PTR 32[rbp]
	mov	edx, eax
	call	ieee80211_ht_adjust_channel@PLT
	mov	DWORD PTR 48[rbp], 0
	mov	QWORD PTR 32[rbp], rax
	mov	rdi, rax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR IEEE80211_FHT_SHORTGI20[rip], eax
	je	.L2
	mov	eax, DWORD PTR IEEE80211_HTCAP_SHORTGI20[rip]
	mov	DWORD PTR 48[rbp], eax
.L2:
	call	IEEE80211_IS_CHAN_HT40@PLT
	test	rax, rax
	jne	.L28
	mov	eax, DWORD PTR IEEE80211_HTINFO_2NDCHAN_NONE[rip]
	mov	DWORD PTR 0[rbp], 20
	mov	DWORD PTR 44[rbp], eax
	mov	eax, DWORD PTR [rbx]
.L6:
	mov	rdx, QWORD PTR 32[rbp]
	mov	edx, DWORD PTR [rdx]
	mov	DWORD PTR 40[rbp], edx
	test	DWORD PTR IEEE80211_FHT_RIFS[rip], eax
	je	.L7
	mov	eax, DWORD PTR IEEE80211_NODE_RIFS[rip]
	or	DWORD PTR 4[rbp], eax
.L7:
	mov	eax, DWORD PTR WME_NUM_TID[rip]
	mov	QWORD PTR 24[rbp], 0
	xor	ebx, ebx
	mov	QWORD PTR 16[rbp], 0
	test	eax, eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR 8[rbp]
	lea	rdi, [rax+rbx*4]
	mov	DWORD PTR [rdi], ebx
	add	rbx, 1
	call	ieee80211_txampdu_init_pps@PLT
	cmp	DWORD PTR WME_NUM_TID[rip], ebx
	jg	.L8
.L9:
	mov	eax, DWORD PTR IEEE80211_NODE_HT[rip]
	or	eax, DWORD PTR IEEE80211_NODE_AMPDU[rip]
	or	DWORD PTR 4[rbp], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	eax, DWORD PTR IEEE80211_HTCAP_CHWIDTH40[rip]
	or	DWORD PTR 48[rbp], eax
	mov	DWORD PTR 0[rbp], 40
	mov	rdi, QWORD PTR 32[rbp]
	call	IEEE80211_IS_CHAN_HT40U@PLT
	test	rax, rax
	je	.L4
	mov	eax, DWORD PTR IEEE80211_HTINFO_2NDCHAN_ABOVE[rip]
	mov	DWORD PTR 44[rbp], eax
.L5:
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR IEEE80211_FHT_SHORTGI40[rip], eax
	je	.L6
	mov	edx, DWORD PTR IEEE80211_HTCAP_SHORTGI40[rip]
	or	DWORD PTR 48[rbp], edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR 32[rbp]
	call	IEEE80211_IS_CHAN_HT40D@PLT
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR IEEE80211_HTINFO_2NDCHAN_BELOW[rip]
	mov	DWORD PTR 44[rbp], eax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ieee80211_ht_wds_init, .-ieee80211_ht_wds_init
	.comm	WME_NUM_TID,4,4
	.comm	IEEE80211_NODE_RIFS,4,4
	.comm	IEEE80211_NODE_HT,4,4
	.comm	IEEE80211_NODE_AMPDU,4,4
	.comm	IEEE80211_HTINFO_2NDCHAN_NONE,4,4
	.comm	IEEE80211_HTINFO_2NDCHAN_BELOW,4,4
	.comm	IEEE80211_HTINFO_2NDCHAN_ABOVE,4,4
	.comm	IEEE80211_HTCAP_SHORTGI40,4,4
	.comm	IEEE80211_HTCAP_SHORTGI20,4,4
	.comm	IEEE80211_HTCAP_CHWIDTH40,4,4
	.comm	IEEE80211_FHT_SHORTGI40,4,4
	.comm	IEEE80211_FHT_SHORTGI20,4,4
	.comm	IEEE80211_FHT_RIFS,4,4
	.comm	IEEE80211_FHT_HT,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_ieee80211_ht.c_ieee80211_ht_wds_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"no HT requested\000"
	.text
	.align	2
	.global	ieee80211_ht_wds_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	ieee80211_ht_wds_init, %function
ieee80211_ht_wds_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r4, [r0, #40]
	ldr	r3, .L28
	ldr	r0, [r4]
	ldr	r3, [r3]
	ldr	r1, .L28+4
	and	r0, r0, r3
	bl	KASSERT
	ldr	r6, [r5, #20]
	ldr	r7, [r5, #36]
	mov	r0, r6
	bl	ieee80211_htchanflags
	mov	r1, r6
	mov	r2, r0
	mov	r0, r7
	bl	ieee80211_ht_adjust_channel
	mov	r3, #0
	ldr	r2, .L28+8
	ldr	r1, [r4]
	ldr	r2, [r2]
	str	r3, [r5, #32]
	tst	r1, r2
	ldrne	r3, .L28+12
	str	r0, [r5, #20]
	ldrne	r3, [r3]
	strne	r3, [r5, #32]
	bl	IEEE80211_IS_CHAN_HT40
	cmp	r0, #0
	bne	.L27
	mov	r1, #20
	ldr	r2, .L28+16
	ldr	r3, [r4]
	ldr	r2, [r2]
	str	r1, [r5]
	str	r2, [r5, #28]
.L6:
	mov	r4, #0
	ldr	r1, .L28+20
	ldr	r2, [r5, #20]
	ldr	r1, [r1]
	ldr	r2, [r2]
	tst	r3, r1
	str	r2, [r5, #24]
	ldrne	r2, .L28+24
	ldrne	r3, [r5, #4]
	ldrne	r2, [r2]
	ldr	r6, .L28+28
	orrne	r3, r3, r2
	strne	r3, [r5, #4]
	ldr	r3, [r6]
	str	r4, [r5, #16]
	cmp	r3, r4
	str	r4, [r5, #12]
	ble	.L9
.L8:
	ldr	r0, [r5, #8]
	str	r4, [r0, r4, lsl #2]
	add	r0, r0, r4, lsl #2
	bl	ieee80211_txampdu_init_pps
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L8
.L9:
	ldr	r3, .L28+32
	ldr	r2, .L28+36
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r5, #4]
	orr	r2, r2, r1
	orr	r3, r3, r2
	str	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L27:
	mov	r1, #40
	ldr	r2, .L28+40
	ldr	r3, [r5, #32]
	ldr	r2, [r2]
	ldr	r0, [r5, #20]
	orr	r3, r3, r2
	str	r1, [r5]
	str	r3, [r5, #32]
	bl	IEEE80211_IS_CHAN_HT40U
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L28+44
	ldr	r3, [r3]
	str	r3, [r5, #28]
.L5:
	ldr	r2, .L28+48
	ldr	r3, [r4]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L6
	ldr	r1, .L28+52
	ldr	r2, [r5, #32]
	ldr	r1, [r1]
	orr	r2, r2, r1
	str	r2, [r5, #32]
	b	.L6
.L4:
	ldr	r0, [r5, #20]
	bl	IEEE80211_IS_CHAN_HT40D
	cmp	r0, #0
	ldrne	r3, .L28+56
	ldrne	r3, [r3]
	strne	r3, [r5, #28]
	b	.L5
.L29:
	.align	2
.L28:
	.word	IEEE80211_FHT_HT
	.word	.LC0
	.word	IEEE80211_FHT_SHORTGI20
	.word	IEEE80211_HTCAP_SHORTGI20
	.word	IEEE80211_HTINFO_2NDCHAN_NONE
	.word	IEEE80211_FHT_RIFS
	.word	IEEE80211_NODE_RIFS
	.word	WME_NUM_TID
	.word	IEEE80211_NODE_AMPDU
	.word	IEEE80211_NODE_HT
	.word	IEEE80211_HTCAP_CHWIDTH40
	.word	IEEE80211_HTINFO_2NDCHAN_ABOVE
	.word	IEEE80211_FHT_SHORTGI40
	.word	IEEE80211_HTCAP_SHORTGI40
	.word	IEEE80211_HTINFO_2NDCHAN_BELOW
	.size	ieee80211_ht_wds_init, .-ieee80211_ht_wds_init
	.comm	WME_NUM_TID,4,4
	.comm	IEEE80211_NODE_RIFS,4,4
	.comm	IEEE80211_NODE_HT,4,4
	.comm	IEEE80211_NODE_AMPDU,4,4
	.comm	IEEE80211_HTINFO_2NDCHAN_NONE,4,4
	.comm	IEEE80211_HTINFO_2NDCHAN_BELOW,4,4
	.comm	IEEE80211_HTINFO_2NDCHAN_ABOVE,4,4
	.comm	IEEE80211_HTCAP_SHORTGI40,4,4
	.comm	IEEE80211_HTCAP_SHORTGI20,4,4
	.comm	IEEE80211_HTCAP_CHWIDTH40,4,4
	.comm	IEEE80211_FHT_SHORTGI40,4,4
	.comm	IEEE80211_FHT_SHORTGI20,4,4
	.comm	IEEE80211_FHT_RIFS,4,4
	.comm	IEEE80211_FHT_HT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
