	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7603_wtbl_set_ps             ## -- Begin function mt7603_wtbl_set_ps
	.p2align	4, 0x90
_mt7603_wtbl_set_ps:                    ## @mt7603_wtbl_set_ps
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	4(%rsi), %r12d
	callq	_spin_lock_bh
	cmpl	%r14d, (%rbx)
	je	LBB0_4
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_MT_PSE_RTA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MT_PSE_RTA_TAG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_FIELD_PREP
	movl	%eax, %r13d
	movq	_MT_PSE_RTA_PORT_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_FIELD_PREP
	orl	%eax, %r13d
	movq	_MT_PSE_RTA_QUEUE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_FIELD_PREP
	movl	%r12d, %ebx
	movl	%eax, %r12d
	movq	_MT_PSE_RTA_REDIRECT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FIELD_PREP
	orl	%eax, %r12d
	orl	%r13d, %r12d
	movq	_MT_PSE_RTA_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_MT_PSE_RTA_BUSY@GOTPCREL(%rip), %r13
	orl	(%r13), %r12d
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_mt76_wr
	movq	_MT_PSE_RTA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$5000, %r8d                     ## imm = 0x1388
	callq	_mt76_poll
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_mt7603_filter_tx
LBB0_3:
	movl	%ebx, %edi
	callq	_mt7603_wtbl1_addr
	movq	%rax, %rbx
	movq	_MT_WTBL1_OR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MT_WTBL1_OR_PSM_WRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r15, %rdi
	callq	_mt76_set
	addq	$12, %rbx
	movq	_MT_WTBL1_W3_POWER_SAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %ecx
	imull	%r14d, %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt76_rmw
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%r15, %rdi
	callq	_mt76_clear
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
LBB0_4:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_PSE_RTA,4,2                 ## @MT_PSE_RTA
	.comm	_MT_PSE_RTA_TAG_ID,4,2          ## @MT_PSE_RTA_TAG_ID
	.comm	_MT_PSE_RTA_PORT_ID,4,2         ## @MT_PSE_RTA_PORT_ID
	.comm	_MT_PSE_RTA_QUEUE_ID,4,2        ## @MT_PSE_RTA_QUEUE_ID
	.comm	_MT_PSE_RTA_REDIRECT_EN,4,2     ## @MT_PSE_RTA_REDIRECT_EN
	.comm	_MT_PSE_RTA_WRITE,4,2           ## @MT_PSE_RTA_WRITE
	.comm	_MT_PSE_RTA_BUSY,4,2            ## @MT_PSE_RTA_BUSY
	.comm	_MT_WTBL1_OR,4,2                ## @MT_WTBL1_OR
	.comm	_MT_WTBL1_OR_PSM_WRITE,4,2      ## @MT_WTBL1_OR_PSM_WRITE
	.comm	_MT_WTBL1_W3_POWER_SAVE,4,2     ## @MT_WTBL1_W3_POWER_SAVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7603_wtbl_set_ps             ; -- Begin function mt7603_wtbl_set_ps
	.p2align	2
_mt7603_wtbl_set_ps:                    ; @mt7603_wtbl_set_ps
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w22, [x1, #4]
	bl	_spin_lock_bh
	ldr	w8, [x21]
	cmp	w8, w20
	b.eq	LBB0_4
; %bb.1:
Lloh0:
	adrp	x25, _MT_PSE_RTA@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MT_PSE_RTA@GOTPAGEOFF]
	ldr	w23, [x25]
Lloh2:
	adrp	x8, _MT_PSE_RTA_TAG_ID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MT_PSE_RTA_TAG_ID@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_FIELD_PREP
	mov	x24, x0
Lloh5:
	adrp	x8, _MT_PSE_RTA_PORT_ID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT_PSE_RTA_PORT_ID@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_FIELD_PREP
	orr	w24, w0, w24
Lloh8:
	adrp	x8, _MT_PSE_RTA_QUEUE_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MT_PSE_RTA_QUEUE_ID@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_FIELD_PREP
	orr	w24, w24, w0
Lloh11:
	adrp	x8, _MT_PSE_RTA_REDIRECT_EN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT_PSE_RTA_REDIRECT_EN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_PREP
	orr	w8, w24, w0
Lloh14:
	adrp	x9, _MT_PSE_RTA_WRITE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MT_PSE_RTA_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x24, _MT_PSE_RTA_BUSY@GOTPAGE
Lloh18:
	ldr	x24, [x24, _MT_PSE_RTA_BUSY@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w2, w8, w9
	mov	x0, x19
	mov	x1, x23
	bl	_mt76_wr
	ldr	w1, [x25]
	ldr	w2, [x24]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #5000
	bl	_mt76_poll
	cbz	w20, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_mt7603_filter_tx
LBB0_3:
	mov	x0, x22
	bl	_mt7603_wtbl1_addr
	mov	x22, x0
Lloh19:
	adrp	x23, _MT_WTBL1_OR@GOTPAGE
Lloh20:
	ldr	x23, [x23, _MT_WTBL1_OR@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh21:
	adrp	x24, _MT_WTBL1_OR_PSM_WRITE@GOTPAGE
Lloh22:
	ldr	x24, [x24, _MT_WTBL1_OR_PSM_WRITE@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_mt76_set
	add	x1, x22, #12
Lloh23:
	adrp	x8, _MT_WTBL1_W3_POWER_SAVE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MT_WTBL1_W3_POWER_SAVE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mul	w3, w2, w20
	mov	x0, x19
	bl	_mt76_rmw
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_mt76_clear
	str	w20, [x21]
LBB0_4:
	mov	x0, x19
	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	_spin_unlock_bh
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_PSE_RTA,4,2                 ; @MT_PSE_RTA
	.comm	_MT_PSE_RTA_TAG_ID,4,2          ; @MT_PSE_RTA_TAG_ID
	.comm	_MT_PSE_RTA_PORT_ID,4,2         ; @MT_PSE_RTA_PORT_ID
	.comm	_MT_PSE_RTA_QUEUE_ID,4,2        ; @MT_PSE_RTA_QUEUE_ID
	.comm	_MT_PSE_RTA_REDIRECT_EN,4,2     ; @MT_PSE_RTA_REDIRECT_EN
	.comm	_MT_PSE_RTA_WRITE,4,2           ; @MT_PSE_RTA_WRITE
	.comm	_MT_PSE_RTA_BUSY,4,2            ; @MT_PSE_RTA_BUSY
	.comm	_MT_WTBL1_OR,4,2                ; @MT_WTBL1_OR
	.comm	_MT_WTBL1_OR_PSM_WRITE,4,2      ; @MT_WTBL1_OR_PSM_WRITE
	.comm	_MT_WTBL1_W3_POWER_SAVE,4,2     ; @MT_WTBL1_W3_POWER_SAVE
.subsections_via_symbols
