	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1c_get_permanent_address
_atl1c_get_permanent_address:           ## @atl1c_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %esi
	callq	_atl1c_read_current_addr
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_23
## %bb.1:
	movq	_REG_OTP_CTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_AT_READ_REG
	movq	%rbx, %rdi
	callq	_atl1c_check_eeprom_exist
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	(%rbx), %rax
	movq	_athr_l1c@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_athr_l2c@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_5:
	movq	-64(%rbp), %rcx
	movq	_OTP_CTRL_CLK_EN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	testq	%rcx, %rdx
	jne	LBB0_7
## %bb.6:
	orq	%rcx, %rdx
	movq	%rdx, -64(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_AT_WRITE_REG
	movq	%rbx, %rdi
	callq	_AT_WRITE_FLUSH
	movl	$1, %edi
	callq	_msleep
	movq	(%rbx), %rax
LBB0_7:
	movq	_athr_l2c_b@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	xorl	%r14d, %r14d
	movq	_athr_l2c_b2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_9:
	movq	_MIIDBG_ANACTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_atl1c_read_phy_dbg
	movq	_ANACTRL_HB_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_atl1c_write_phy_dbg
	movq	_MIIDBG_VOLT_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_atl1c_read_phy_dbg
	movq	_VOLT_CTRL_SWLOWEST@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_atl1c_write_phy_dbg
	movl	$20, %edi
	callq	_udelay
	movl	$1, %r14d
LBB0_10:
	movq	_REG_TWSI_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_AT_READ_REG
	movq	_TWSI_CTRL_SW_LDSTART@GOTPCREL(%rip), %r15
	movq	-56(%rbp), %rdx
	orq	(%r15), %rdx
	movq	%rdx, -56(%rbp)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_AT_WRITE_REG
	movq	_AT_TWSI_EEPROM_TIMEOUT@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	testq	%rcx, %rcx
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	jle	LBB0_11
## %bb.12:
	xorl	%r12d, %r12d
	leaq	-56(%rbp), %r14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_msleep
	movq	_REG_TWSI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_AT_READ_REG
	movq	(%r15), %rax
	testq	%rax, -56(%rbp)
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%r12
	movq	(%r13), %rcx
	cmpq	%rcx, %r12
	jl	LBB0_13
	jmp	LBB0_16
LBB0_2:
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_11:
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_14:
	movq	(%r13), %rcx
LBB0_16:
	movl	$-1, %eax
	cmpq	%rcx, %r12
	movq	_REG_OTP_CTRL@GOTPCREL(%rip), %r14
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	jge	LBB0_23
LBB0_17:
	movq	(%rbx), %rax
	movq	_athr_l1c@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.18:
	movq	_athr_l2c@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
LBB0_19:
	movq	_OTP_CTRL_CLK_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	notq	%rdx
	andq	-64(%rbp), %rdx
	movq	%rdx, -64(%rbp)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_AT_WRITE_REG
	movl	$1, %edi
	callq	_msleep
LBB0_20:
	testl	%r15d, %r15d
	je	LBB0_22
## %bb.21:
	movq	_MIIDBG_ANACTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_atl1c_read_phy_dbg
	movq	_ANACTRL_HB_EN@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_atl1c_write_phy_dbg
	movq	_MIIDBG_VOLT_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_atl1c_read_phy_dbg
	movq	_VOLT_CTRL_SWLOWEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_atl1c_write_phy_dbg
	movl	$20, %edi
	callq	_udelay
LBB0_22:
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_atl1c_read_current_addr
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	$1, %rcx
	sbbl	%eax, %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_OTP_CTRL,4,2               ## @REG_OTP_CTRL
	.comm	_athr_l1c,8,3                   ## @athr_l1c
	.comm	_athr_l2c,8,3                   ## @athr_l2c
	.comm	_OTP_CTRL_CLK_EN,8,3            ## @OTP_CTRL_CLK_EN
	.comm	_athr_l2c_b,8,3                 ## @athr_l2c_b
	.comm	_athr_l2c_b2,8,3                ## @athr_l2c_b2
	.comm	_MIIDBG_ANACTRL,4,2             ## @MIIDBG_ANACTRL
	.comm	_ANACTRL_HB_EN,4,2              ## @ANACTRL_HB_EN
	.comm	_MIIDBG_VOLT_CTRL,4,2           ## @MIIDBG_VOLT_CTRL
	.comm	_VOLT_CTRL_SWLOWEST,4,2         ## @VOLT_CTRL_SWLOWEST
	.comm	_REG_TWSI_CTRL,4,2              ## @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
	.no_dead_strip	_atl1c_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 atl1c_get_permanent_address
_atl1c_get_permanent_address:           ; @atl1c_get_permanent_address
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w1, [x0, #8]
	bl	_atl1c_read_current_addr
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_23
LBB0_2:
Lloh0:
	adrp	x20, _REG_OTP_CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_OTP_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #24
	mov	x0, x19
	bl	_AT_READ_REG
	mov	x0, x19
	bl	_atl1c_check_eeprom_exist
Lloh2:
	adrp	x21, _athr_l1c@GOTPAGE
Lloh3:
	ldr	x21, [x21, _athr_l1c@GOTPAGEOFF]
Lloh4:
	adrp	x22, _athr_l2c@GOTPAGE
Lloh5:
	ldr	x22, [x22, _athr_l2c@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.4:
	ldr	x9, [sp, #24]
Lloh6:
	adrp	x10, _OTP_CTRL_CLK_EN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _OTP_CTRL_CLK_EN@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	tst	x10, x9
	b.ne	LBB0_6
; %bb.5:
	orr	x2, x10, x9
	str	x2, [sp, #24]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_AT_WRITE_REG
	mov	x0, x19
	bl	_AT_WRITE_FLUSH
	mov	w0, #1
	bl	_msleep
	ldr	x8, [x19]
LBB0_6:
Lloh9:
	adrp	x9, _athr_l2c_b@GOTPAGE
Lloh10:
	ldr	x9, [x9, _athr_l2c_b@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _athr_l2c_b2@GOTPAGE
Lloh13:
	ldr	x10, [x10, _athr_l2c_b2@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
; %bb.7:
Lloh15:
	adrp	x23, _MIIDBG_ANACTRL@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MIIDBG_ANACTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_atl1c_read_phy_dbg
Lloh17:
	adrp	x8, _ANACTRL_HB_EN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ANACTRL_HB_EN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_atl1c_write_phy_dbg
Lloh20:
	adrp	x23, _MIIDBG_VOLT_CTRL@GOTPAGE
Lloh21:
	ldr	x23, [x23, _MIIDBG_VOLT_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_atl1c_read_phy_dbg
Lloh22:
	adrp	x8, _VOLT_CTRL_SWLOWEST@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VOLT_CTRL_SWLOWEST@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_atl1c_write_phy_dbg
	mov	w0, #20
	bl	_udelay
	mov	w23, #1
	b	LBB0_10
LBB0_8:
	mov	w23, #0
	b	LBB0_16
LBB0_9:
	mov	w23, #0
LBB0_10:
Lloh25:
	adrp	x24, _REG_TWSI_CTRL@GOTPAGE
Lloh26:
	ldr	x24, [x24, _REG_TWSI_CTRL@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #16
	mov	x0, x19
	bl	_AT_READ_REG
Lloh27:
	adrp	x25, _TWSI_CTRL_SW_LDSTART@GOTPAGE
Lloh28:
	ldr	x25, [x25, _TWSI_CTRL_SW_LDSTART@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [sp, #16]
	orr	x2, x9, x8
	str	x2, [sp, #16]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_AT_WRITE_REG
Lloh29:
	adrp	x27, _AT_TWSI_EEPROM_TIMEOUT@GOTPAGE
Lloh30:
	ldr	x27, [x27, _AT_TWSI_EEPROM_TIMEOUT@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x8, #1
	b.lt	LBB0_14
; %bb.11:
	mov	x26, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_msleep
	ldr	w1, [x24]
	add	x2, sp, #16
	mov	x0, x19
	bl	_AT_READ_REG
	ldr	x8, [sp, #16]
	ldr	x9, [x25]
	tst	x9, x8
	b.eq	LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x26, x26, #1
	ldr	x8, [x27]
	cmp	x26, x8
	b.lt	LBB0_12
	b	LBB0_15
LBB0_14:
	mov	x26, #0
LBB0_15:
	cmp	x26, x8
	b.ge	LBB0_22
LBB0_16:
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_18
; %bb.17:
Lloh31:
	adrp	x8, _OTP_CTRL_CLK_EN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _OTP_CTRL_CLK_EN@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	x9, [sp, #24]
	bic	x2, x9, x8
	str	x2, [sp, #24]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_AT_WRITE_REG
	mov	w0, #1
	bl	_msleep
LBB0_18:
	cbz	w23, LBB0_20
; %bb.19:
Lloh34:
	adrp	x20, _MIIDBG_ANACTRL@GOTPAGE
Lloh35:
	ldr	x20, [x20, _MIIDBG_ANACTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_atl1c_read_phy_dbg
Lloh36:
	adrp	x8, _ANACTRL_HB_EN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ANACTRL_HB_EN@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_atl1c_write_phy_dbg
Lloh39:
	adrp	x20, _MIIDBG_VOLT_CTRL@GOTPAGE
Lloh40:
	ldr	x20, [x20, _MIIDBG_VOLT_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_atl1c_read_phy_dbg
Lloh41:
	adrp	x8, _VOLT_CTRL_SWLOWEST@GOTPAGE
Lloh42:
	ldr	x8, [x8, _VOLT_CTRL_SWLOWEST@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_atl1c_write_phy_dbg
	mov	w0, #20
	bl	_udelay
LBB0_20:
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_atl1c_read_current_addr
	cmp	x0, #0
	csetm	w0, eq
	b	LBB0_23
LBB0_21:
	ldr	x8, [x27]
	cmp	x26, x8
	b.lt	LBB0_16
LBB0_22:
	mov	w0, #-1
LBB0_23:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_OTP_CTRL,4,2               ; @REG_OTP_CTRL
	.comm	_athr_l1c,8,3                   ; @athr_l1c
	.comm	_athr_l2c,8,3                   ; @athr_l2c
	.comm	_OTP_CTRL_CLK_EN,8,3            ; @OTP_CTRL_CLK_EN
	.comm	_athr_l2c_b,8,3                 ; @athr_l2c_b
	.comm	_athr_l2c_b2,8,3                ; @athr_l2c_b2
	.comm	_MIIDBG_ANACTRL,4,2             ; @MIIDBG_ANACTRL
	.comm	_ANACTRL_HB_EN,4,2              ; @ANACTRL_HB_EN
	.comm	_MIIDBG_VOLT_CTRL,4,2           ; @MIIDBG_VOLT_CTRL
	.comm	_VOLT_CTRL_SWLOWEST,4,2         ; @VOLT_CTRL_SWLOWEST
	.comm	_REG_TWSI_CTRL,4,2              ; @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
	.no_dead_strip	_atl1c_get_permanent_address
.subsections_via_symbols
