	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_mac_init
_lan743x_mac_init:                      ## @lan743x_mac_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_MAC_CR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_lan743x_csr_read
	movq	_MAC_CR_ADD_@GOTPCREL(%rip), %rcx
	movq	_MAC_CR_ASD_@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	_MAC_CR_CNTR_RST_@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_lan743x_csr_write
	movq	_MAC_RX_ADDRH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_read
	movl	%eax, %r15d
	movq	_MAC_RX_ADDRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_read
	movzbl	%al, %ecx
	movq	(%rbx), %rdi
	movl	%ecx, (%rdi)
	movzbl	%ah, %ecx
	movl	%ecx, 4(%rdi)
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, 8(%rdi)
	movl	%eax, %ecx
	shrl	$24, %ecx
	movl	%ecx, 12(%rdi)
	movl	%r15d, %edx
	movzbl	%dl, %ecx
	movl	%ecx, 16(%rdi)
	movzbl	%dh, %ecx
	movl	%ecx, 20(%rdi)
	cmpw	$-1, %dx
	jne	LBB0_2
## %bb.1:
	cmpl	$-1, %eax
	je	LBB0_4
LBB0_2:
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	(%rbx), %rdi
LBB0_4:
	callq	_eth_random_addr
LBB0_5:
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_lan743x_mac_set_address
	movl	(%r14), %edi
	movq	(%rbx), %rsi
	callq	_ether_addr_copy
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_CR,4,2                     ## @MAC_CR
	.comm	_MAC_CR_ADD_,4,2                ## @MAC_CR_ADD_
	.comm	_MAC_CR_ASD_,4,2                ## @MAC_CR_ASD_
	.comm	_MAC_CR_CNTR_RST_,4,2           ## @MAC_CR_CNTR_RST_
	.comm	_MAC_RX_ADDRH,4,2               ## @MAC_RX_ADDRH
	.comm	_MAC_RX_ADDRL,4,2               ## @MAC_RX_ADDRL
	.no_dead_strip	_lan743x_mac_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function lan743x_mac_init
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_lan743x_mac_init:                      ; @lan743x_mac_init
	.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
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x20, _MAC_CR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAC_CR@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_lan743x_csr_read
Lloh2:
	adrp	x8, _MAC_CR_ADD_@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAC_CR_ADD_@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _MAC_CR_ASD_@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAC_CR_ASD_@GOTPAGEOFF]
Lloh7:
	adrp	x10, _MAC_CR_CNTR_RST_@GOTPAGE
Lloh8:
	ldr	x10, [x10, _MAC_CR_CNTR_RST_@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w2, w8, w10
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lan743x_csr_write
Lloh11:
	adrp	x8, _MAC_RX_ADDRH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAC_RX_ADDRH@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_read
	mov	x20, x0
	mvn	w22, w0
Lloh14:
	adrp	x8, _MAC_RX_ADDRL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAC_RX_ADDRL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_read
	mov	x8, x0
	and	w9, w0, #0xff
	ldr	x0, [x19]
	str	w9, [x0]
	dup.2s	v0, w8
Lloh17:
	adrp	x9, lCPI0_0@PAGE
Lloh18:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	stur	d0, [x0, #4]
	lsr	w9, w8, #24
	and	w10, w20, #0xff
	stp	w9, w10, [x0, #12]
	ubfx	w9, w20, #8, #8
	str	w9, [x0, #20]
	and	w9, w22, #0xffff
	cmp	w9, #0
	ccmn	w8, #1, #0, eq
	b.eq	LBB0_3
; %bb.1:
	bl	_is_valid_ether_addr
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x19]
LBB0_3:
	bl	_eth_random_addr
LBB0_4:
	ldr	x1, [x19]
	mov	x0, x19
	bl	_lan743x_mac_set_address
	ldr	w0, [x21]
	ldr	x1, [x19]
	bl	_ether_addr_copy
	mov	w0, #0
	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 AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_CR,4,2                     ; @MAC_CR
	.comm	_MAC_CR_ADD_,4,2                ; @MAC_CR_ADD_
	.comm	_MAC_CR_ASD_,4,2                ; @MAC_CR_ASD_
	.comm	_MAC_CR_CNTR_RST_,4,2           ; @MAC_CR_CNTR_RST_
	.comm	_MAC_RX_ADDRH,4,2               ; @MAC_RX_ADDRH
	.comm	_MAC_RX_ADDRL,4,2               ; @MAC_RX_ADDRL
	.no_dead_strip	_lan743x_mac_init
.subsections_via_symbols
