	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_read_fw_ver
_tg3_read_fw_ver:                       ## @tg3_read_fw_ver
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_NO_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_1
## %bb.16:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcat
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tg3_read_otp_ver               ## TAILCALL
LBB0_1:
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_15
## %bb.2:
	movl	-20(%rbp), %esi
	movq	_TG3_EEPROM_MAGIC@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_tg3_read_bc_ver
	jmp	LBB0_8
LBB0_4:
	movq	_TG3_EEPROM_MAGIC_FW_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movq	_TG3_EEPROM_MAGIC_FW@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_tg3_read_sb_ver
	jmp	LBB0_8
LBB0_6:
	movq	_TG3_EEPROM_MAGIC_HW_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	movq	_TG3_EEPROM_MAGIC_HW@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_tg3_read_hwsb_ver
LBB0_8:
	movq	_ENABLE_ASF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	_ENABLE_APE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%rbx, %rdi
	callq	_tg3_probe_ncsi
	testq	%r14, %r14
	jne	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	callq	_tg3_read_dash_ver
	jmp	LBB0_14
LBB0_12:
	testq	%r14, %r14
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_tg3_read_mgmtfw_ver
LBB0_14:
	movq	(%rbx), %rax
	movq	_TG3_VER_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	$0, -8(%rax,%rcx,8)
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NO_NVRAM,4,2                   ## @NO_NVRAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sb"

	.comm	_TG3_EEPROM_MAGIC,4,2           ## @TG3_EEPROM_MAGIC
	.comm	_TG3_EEPROM_MAGIC_FW_MSK,4,2    ## @TG3_EEPROM_MAGIC_FW_MSK
	.comm	_TG3_EEPROM_MAGIC_FW,4,2        ## @TG3_EEPROM_MAGIC_FW
	.comm	_TG3_EEPROM_MAGIC_HW_MSK,4,2    ## @TG3_EEPROM_MAGIC_HW_MSK
	.comm	_TG3_EEPROM_MAGIC_HW,4,2        ## @TG3_EEPROM_MAGIC_HW
	.comm	_ENABLE_ASF,4,2                 ## @ENABLE_ASF
	.comm	_ENABLE_APE,4,2                 ## @ENABLE_APE
	.comm	_TG3_VER_SIZE,4,2               ## @TG3_VER_SIZE
	.no_dead_strip	_tg3_read_fw_ver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_read_fw_ver
_tg3_read_fw_ver:                       ; @tg3_read_fw_ver
	.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
	ldr	x8, [x0]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _NO_NVRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NO_NVRAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_tg3_flag
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcat
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_tg3_read_otp_ver
LBB0_2:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_16
; %bb.3:
	ldr	w1, [sp, #12]
Lloh5:
	adrp	x8, _TG3_EEPROM_MAGIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TG3_EEPROM_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_tg3_read_bc_ver
	b	LBB0_9
LBB0_5:
Lloh8:
	adrp	x8, _TG3_EEPROM_MAGIC_FW_MSK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TG3_EEPROM_MAGIC_FW_MSK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh11:
	adrp	x9, _TG3_EEPROM_MAGIC_FW@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TG3_EEPROM_MAGIC_FW@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_tg3_read_sb_ver
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x8, _TG3_EEPROM_MAGIC_HW_MSK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TG3_EEPROM_MAGIC_HW_MSK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh17:
	adrp	x9, _TG3_EEPROM_MAGIC_HW@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TG3_EEPROM_MAGIC_HW@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_tg3_read_hwsb_ver
LBB0_9:
Lloh20:
	adrp	x8, _ENABLE_ASF@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENABLE_ASF@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_15
; %bb.10:
Lloh23:
	adrp	x8, _ENABLE_APE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENABLE_APE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tg3_flag
	cbz	x0, LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_tg3_probe_ncsi
	cbnz	x20, LBB0_15
; %bb.12:
	mov	x0, x19
	bl	_tg3_read_dash_ver
	b	LBB0_15
LBB0_13:
	cbnz	x20, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_tg3_read_mgmtfw_ver
LBB0_15:
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _TG3_VER_SIZE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _TG3_VER_SIZE@GOTPAGEOFF]
Lloh28:
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #3
	stur	xzr, [x8, #-8]
LBB0_16:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_NO_NVRAM,4,2                   ; @NO_NVRAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sb"

	.comm	_TG3_EEPROM_MAGIC,4,2           ; @TG3_EEPROM_MAGIC
	.comm	_TG3_EEPROM_MAGIC_FW_MSK,4,2    ; @TG3_EEPROM_MAGIC_FW_MSK
	.comm	_TG3_EEPROM_MAGIC_FW,4,2        ; @TG3_EEPROM_MAGIC_FW
	.comm	_TG3_EEPROM_MAGIC_HW_MSK,4,2    ; @TG3_EEPROM_MAGIC_HW_MSK
	.comm	_TG3_EEPROM_MAGIC_HW,4,2        ; @TG3_EEPROM_MAGIC_HW
	.comm	_ENABLE_ASF,4,2                 ; @ENABLE_ASF
	.comm	_ENABLE_APE,4,2                 ; @ENABLE_APE
	.comm	_TG3_VER_SIZE,4,2               ; @TG3_VER_SIZE
	.no_dead_strip	_tg3_read_fw_ver
.subsections_via_symbols
