	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_eeprom_init            ## -- Begin function mt7601u_eeprom_init
	.p2align	4, 0x90
_mt7601u_eeprom_init:                   ## @mt7601u_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	%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, %r15
	callq	_mt7601u_efuse_physical_size_check
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	8(%r15), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	_MT7601U_EEPROM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	xorl	%esi, %esi
	movq	_MT_EE_READ@GOTPCREL(%rip), %r14
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	16(%rsi), %r13d
	movq	_MT7601U_EEPROM_SIZE@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jl	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %ecx
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rbx, %rdx
	callq	_mt7601u_efuse_read
	subq	$-128, %rbx
	movl	%r13d, %esi
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movl	%eax, %r12d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_8:
	movq	_MT_EE_VERSION_EE@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx,%rax,8), %rdx
	movq	_MT7601U_EE_MAX_VER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jle	LBB0_10
## %bb.9:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	(%r14), %rax
	movq	(%rbx,%rax,8), %rdx
LBB0_10:
	movl	8(%r15), %edi
	movq	_MT_EE_VERSION_FAE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx,%rax,8), %rcx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	movq	_MT_EE_MAC_ADDR@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,8), %rsi
	movq	%r15, %rdi
	callq	_mt7601u_set_macaddr
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_set_chip_cap
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_set_channel_power
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_set_country_reg
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_set_rf_freq_off
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_set_rssi_offset
	movq	_MT_EE_REF_TEMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx,%rax,8), %rax
	movq	(%r15), %rcx
	movq	%rax, 8(%rcx)
	movq	_MT_EE_LNA_GAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx,%rax,8), %rax
	movq	%rax, (%rcx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_config_tx_power_per_rate
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mt7601u_init_tssi_params
	xorl	%r12d, %r12d
LBB0_11:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MT7601U_EEPROM_SIZE,4,2        ## @MT7601U_EEPROM_SIZE
	.comm	_MT_EE_READ,4,2                 ## @MT_EE_READ
	.comm	_MT_EE_VERSION_EE,8,3           ## @MT_EE_VERSION_EE
	.comm	_MT7601U_EE_MAX_VER,8,3         ## @MT7601U_EE_MAX_VER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Warning: unsupported EEPROM version %02hhx\n"

L_.str.1:                               ## @.str.1
	.asciz	"EEPROM ver:%02hhx fae:%02hhx\n"

	.comm	_MT_EE_VERSION_FAE,8,3          ## @MT_EE_VERSION_FAE
	.comm	_MT_EE_MAC_ADDR,4,2             ## @MT_EE_MAC_ADDR
	.comm	_MT_EE_REF_TEMP,8,3             ## @MT_EE_REF_TEMP
	.comm	_MT_EE_LNA_GAIN,8,3             ## @MT_EE_LNA_GAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt7601u_eeprom_init            ; -- Begin function mt7601u_eeprom_init
	.p2align	2
_mt7601u_eeprom_init:                   ; @mt7601u_eeprom_init
	.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
	mov	x19, x0
	bl	_mt7601u_efuse_physical_size_check
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.1:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #16
	bl	_devm_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.2:
Lloh2:
	adrp	x23, _MT7601U_EEPROM_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MT7601U_EEPROM_SIZE@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w1, [x20]
	bl	_kmalloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
	mov	w1, #0
Lloh4:
	adrp	x24, _MT_EE_READ@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MT_EE_READ@GOTPAGEOFF]
	mov	x22, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	add	w25, w1, #16
	cmp	w8, w25
	b.lt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w3, [x24]
	mov	x0, x19
	mov	x2, x22
	bl	_mt7601u_efuse_read
	add	x22, x22, #128
	mov	x1, x25
	cbz	w0, LBB0_4
; %bb.6:
	mov	x21, x0
	b	LBB0_11
LBB0_7:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_8:
Lloh9:
	adrp	x21, _MT_EE_VERSION_EE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MT_EE_VERSION_EE@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x2, [x20, x8, lsl #3]
Lloh11:
	adrp	x8, _MT7601U_EE_MAX_VER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MT7601U_EE_MAX_VER@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x2, x8
	b.le	LBB0_10
; %bb.9:
	ldr	w0, [x19, #8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	ldr	x8, [x21]
	ldr	x2, [x20, x8, lsl #3]
LBB0_10:
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x8, _MT_EE_VERSION_FAE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MT_EE_VERSION_FAE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	x3, [x20, x8, lsl #3]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
Lloh21:
	adrp	x8, _MT_EE_MAC_ADDR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MT_EE_MAC_ADDR@GOTPAGEOFF]
Lloh23:
	ldrsw	x8, [x8]
	add	x1, x20, x8, lsl #3
	mov	x0, x19
	bl	_mt7601u_set_macaddr
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_set_chip_cap
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_set_channel_power
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_set_country_reg
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_set_rf_freq_off
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_set_rssi_offset
Lloh24:
	adrp	x8, _MT_EE_REF_TEMP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MT_EE_REF_TEMP@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	ldr	x8, [x20, x8, lsl #3]
	ldr	x9, [x19]
	str	x8, [x9, #8]
Lloh27:
	adrp	x8, _MT_EE_LNA_GAIN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MT_EE_LNA_GAIN@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	x8, [x20, x8, lsl #3]
	str	x8, [x9]
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_config_tx_power_per_rate
	mov	x0, x19
	mov	x1, x20
	bl	_mt7601u_init_tssi_params
	mov	w21, #0
LBB0_11:
	mov	x0, x20
	bl	_kfree
LBB0_12:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MT7601U_EEPROM_SIZE,4,2        ; @MT7601U_EEPROM_SIZE
	.comm	_MT_EE_READ,4,2                 ; @MT_EE_READ
	.comm	_MT_EE_VERSION_EE,8,3           ; @MT_EE_VERSION_EE
	.comm	_MT7601U_EE_MAX_VER,8,3         ; @MT7601U_EE_MAX_VER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Warning: unsupported EEPROM version %02hhx\n"

l_.str.1:                               ; @.str.1
	.asciz	"EEPROM ver:%02hhx fae:%02hhx\n"

	.comm	_MT_EE_VERSION_FAE,8,3          ; @MT_EE_VERSION_FAE
	.comm	_MT_EE_MAC_ADDR,4,2             ; @MT_EE_MAC_ADDR
	.comm	_MT_EE_REF_TEMP,8,3             ; @MT_EE_REF_TEMP
	.comm	_MT_EE_LNA_GAIN,8,3             ; @MT_EE_LNA_GAIN
.subsections_via_symbols
