	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xge_mac_set_speed              ## -- Begin function xge_mac_set_speed
	.p2align	4, 0x90
_xge_mac_set_speed:                     ## @xge_mac_set_speed
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_ICM_CONFIG0_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xge_rd_csr
	movl	%eax, -64(%rbp)
	movq	_ICM_CONFIG2_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_xge_rd_csr
	movl	%eax, %r14d
	movq	_ECM_CONFIG0_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_xge_rd_csr
	movl	%eax, -56(%rbp)
	movq	_RGMII_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_xge_rd_csr
	movl	%eax, -48(%rbp)
	movq	_MAC_CONFIG_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_xge_rd_csr
	movl	%eax, -44(%rbp)
	movq	_INTERFACE_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_xge_rd_csr
	movl	%eax, -52(%rbp)
	movq	_CFG_WAITASYNCRD_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, -60(%rbp)
	movl	(%rbx), %eax
	xorl	%r14d, %r14d
	cmpl	$129, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.3:
	movl	$80, %r15d
	movl	$1, %edx
	movl	$1, %r12d
	jmp	LBB0_5
LBB0_1:
	movl	$500, %r15d                     ## imm = 0x1F4
	movl	$1, %edx
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_4:
	movl	$1, %r14d
	movl	$16, %r15d
	movl	$2, %edx
	movl	$2, %r12d
