	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1e_get_permanent_address
_atl1e_get_permanent_address:           ## @atl1e_get_permanent_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
	pushq	%rax
	.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	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%rbx), %rdi
	callq	_is_valid_ether_addr
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movq	%rbx, %rdi
	callq	_atl1e_check_eeprom_exist
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movq	_REG_TWSI_CTRL@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	callq	_AT_READ_REG
	movq	_TWSI_CTRL_SW_LDSTART@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_AT_WRITE_REG
	movq	_AT_TWSI_EEPROM_TIMEOUT@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_msleep
	movq	_REG_TWSI_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_AT_READ_REG
	movq	_TWSI_CTRL_SW_LDSTART@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	(%r13), %rax
	cmpq	%rax, %r12
	jl	LBB0_3
LBB0_6:
	cmpq	%rax, %r12
	jge	LBB0_7
LBB0_8:
	movq	_REG_MAC_STA_ADDR@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	callq	_AT_READ_REG
	movq	%rax, %r12
	movq	(%r13), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_AT_READ_REG
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_swab32
	movq	%rax, 8(%r15)
	movl	%r13d, %edi
	callq	_swab16
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_is_valid_ether_addr
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%rbx), %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_memcpy
	jmp	LBB0_12
LBB0_10:
	movq	_AT_ERR_EEPROM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_4:
	movq	(%r13), %rax
	cmpq	%rax, %r12
	jl	LBB0_8
LBB0_7:
	movq	_AT_ERR_TIMEOUT@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %r14d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_REG_TWSI_CTRL,8,3              ## @REG_TWSI_CTRL
	.comm	_TWSI_CTRL_SW_LDSTART,8,3       ## @TWSI_CTRL_SW_LDSTART
	.comm	_AT_TWSI_EEPROM_TIMEOUT,8,3     ## @AT_TWSI_EEPROM_TIMEOUT
	.comm	_AT_ERR_TIMEOUT,4,2             ## @AT_ERR_TIMEOUT
	.comm	_REG_MAC_STA_ADDR,8,3           ## @REG_MAC_STA_ADDR
	.comm	_AT_ERR_EEPROM,4,2              ## @AT_ERR_EEPROM
	.no_dead_strip	_atl1e_get_permanent_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1e_get_permanent_address
_atl1e_get_permanent_address:           ; @atl1e_get_permanent_address
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x23, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x0, [x0]
	bl	_is_valid_ether_addr
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_15
LBB0_2:
	mov	x0, x19
	bl	_atl1e_check_eeprom_exist
	cbnz	w0, LBB0_9
; %bb.3:
Lloh7:
	adrp	x21, _REG_TWSI_CTRL@GOTPAGE
Lloh8:
	ldr	x21, [x21, _REG_TWSI_CTRL@GOTPAGEOFF]
	ldr	x1, [x21]
	mov	x0, x19
	bl	_AT_READ_REG
Lloh9:
	adrp	x22, _TWSI_CTRL_SW_LDSTART@GOTPAGE
Lloh10:
	ldr	x22, [x22, _TWSI_CTRL_SW_LDSTART@GOTPAGEOFF]
	ldr	x8, [x22]
	orr	x2, x8, x0
	ldr	x1, [x21]
	mov	x0, x19
	bl	_AT_WRITE_REG
Lloh11:
	adrp	x25, _AT_TWSI_EEPROM_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x25, [x25, _AT_TWSI_EEPROM_TIMEOUT@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_msleep
	ldr	x1, [x21]
	mov	x0, x19
	bl	_AT_READ_REG
	ldr	x8, [x22]
	tst	x8, x0
	b.eq	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	x8, [x25]
	cmp	x24, x8
	b.lt	LBB0_5
	b	LBB0_8
LBB0_7:
	mov	x24, #0
LBB0_8:
	cmp	x24, x8
	b.ge	LBB0_13
LBB0_9:
Lloh13:
	adrp	x22, _REG_MAC_STA_ADDR@GOTPAGE
Lloh14:
	ldr	x22, [x22, _REG_MAC_STA_ADDR@GOTPAGEOFF]
	ldr	x1, [x22]
	mov	x0, x19
	bl	_AT_READ_REG
	mov	x21, x0
	ldr	x8, [x22]
	add	x1, x8, #4
	mov	x0, x19
	bl	_AT_READ_REG
	mov	x22, x0
	mov	x0, x21
	bl	_swab32
	str	x0, [x20, #8]
	mov	x0, x22
	bl	_swab16
	str	w0, [x20]
	mov	x0, x20
	bl	_is_valid_ether_addr
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x0, [x19]
	ldr	w2, [x23]
	mov	x1, x20
	bl	_memcpy
	mov	w0, #0
	b	LBB0_15
LBB0_11:
Lloh15:
	adrp	x8, _AT_ERR_EEPROM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AT_ERR_EEPROM@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	ldr	x8, [x25]
	cmp	x24, x8
	b.lt	LBB0_9
LBB0_13:
Lloh17:
	adrp	x8, _AT_ERR_TIMEOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AT_ERR_TIMEOUT@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	ldur	x8, [x29, #-72]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_REG_TWSI_CTRL,8,3              ; @REG_TWSI_CTRL
	.comm	_TWSI_CTRL_SW_LDSTART,8,3       ; @TWSI_CTRL_SW_LDSTART
	.comm	_AT_TWSI_EEPROM_TIMEOUT,8,3     ; @AT_TWSI_EEPROM_TIMEOUT
	.comm	_AT_ERR_TIMEOUT,4,2             ; @AT_ERR_TIMEOUT
	.comm	_REG_MAC_STA_ADDR,8,3           ; @REG_MAC_STA_ADDR
	.comm	_AT_ERR_EEPROM,4,2              ; @AT_ERR_EEPROM
	.no_dead_strip	_atl1e_get_permanent_address
.subsections_via_symbols
