	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm8704_init_user_dev3
_bcm8704_init_user_dev3:                ## @bcm8704_init_user_dev3
	.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
	movq	_USER_CONTROL_OPTXRST_LVL@GOTPCREL(%rip), %rax
	movq	_USER_CONTROL_OPBIASFLT_LVL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_USER_CONTROL_OBTMPFLT_LVL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%rdi, %r13
	movq	_USER_CONTROL_OPPRFLT_LVL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%rdi), %esi
	movq	_USER_CONTROL_OPTXFLT_LVL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_BCM8704_USER_DEV3_ADDR@GOTPCREL(%rip), %r14
	movq	_USER_CONTROL_OPRXLOS_LVL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r14), %edx
	movq	_USER_CONTROL_OPRXFLT_LVL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_BCM8704_USER_CONTROL@GOTPCREL(%rip), %r15
	movq	_USER_CONTROL_OPTXON_LVL@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %eax
	movq	_USER_CONTROL_RES1_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$63, %r8d
	shll	%cl, %r8d
	orl	%ebx, %r8d
	movl	%eax, %ecx
	callq	_mdio_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	(%r13), %esi
	movl	(%r14), %edx
	movq	_BCM8704_USER_PMD_TX_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_USER_PMD_TX_CTL_XFP_CLKEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_USER_PMD_TX_CTL_TX_DAC_TXD_SH@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %edi
	movq	_USER_PMD_TX_CTL_TX_DAC_TXCK_SH@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$2, %r8d
	shll	%cl, %r8d
	orl	%edi, %r8d
	movq	_USER_PMD_TX_CTL_TSCK_LPWREN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r8d
	movq	%r13, %rdi
	movl	%eax, %ecx
	callq	_mdio_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_bcm8704_user_dev3_readback
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_bcm8704_user_dev3_readback
	testl	%eax, %eax
	je	LBB0_4
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r13), %esi
	movl	(%r14), %edx
	movq	_BCM8704_USER_OPT_DIGITAL_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%r13, %rdi
	callq	_mdio_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movq	_USER_ODIG_CTRL_GPIOS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movq	_USER_ODIG_CTRL_GPIOS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$3, %r8d
	shll	%cl, %r8d
	orl	%eax, %r8d
	movl	(%r13), %esi
	movl	(%r14), %edx
	movl	(%r15), %ecx
	movq	%r13, %rdi
	callq	_mdio_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_mdelay
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_BCM8704_USER_DEV3_ADDR,4,2     ## @BCM8704_USER_DEV3_ADDR
	.comm	_BCM8704_USER_CONTROL,4,2       ## @BCM8704_USER_CONTROL
	.comm	_USER_CONTROL_OPTXRST_LVL,4,2   ## @USER_CONTROL_OPTXRST_LVL
	.comm	_USER_CONTROL_OPBIASFLT_LVL,4,2 ## @USER_CONTROL_OPBIASFLT_LVL
	.comm	_USER_CONTROL_OBTMPFLT_LVL,4,2  ## @USER_CONTROL_OBTMPFLT_LVL
	.comm	_USER_CONTROL_OPPRFLT_LVL,4,2   ## @USER_CONTROL_OPPRFLT_LVL
	.comm	_USER_CONTROL_OPTXFLT_LVL,4,2   ## @USER_CONTROL_OPTXFLT_LVL
	.comm	_USER_CONTROL_OPRXLOS_LVL,4,2   ## @USER_CONTROL_OPRXLOS_LVL
	.comm	_USER_CONTROL_OPRXFLT_LVL,4,2   ## @USER_CONTROL_OPRXFLT_LVL
	.comm	_USER_CONTROL_OPTXON_LVL,4,2    ## @USER_CONTROL_OPTXON_LVL
	.comm	_USER_CONTROL_RES1_SHIFT,4,2    ## @USER_CONTROL_RES1_SHIFT
	.comm	_BCM8704_USER_PMD_TX_CONTROL,4,2 ## @BCM8704_USER_PMD_TX_CONTROL
	.comm	_USER_PMD_TX_CTL_XFP_CLKEN,4,2  ## @USER_PMD_TX_CTL_XFP_CLKEN
	.comm	_USER_PMD_TX_CTL_TX_DAC_TXD_SH,4,2 ## @USER_PMD_TX_CTL_TX_DAC_TXD_SH
	.comm	_USER_PMD_TX_CTL_TX_DAC_TXCK_SH,4,2 ## @USER_PMD_TX_CTL_TX_DAC_TXCK_SH
	.comm	_USER_PMD_TX_CTL_TSCK_LPWREN,4,2 ## @USER_PMD_TX_CTL_TSCK_LPWREN
	.comm	_BCM8704_USER_OPT_DIGITAL_CTRL,4,2 ## @BCM8704_USER_OPT_DIGITAL_CTRL
	.comm	_USER_ODIG_CTRL_GPIOS,4,2       ## @USER_ODIG_CTRL_GPIOS
	.comm	_USER_ODIG_CTRL_GPIOS_SHIFT,4,2 ## @USER_ODIG_CTRL_GPIOS_SHIFT
	.no_dead_strip	_bcm8704_init_user_dev3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm8704_init_user_dev3
