	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lmac_set_training
_lmac_set_training:                     ## @lmac_set_training
	.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	%rsi, %rbx
	movq	(%rsi), %rcx
	movq	_BGX_MODE_10G_KR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	movq	_BGX_MODE_40G_KR@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_3
LBB0_2:
	movq	_BGX_SPUX_BR_PMD_CRTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edx, %esi
	movl	%eax, %edx
	callq	_bgx_reg_read
	movq	_SPU_PMD_CRTL_TRAIN_EN@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
LBB0_3:
	movl	%eax, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGX_MODE_10G_KR,8,3            ## @BGX_MODE_10G_KR
	.comm	_BGX_MODE_40G_KR,8,3            ## @BGX_MODE_40G_KR
	.comm	_BGX_SPUX_BR_PMD_CRTL,4,2       ## @BGX_SPUX_BR_PMD_CRTL
	.comm	_SPU_PMD_CRTL_TRAIN_EN,4,2      ## @SPU_PMD_CRTL_TRAIN_EN
	.no_dead_strip	_lmac_set_training
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lmac_set_training
_lmac_set_training:                     ; @lmac_set_training
	.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, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _BGX_MODE_10G_KR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BGX_MODE_10G_KR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _BGX_MODE_40G_KR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BGX_MODE_40G_KR@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _BGX_SPUX_BR_PMD_CRTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BGX_SPUX_BR_PMD_CRTL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	x1, x2
	mov	x2, x8
	bl	_bgx_reg_read
Lloh9:
	adrp	x8, _SPU_PMD_CRTL_TRAIN_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SPU_PMD_CRTL_TRAIN_EN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w8, w8, w0
	b	LBB0_3
LBB0_2:
	mov	w8, #0
LBB0_3:
	str	w8, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BGX_MODE_10G_KR,8,3            ; @BGX_MODE_10G_KR
	.comm	_BGX_MODE_40G_KR,8,3            ; @BGX_MODE_40G_KR
	.comm	_BGX_SPUX_BR_PMD_CRTL,4,2       ; @BGX_SPUX_BR_PMD_CRTL
	.comm	_SPU_PMD_CRTL_TRAIN_EN,4,2      ; @SPU_PMD_CRTL_TRAIN_EN
	.no_dead_strip	_lmac_set_training
.subsections_via_symbols
