	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8367b_extif_set_mode
_rtl8367b_extif_set_mode:               ## @rtl8367b_extif_set_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %r14
	leal	-128(%r15), %eax
	cmpl	$7, %eax
	ja	LBB0_5
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	_RTL8367B_BYPASS_LINE_RATE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	1(%r13), %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	incl	%eax
	andl	$-2, %eax
	negl	%eax
	leal	(%rax,%r13), %edi
	incl	%edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_REG_RMW
	movl	%r13d, %edi
	callq	_RTL8367B_EXT_RGMXF_REG
	movl	%eax, %ebx
	movl	$6, %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_3:
	movq	_RTL8367B_BYPASS_LINE_RATE_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leal	1(%r13), %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%r13d, %eax
	incl	%eax
	andl	$-2, %eax
	subl	%eax, %ebx
	movl	%ebx, %edi
	callq	_BIT
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	jmp	LBB0_7
LBB0_4:
	movq	_RTL8367B_CHIP_DEBUG0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$871, %edx                      ## imm = 0x367
	callq	_REG_WR
	movq	_RTL8367B_CHIP_DEBUG1_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$30583, %edx                    ## imm = 0x7777
	callq	_REG_WR
	jmp	LBB0_9
LBB0_5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_6:
	movq	_RTL8367B_CHIP_DEBUG0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r13d, %edi
	callq	_RTL8367B_CHIP_DEBUG0_DUMMY0
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_RTL8367B_CHIP_DEBUG0_DUMMY0
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_REG_RMW
	movl	%r13d, %edi
	callq	_RTL8367B_EXT_RGMXF_REG
	movl	%eax, %r12d
	movl	$6, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$6, %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
LBB0_7:
	movl	%eax, %ecx
LBB0_8:
	callq	_REG_RMW
LBB0_9:
	movq	_RTL8367B_DIS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_RTL8367B_DIS_RGMII_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_RTL8367B_DIS_RGMII_SHIFT
	movl	%eax, %ecx
	shll	%cl, %ebx
	movl	%r13d, %edi
	callq	_RTL8367B_DIS_RGMII_SHIFT
	movl	%eax, %ecx
	shll	%cl, %r15d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_REG_RMW
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_RTL8367B_CHIP_DEBUG0_REG,4,2   ## @RTL8367B_CHIP_DEBUG0_REG
	.comm	_RTL8367B_CHIP_DEBUG1_REG,4,2   ## @RTL8367B_CHIP_DEBUG1_REG
	.comm	_RTL8367B_BYPASS_LINE_RATE_REG,4,2 ## @RTL8367B_BYPASS_LINE_RATE_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid mode for external interface %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RTL8367B_DIS_REG,4,2           ## @RTL8367B_DIS_REG
	.comm	_RTL8367B_DIS_RGMII_MASK,4,2    ## @RTL8367B_DIS_RGMII_MASK
	.no_dead_strip	_rtl8367b_extif_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8367b_extif_set_mode
_rtl8367b_extif_set_mode:               ; @rtl8367b_extif_set_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	sub	w8, w2, #128
	cmp	w8, #7
	b.hi	LBB0_5
; %bb.1:
	mov	x21, x2
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _RTL8367B_BYPASS_LINE_RATE_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RTL8367B_BYPASS_LINE_RATE_REG@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	add	w8, w20, #1
	and	w9, w8, #0x1
	cmp	w8, #0
	cneg	w0, w9, lt
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	bl	_REG_RMW
	mov	x0, x20
	bl	_RTL8367B_EXT_RGMXF_REG
	mov	x22, x0
	mov	w0, #6
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	b	LBB0_7
LBB0_3:
Lloh5:
	adrp	x8, _RTL8367B_BYPASS_LINE_RATE_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RTL8367B_BYPASS_LINE_RATE_REG@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	add	w8, w20, #1
	and	w9, w8, #0x1
	cmp	w8, #0
	cneg	w23, w9, lt
	mov	x0, x23
	bl	_BIT
	mov	x24, x0
	mov	x0, x23
	bl	_BIT
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _RTL8367B_CHIP_DEBUG0_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RTL8367B_CHIP_DEBUG0_REG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #871
	bl	_REG_WR
Lloh11:
	adrp	x8, _RTL8367B_CHIP_DEBUG1_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RTL8367B_CHIP_DEBUG1_REG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #30583
	bl	_REG_WR
	b	LBB0_8
LBB0_5:
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
Lloh19:
	adrp	x8, _RTL8367B_CHIP_DEBUG0_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RTL8367B_CHIP_DEBUG0_REG@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_RTL8367B_CHIP_DEBUG0_DUMMY0
	mov	x23, x0
	mov	x0, x20
	bl	_RTL8367B_CHIP_DEBUG0_DUMMY0
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_REG_RMW
	mov	x0, x20
	bl	_RTL8367B_EXT_RGMXF_REG
	mov	x22, x0
	mov	w0, #6
	bl	_BIT
	mov	x23, x0
	mov	w0, #6
	bl	_BIT
	mov	x3, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
LBB0_7:
	bl	_REG_RMW
LBB0_8:
Lloh22:
	adrp	x8, _RTL8367B_DIS_REG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RTL8367B_DIS_REG@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
Lloh25:
	adrp	x8, _RTL8367B_DIS_RGMII_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RTL8367B_DIS_RGMII_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_RTL8367B_DIS_RGMII_SHIFT
	lsl	w23, w23, w0
	mov	x0, x20
	bl	_RTL8367B_DIS_RGMII_SHIFT
	lsl	w3, w21, w0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_REG_RMW
	mov	w0, #0
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_RTL8367B_CHIP_DEBUG0_REG,4,2   ; @RTL8367B_CHIP_DEBUG0_REG
	.comm	_RTL8367B_CHIP_DEBUG1_REG,4,2   ; @RTL8367B_CHIP_DEBUG1_REG
	.comm	_RTL8367B_BYPASS_LINE_RATE_REG,4,2 ; @RTL8367B_BYPASS_LINE_RATE_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid mode for external interface %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RTL8367B_DIS_REG,4,2           ; @RTL8367B_DIS_REG
	.comm	_RTL8367B_DIS_RGMII_MASK,4,2    ; @RTL8367B_DIS_RGMII_MASK
	.no_dead_strip	_rtl8367b_extif_set_mode
.subsections_via_symbols
