	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ip1001_config_init
_ip1001_config_init:                    ## @ip1001_config_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_ip1xx_reset
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movq	_IP1001_SPEC_CTRL_STATUS_2@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movq	_IP1001_APS_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	%eax, %edx
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movq	%rbx, %rdi
	callq	_phy_interface_is_rgmii
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	_IP10XX_SPEC_CTRL_STATUS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	_IP1001_RXPHASE_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_IP1001_TXPHASE_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%r8d, %edx
	orl	%esi, %edx
	movq	(%rbx), %rdi
	movq	_PHY_INTERFACE_MODE_RGMII_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	je	LBB0_9
## %bb.6:
	notl	%edx
	andl	%edx, %eax
	movq	_PHY_INTERFACE_MODE_RGMII_RXID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	jne	LBB0_8
## %bb.7:
	orl	%esi, %eax
	movl	%eax, %edx
	jmp	LBB0_10
LBB0_8:
	movq	_PHY_INTERFACE_MODE_RGMII_TXID@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rdi
	cmovel	%r8d, %edx
LBB0_9:
	orl	%eax, %edx
LBB0_10:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_12
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IP1001_SPEC_CTRL_STATUS_2,4,2  ## @IP1001_SPEC_CTRL_STATUS_2
	.comm	_IP1001_APS_ON,4,2              ## @IP1001_APS_ON
	.comm	_IP10XX_SPEC_CTRL_STATUS,4,2    ## @IP10XX_SPEC_CTRL_STATUS
	.comm	_IP1001_RXPHASE_SEL,4,2         ## @IP1001_RXPHASE_SEL
	.comm	_IP1001_TXPHASE_SEL,4,2         ## @IP1001_TXPHASE_SEL
	.comm	_PHY_INTERFACE_MODE_RGMII_ID,8,3 ## @PHY_INTERFACE_MODE_RGMII_ID
	.comm	_PHY_INTERFACE_MODE_RGMII_RXID,8,3 ## @PHY_INTERFACE_MODE_RGMII_RXID
	.comm	_PHY_INTERFACE_MODE_RGMII_TXID,8,3 ## @PHY_INTERFACE_MODE_RGMII_TXID
	.no_dead_strip	_ip1001_config_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ip1001_config_init
_ip1001_config_init:                    ; @ip1001_config_init
	.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, x0
	bl	_ip1xx_reset
	tbnz	w0, #31, LBB0_12
; %bb.1:
Lloh0:
	adrp	x20, _IP1001_SPEC_CTRL_STATUS_2@GOTPAGE
Lloh1:
	ldr	x20, [x20, _IP1001_SPEC_CTRL_STATUS_2@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_read
	tbnz	w0, #31, LBB0_12
; %bb.2:
Lloh2:
	adrp	x8, _IP1001_APS_ON@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IP1001_APS_ON@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_write
	tbnz	w0, #31, LBB0_12
; %bb.3:
	mov	x0, x19
	bl	_phy_interface_is_rgmii
	cbz	x0, LBB0_11
; %bb.4:
Lloh5:
	adrp	x20, _IP10XX_SPEC_CTRL_STATUS@GOTPAGE
Lloh6:
	ldr	x20, [x20, _IP10XX_SPEC_CTRL_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_read
	tbnz	w0, #31, LBB0_12
; %bb.5:
Lloh7:
	adrp	x8, _IP1001_RXPHASE_SEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IP1001_RXPHASE_SEL@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x8]
Lloh10:
	adrp	x8, _IP1001_TXPHASE_SEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IP1001_TXPHASE_SEL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w11, w8, w9
	ldr	x10, [x19]
Lloh13:
	adrp	x12, _PHY_INTERFACE_MODE_RGMII_ID@GOTPAGE
Lloh14:
	ldr	x12, [x12, _PHY_INTERFACE_MODE_RGMII_ID@GOTPAGEOFF]
Lloh15:
	ldr	x12, [x12]
	cmp	x10, x12
	b.ne	LBB0_7
; %bb.6:
	orr	w2, w11, w0
	b	LBB0_10
LBB0_7:
	bic	w11, w0, w11
Lloh16:
	adrp	x12, _PHY_INTERFACE_MODE_RGMII_RXID@GOTPAGE
Lloh17:
	ldr	x12, [x12, _PHY_INTERFACE_MODE_RGMII_RXID@GOTPAGEOFF]
Lloh18:
	ldr	x12, [x12]
	cmp	x10, x12
	b.ne	LBB0_9
; %bb.8:
	orr	w2, w11, w9
	b	LBB0_10
LBB0_9:
Lloh19:
	adrp	x9, _PHY_INTERFACE_MODE_RGMII_TXID@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_RGMII_TXID@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x10, x9
	csel	w8, w8, wzr, eq
	orr	w2, w8, w11
LBB0_10:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_phy_write
	tbnz	w0, #31, LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IP1001_SPEC_CTRL_STATUS_2,4,2  ; @IP1001_SPEC_CTRL_STATUS_2
	.comm	_IP1001_APS_ON,4,2              ; @IP1001_APS_ON
	.comm	_IP10XX_SPEC_CTRL_STATUS,4,2    ; @IP10XX_SPEC_CTRL_STATUS
	.comm	_IP1001_RXPHASE_SEL,4,2         ; @IP1001_RXPHASE_SEL
	.comm	_IP1001_TXPHASE_SEL,4,2         ; @IP1001_TXPHASE_SEL
	.comm	_PHY_INTERFACE_MODE_RGMII_ID,8,3 ; @PHY_INTERFACE_MODE_RGMII_ID
	.comm	_PHY_INTERFACE_MODE_RGMII_RXID,8,3 ; @PHY_INTERFACE_MODE_RGMII_RXID
	.comm	_PHY_INTERFACE_MODE_RGMII_TXID,8,3 ; @PHY_INTERFACE_MODE_RGMII_TXID
	.no_dead_strip	_ip1001_config_init
.subsections_via_symbols
