	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl2_read_eeprom
_atl2_read_eeprom:                      ## @atl2_read_eeprom
	.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
	movl	%esi, %ebx
	xorl	%eax, %eax
	testb	$3, %bl
	jne	LBB0_13
## %bb.1:
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	_REG_VPD_DATA@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%edx, %edx
	callq	_ATL2_WRITE_REG
	movq	_VPD_CAP_VPD_ADDR_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_VPD_CAP_VPD_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_REG_VPD_CAP@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_ATL2_WRITE_REG
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	movq	_VPD_CAP_VPD_FLAG@GOTPCREL(%rip), %rbx
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.2:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.3:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.4:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.5:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.6:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.7:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.8:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.9:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.10:
	movl	$2, %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	testl	%eax, (%rbx)
	je	LBB0_11
LBB0_12:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ATL2_READ_REG
	movl	%eax, (%r14)
	movl	$1, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_VPD_DATA,4,2               ## @REG_VPD_DATA
	.comm	_VPD_CAP_VPD_ADDR_MASK,4,2      ## @VPD_CAP_VPD_ADDR_MASK
	.comm	_VPD_CAP_VPD_ADDR_SHIFT,4,2     ## @VPD_CAP_VPD_ADDR_SHIFT
	.comm	_REG_VPD_CAP,4,2                ## @REG_VPD_CAP
	.comm	_VPD_CAP_VPD_FLAG,4,2           ## @VPD_CAP_VPD_FLAG
	.no_dead_strip	_atl2_read_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl2_read_eeprom
_atl2_read_eeprom:                      ; @atl2_read_eeprom
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	tst	w1, #0x3
	b.eq	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_13
LBB0_2:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _REG_VPD_DATA@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_VPD_DATA@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #0
	bl	_ATL2_WRITE_REG
Lloh2:
	adrp	x8, _VPD_CAP_VPD_ADDR_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VPD_CAP_VPD_ADDR_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _VPD_CAP_VPD_ADDR_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VPD_CAP_VPD_ADDR_SHIFT@GOTPAGEOFF]
	and	w8, w8, w21
Lloh7:
	ldr	w9, [x9]
	lsl	w2, w8, w9
Lloh8:
	adrp	x21, _REG_VPD_CAP@GOTPAGE
Lloh9:
	ldr	x21, [x21, _REG_VPD_CAP@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_WRITE_REG
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
Lloh10:
	adrp	x23, _VPD_CAP_VPD_FLAG@GOTPAGE
Lloh11:
	ldr	x23, [x23, _VPD_CAP_VPD_FLAG@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.3:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.4:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.5:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.6:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.7:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.8:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.9:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.10:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #2
	bl	_msleep
	ldr	w1, [x21]
	mov	x0, x20
	bl	_ATL2_READ_REG
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_1
LBB0_12:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ATL2_READ_REG
	str	w0, [x19]
	mov	w0, #1
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_VPD_DATA,4,2               ; @REG_VPD_DATA
	.comm	_VPD_CAP_VPD_ADDR_MASK,4,2      ; @VPD_CAP_VPD_ADDR_MASK
	.comm	_VPD_CAP_VPD_ADDR_SHIFT,4,2     ; @VPD_CAP_VPD_ADDR_SHIFT
	.comm	_REG_VPD_CAP,4,2                ; @REG_VPD_CAP
	.comm	_VPD_CAP_VPD_FLAG,4,2           ; @VPD_CAP_VPD_FLAG
	.no_dead_strip	_atl2_read_eeprom
.subsections_via_symbols
