	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2800_set_max_psdu_len
_rt2800_set_max_psdu_len:               ## @rt2800_set_max_psdu_len
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	xorl	%esi, %esi
	cmpq	$0, (%rcx)
	jg	LBB0_3
## %bb.1:
	movl	$1, %esi
	cmpq	$0, 8(%rcx)
	jg	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	cmpq	$0, 16(%rcx)
	setg	%sil
	xorl	$3, %esi
LBB0_3:
	movl	8(%rax), %edi
	callq	_min
	movl	%eax, %r14d
	movq	_MAX_LEN_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, -28(%rbp)
	movq	_MAX_LEN_CFG_MAX_PSDU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdi
	movl	%r14d, %edx
	callq	_rt2x00_set_field32
	movl	(%r15), %esi
	movl	-28(%rbp), %edx
	movq	%rbx, %rdi
	callq	_rt2800_register_write
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_LEN_CFG,4,2                ## @MAX_LEN_CFG
	.comm	_MAX_LEN_CFG_MAX_PSDU,4,2       ## @MAX_LEN_CFG_MAX_PSDU
	.no_dead_strip	_rt2800_set_max_psdu_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2800_set_max_psdu_len
_rt2800_set_max_psdu_len:               ; @rt2800_set_max_psdu_len
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0]
	ldr	x9, [x8]
	ldr	x10, [x9]
	cmp	x10, #0
	b.le	LBB0_2
; %bb.1:
	mov	w1, #0
	b	LBB0_5
LBB0_2:
	ldr	x10, [x9, #8]
	cmp	x10, #0
	b.le	LBB0_4
; %bb.3:
	mov	w1, #1
	b	LBB0_5
LBB0_4:
	ldr	x9, [x9, #16]
	cmp	x9, #0
	mov	w9, #2
	cinc	w1, w9, le
LBB0_5:
	ldr	w0, [x8, #8]
	bl	_min
	mov	x20, x0
Lloh0:
	adrp	x21, _MAX_LEN_CFG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_LEN_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_rt2800_register_read
	str	w0, [sp, #12]
Lloh2:
	adrp	x8, _MAX_LEN_CFG_MAX_PSDU@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_LEN_CFG_MAX_PSDU@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_rt2x00_set_field32
	ldr	w1, [x21]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_rt2800_register_write
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_LEN_CFG,4,2                ; @MAX_LEN_CFG
	.comm	_MAX_LEN_CFG_MAX_PSDU,4,2       ; @MAX_LEN_CFG_MAX_PSDU
	.no_dead_strip	_rt2800_set_max_psdu_len
.subsections_via_symbols
