	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8366s_sw_set_max_length
_rtl8366s_sw_set_max_length:            ## @rtl8366s_sw_set_max_length
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	callq	_sw_to_rtl8366_smi
	movslq	(%rbx), %rcx
	cmpq	$4, %rcx
	jae	LBB0_1
## %bb.2:
	leaq	l_switch.table.rtl8366s_sw_set_max_length(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movsbl	(%rcx), %ecx
	movq	_RTL8366S_SGCR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_RTL8366S_SGCR_MAX_LENGTH_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_rtl8366_smi_rmwr               ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1522,1,0 ## @RTL8366S_SGCR_MAX_LENGTH_1522
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1536,1,0 ## @RTL8366S_SGCR_MAX_LENGTH_1536
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1552,1,0 ## @RTL8366S_SGCR_MAX_LENGTH_1552
	.comm	_RTL8366S_SGCR_MAX_LENGTH_16000,1,0 ## @RTL8366S_SGCR_MAX_LENGTH_16000
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTL8366S_SGCR,4,2              ## @RTL8366S_SGCR
	.comm	_RTL8366S_SGCR_MAX_LENGTH_MASK,4,2 ## @RTL8366S_SGCR_MAX_LENGTH_MASK
	.no_dead_strip	_rtl8366s_sw_set_max_length
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.rtl8366s_sw_set_max_length
l_switch.table.rtl8366s_sw_set_max_length:
	.quad	_RTL8366S_SGCR_MAX_LENGTH_1522
	.quad	_RTL8366S_SGCR_MAX_LENGTH_1536
	.quad	_RTL8366S_SGCR_MAX_LENGTH_1552
	.quad	_RTL8366S_SGCR_MAX_LENGTH_16000

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8366s_sw_set_max_length
_rtl8366s_sw_set_max_length:            ; @rtl8366s_sw_set_max_length
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_sw_to_rtl8366_smi
	ldrsw	x8, [x19]
	cmp	w8, #4
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.rtl8366s_sw_set_max_length@PAGE
Lloh1:
	add	x9, x9, l_switch.table.rtl8366s_sw_set_max_length@PAGEOFF
	ldr	x8, [x9, x8, lsl #3]
	ldrsb	w3, [x8]
Lloh2:
	adrp	x8, _RTL8366S_SGCR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTL8366S_SGCR@GOTPAGEOFF]
Lloh4:
	adrp	x9, _RTL8366S_SGCR_MAX_LENGTH_MASK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _RTL8366S_SGCR_MAX_LENGTH_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	ldr	w2, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rtl8366_smi_rmwr
LBB0_2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1522,1,0 ; @RTL8366S_SGCR_MAX_LENGTH_1522
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1536,1,0 ; @RTL8366S_SGCR_MAX_LENGTH_1536
	.comm	_RTL8366S_SGCR_MAX_LENGTH_1552,1,0 ; @RTL8366S_SGCR_MAX_LENGTH_1552
	.comm	_RTL8366S_SGCR_MAX_LENGTH_16000,1,0 ; @RTL8366S_SGCR_MAX_LENGTH_16000
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTL8366S_SGCR,4,2              ; @RTL8366S_SGCR
	.comm	_RTL8366S_SGCR_MAX_LENGTH_MASK,4,2 ; @RTL8366S_SGCR_MAX_LENGTH_MASK
	.no_dead_strip	_rtl8366s_sw_set_max_length
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.rtl8366s_sw_set_max_length
l_switch.table.rtl8366s_sw_set_max_length:
	.quad	_RTL8366S_SGCR_MAX_LENGTH_1522
	.quad	_RTL8366S_SGCR_MAX_LENGTH_1536
	.quad	_RTL8366S_SGCR_MAX_LENGTH_1552
	.quad	_RTL8366S_SGCR_MAX_LENGTH_16000

.subsections_via_symbols
