	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76x2u_init_eeprom
_mt76x2u_init_eeprom:                   ## @mt76x2u_init_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	movq	_MT7612U_EEPROM_SIZE@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_devm_kzalloc
	movq	%rax, (%r14)
	movq	(%r15), %rcx
	movq	%rcx, 8(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	cmpq	$4, %rcx
	jl	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_EEPROM@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_MT_VEND_ADDR
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mt76_rr
	movq	(%r14), %rsi
	addq	%rbx, %rsi
	movq	%rax, %rdi
	callq	_put_unaligned_le32
	leaq	4(%rbx), %rax
	addq	$8, %rbx
	cmpq	(%r15), %rbx
	movq	%rax, %rbx
	jle	LBB0_3
LBB0_4:
	movq	%r14, %rdi
	callq	_mt76x02_eeprom_parse_hw_cap
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT7612U_EEPROM_SIZE,8,3        ## @MT7612U_EEPROM_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EEPROM,4,2                     ## @EEPROM
	.no_dead_strip	_mt76x2u_init_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76x2u_init_eeprom
_mt76x2u_init_eeprom:                   ; @mt76x2u_init_eeprom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x21, _MT7612U_EEPROM_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MT7612U_EEPROM_SIZE@GOTPAGEOFF]
	ldr	x1, [x21]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_devm_kzalloc
	str	x0, [x19]
	ldr	x8, [x21]
	str	x8, [x19, #8]
	cbz	x0, LBB0_5
; %bb.1:
	cmp	x8, #4
	b.lt	LBB0_4
; %bb.2:
	mov	x20, #0
Lloh5:
	adrp	x22, _EEPROM@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EEPROM@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	mov	x1, x20
	bl	_MT_VEND_ADDR
	mov	x1, x0
	mov	x0, x19
	bl	_mt76_rr
	ldr	x8, [x19]
	add	x1, x20, x8
	bl	_put_unaligned_le32
	ldr	x8, [x21]
	add	x9, x20, #8
	add	x20, x20, #4
	cmp	x9, x8
	b.le	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_mt76x02_eeprom_parse_hw_cap
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MT7612U_EEPROM_SIZE,8,3        ; @MT7612U_EEPROM_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EEPROM,4,2                     ; @EEPROM
	.no_dead_strip	_mt76x2u_init_eeprom
.subsections_via_symbols
