	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arc_emac_probe                 ## -- Begin function arc_emac_probe
	.p2align	4, 0x90
_arc_emac_probe:                        ## @arc_emac_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	32(%rdi), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movl	(%r13), %edi
	xorl	%r15d, %r15d
	leaq	-72(%rbp), %rdx
	xorl	%esi, %esi
	callq	_of_address_to_resource
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_4:
	subl	(%rax), %r15d
LBB0_5:
	movq	%r14, %rdi
	callq	_of_node_put
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_irq_of_parse_and_map
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %ebx
	movq	_arc_emac_netdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r12)
	movq	_arc_emac_ethtool_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r12)
	movq	_TX_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	%r12, %rdi
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%r13, 56(%rax)
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_devm_ioremap_resource
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%r15), %rdx
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%rdx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_5
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_3
LBB0_12:
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_15
## %bb.13:
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_15:
	movl	(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	leaq	-52(%rbp), %rdx
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	leaq	L_.str.7(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_17:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15), %rdi
	callq	_clk_get_rate
	movl	%eax, -52(%rbp)
LBB0_18:
	movq	_R_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_arc_reg_get
	movl	%eax, %ecx
	andl	$-131073, %ecx                  ## imm = 0xFFFDFFFF
	cmpl	$392450, %ecx                   ## imm = 0x5FD02
	jne	LBB0_22
## %bb.19:
	leaq	L_.str.9(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_R_POLLRATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %eax
	imulq	$1125899907, %rax, %rdx         ## imm = 0x431BDE83
	shrq	$50, %rdx
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_arc_reg_set
	movl	%ebx, (%r12)
	leaq	L_.str.10(%rip), %rsi
	movq	%r13, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_arc_emac_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %esi
	movl	8(%r12), %r8d
	movq	%r13, %rdi
	xorl	%ecx, %ecx
	movq	%r12, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_26
## %bb.20:
	movl	%eax, %r15d
	leaq	L_.str.11(%rip), %rsi
LBB0_21:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_24
LBB0_22:
	leaq	L_.str.8(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_23:
	subl	(%rax), %r15d
LBB0_24:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.25:
	callq	_clk_disable_unprepare
	jmp	LBB0_5
LBB0_26:
	movl	(%r13), %edi
	callq	_of_get_mac_address
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:
	movq	%r12, %rdi
	callq	_eth_hw_addr_random
	jmp	LBB0_29
LBB0_28:
	movl	4(%r12), %edi
	movq	%r15, %rsi
	callq	_ether_addr_copy
LBB0_29:
	movq	%r12, %rdi
	callq	_arc_emac_set_address_internal
	movl	4(%r12), %edx
	leaq	L_.str.12(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	_RX_RING_SZ@GOTPCREL(%rip), %rcx
	movq	_TX_RING_SZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rcx), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	32(%rbx), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_dmam_alloc_coherent
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_32
## %bb.30:
	movq	_RX_BD_NUM@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, 48(%rbx)
	movq	32(%rbx), %rdx
	movq	_RX_RING_SZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%rdx, %rcx
	movq	%rcx, 24(%rbx)
	leaq	L_.str.14(%rip), %rsi
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%rbx, %rdi
	callq	_arc_mdio_probe
	testl	%eax, %eax
	je	LBB0_33
## %bb.31:
	movl	%eax, %r15d
	leaq	L_.str.15(%rip), %rsi
	jmp	LBB0_21
LBB0_32:
	leaq	L_.str.13(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_33:
	movq	_arc_emac_adjust_link@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	movl	-64(%rbp), %r8d                 ## 4-byte Reload
	callq	_of_phy_connect
	testq	%rax, %rax
	je	LBB0_36
## %bb.34:
	movq	8(%rax), %rcx
	movl	(%rcx), %edx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %ecx
	leaq	L_.str.17(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$16, %rbx
	movq	_arc_emac_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ARC_EMAC_NAPI_WEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_netif_napi_add
	movq	%r12, %rdi
	callq	_register_netdev
	testl	%eax, %eax
	je	LBB0_5
## %bb.35:
	movl	%eax, %r12d
	leaq	L_.str.18(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_netif_napi_del
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_phy_disconnect
	movl	%r12d, %r15d
	jmp	LBB0_37
LBB0_36:
	leaq	L_.str.16(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_37:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_arc_mdio_remove
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy"

L_.str.1:                               ## @.str.1
	.asciz	"failed to retrieve phy description from device tree\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"failed to retrieve registers base from device tree\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to retrieve <irq> value from device tree\n"

	.comm	_arc_emac_netdev_ops,4,2        ## @arc_emac_netdev_ops
	.comm	_arc_emac_ethtool_ops,4,2       ## @arc_emac_ethtool_ops
	.comm	_TX_TIMEOUT,4,2                 ## @TX_TIMEOUT
L_.str.4:                               ## @.str.4
	.asciz	"Registers base address is 0x%p\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to enable clock\n"

L_.str.6:                               ## @.str.6
	.asciz	"clock-frequency"

L_.str.7:                               ## @.str.7
	.asciz	"failed to retrieve <clock-frequency> from device tree\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_R_ID,4,2                       ## @R_ID
L_.str.8:                               ## @.str.8
	.asciz	"ARC EMAC not detected, id=0x%x\n"

L_.str.9:                               ## @.str.9
	.asciz	"ARC EMAC detected with id: 0x%x\n"

	.comm	_R_POLLRATE,4,2                 ## @R_POLLRATE
L_.str.10:                              ## @.str.10
	.asciz	"IRQ is %d\n"

	.comm	_arc_emac_intr,4,2              ## @arc_emac_intr
L_.str.11:                              ## @.str.11
	.asciz	"could not allocate IRQ\n"

L_.str.12:                              ## @.str.12
	.asciz	"MAC address is now %pM\n"

	.comm	_RX_RING_SZ,8,3                 ## @RX_RING_SZ
	.comm	_TX_RING_SZ,8,3                 ## @TX_RING_SZ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.13:                              ## @.str.13
	.asciz	"failed to allocate data buffers\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RX_BD_NUM,8,3                  ## @RX_BD_NUM
L_.str.14:                              ## @.str.14
	.asciz	"EMAC Device addr: Rx Ring [0x%x], Tx Ring[%x]\n"

L_.str.15:                              ## @.str.15
	.asciz	"failed to probe MII bus\n"

	.comm	_arc_emac_adjust_link,4,2       ## @arc_emac_adjust_link
L_.str.16:                              ## @.str.16
	.asciz	"of_phy_connect() failed\n"

L_.str.17:                              ## @.str.17
	.asciz	"connected to %s phy with id 0x%x\n"

	.comm	_arc_emac_poll,4,2              ## @arc_emac_poll
	.comm	_ARC_EMAC_NAPI_WEIGHT,4,2       ## @ARC_EMAC_NAPI_WEIGHT
L_.str.18:                              ## @.str.18
	.asciz	"failed to register network device\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arc_emac_probe                 ; -- Begin function arc_emac_probe
	.p2align	2
_arc_emac_probe:                        ; @arc_emac_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	mov	x22, x0
	ldr	x20, [x0, #32]
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20]
	add	x2, sp, #24
	mov	w1, #0
	bl	_of_address_to_resource
	cbz	w0, LBB0_8
; %bb.2:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_3:
	mov	x0, x20
	bl	_dev_err
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_5:
	mov	x0, x19
	bl	_of_node_put
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_7:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	ldr	w0, [x20]
	mov	w1, #0
	bl	_irq_of_parse_and_map
	cbz	w0, LBB0_11
; %bb.9:
	mov	x25, x0
Lloh11:
	adrp	x8, _arc_emac_netdev_ops@GOTPAGE
Lloh12:
	ldr	x8, [x8, _arc_emac_netdev_ops@GOTPAGEOFF]
Lloh13:
	adrp	x9, _arc_emac_ethtool_ops@GOTPAGE
Lloh14:
	ldr	x9, [x9, _arc_emac_ethtool_ops@GOTPAGEOFF]
	stp	x9, x8, [x22, #16]
Lloh15:
	adrp	x8, _TX_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TX_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x22, #12]
	mov	x0, x22
	bl	_netdev_priv
	mov	x21, x0
	str	x20, [x0, #56]
	add	x1, sp, #24
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	x0, [x21]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x21]
	cbz	x8, LBB0_12
; %bb.10:
	bl	_PTR_ERR
	mov	x24, x0
	b	LBB0_5
LBB0_11:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_12:
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_15
; %bb.13:
	bl	_clk_prepare_enable
	cbz	w0, LBB0_17
; %bb.14:
	mov	x24, x0
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_5
LBB0_15:
	ldr	w0, [x20]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x2, sp, #20
	bl	_of_property_read_u32
	cbz	x0, LBB0_18
; %bb.16:
Lloh26:
	adrp	x1, l_.str.7@PAGE
Lloh27:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_17:
	ldr	x0, [x21, #8]
	bl	_clk_get_rate
	str	w0, [sp, #20]
LBB0_18:
Lloh30:
	adrp	x8, _R_ID@GOTPAGE
Lloh31:
	ldr	x8, [x8, _R_ID@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_arc_reg_get
	mov	x2, x0
	and	w8, w0, #0xfffdffff
	sub	w8, w8, #95, lsl #12            ; =389120
	cmp	w8, #3330
	b.ne	LBB0_22
; %bb.19:
Lloh33:
	adrp	x1, l_.str.9@PAGE
Lloh34:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_info
Lloh35:
	adrp	x8, _R_POLLRATE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _R_POLLRATE@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	w8, [sp, #20]
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	mul	x8, x8, x9
	lsr	x2, x8, #50
	mov	x0, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_arc_reg_set
	str	w25, [x22]
Lloh38:
	adrp	x1, l_.str.10@PAGE
Lloh39:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x20
	mov	x2, x25
	bl	_dev_info
	ldr	w1, [x22]
Lloh40:
	adrp	x8, _arc_emac_intr@GOTPAGE
Lloh41:
	ldr	x8, [x8, _arc_emac_intr@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	ldr	w4, [x22, #8]
	mov	x0, x20
	mov	w3, #0
	mov	x5, x22
	bl	_devm_request_irq
	cbz	w0, LBB0_25
; %bb.20:
	mov	x24, x0
Lloh43:
	adrp	x1, l_.str.11@PAGE
Lloh44:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_21:
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x21, #8]
	cbnz	x0, LBB0_24
	b	LBB0_5
LBB0_22:
	str	x2, [sp]
Lloh45:
	adrp	x1, l_.str.8@PAGE
Lloh46:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh47:
	adrp	x8, _ENODEV@GOTPAGE
Lloh48:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w24, w8
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_5
LBB0_24:
	bl	_clk_disable_unprepare
	b	LBB0_5
LBB0_25:
	ldr	w0, [x20]
	bl	_of_get_mac_address
	mov	x24, x0
	bl	_IS_ERR
	cbz	x0, LBB0_27
; %bb.26:
	mov	x0, x22
	bl	_eth_hw_addr_random
	b	LBB0_28
LBB0_27:
	ldr	w0, [x22, #4]
	mov	x1, x24
	bl	_ether_addr_copy
LBB0_28:
	mov	x0, x22
	bl	_arc_emac_set_address_internal
	ldr	w2, [x22, #4]
Lloh49:
	adrp	x1, l_.str.12@PAGE
Lloh50:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh51:
	adrp	x24, _RX_RING_SZ@GOTPAGE
Lloh52:
	ldr	x24, [x24, _RX_RING_SZ@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh53:
	adrp	x9, _TX_RING_SZ@GOTPAGE
Lloh54:
	ldr	x9, [x9, _TX_RING_SZ@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	add	x1, x9, x8
	add	x2, x21, #32
Lloh56:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh57:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh58:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dmam_alloc_coherent
	str	x0, [x21, #40]
	cbz	x0, LBB0_31
; %bb.29:
Lloh59:
	adrp	x8, _RX_BD_NUM@GOTPAGE
Lloh60:
	ldr	x8, [x8, _RX_BD_NUM@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	add	x8, x8, x0
	str	x8, [x21, #48]
	ldr	x8, [x21, #32]
	ldr	x9, [x24]
	add	x9, x9, x8
	str	x9, [x21, #24]
	stp	x8, x9, [sp]
Lloh62:
	adrp	x1, l_.str.14@PAGE
Lloh63:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	x0, x21
	bl	_arc_mdio_probe
	cbz	w0, LBB0_32
; %bb.30:
	mov	x24, x0
Lloh64:
	adrp	x1, l_.str.15@PAGE
Lloh65:
	add	x1, x1, l_.str.15@PAGEOFF
	b	LBB0_21
LBB0_31:
Lloh66:
	adrp	x1, l_.str.13@PAGE
Lloh67:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh68:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh69:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_23
LBB0_32:
Lloh70:
	adrp	x8, _arc_emac_adjust_link@GOTPAGE
Lloh71:
	ldr	x8, [x8, _arc_emac_adjust_link@GOTPAGEOFF]
Lloh72:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x19
	mov	w3, #0
	mov	x4, x23
	bl	_of_phy_connect
	cbz	x0, LBB0_35
; %bb.33:
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	w2, [x8]
	ldr	w8, [x0]
	str	x8, [sp]
Lloh73:
	adrp	x1, l_.str.17@PAGE
Lloh74:
	add	x1, x1, l_.str.17@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	add	x25, x21, #16
Lloh75:
	adrp	x8, _arc_emac_poll@GOTPAGE
Lloh76:
	ldr	x8, [x8, _arc_emac_poll@GOTPAGEOFF]
Lloh77:
	ldr	w2, [x8]
Lloh78:
	adrp	x8, _ARC_EMAC_NAPI_WEIGHT@GOTPAGE
Lloh79:
	ldr	x8, [x8, _ARC_EMAC_NAPI_WEIGHT@GOTPAGEOFF]
Lloh80:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x25
	bl	_netif_napi_add
	mov	x0, x22
	bl	_register_netdev
	mov	x24, x0
	cbz	w0, LBB0_5
; %bb.34:
Lloh81:
	adrp	x1, l_.str.18@PAGE
Lloh82:
	add	x1, x1, l_.str.18@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x25
	bl	_netif_napi_del
	mov	x0, x23
	bl	_phy_disconnect
	b	LBB0_36
LBB0_35:
Lloh83:
	adrp	x1, l_.str.16@PAGE
Lloh84:
	add	x1, x1, l_.str.16@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh85:
	adrp	x8, _ENODEV@GOTPAGE
Lloh86:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh87:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_36:
	mov	x0, x21
	bl	_arc_mdio_remove
	ldr	x0, [x21, #8]
	cbnz	x0, LBB0_24
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpAdd	Lloh83, Lloh84
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy"

l_.str.1:                               ; @.str.1
	.asciz	"failed to retrieve phy description from device tree\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"failed to retrieve registers base from device tree\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to retrieve <irq> value from device tree\n"

	.comm	_arc_emac_netdev_ops,4,2        ; @arc_emac_netdev_ops
	.comm	_arc_emac_ethtool_ops,4,2       ; @arc_emac_ethtool_ops
	.comm	_TX_TIMEOUT,4,2                 ; @TX_TIMEOUT
l_.str.4:                               ; @.str.4
	.asciz	"Registers base address is 0x%p\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to enable clock\n"

l_.str.6:                               ; @.str.6
	.asciz	"clock-frequency"

l_.str.7:                               ; @.str.7
	.asciz	"failed to retrieve <clock-frequency> from device tree\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_R_ID,4,2                       ; @R_ID
l_.str.8:                               ; @.str.8
	.asciz	"ARC EMAC not detected, id=0x%x\n"

l_.str.9:                               ; @.str.9
	.asciz	"ARC EMAC detected with id: 0x%x\n"

	.comm	_R_POLLRATE,4,2                 ; @R_POLLRATE
l_.str.10:                              ; @.str.10
	.asciz	"IRQ is %d\n"

	.comm	_arc_emac_intr,4,2              ; @arc_emac_intr
l_.str.11:                              ; @.str.11
	.asciz	"could not allocate IRQ\n"

l_.str.12:                              ; @.str.12
	.asciz	"MAC address is now %pM\n"

	.comm	_RX_RING_SZ,8,3                 ; @RX_RING_SZ
	.comm	_TX_RING_SZ,8,3                 ; @TX_RING_SZ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.13:                              ; @.str.13
	.asciz	"failed to allocate data buffers\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RX_BD_NUM,8,3                  ; @RX_BD_NUM
l_.str.14:                              ; @.str.14
	.asciz	"EMAC Device addr: Rx Ring [0x%x], Tx Ring[%x]\n"

l_.str.15:                              ; @.str.15
	.asciz	"failed to probe MII bus\n"

	.comm	_arc_emac_adjust_link,4,2       ; @arc_emac_adjust_link
l_.str.16:                              ; @.str.16
	.asciz	"of_phy_connect() failed\n"

l_.str.17:                              ; @.str.17
	.asciz	"connected to %s phy with id 0x%x\n"

	.comm	_arc_emac_poll,4,2              ; @arc_emac_poll
	.comm	_ARC_EMAC_NAPI_WEIGHT,4,2       ; @ARC_EMAC_NAPI_WEIGHT
l_.str.18:                              ; @.str.18
	.asciz	"failed to register network device\n"

.subsections_via_symbols
