	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emac_sgmii_config              ## -- Begin function emac_sgmii_config
	.p2align	4, 0x90
_emac_sgmii_config:                     ## @emac_sgmii_config
	.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	%rsi, %r15
	movq	%rdi, %rbx
	callq	_has_acpi_companion
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	24(%r15), %rsi
	movq	_emac_sgmii_acpi_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_device_find_child
	testq	%rax, %rax
	je	LBB0_2
## %bb.10:
	movq	%rax, %rdi
	callq	_to_platform_device
	movq	%rax, %r14
LBB0_11:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.16:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_18
LBB0_19:
	movq	%r15, %rdi
	callq	_emac_sgmii_init
	testl	%eax, %eax
	je	LBB0_20
## %bb.22:
	movl	%eax, %r12d
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:
	callq	_iounmap
	jmp	LBB0_24
LBB0_3:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_of_find_device_by_node
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_of_node_put
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	movq	_emac_sgmii_dt_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	(%rax), %rax
	movq	%rax, 24(%r15)
	jmp	LBB0_11
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	xorl	%r12d, %r12d
	jmp	LBB0_26
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_25
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_26
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_26
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_25
LBB0_20:
	movq	%r15, %rdi
	callq	_emac_sgmii_link_init
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	jle	LBB0_25
## %bb.21:
	movl	%eax, (%r15)
	jmp	LBB0_25
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_24:
	movq	8(%r15), %rdi
	callq	_iounmap
LBB0_25:
	movq	%r14, %rdi
	callq	_put_device
LBB0_26:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_emac_sgmii_acpi_match,4,2      ## @emac_sgmii_acpi_match
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot find internal phy node\n"

L_.str.1:                               ## @.str.1
	.asciz	"internal-phy"

L_.str.2:                               ## @.str.2
	.asciz	"missing internal-phy property\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.3:                               ## @.str.3
	.asciz	"invalid internal-phy property\n"

	.comm	_emac_sgmii_dt_match,4,2        ## @emac_sgmii_dt_match
L_.str.4:                               ## @.str.4
	.asciz	"unrecognized internal phy node\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emac_sgmii_config              ; -- Begin function emac_sgmii_config
	.p2align	2
_emac_sgmii_config:                     ; @emac_sgmii_config
	.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, x1
	mov	x21, x0
	bl	_has_acpi_companion
	cbz	x0, LBB0_10
; %bb.1:
	add	x1, x19, #24
Lloh0:
	adrp	x8, _emac_sgmii_acpi_match@GOTPAGE
Lloh1:
	ldr	x8, [x8, _emac_sgmii_acpi_match@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_device_find_child
	cbz	x0, LBB0_14
; %bb.2:
	bl	_to_platform_device
	mov	x20, x0
LBB0_3:
Lloh3:
	adrp	x22, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x22, [x22, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_15
; %bb.4:
	ldr	w21, [x0]
	bl	_resource_size
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	str	x0, [x19, #8]
	cbz	x0, LBB0_17
; %bb.5:
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #1
	bl	_platform_get_resource
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w21, [x0]
	bl	_resource_size
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	str	x0, [x19, #16]
	cbz	x0, LBB0_25
LBB0_7:
	mov	x0, x19
	bl	_emac_sgmii_init
	cbz	w0, LBB0_22
; %bb.8:
	mov	x21, x0
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_26
; %bb.9:
	bl	_iounmap
	b	LBB0_26
LBB0_10:
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_16
; %bb.11:
	mov	x22, x0
	bl	_of_find_device_by_node
	mov	x20, x0
	mov	x0, x22
	bl	_of_node_put
	cbz	x20, LBB0_18
; %bb.12:
Lloh7:
	adrp	x8, _emac_sgmii_dt_match@GOTPAGE
Lloh8:
	ldr	x8, [x8, _emac_sgmii_dt_match@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_of_match_device
	cbz	x0, LBB0_20
; %bb.13:
	ldr	x8, [x0]
	str	x8, [x19, #24]
	b	LBB0_3
LBB0_14:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	mov	w21, #0
	b	LBB0_28
LBB0_15:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_21
LBB0_16:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_17:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_21
LBB0_18:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_19:
	mov	x0, x21
	bl	_dev_err
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_28
LBB0_20:
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_21:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_27
LBB0_22:
	mov	x0, x19
	bl	_emac_sgmii_link_init
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	cmp	w0, #1
	b.lt	LBB0_24
; %bb.23:
	str	w0, [x19]
LBB0_24:
	mov	x0, x20
	bl	_put_device
	mov	w21, #0
	b	LBB0_28
LBB0_25:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_26:
	ldr	x0, [x19, #8]
	bl	_iounmap
LBB0_27:
	mov	x0, x20
	bl	_put_device
LBB0_28:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_emac_sgmii_acpi_match,4,2      ; @emac_sgmii_acpi_match
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot find internal phy node\n"

l_.str.1:                               ; @.str.1
	.asciz	"internal-phy"

l_.str.2:                               ; @.str.2
	.asciz	"missing internal-phy property\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.3:                               ; @.str.3
	.asciz	"invalid internal-phy property\n"

	.comm	_emac_sgmii_dt_match,4,2        ; @emac_sgmii_dt_match
l_.str.4:                               ; @.str.4
	.asciz	"unrecognized internal phy node\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
