	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_bbp_set_bw             ## -- Begin function mt7601u_bbp_set_bw
	.p2align	4, 0x90
_mt7601u_bbp_set_bw:                    ## @mt7601u_bbp_set_bw
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	cmpl	%esi, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	_MT_BW_20@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r14d, (%rax)
	setne	%cl
	shll	$4, %ecx
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$24, %edx
	callq	_mt7601u_bbp_rmc
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%r14d, (%rbx)
	movq	_MT_MAC_SYS_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mt7601u_rr
	movq	_MT_MAC_SYS_CTRL_ENABLE_TX@GOTPCREL(%rip), %rcx
	movq	_MT_MAC_SYS_CTRL_ENABLE_RX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%eax, %r15d
	notl	%edx
	andl	%eax, %edx
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mt7601u_wr
	movq	_MT_MAC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT_MAC_STATUS_TX@GOTPCREL(%rip), %rax
	movq	_MT_MAC_STATUS_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	movl	$500000, %r8d                   ## imm = 0x7A120
	callq	_mt76_poll
	movq	_MT_BW_20@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r14d, (%rax)
	setne	%cl
	shll	$4, %ecx
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$24, %edx
	callq	_mt7601u_bbp_rmc
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_mt7601u_wr
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt7601u_load_bbp_temp_table_bw ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_BW_20,4,2                   ## @MT_BW_20
	.comm	_MT_MAC_SYS_CTRL,4,2            ## @MT_MAC_SYS_CTRL
	.comm	_MT_MAC_SYS_CTRL_ENABLE_TX,4,2  ## @MT_MAC_SYS_CTRL_ENABLE_TX
	.comm	_MT_MAC_SYS_CTRL_ENABLE_RX,4,2  ## @MT_MAC_SYS_CTRL_ENABLE_RX
	.comm	_MT_MAC_STATUS,4,2              ## @MT_MAC_STATUS
	.comm	_MT_MAC_STATUS_TX,4,2           ## @MT_MAC_STATUS_TX
	.comm	_MT_MAC_STATUS_RX,4,2           ## @MT_MAC_STATUS_RX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_bbp_set_bw             ; -- Begin function mt7601u_bbp_set_bw
	.p2align	2
_mt7601u_bbp_set_bw:                    ; @mt7601u_bbp_set_bw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MT_BW_20@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_BW_20@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w8, ne
	lsl	w3, w8, #4
	mov	x0, x19
	mov	w1, #4
	mov	w2, #24
	bl	_mt7601u_bbp_rmc
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	str	w20, [x19]
Lloh3:
	adrp	x22, _MT_MAC_SYS_CTRL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MT_MAC_SYS_CTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mt7601u_rr
	mov	x21, x0
Lloh5:
	adrp	x8, _MT_MAC_SYS_CTRL_ENABLE_TX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT_MAC_SYS_CTRL_ENABLE_TX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MT_MAC_SYS_CTRL_ENABLE_RX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MT_MAC_SYS_CTRL_ENABLE_RX@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mt7601u_wr
Lloh11:
	adrp	x8, _MT_MAC_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT_MAC_STATUS@GOTPAGEOFF]
Lloh13:
	adrp	x9, _MT_MAC_STATUS_TX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MT_MAC_STATUS_TX@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	ldr	w8, [x9]
Lloh17:
	adrp	x9, _MT_MAC_STATUS_RX@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MT_MAC_STATUS_RX@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #0
	mov	w4, #41248
	movk	w4, #7, lsl #16
	bl	_mt76_poll
Lloh20:
	adrp	x8, _MT_BW_20@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MT_BW_20@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w8, w20
	cset	w8, ne
	lsl	w3, w8, #4
	mov	x0, x19
	mov	w1, #4
	mov	w2, #24
	bl	_mt7601u_bbp_rmc
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_mt7601u_wr
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mt7601u_load_bbp_temp_table_bw
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_BW_20,4,2                   ; @MT_BW_20
	.comm	_MT_MAC_SYS_CTRL,4,2            ; @MT_MAC_SYS_CTRL
	.comm	_MT_MAC_SYS_CTRL_ENABLE_TX,4,2  ; @MT_MAC_SYS_CTRL_ENABLE_TX
	.comm	_MT_MAC_SYS_CTRL_ENABLE_RX,4,2  ; @MT_MAC_SYS_CTRL_ENABLE_RX
	.comm	_MT_MAC_STATUS,4,2              ; @MT_MAC_STATUS
	.comm	_MT_MAC_STATUS_TX,4,2           ; @MT_MAC_STATUS_TX
	.comm	_MT_MAC_STATUS_RX,4,2           ; @MT_MAC_STATUS_RX
.subsections_via_symbols
