	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_get_nvram_size
_tg3_get_nvram_size:                    ## @tg3_get_nvram_size
	.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
	movq	_NO_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tg3_flag
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_9
## %bb.2:
	movl	-12(%rbp), %eax
	movq	_TG3_EEPROM_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.4:
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$240, %esi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movzwl	%ax, %edi
	callq	_swab16
	shll	$10, %eax
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	callq	_tg3_get_eeprom_size
	jmp	LBB0_9
LBB0_7:
	movq	_TG3_NVRAM_SIZE_512KB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movl	%eax, (%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NO_NVRAM,4,2                   ## @NO_NVRAM
	.comm	_TG3_EEPROM_MAGIC,4,2           ## @TG3_EEPROM_MAGIC
	.comm	_TG3_NVRAM_SIZE_512KB,4,2       ## @TG3_NVRAM_SIZE_512KB
	.no_dead_strip	_tg3_get_nvram_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_get_nvram_size
_tg3_get_nvram_size:                    ; @tg3_get_nvram_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _NO_NVRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NO_NVRAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tg3_flag
	cbnz	x0, LBB0_9
; %bb.1:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_9
; %bb.2:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _TG3_EEPROM_MAGIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TG3_EEPROM_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #240
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_7
; %bb.4:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_7
; %bb.5:
	and	w0, w8, #0xffff
	bl	_swab16
	lsl	w8, w0, #10
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_tg3_get_eeprom_size
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _TG3_NVRAM_SIZE_512KB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TG3_NVRAM_SIZE_512KB@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
LBB0_8:
	str	w8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NO_NVRAM,4,2                   ; @NO_NVRAM
	.comm	_TG3_EEPROM_MAGIC,4,2           ; @TG3_EEPROM_MAGIC
	.comm	_TG3_NVRAM_SIZE_512KB,4,2       ; @TG3_NVRAM_SIZE_512KB
	.no_dead_strip	_tg3_get_nvram_size
.subsections_via_symbols
