	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7615_eeprom_init             ## -- Begin function mt7615_eeprom_init
	.p2align	4, 0x90
_mt7615_eeprom_init:                    ## @mt7615_eeprom_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_mt7615_eeprom_load
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_mt7615_check_eeprom
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rdi
	movq	_MT7615_EEPROM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_mt7615_apply_cal_free_data
LBB0_5:
	movq	%rbx, %rdi
	callq	_mt7615_eeprom_parse_hw_cap
	movq	8(%rbx), %rdi
	movq	_MT_EE_MAC_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_mt76_eeprom_override
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT7615_EEPROM_SIZE,4,2         ## @MT7615_EEPROM_SIZE
	.comm	_MT_EE_MAC_ADDR,8,3             ## @MT_EE_MAC_ADDR
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7615_eeprom_init             ; -- Begin function mt7615_eeprom_init
	.p2align	2
_mt7615_eeprom_init:                    ; @mt7615_eeprom_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mt7615_eeprom_load
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_mt7615_check_eeprom
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_4
; %bb.3:
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _MT7615_EEPROM_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT7615_EEPROM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_memcpy
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_mt7615_apply_cal_free_data
LBB0_5:
	mov	x0, x19
	bl	_mt7615_eeprom_parse_hw_cap
Lloh3:
	adrp	x8, _MT_EE_MAC_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_EE_MAC_ADDR@GOTPAGEOFF]
	ldp	x9, x0, [x19]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh6:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_memcpy
	mov	x0, x19
	bl	_mt76_eeprom_override
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MT7615_EEPROM_SIZE,4,2         ; @MT7615_EEPROM_SIZE
	.comm	_MT_EE_MAC_ADDR,8,3             ; @MT_EE_MAC_ADDR
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
.subsections_via_symbols
