	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7603_conf_tx
_mt7603_conf_tx:                        ## @mt7603_conf_tx
	.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
	movq	(%rdi), %r14
	movq	8(%r14), %rax
	movq	(%rax,%rdx,8), %rax
	movq	(%rax), %r13
	movq	%rcx, %rdx
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movq	%rdx, %rbx
	testq	%rax, %rax
	movl	$31, %edx
	cmovneq	%rax, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	movl	$1023, %eax                     ## imm = 0x3FF
	cmovneq	%rcx, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_mt7603_mac_stop
	movq	%r13, %rdi
	callq	_MT_WMM_TXOP
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	%rax, %r15
	movq	_MT_WMM_TXOP_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r13, %rdi
	callq	_MT_WMM_TXOP_SHIFT
	movl	%eax, %ecx
	shlq	%cl, %r12
	notq	%r12
	andq	%r15, %r12
	movq	%rbx, %r15
	movq	16(%rbx), %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_TXOP_SHIFT
	movl	%eax, %ecx
	shlq	%cl, %rbx
	orq	%r12, %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_TXOP
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_mt76_wr
	movq	_MT_WMM_AIFSN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mt76_rr
	movq	%rax, %r12
	movq	_MT_WMM_AIFSN_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_AIFSN_SHIFT
	movl	%eax, %ecx
	shlq	%cl, %rbx
	notq	%rbx
	andq	%r12, %rbx
	movq	24(%r15), %r12
	movq	%r13, %rdi
	callq	_MT_WMM_AIFSN_SHIFT
	movl	%eax, %ecx
	shlq	%cl, %r12
	orq	%rbx, %r12
	movq	_MT_WMM_AIFSN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_mt76_wr
	movq	_MT_WMM_CWMIN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_mt76_rr
	movq	%rax, %r12
	movq	_MT_WMM_CWMIN_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_CWMIN_SHIFT
	movl	%eax, %ecx
	shlq	%cl, %rbx
	notq	%rbx
	andq	%r12, %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_CWMIN_SHIFT
	movl	%eax, %ecx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	shlq	%cl, %rdx
	orq	%rbx, %rdx
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_mt76_wr
	movq	%r13, %rdi
	callq	_MT_WMM_CWMAX
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	%rax, %r15
	movq	_MT_WMM_CWMAX_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_CWMAX_SHIFT
	movl	%eax, %ecx
	shlq	%cl, %rbx
	notq	%rbx
	andq	%r15, %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_CWMAX_SHIFT
	movl	%eax, %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	shlq	%cl, %rax
	orq	%rbx, %rax
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_MT_WMM_CWMAX
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_mt76_wr
	movq	%r14, %rdi
	callq	_mt7603_mac_start
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_WMM_TXOP_MASK,8,3           ## @MT_WMM_TXOP_MASK
	.comm	_MT_WMM_AIFSN,4,2               ## @MT_WMM_AIFSN
	.comm	_MT_WMM_AIFSN_MASK,8,3          ## @MT_WMM_AIFSN_MASK
	.comm	_MT_WMM_CWMIN,4,2               ## @MT_WMM_CWMIN
	.comm	_MT_WMM_CWMIN_MASK,8,3          ## @MT_WMM_CWMIN_MASK
	.comm	_MT_WMM_CWMAX_MASK,8,3          ## @MT_WMM_CWMAX_MASK
	.no_dead_strip	_mt7603_conf_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7603_conf_tx
_mt7603_conf_tx:                        ; @mt7603_conf_tx
	.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	x21, x3
	ldr	x19, [x0]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x2, lsl #3]
	ldr	x20, [x8]
	mov	w8, #31
	ldp	x9, x10, [x3]
	cmp	x9, #0
	csel	x24, x8, x9, eq
	mov	w8, #1023
	cmp	x10, #0
	csel	x23, x8, x10, eq
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	bl	_mt7603_mac_stop
	mov	x0, x20
	bl	_MT_WMM_TXOP
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x22, x0
Lloh0:
	adrp	x8, _MT_WMM_TXOP_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_WMM_TXOP_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	mov	x0, x20
	bl	_MT_WMM_TXOP_SHIFT
	lsl	x8, x25, x0
	bic	x22, x22, x8
	ldr	x25, [x21, #16]
	mov	x0, x20
	bl	_MT_WMM_TXOP_SHIFT
	lsl	x8, x25, x0
	orr	x22, x8, x22
	mov	x0, x20
	bl	_MT_WMM_TXOP
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_mt76_wr
Lloh3:
	adrp	x25, _MT_WMM_AIFSN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MT_WMM_AIFSN@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_mt76_rr
	mov	x22, x0
Lloh5:
	adrp	x8, _MT_WMM_AIFSN_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT_WMM_AIFSN_MASK@GOTPAGEOFF]
Lloh7:
	ldr	x26, [x8]
	mov	x0, x20
	bl	_MT_WMM_AIFSN_SHIFT
	lsl	x8, x26, x0
	bic	x22, x22, x8
	ldr	x21, [x21, #24]
	mov	x0, x20
	bl	_MT_WMM_AIFSN_SHIFT
	lsl	x8, x21, x0
	orr	x2, x8, x22
	ldr	w1, [x25]
	mov	x0, x19
	bl	_mt76_wr
Lloh8:
	adrp	x22, _MT_WMM_CWMIN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MT_WMM_CWMIN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mt76_rr
	mov	x21, x0
Lloh10:
	adrp	x8, _MT_WMM_CWMIN_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MT_WMM_CWMIN_MASK@GOTPAGEOFF]
Lloh12:
	ldr	x25, [x8]
	mov	x0, x20
	bl	_MT_WMM_CWMIN_SHIFT
	lsl	x8, x25, x0
	bic	x21, x21, x8
	mov	x0, x20
	bl	_MT_WMM_CWMIN_SHIFT
	lsl	x8, x24, x0
	orr	x2, x21, x8
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mt76_wr
	mov	x0, x20
	bl	_MT_WMM_CWMAX
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	mov	x21, x0
Lloh13:
	adrp	x8, _MT_WMM_CWMAX_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MT_WMM_CWMAX_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x22, [x8]
	mov	x0, x20
	bl	_MT_WMM_CWMAX_SHIFT
	lsl	x8, x22, x0
	bic	x21, x21, x8
	mov	x0, x20
	bl	_MT_WMM_CWMAX_SHIFT
	lsl	x8, x23, x0
	orr	x21, x21, x8
	mov	x0, x20
	bl	_MT_WMM_CWMAX
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	bl	_mt76_wr
	mov	x0, x19
	bl	_mt7603_mac_start
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_WMM_TXOP_MASK,8,3           ; @MT_WMM_TXOP_MASK
	.comm	_MT_WMM_AIFSN,4,2               ; @MT_WMM_AIFSN
	.comm	_MT_WMM_AIFSN_MASK,8,3          ; @MT_WMM_AIFSN_MASK
	.comm	_MT_WMM_CWMIN,4,2               ; @MT_WMM_CWMIN
	.comm	_MT_WMM_CWMIN_MASK,8,3          ; @MT_WMM_CWMIN_MASK
	.comm	_MT_WMM_CWMAX_MASK,8,3          ; @MT_WMM_CWMAX_MASK
	.no_dead_strip	_mt7603_conf_tx
.subsections_via_symbols