_bcm8704_init_user_dev3:                ; @bcm8704_init_user_dev3
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _BCM8704_USER_DEV3_ADDR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BCM8704_USER_DEV3_ADDR@GOTPAGEOFF]
	ldr	w1, [x0]
	ldr	w2, [x20]
Lloh2:
	adrp	x21, _BCM8704_USER_CONTROL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _BCM8704_USER_CONTROL@GOTPAGEOFF]
Lloh4:
	adrp	x8, _USER_CONTROL_OPTXRST_LVL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _USER_CONTROL_OPTXRST_LVL@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _USER_CONTROL_OPBIASFLT_LVL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _USER_CONTROL_OPBIASFLT_LVL@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _USER_CONTROL_OBTMPFLT_LVL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _USER_CONTROL_OBTMPFLT_LVL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh13:
	adrp	x9, _USER_CONTROL_OPPRFLT_LVL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _USER_CONTROL_OPPRFLT_LVL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _USER_CONTROL_OPTXFLT_LVL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _USER_CONTROL_OPTXFLT_LVL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh19:
	adrp	x9, _USER_CONTROL_OPRXLOS_LVL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _USER_CONTROL_OPRXLOS_LVL@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _USER_CONTROL_OPRXFLT_LVL@GOTPAGE
Lloh23:
	ldr	x9, [x9, _USER_CONTROL_OPRXFLT_LVL@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh25:
	adrp	x9, _USER_CONTROL_OPTXON_LVL@GOTPAGE
Lloh26:
	ldr	x9, [x9, _USER_CONTROL_OPTXON_LVL@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh28:
	adrp	x9, _USER_CONTROL_RES1_SHIFT@GOTPAGE
Lloh29:
	ldr	x9, [x9, _USER_CONTROL_RES1_SHIFT@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	mov	w10, #63
	lsl	w9, w10, w9
	orr	w4, w8, w9
	bl	_mdio_write
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w1, [x19]
	ldr	w2, [x20]
Lloh31:
	adrp	x22, _BCM8704_USER_PMD_TX_CONTROL@GOTPAGE
Lloh32:
	ldr	x22, [x22, _BCM8704_USER_PMD_TX_CONTROL@GOTPAGEOFF]
Lloh33:
	adrp	x8, _USER_PMD_TX_CTL_XFP_CLKEN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _USER_PMD_TX_CTL_XFP_CLKEN@GOTPAGEOFF]
	ldr	w3, [x22]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _USER_PMD_TX_CTL_TX_DAC_TXD_SH@GOTPAGE
Lloh37:
	ldr	x9, [x9, _USER_PMD_TX_CTL_TX_DAC_TXD_SH@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh39:
	adrp	x9, _USER_PMD_TX_CTL_TX_DAC_TXCK_SH@GOTPAGE
Lloh40:
	ldr	x9, [x9, _USER_PMD_TX_CTL_TX_DAC_TXCK_SH@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	mov	w10, #2
	lsl	w9, w10, w9
	orr	w8, w8, w9
Lloh42:
	adrp	x9, _USER_PMD_TX_CTL_TSCK_LPWREN@GOTPAGE
Lloh43:
	ldr	x9, [x9, _USER_PMD_TX_CTL_TSCK_LPWREN@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w4, w8, w9
	mov	x0, x19
	bl	_mdio_write
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_bcm8704_user_dev3_readback
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_bcm8704_user_dev3_readback
	cbz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w1, [x19]
	ldr	w2, [x20]
Lloh45:
	adrp	x21, _BCM8704_USER_OPT_DIGITAL_CTRL@GOTPAGE
Lloh46:
	ldr	x21, [x21, _BCM8704_USER_OPT_DIGITAL_CTRL@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_mdio_read
	tbnz	w0, #31, LBB0_4
; %bb.6:
Lloh47:
	adrp	x8, _USER_ODIG_CTRL_GPIOS@GOTPAGE
Lloh48:
	ldr	x8, [x8, _USER_ODIG_CTRL_GPIOS@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh50:
	adrp	x9, _USER_ODIG_CTRL_GPIOS_SHIFT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _USER_ODIG_CTRL_GPIOS_SHIFT@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	mov	w10, #3
	lsl	w9, w10, w9
	orr	w4, w9, w8
	ldr	w1, [x19]
	ldr	w2, [x20]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_mdio_write
	cbnz	w0, LBB0_4
; %bb.7:
	mov	w0, #1000
	bl	_mdelay
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_BCM8704_USER_DEV3_ADDR,4,2     ; @BCM8704_USER_DEV3_ADDR
	.comm	_BCM8704_USER_CONTROL,4,2       ; @BCM8704_USER_CONTROL
	.comm	_USER_CONTROL_OPTXRST_LVL,4,2   ; @USER_CONTROL_OPTXRST_LVL
	.comm	_USER_CONTROL_OPBIASFLT_LVL,4,2 ; @USER_CONTROL_OPBIASFLT_LVL
	.comm	_USER_CONTROL_OBTMPFLT_LVL,4,2  ; @USER_CONTROL_OBTMPFLT_LVL
	.comm	_USER_CONTROL_OPPRFLT_LVL,4,2   ; @USER_CONTROL_OPPRFLT_LVL
	.comm	_USER_CONTROL_OPTXFLT_LVL,4,2   ; @USER_CONTROL_OPTXFLT_LVL
	.comm	_USER_CONTROL_OPRXLOS_LVL,4,2   ; @USER_CONTROL_OPRXLOS_LVL
	.comm	_USER_CONTROL_OPRXFLT_LVL,4,2   ; @USER_CONTROL_OPRXFLT_LVL
	.comm	_USER_CONTROL_OPTXON_LVL,4,2    ; @USER_CONTROL_OPTXON_LVL
	.comm	_USER_CONTROL_RES1_SHIFT,4,2    ; @USER_CONTROL_RES1_SHIFT
	.comm	_BCM8704_USER_PMD_TX_CONTROL,4,2 ; @BCM8704_USER_PMD_TX_CONTROL
	.comm	_USER_PMD_TX_CTL_XFP_CLKEN,4,2  ; @USER_PMD_TX_CTL_XFP_CLKEN
	.comm	_USER_PMD_TX_CTL_TX_DAC_TXD_SH,4,2 ; @USER_PMD_TX_CTL_TX_DAC_TXD_SH
	.comm	_USER_PMD_TX_CTL_TX_DAC_TXCK_SH,4,2 ; @USER_PMD_TX_CTL_TX_DAC_TXCK_SH
	.comm	_USER_PMD_TX_CTL_TSCK_LPWREN,4,2 ; @USER_PMD_TX_CTL_TSCK_LPWREN
	.comm	_BCM8704_USER_OPT_DIGITAL_CTRL,4,2 ; @BCM8704_USER_OPT_DIGITAL_CTRL
	.comm	_USER_ODIG_CTRL_GPIOS,4,2       ; @USER_ODIG_CTRL_GPIOS
	.comm	_USER_ODIG_CTRL_GPIOS_SHIFT,4,2 ; @USER_ODIG_CTRL_GPIOS_SHIFT
	.no_dead_strip	_bcm8704_init_user_dev3
.subsections_via_symbols
