	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc18xx_dwmac_probe
_lpc18xx_dwmac_probe:                   ## @lpc18xx_dwmac_probe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	-40(%rbp), %rsi
	callq	_stmmac_get_platform_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	leaq	-40(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stmmac_probe_config_dt
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_3:
	movl	$1, (%r14)
	leaq	L_.str(%rip), %rdi
	callq	_syscon_regmap_lookup_by_compatible
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_5:
	movq	8(%r14), %rax
	movq	_PHY_INTERFACE_MODE_MII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_LPC18XX_CREG_CREG6_ETHMODE_MII@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_PHY_INTERFACE_MODE_RMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	movq	_LPC18XX_CREG_CREG6_ETHMODE_RMII@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ecx
	movq	_LPC18XX_CREG_CREG6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LPC18XX_CREG_CREG6_ETHMODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_regmap_update_bits
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_stmmac_dvr_probe
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_stmmac_remove_config_dt
LBB0_13:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nxp,lpc1850-creg"

L_.str.1:                               ## @.str.1
	.asciz	"syscon lookup failed\n"

	.comm	_PHY_INTERFACE_MODE_MII,8,3     ## @PHY_INTERFACE_MODE_MII
	.comm	_LPC18XX_CREG_CREG6_ETHMODE_MII,4,2 ## @LPC18XX_CREG_CREG6_ETHMODE_MII
	.comm	_PHY_INTERFACE_MODE_RMII,8,3    ## @PHY_INTERFACE_MODE_RMII
	.comm	_LPC18XX_CREG_CREG6_ETHMODE_RMII,4,2 ## @LPC18XX_CREG_CREG6_ETHMODE_RMII
L_.str.2:                               ## @.str.2
	.asciz	"Only MII and RMII mode supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LPC18XX_CREG_CREG6,4,2         ## @LPC18XX_CREG_CREG6
	.comm	_LPC18XX_CREG_CREG6_ETHMODE_MASK,4,2 ## @LPC18XX_CREG_CREG6_ETHMODE_MASK
	.no_dead_strip	_lpc18xx_dwmac_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc18xx_dwmac_probe
_lpc18xx_dwmac_probe:                   ; @lpc18xx_dwmac_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	add	x1, sp, #8
	bl	_stmmac_get_platform_resources
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	bl	_stmmac_probe_config_dt
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_12
LBB0_3:
	mov	w8, #1
	str	w8, [x20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_syscon_regmap_lookup_by_compatible
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x21
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_11
LBB0_5:
	ldr	x8, [x20, #8]
Lloh4:
	adrp	x9, _PHY_INTERFACE_MODE_MII@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_MII@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _LPC18XX_CREG_CREG6_ETHMODE_MII@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LPC18XX_CREG_CREG6_ETHMODE_MII@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x9, _PHY_INTERFACE_MODE_RMII@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_RMII@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
Lloh12:
	adrp	x8, _LPC18XX_CREG_CREG6_ETHMODE_RMII@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LPC18XX_CREG_CREG6_ETHMODE_RMII@GOTPAGEOFF]
LBB0_9:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _LPC18XX_CREG_CREG6@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LPC18XX_CREG_CREG6@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _LPC18XX_CREG_CREG6_ETHMODE_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LPC18XX_CREG_CREG6_ETHMODE_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_regmap_update_bits
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_stmmac_dvr_probe
	mov	x21, x0
	cbnz	w0, LBB0_11
	b	LBB0_12
LBB0_10:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_stmmac_remove_config_dt
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nxp,lpc1850-creg"

l_.str.1:                               ; @.str.1
	.asciz	"syscon lookup failed\n"

	.comm	_PHY_INTERFACE_MODE_MII,8,3     ; @PHY_INTERFACE_MODE_MII
	.comm	_LPC18XX_CREG_CREG6_ETHMODE_MII,4,2 ; @LPC18XX_CREG_CREG6_ETHMODE_MII
	.comm	_PHY_INTERFACE_MODE_RMII,8,3    ; @PHY_INTERFACE_MODE_RMII
	.comm	_LPC18XX_CREG_CREG6_ETHMODE_RMII,4,2 ; @LPC18XX_CREG_CREG6_ETHMODE_RMII
l_.str.2:                               ; @.str.2
	.asciz	"Only MII and RMII mode supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LPC18XX_CREG_CREG6,4,2         ; @LPC18XX_CREG_CREG6
	.comm	_LPC18XX_CREG_CREG6_ETHMODE_MASK,4,2 ; @LPC18XX_CREG_CREG6_ETHMODE_MASK
	.no_dead_strip	_lpc18xx_dwmac_probe
.subsections_via_symbols
