	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan78xx_read_raw_eeprom
_lan78xx_read_raw_eeprom:               ## @lan78xx_read_raw_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_HW_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-44(%rbp), %rdx
	callq	_lan78xx_read_reg
	movl	-44(%rbp), %r14d
	movq	(%rbx), %rax
	movq	_ID_REV_CHIP_ID_7800_@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_HW_CFG_LED1_EN_@GOTPCREL(%rip), %rax
	movq	_HW_CFG_LED0_EN_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	notl	%edx
	andl	%r14d, %edx
	movl	%edx, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_lan78xx_write_reg
LBB0_2:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_lan78xx_eeprom_confirm_not_busy
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.3:
	testl	%r13d, %r13d
	jle	LBB0_4
## %bb.5:
	movl	%r13d, %r13d
	movl	%r12d, %r12d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%r15), %edx
	movq	_E2P_CMD_EPC_CMD_READ_@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_E2P_CMD_EPC_BUSY_@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_E2P_CMD_EPC_ADDR_MASK_@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	%eax, %edx
	movl	%edx, -44(%rbp)
	movq	_E2P_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lan78xx_write_reg
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_lan78xx_wait_eeprom
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_E2P_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rdx
	callq	_lan78xx_read_reg
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movzbl	-44(%rbp), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r15,4)
	incq	%r15
	cmpq	%r15, %r13
	jne	LBB0_6
## %bb.12:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_4:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %r14d
LBB0_13:
	movq	_HW_CFG@GOTPCREL(%rip), %r15
LBB0_14:
	movq	_ID_REV_CHIP_ID_7800_@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rax
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_lan78xx_write_reg
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_CFG,4,2                     ## @HW_CFG
	.comm	_ID_REV_CHIP_ID_7800_,8,3       ## @ID_REV_CHIP_ID_7800_
	.comm	_HW_CFG_LED1_EN_,4,2            ## @HW_CFG_LED1_EN_
	.comm	_HW_CFG_LED0_EN_,4,2            ## @HW_CFG_LED0_EN_
	.comm	_E2P_CMD_EPC_BUSY_,4,2          ## @E2P_CMD_EPC_BUSY_
	.comm	_E2P_CMD_EPC_CMD_READ_,4,2      ## @E2P_CMD_EPC_CMD_READ_
	.comm	_E2P_CMD_EPC_ADDR_MASK_,4,2     ## @E2P_CMD_EPC_ADDR_MASK_
	.comm	_E2P_CMD,4,2                    ## @E2P_CMD
	.comm	_EIO,4,2                        ## @EIO
	.comm	_E2P_DATA,4,2                   ## @E2P_DATA
	.no_dead_strip	_lan78xx_read_raw_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan78xx_read_raw_eeprom
_lan78xx_read_raw_eeprom:               ; @lan78xx_read_raw_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x20, _HW_CFG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HW_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_lan78xx_read_reg
	ldr	w25, [sp, #12]
	ldr	x8, [x19]
Lloh2:
	adrp	x26, _ID_REV_CHIP_ID_7800_@GOTPAGE
Lloh3:
	ldr	x26, [x26, _ID_REV_CHIP_ID_7800_@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _HW_CFG_LED1_EN_@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HW_CFG_LED1_EN_@GOTPAGEOFF]
Lloh6:
	adrp	x9, _HW_CFG_LED0_EN_@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HW_CFG_LED0_EN_@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w2, w25, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lan78xx_write_reg
LBB0_2:
	mov	x0, x19
	bl	_lan78xx_eeprom_confirm_not_busy
	mov	x24, x0
	cbnz	w0, LBB0_16
; %bb.3:
	cmp	w23, #1
	b.lt	LBB0_10
; %bb.4:
	str	w25, [sp, #8]                   ; 4-byte Folded Spill
	mov	w23, w23
Lloh10:
	adrp	x27, _E2P_CMD_EPC_BUSY_@GOTPAGE
Lloh11:
	ldr	x27, [x27, _E2P_CMD_EPC_BUSY_@GOTPAGEOFF]
Lloh12:
	adrp	x28, _E2P_CMD_EPC_CMD_READ_@GOTPAGE
Lloh13:
	ldr	x28, [x28, _E2P_CMD_EPC_CMD_READ_@GOTPAGEOFF]
Lloh14:
	adrp	x26, _E2P_CMD_EPC_ADDR_MASK_@GOTPAGE
Lloh15:
	ldr	x26, [x26, _E2P_CMD_EPC_ADDR_MASK_@GOTPAGEOFF]
Lloh16:
	adrp	x25, _E2P_CMD@GOTPAGE
Lloh17:
	ldr	x25, [x25, _E2P_CMD@GOTPAGEOFF]
Lloh18:
	adrp	x20, _E2P_DATA@GOTPAGE
Lloh19:
	ldr	x20, [x20, _E2P_DATA@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x26]
	and	w9, w9, w22
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_lan78xx_write_reg
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_lan78xx_wait_eeprom
	tbnz	w0, #31, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_lan78xx_read_reg
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [sp, #12]
	str	w8, [x21], #4
	add	w22, w22, #1
	subs	x23, x23, #1
	b.ne	LBB0_5
; %bb.9:
	mov	w24, #0
	b	LBB0_13
LBB0_10:
	mov	w24, #0
	b	LBB0_14
LBB0_11:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_13
LBB0_12:
	mov	x24, x0
LBB0_13:
Lloh23:
	adrp	x20, _HW_CFG@GOTPAGE
Lloh24:
	ldr	x20, [x20, _HW_CFG@GOTPAGEOFF]
	ldr	w25, [sp, #8]                   ; 4-byte Folded Reload
Lloh25:
	adrp	x26, _ID_REV_CHIP_ID_7800_@GOTPAGE
Lloh26:
	ldr	x26, [x26, _ID_REV_CHIP_ID_7800_@GOTPAGEOFF]
LBB0_14:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x25
	bl	_lan78xx_write_reg
LBB0_16:
	mov	x0, x24
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_CFG,4,2                     ; @HW_CFG
	.comm	_ID_REV_CHIP_ID_7800_,8,3       ; @ID_REV_CHIP_ID_7800_
	.comm	_HW_CFG_LED1_EN_,4,2            ; @HW_CFG_LED1_EN_
	.comm	_HW_CFG_LED0_EN_,4,2            ; @HW_CFG_LED0_EN_
	.comm	_E2P_CMD_EPC_BUSY_,4,2          ; @E2P_CMD_EPC_BUSY_
	.comm	_E2P_CMD_EPC_CMD_READ_,4,2      ; @E2P_CMD_EPC_CMD_READ_
	.comm	_E2P_CMD_EPC_ADDR_MASK_,4,2     ; @E2P_CMD_EPC_ADDR_MASK_
	.comm	_E2P_CMD,4,2                    ; @E2P_CMD
	.comm	_EIO,4,2                        ; @EIO
	.comm	_E2P_DATA,4,2                   ; @E2P_DATA
	.no_dead_strip	_lan78xx_read_raw_eeprom
.subsections_via_symbols
