	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8xxxu_set_ampdu_factor
_rtl8xxxu_set_ampdu_factor:             ## @rtl8xxxu_set_ampdu_factor
	.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
                                        ## kill: def $esi killed $esi def $rsi
	leal	2(%rsi), %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	$15, %eax
	movl	$15, %r15d
	cmovll	%eax, %r15d
	movl	%r15d, %ebx
	shll	$4, %ebx
	leal	1(%rbx), %eax
	cmpl	$64, %ebx
	movl	$65, %ecx
	cmovll	%eax, %ecx
	movq	%rdi, %r14
	movl	%ecx, %edx
	andl	$240, %edx
	orl	%r15d, %edx
	testl	%r15d, %r15d
	cmovgl	%ecx, %edx
	movq	_REG_AGGLEN_LMT@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	callq	_rtl8xxxu_write8
	leal	8(%rbx), %eax
	cmpl	$160, %ebx
	movl	$168, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, %edx
	andl	$240, %edx
	orl	%r15d, %edx
	cmpl	$8, %r15d
	cmovgel	%ecx, %edx
	movq	(%r12), %rsi
	incq	%rsi
	movq	%r14, %rdi
	callq	_rtl8xxxu_write8
	leal	2(%rbx), %eax
	cmpl	$112, %ebx
	movl	$114, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, %edx
	andl	$240, %edx
	orl	%r15d, %edx
	cmpl	$2, %r15d
	cmovgel	%ecx, %edx
	movq	(%r12), %rsi
	addq	$2, %rsi
	movq	%r14, %rdi
	callq	_rtl8xxxu_write8
	leal	9(%rbx), %eax
	cmpl	$176, %ebx
	movl	$185, %ecx
	cmovll	%eax, %ecx
	movl	%ecx, %edx
	andl	$240, %edx
	orl	%r15d, %edx
	cmpl	$9, %r15d
	cmovgel	%ecx, %edx
	movq	(%r12), %rsi
	addq	$3, %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rtl8xxxu_write8                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_AGGLEN_LMT,8,3             ## @REG_AGGLEN_LMT
	.no_dead_strip	_rtl8xxxu_set_ampdu_factor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8xxxu_set_ampdu_factor
_rtl8xxxu_set_ampdu_factor:             ; @rtl8xxxu_set_ampdu_factor
	.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	x19, x0
	add	w8, w1, #2
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w10, #15
	cmp	w8, #15
	csel	w20, w8, w10, lt
	lsl	w21, w20, #4
	bfi	w9, w20, #4, #28
	mov	w8, #65
	cmp	w21, #64
	csel	w8, w9, w8, lt
	and	w9, w8, #0xf0
	orr	w9, w9, w20
	cmp	w20, #1
	csel	w2, w9, w8, lt
Lloh0:
	adrp	x22, _REG_AGGLEN_LMT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_AGGLEN_LMT@GOTPAGEOFF]
	ldr	x1, [x22]
	bl	_rtl8xxxu_write8
	mov	w8, #8
	bfi	w8, w20, #4, #28
	mov	w9, #168
	cmp	w21, #160
	csel	w8, w8, w9, lt
	and	w9, w8, #0xf0
	orr	w9, w9, w20
	cmp	w20, #8
	csel	w2, w9, w8, lt
	ldr	x8, [x22]
	add	x1, x8, #1
	mov	x0, x19
	bl	_rtl8xxxu_write8
	mov	w8, #2
	bfi	w8, w20, #4, #28
	mov	w9, #114
	cmp	w21, #112
	csel	w8, w8, w9, lt
	and	w9, w8, #0xf0
	orr	w9, w9, w20
	cmp	w20, #2
	csel	w2, w9, w8, lt
	ldr	x8, [x22]
	add	x1, x8, #2
	mov	x0, x19
	bl	_rtl8xxxu_write8
	mov	w8, #9
	bfi	w8, w20, #4, #28
	mov	w9, #185
	cmp	w21, #176
	csel	w8, w8, w9, lt
	and	w9, w8, #0xf0
	orr	w9, w9, w20
	cmp	w20, #9
	csel	w2, w9, w8, lt
	ldr	x8, [x22]
	add	x1, x8, #3
	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	_rtl8xxxu_write8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_AGGLEN_LMT,8,3             ; @REG_AGGLEN_LMT
	.no_dead_strip	_rtl8xxxu_set_ampdu_factor
.subsections_via_symbols
