	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hix5hd2_config_port
_hix5hd2_config_port:                   ## @hix5hd2_config_port
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%r15, 32(%rax)
	movq	%r14, 24(%rax)
	movl	(%rax), %eax
	cmpl	$129, %eax
	je	LBB0_7
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_9
## %bb.2:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	_RGMII_SPEED_1000@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_10
## %bb.8:
	movq	_MII_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_warn
LBB0_10:
	movq	_MII_SPEED_10@GOTPCREL(%rip), %rax
LBB0_11:
	movq	%r14, %rdi
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	movq	_GMAC_FULL_DUPLEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
LBB0_13:
	orq	(%rax), %rdi
	movq	16(%rbx), %rsi
	callq	_writel_relaxed
	movq	%rbx, %rdi
	callq	_hix5hd2_mac_interface_reset
	movq	_BIT_MODE_CHANGE_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_MODE_CHANGE_EN@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	callq	_writel_relaxed
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_14
## %bb.15:
	movq	_GMAC_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	%r15, %rcx
	je	LBB0_17
	jmp	LBB0_18
LBB0_14:
	movq	_GMAC_SPEED_10@GOTPCREL(%rip), %rax
	cmpq	%r15, %rcx
	jne	LBB0_18
LBB0_17:
	movq	_GMAC_SPEED_1000@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %rdi
	movq	_PORT_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel_relaxed
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel_relaxed
	movq	_MAC_DUPLEX_HALF_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel_relaxed                 ## TAILCALL
LBB0_4:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_5
## %bb.6:
	movq	_RGMII_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	_RGMII_SPEED_10@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_RGMII_SPEED_1000,8,3           ## @RGMII_SPEED_1000
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_RGMII_SPEED_100,8,3            ## @RGMII_SPEED_100
	.comm	_RGMII_SPEED_10,8,3             ## @RGMII_SPEED_10
	.comm	_MII_SPEED_100,8,3              ## @MII_SPEED_100
	.comm	_MII_SPEED_10,8,3               ## @MII_SPEED_10
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not supported mode\n"

	.comm	_GMAC_FULL_DUPLEX,8,3           ## @GMAC_FULL_DUPLEX
	.comm	_BIT_MODE_CHANGE_EN,8,3         ## @BIT_MODE_CHANGE_EN
	.comm	_MODE_CHANGE_EN,8,3             ## @MODE_CHANGE_EN
	.comm	_GMAC_SPEED_1000,8,3            ## @GMAC_SPEED_1000
	.comm	_GMAC_SPEED_100,8,3             ## @GMAC_SPEED_100
	.comm	_GMAC_SPEED_10,8,3              ## @GMAC_SPEED_10
	.comm	_PORT_MODE,8,3                  ## @PORT_MODE
	.comm	_MAC_DUPLEX_HALF_CTRL,8,3       ## @MAC_DUPLEX_HALF_CTRL
	.no_dead_strip	_hix5hd2_config_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hix5hd2_config_port
_hix5hd2_config_port:                   ; @hix5hd2_config_port
	.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	x19, x2
	mov	x21, x1
	mov	x22, x0
	bl	_netdev_priv
	mov	x20, x0
	stp	x19, x21, [x0, #24]
	ldr	w8, [x0]
Lloh0:
	adrp	x23, _SPEED_1000@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SPEED_1000@GOTPAGEOFF]
Lloh2:
	adrp	x24, _SPEED_100@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SPEED_100@GOTPAGEOFF]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x23]
	cmp	x8, x21
	b.ne	LBB0_6
; %bb.3:
Lloh4:
	adrp	x8, _RGMII_SPEED_1000@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RGMII_SPEED_1000@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	x8, [x24]
Lloh6:
	adrp	x9, _MII_SPEED_10@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MII_SPEED_10@GOTPAGEOFF]
Lloh8:
	adrp	x10, _MII_SPEED_100@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MII_SPEED_100@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_netdev_warn
Lloh12:
	adrp	x8, _MII_SPEED_10@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MII_SPEED_10@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x24]
