	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan78xx_init_mac_address
_lan78xx_init_mac_address:              ## @lan78xx_init_mac_address
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_RX_ADDRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-88(%rbp), %rdx
	callq	_lan78xx_read_reg
	movq	_RX_ADDRH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-84(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_lan78xx_read_reg
	movl	-88(%rbp), %eax
	movzbl	%al, %ecx
	movl	%ecx, -80(%rbp)
	movzbl	%ah, %ecx
	movl	%ecx, -76(%rbp)
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, -72(%rbp)
	shrl	$24, %eax
	movl	%eax, -68(%rbp)
	movl	-84(%rbp), %eax
	movzbl	%al, %ecx
	movl	%ecx, -64(%rbp)
	movzbl	%ah, %eax
	movl	%eax, -60(%rbp)
	leaq	-80(%rbp), %rdi
	callq	_is_valid_ether_addr
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	8(%rbx), %rdi
	leaq	-80(%rbp), %rsi
	callq	_eth_platform_get_mac_address
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_EEPROM_MAC_OFFSET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-80(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_lan78xx_read_eeprom
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r12), %esi
	movl	(%r13), %edx
	leaq	-80(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_lan78xx_read_otp
	testq	%rax, %rax
	jne	LBB0_7
LBB0_5:
	leaq	-80(%rbp), %rdi
	callq	_is_valid_ether_addr
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_8
LBB0_7:
	leaq	-80(%rbp), %rdi
	callq	_eth_random_addr
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rcx
LBB0_8:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_netif_dbg
	movl	-76(%rbp), %eax
	movl	-72(%rbp), %ecx
	shll	$8, %eax
	orl	-80(%rbp), %eax
	shll	$16, %ecx
	movl	-68(%rbp), %edx
	shll	$24, %edx
	orl	%ecx, %edx
	orl	%eax, %edx
	movl	%edx, -88(%rbp)
	movl	-60(%rbp), %eax
	shll	$8, %eax
	orl	-64(%rbp), %eax
	movl	%eax, -84(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_lan78xx_write_reg
	movl	(%r15), %esi
	movl	-84(%rbp), %edx
	movq	%rbx, %rdi
	callq	_lan78xx_write_reg
LBB0_9:
	xorl	%edi, %edi
	callq	_MAF_LO
	movl	-88(%rbp), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_lan78xx_write_reg
	xorl	%edi, %edi
	callq	_MAF_HI
	movq	_MAF_HI_VALID_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	-84(%rbp), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_lan78xx_write_reg
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	-80(%rbp), %rsi
	callq	_ether_addr_copy
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_ADDRL,4,2                   ## @RX_ADDRL
	.comm	_RX_ADDRH,4,2                   ## @RX_ADDRH
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC address read from Device Tree"

	.comm	_EEPROM_MAC_OFFSET,4,2          ## @EEPROM_MAC_OFFSET
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
L_.str.1:                               ## @.str.1
	.asciz	"MAC address read from EEPROM"

L_.str.2:                               ## @.str.2
	.asciz	"MAC address set to random addr"

	.comm	_MAF_HI_VALID_,4,2              ## @MAF_HI_VALID_
	.no_dead_strip	_lan78xx_init_mac_address
.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 lan78xx_init_mac_address
lCPI0_0:
	.long	4294967288                      ; 0xfffffff8
	.long	4294967280                      ; 0xfffffff0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_lan78xx_init_mac_address:              ; @lan78xx_init_mac_address
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x20, _RX_ADDRL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _RX_ADDRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_lan78xx_read_reg
Lloh5:
	adrp	x21, _RX_ADDRH@GOTPAGE
Lloh6:
	ldr	x21, [x21, _RX_ADDRH@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_lan78xx_read_reg
	ldr	w8, [sp, #12]
	and	w9, w8, #0xff
	str	w9, [sp, #16]
	dup.2s	v0, w8
Lloh7:
	adrp	x9, lCPI0_0@PAGE
Lloh8:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	movi	d1, #0x0000ff000000ff
	and.8b	v0, v0, v1
	stur	d0, [sp, #20]
	lsr	w8, w8, #24
	ldr	w9, [sp, #8]
	and	w10, w9, #0xff
	stp	w8, w10, [sp, #28]
	ubfx	w8, w9, #8, #8
	str	w8, [sp, #36]
	add	x0, sp, #16
	bl	_is_valid_ether_addr
	cbnz	x0, LBB0_9
; %bb.1:
	ldr	x0, [x19, #8]
	add	x1, sp, #16
	bl	_eth_platform_get_mac_address
	cbz	w0, LBB0_7
; %bb.2:
Lloh9:
	adrp	x22, _EEPROM_MAC_OFFSET@GOTPAGE
Lloh10:
	ldr	x22, [x22, _EEPROM_MAC_OFFSET@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh11:
	adrp	x23, _ETH_ALEN@GOTPAGE
Lloh12:
	ldr	x23, [x23, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x3, sp, #16
	mov	x0, x19
	bl	_lan78xx_read_eeprom
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x22]
	ldr	w2, [x23]
	add	x3, sp, #16
	mov	x0, x19
	bl	_lan78xx_read_otp
	cbnz	x0, LBB0_6
LBB0_4:
	add	x0, sp, #16
	bl	_is_valid_ether_addr
	cbz	x0, LBB0_6
; %bb.5:
Lloh13:
	adrp	x3, l_.str.1@PAGE
Lloh14:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
	add	x0, sp, #16
	bl	_eth_random_addr
Lloh15:
	adrp	x3, l_.str.2@PAGE
Lloh16:
	add	x3, x3, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
LBB0_8:
Lloh19:
	adrp	x8, _ifup@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	x2, [x19]
	mov	x0, x19
	bl	_netif_dbg
	ldp	w8, w9, [sp, #16]
	orr	w8, w8, w9, lsl #8
	ldp	w9, w10, [sp, #24]
	orr	w8, w8, w9, lsl #16
	orr	w2, w8, w10, lsl #24
	ldp	w8, w9, [sp, #32]
	orr	w8, w8, w9, lsl #8
	stp	w8, w2, [sp, #8]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lan78xx_write_reg
	ldr	w1, [x21]
	ldr	w2, [sp, #8]
	mov	x0, x19
	bl	_lan78xx_write_reg
LBB0_9:
	mov	w0, #0
	bl	_MAF_LO
	mov	x1, x0
	ldr	w2, [sp, #12]
	mov	x0, x19
	bl	_lan78xx_write_reg
	mov	w0, #0
	bl	_MAF_HI
	mov	x1, x0
	ldr	w8, [sp, #8]
Lloh22:
	adrp	x9, _MAF_HI_VALID_@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MAF_HI_VALID_@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_lan78xx_write_reg
	ldr	x8, [x19]
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_ether_addr_copy
	ldr	x8, [sp, #40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	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
	add	sp, sp, #112
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_ADDRL,4,2                   ; @RX_ADDRL
	.comm	_RX_ADDRH,4,2                   ; @RX_ADDRH
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC address read from Device Tree"

	.comm	_EEPROM_MAC_OFFSET,4,2          ; @EEPROM_MAC_OFFSET
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
l_.str.1:                               ; @.str.1
	.asciz	"MAC address read from EEPROM"

l_.str.2:                               ; @.str.2
	.asciz	"MAC address set to random addr"

	.comm	_MAF_HI_VALID_,4,2              ; @MAF_HI_VALID_
	.no_dead_strip	_lan78xx_init_mac_address
.subsections_via_symbols