LBB0_5:
	movq	_INTF_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	callq	_SET_REG_BITS
	movq	_HD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdi
	movl	%r12d, %edx
	callq	_SET_REG_BITS
	movq	_CFG_MACMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdi
	movl	%r12d, %edx
	callq	_SET_REG_BITS
	movq	_CFG_WAITASYNCRD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdi
	movl	%r15d, %edx
	callq	_SET_REG_BITS
	movq	_CFG_SPEED_125@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	movl	%r14d, %edx
	callq	_SET_REG_BIT
	movq	_FULL_DUPLEX@GOTPCREL(%rip), %rax
	movq	_CRC_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_PAD_CRC@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, -44(%rbp)
	movq	_CFG_WFIFOFULLTHR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	movl	$50, %edx
	callq	_SET_REG_BITS
	movq	_MAC_CONFIG_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xge_wr_csr
	movl	(%r13), %esi
	movl	-52(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xge_wr_csr
	movq	_RGMII_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xge_wr_csr
	movq	_ICM_CONFIG0_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-64(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xge_wr_csr
	movq	_ICM_CONFIG2_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xge_wr_csr
	movq	_ECM_CONFIG0_REG_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %edx
	movq	%rbx, %rdi
	callq	_xge_wr_csr
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICM_CONFIG0_REG_0,4,2          ## @ICM_CONFIG0_REG_0
	.comm	_ICM_CONFIG2_REG_0,4,2          ## @ICM_CONFIG2_REG_0
	.comm	_ECM_CONFIG0_REG_0,4,2          ## @ECM_CONFIG0_REG_0
	.comm	_RGMII_REG_0,4,2                ## @RGMII_REG_0
	.comm	_MAC_CONFIG_2,4,2               ## @MAC_CONFIG_2
	.comm	_INTERFACE_CONTROL,4,2          ## @INTERFACE_CONTROL
	.comm	_CFG_WAITASYNCRD_EN,4,2         ## @CFG_WAITASYNCRD_EN
	.comm	_INTF_MODE,4,2                  ## @INTF_MODE
	.comm	_HD_MODE,4,2                    ## @HD_MODE
	.comm	_CFG_MACMODE,4,2                ## @CFG_MACMODE
	.comm	_CFG_WAITASYNCRD,4,2            ## @CFG_WAITASYNCRD
	.comm	_CFG_SPEED_125,4,2              ## @CFG_SPEED_125
	.comm	_FULL_DUPLEX,4,2                ## @FULL_DUPLEX
	.comm	_CRC_EN,4,2                     ## @CRC_EN
	.comm	_PAD_CRC,4,2                    ## @PAD_CRC
	.comm	_CFG_WFIFOFULLTHR,4,2           ## @CFG_WFIFOFULLTHR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xge_mac_set_speed              ; -- Begin function xge_mac_set_speed
	.p2align	2
_xge_mac_set_speed:                     ; @xge_mac_set_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x23, _ICM_CONFIG0_REG_0@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ICM_CONFIG0_REG_0@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_xge_rd_csr
	str	w0, [sp, #28]
Lloh2:
	adrp	x24, _ICM_CONFIG2_REG_0@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ICM_CONFIG2_REG_0@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_xge_rd_csr
	mov	x20, x0
Lloh4:
	adrp	x25, _ECM_CONFIG0_REG_0@GOTPAGE
Lloh5:
	ldr	x25, [x25, _ECM_CONFIG0_REG_0@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_xge_rd_csr
	str	w0, [sp, #20]
Lloh6:
	adrp	x26, _RGMII_REG_0@GOTPAGE
Lloh7:
	ldr	x26, [x26, _RGMII_REG_0@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_xge_rd_csr
	str	w0, [sp, #8]
Lloh8:
	adrp	x27, _MAC_CONFIG_2@GOTPAGE
Lloh9:
	ldr	x27, [x27, _MAC_CONFIG_2@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x19
	bl	_xge_rd_csr
	str	w0, [sp, #16]
Lloh10:
	adrp	x28, _INTERFACE_CONTROL@GOTPAGE
Lloh11:
	ldr	x28, [x28, _INTERFACE_CONTROL@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	x0, x19
	bl	_xge_rd_csr
Lloh12:
	adrp	x8, _CFG_WAITASYNCRD_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CFG_WAITASYNCRD_EN@GOTPAGEOFF]
	str	w0, [sp, #12]
Lloh14:
	ldr	w8, [x8]
	orr	w8, w20, w8
	str	w8, [sp, #24]
	ldr	w8, [x19]
	mov	w9, #500
	mov	w10, #1
	mov	w11, #1
	mov	w12, #16
	mov	w13, #2
	mov	w14, #80
	mov	w15, #1
	cmp	w8, #128
	csel	w13, w13, w15, ne
	csel	w12, w12, w14, ne
	csel	w11, w11, wzr, ne
	cmp	w8, #129
	csel	w2, w10, w13, eq
	csel	w20, wzr, w13, eq
	csel	w21, w9, w12, eq
	csel	w22, wzr, w11, eq
Lloh15:
	adrp	x8, _INTF_MODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INTF_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x0, sp, #16
	bl	_SET_REG_BITS
Lloh18:
	adrp	x8, _HD_MODE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HD_MODE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x0, sp, #12
	mov	x2, x20
	bl	_SET_REG_BITS
Lloh21:
	adrp	x8, _CFG_MACMODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CFG_MACMODE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x0, sp, #28
	mov	x2, x20
	bl	_SET_REG_BITS
Lloh24:
	adrp	x8, _CFG_WAITASYNCRD@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CFG_WAITASYNCRD@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x0, sp, #24
	mov	x2, x21
	bl	_SET_REG_BITS
Lloh27:
	adrp	x8, _CFG_SPEED_125@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CFG_SPEED_125@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	add	x0, sp, #8
	mov	x2, x22
	bl	_SET_REG_BIT
Lloh30:
	adrp	x8, _FULL_DUPLEX@GOTPAGE
Lloh31:
	ldr	x8, [x8, _FULL_DUPLEX@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _CRC_EN@GOTPAGE
Lloh34:
	ldr	x9, [x9, _CRC_EN@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh36:
	adrp	x9, _PAD_CRC@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PAD_CRC@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [sp, #16]
	orr	w8, w8, w9
	str	w8, [sp, #16]
Lloh39:
	adrp	x8, _CFG_WFIFOFULLTHR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _CFG_WFIFOFULLTHR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	add	x0, sp, #20
	mov	w2, #50
	bl	_SET_REG_BITS
	ldr	w1, [x27]
	ldr	w2, [sp, #16]
	mov	x0, x19
	bl	_xge_wr_csr
	ldr	w1, [x28]
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_xge_wr_csr
	ldr	w1, [x26]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_xge_wr_csr
	ldr	w1, [x23]
	ldr	w2, [sp, #28]
	mov	x0, x19
	bl	_xge_wr_csr
	ldr	w1, [x24]
	ldr	w2, [sp, #24]
	mov	x0, x19
	bl	_xge_wr_csr
	ldr	w1, [x25]
	ldr	w2, [sp, #20]
	mov	x0, x19
	bl	_xge_wr_csr
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ICM_CONFIG0_REG_0,4,2          ; @ICM_CONFIG0_REG_0
	.comm	_ICM_CONFIG2_REG_0,4,2          ; @ICM_CONFIG2_REG_0
	.comm	_ECM_CONFIG0_REG_0,4,2          ; @ECM_CONFIG0_REG_0
	.comm	_RGMII_REG_0,4,2                ; @RGMII_REG_0
	.comm	_MAC_CONFIG_2,4,2               ; @MAC_CONFIG_2
	.comm	_INTERFACE_CONTROL,4,2          ; @INTERFACE_CONTROL
	.comm	_CFG_WAITASYNCRD_EN,4,2         ; @CFG_WAITASYNCRD_EN
	.comm	_INTF_MODE,4,2                  ; @INTF_MODE
	.comm	_HD_MODE,4,2                    ; @HD_MODE
	.comm	_CFG_MACMODE,4,2                ; @CFG_MACMODE
	.comm	_CFG_WAITASYNCRD,4,2            ; @CFG_WAITASYNCRD
	.comm	_CFG_SPEED_125,4,2              ; @CFG_SPEED_125
	.comm	_FULL_DUPLEX,4,2                ; @FULL_DUPLEX
	.comm	_CRC_EN,4,2                     ; @CRC_EN
	.comm	_PAD_CRC,4,2                    ; @PAD_CRC
	.comm	_CFG_WFIFOFULLTHR,4,2           ; @CFG_WFIFOFULLTHR
.subsections_via_symbols