Lloh14:
	adrp	x9, _RGMII_SPEED_10@GOTPAGE
Lloh15:
	ldr	x9, [x9, _RGMII_SPEED_10@GOTPAGEOFF]
Lloh16:
	adrp	x10, _RGMII_SPEED_100@GOTPAGE
Lloh17:
	ldr	x10, [x10, _RGMII_SPEED_100@GOTPAGEOFF]
LBB0_7:
	cmp	x8, x21
	csel	x8, x10, x9, eq
LBB0_8:
Lloh18:
	adrp	x9, _GMAC_FULL_DUPLEX@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GMAC_FULL_DUPLEX@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh20:
	ldr	x9, [x9]
	cmp	x19, #0
	csel	x9, xzr, x9, eq
	orr	x0, x9, x8
	ldr	x1, [x20, #16]
	bl	_writel_relaxed
	mov	x0, x20
	bl	_hix5hd2_mac_interface_reset
Lloh21:
	adrp	x8, _BIT_MODE_CHANGE_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BIT_MODE_CHANGE_EN@GOTPAGEOFF]
Lloh23:
	ldr	x0, [x8]
	ldr	x8, [x20, #8]
Lloh24:
	adrp	x22, _MODE_CHANGE_EN@GOTPAGE
Lloh25:
	ldr	x22, [x22, _MODE_CHANGE_EN@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x23]
	ldr	x9, [x24]
Lloh26:
	adrp	x10, _GMAC_SPEED_1000@GOTPAGE
Lloh27:
	ldr	x10, [x10, _GMAC_SPEED_1000@GOTPAGEOFF]
Lloh28:
	adrp	x11, _GMAC_SPEED_100@GOTPAGE
Lloh29:
	ldr	x11, [x11, _GMAC_SPEED_100@GOTPAGEOFF]
Lloh30:
	adrp	x12, _GMAC_SPEED_10@GOTPAGE
Lloh31:
	ldr	x12, [x12, _GMAC_SPEED_10@GOTPAGEOFF]
	cmp	x9, x21
	csel	x9, x11, x12, eq
	cmp	x8, x21
	csel	x8, x10, x9, eq
	ldr	x0, [x8]
	ldr	x8, [x20, #8]
Lloh32:
	adrp	x9, _PORT_MODE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _PORT_MODE@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, #0
	bl	_writel_relaxed
	ldr	x8, [x20, #8]
Lloh35:
	adrp	x9, _MAC_DUPLEX_HALF_CTRL@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MAC_DUPLEX_HALF_CTRL@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x19
	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
	b	_writel_relaxed
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_RGMII_SPEED_1000,8,3           ; @RGMII_SPEED_1000
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_RGMII_SPEED_100,8,3            ; @RGMII_SPEED_100
	.comm	_RGMII_SPEED_10,8,3             ; @RGMII_SPEED_10
	.comm	_MII_SPEED_100,8,3              ; @MII_SPEED_100
	.comm	_MII_SPEED_10,8,3               ; @MII_SPEED_10
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not supported mode\n"

	.comm	_GMAC_FULL_DUPLEX,8,3           ; @GMAC_FULL_DUPLEX
	.comm	_BIT_MODE_CHANGE_EN,8,3         ; @BIT_MODE_CHANGE_EN
	.comm	_MODE_CHANGE_EN,8,3             ; @MODE_CHANGE_EN
	.comm	_GMAC_SPEED_1000,8,3            ; @GMAC_SPEED_1000
	.comm	_GMAC_SPEED_100,8,3             ; @GMAC_SPEED_100
	.comm	_GMAC_SPEED_10,8,3              ; @GMAC_SPEED_10
	.comm	_PORT_MODE,8,3                  ; @PORT_MODE
	.comm	_MAC_DUPLEX_HALF_CTRL,8,3       ; @MAC_DUPLEX_HALF_CTRL
	.no_dead_strip	_hix5hd2_config_port
.subsections_via_symbols
