	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7603_mac_tx_ba_reset         ## -- Begin function mt7603_mac_tx_ba_reset
	.p2align	4, 0x90
_mt7603_mac_tx_ba_reset:                ## @mt7603_mac_tx_ba_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_mt7603_wtbl2_addr
	movl	%eax, %r15d
	movq	_MT_WTBL2_W15_BA_EN_TIDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_BIT
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	movq	_MT_WTBL2_W15_BA_WIN_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_MT_WTBL2_W15_BA_WIN_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%r12d, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%eax, %ebx
	testl	%r13d, %r13d
	js	LBB0_9
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	$7, %r14d
	movl	$7, %edi
	callq	_MT_AGG_SIZE_LIMIT
	cmpl	%r13d, %eax
	jle	LBB0_8
## %bb.2:
	movl	$6, %r14d
	movl	$6, %edi
	callq	_MT_AGG_SIZE_LIMIT
	cmpl	%r13d, %eax
	jle	LBB0_8
## %bb.3:
	movl	$5, %r14d
	movl	$5, %edi
	callq	_MT_AGG_SIZE_LIMIT
	cmpl	%r13d, %eax
	jle	LBB0_8
## %bb.4:
	movl	$4, %r14d
	movl	$4, %edi
	callq	_MT_AGG_SIZE_LIMIT
	cmpl	%r13d, %eax
	jle	LBB0_8
## %bb.5:
	movl	$3, %r14d
	movl	$3, %edi
	callq	_MT_AGG_SIZE_LIMIT
	cmpl	%r13d, %eax
	jle	LBB0_8
## %bb.6:
	movl	$2, %r14d
	movl	$2, %edi
	callq	_MT_AGG_SIZE_LIMIT
	cmpl	%r13d, %eax
	jle	LBB0_8
## %bb.7:
	movl	$1, %edi
	callq	_MT_AGG_SIZE_LIMIT
	xorl	%r14d, %r14d
	cmpl	%r13d, %eax
	setle	%r14b
LBB0_8:
	movq	_MT_WTBL2_W15_BA_EN_TIDS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r12d, %edi
	callq	_BIT
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	movq	_MT_WTBL2_W15_BA_WIN_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	imull	(%rcx), %r12d
	movl	%r12d, %ecx
	shll	%cl, %r14d
	orl	%eax, %r14d
	addl	$60, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76_rmw                       ## TAILCALL
LBB0_9:
	addl	$60, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76_clear                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_WTBL2_W15_BA_EN_TIDS,4,2    ## @MT_WTBL2_W15_BA_EN_TIDS
	.comm	_MT_WTBL2_W15_BA_WIN_SIZE,4,2   ## @MT_WTBL2_W15_BA_WIN_SIZE
	.comm	_MT_WTBL2_W15_BA_WIN_SIZE_SHIFT,4,2 ## @MT_WTBL2_W15_BA_WIN_SIZE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7603_mac_tx_ba_reset         ; -- Begin function mt7603_mac_tx_ba_reset
	.p2align	2
_mt7603_mac_tx_ba_reset:                ; @mt7603_mac_tx_ba_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x20, x2
	mov	x19, x0
	mov	x0, x1
	bl	_mt7603_wtbl2_addr
	mov	x21, x0
Lloh0:
	adrp	x24, _MT_WTBL2_W15_BA_EN_TIDS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MT_WTBL2_W15_BA_EN_TIDS@GOTPAGEOFF]
	ldr	w22, [x24]
	mov	x0, x20
	bl	_BIT
	mov	x1, x0
	mov	x0, x22
	bl	_FIELD_PREP
Lloh2:
	adrp	x8, _MT_WTBL2_W15_BA_WIN_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT_WTBL2_W15_BA_WIN_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x25, _MT_WTBL2_W15_BA_WIN_SIZE_SHIFT@GOTPAGE
Lloh6:
	ldr	x25, [x25, _MT_WTBL2_W15_BA_WIN_SIZE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x25]
	mul	w9, w9, w20
	lsl	w8, w8, w9
	orr	w22, w8, w0
	tbnz	w23, #31, LBB0_9
; %bb.1:
	mov	w26, #7
	mov	w0, #7
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	b.le	LBB0_8
; %bb.2:
	mov	w26, #6
	mov	w0, #6
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	b.le	LBB0_8
; %bb.3:
	mov	w26, #5
	mov	w0, #5
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	b.le	LBB0_8
; %bb.4:
	mov	w26, #4
	mov	w0, #4
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	b.le	LBB0_8
; %bb.5:
	mov	w26, #3
	mov	w0, #3
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	b.le	LBB0_8
; %bb.6:
	mov	w26, #2
	mov	w0, #2
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	b.le	LBB0_8
; %bb.7:
	mov	w0, #1
	bl	_MT_AGG_SIZE_LIMIT
	cmp	w0, w23
	cset	w26, le
LBB0_8:
	ldr	w23, [x24]
	mov	x0, x20
	bl	_BIT
	mov	x1, x0
	mov	x0, x23
	bl	_FIELD_PREP
	ldr	w8, [x25]
	mul	w8, w8, w20
	lsl	w8, w26, w8
	orr	w3, w8, w0
	add	w1, w21, #60
	mov	x0, x19
	mov	x2, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mt76_rmw
LBB0_9:
	add	w1, w21, #60
	mov	x0, x19
	mov	x2, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mt76_clear
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_WTBL2_W15_BA_EN_TIDS,4,2    ; @MT_WTBL2_W15_BA_EN_TIDS
	.comm	_MT_WTBL2_W15_BA_WIN_SIZE,4,2   ; @MT_WTBL2_W15_BA_WIN_SIZE
	.comm	_MT_WTBL2_W15_BA_WIN_SIZE_SHIFT,4,2 ; @MT_WTBL2_W15_BA_WIN_SIZE_SHIFT
.subsections_via_symbols
