	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_read_bc_ver
_tg3_read_bc_ver:                       ## @tg3_read_bc_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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-28(%rbp), %rdx
	movl	$12, %esi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.1:
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.2:
	movl	-28(%rbp), %esi
	movq	%rbx, %rdi
	callq	_tg3_nvram_logical_addr
	movl	%eax, -28(%rbp)
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	je	LBB0_3
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$-67108864, %eax                ## imm = 0xFC000000
	andl	-40(%rbp), %eax
	cmpl	$201326592, %eax                ## imm = 0xC000000
	jne	LBB0_4
## %bb.7:
	movl	-28(%rbp), %esi
	addl	$4, %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.8:
	movl	-40(%rbp), %r15d
	movq	(%rbx), %rdi
	callq	_strlen
	movl	%eax, %r14d
	testl	%r15d, %r15d
	jne	LBB0_5
## %bb.9:
	movq	_TG3_VER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%r14d, %eax
	cmpl	$16, %eax
	jl	LBB0_16
## %bb.10:
	movl	-28(%rbp), %esi
	addl	$8, %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:
	movl	-36(%rbp), %esi
	addl	-28(%rbp), %esi
	subl	-44(%rbp), %esi
	movl	%esi, -28(%rbp)
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_tg3_nvram_read_be32
	testq	%rax, %rax
	jne	LBB0_16
## %bb.12:
	movslq	%r14d, %r15
	leaq	(,%r15,4), %rdi
	addq	(%rbx), %rdi
	leaq	-32(%rbp), %r14
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	-28(%rbp), %esi
	addl	$4, %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_tg3_nvram_read_be32
	testq	%rax, %rax
	jne	LBB0_16
## %bb.13:
	movq	(%rbx), %rax
	leaq	(%rax,%r15,4), %rdi
	addq	$16, %rdi
	leaq	-32(%rbp), %r14
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	-28(%rbp), %esi
	addl	$8, %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_tg3_nvram_read_be32
	testq	%rax, %rax
	jne	LBB0_16
## %bb.14:
	movq	(%rbx), %rax
	leaq	(%rax,%r15,4), %rdi
	addq	$32, %rdi
	leaq	-32(%rbp), %r14
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	-28(%rbp), %esi
	addl	$12, %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_tg3_nvram_read_be32
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movq	(%rbx), %rax
	leaq	(%rax,%r15,4), %rdi
	addq	$48, %rdi
	leaq	-32(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	jmp	LBB0_16
LBB0_4:
	movq	(%rbx), %rdi
	callq	_strlen
	movl	%eax, %r14d
LBB0_5:
	movq	_TG3_NVM_PTREV_BCVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_tg3_nvram_read
	testq	%rax, %rax
	jne	LBB0_16
## %bb.6:
	movl	-36(%rbp), %r8d
	movq	_TG3_NVM_BCVER_MAJMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r8d, %eax
	movq	_TG3_NVM_BCVER_MAJSFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_TG3_NVM_BCVER_MINMSK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r8d
	movslq	%r14d, %rcx
	leaq	(,%rcx,4), %rdi
	addq	(%rbx), %rdi
	movq	_TG3_VER_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	subl	%ecx, %esi
	leaq	L_.str(%rip), %rdx
	movl	%eax, %ecx
	callq	_snprintf
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_VER_SIZE,4,2               ## @TG3_VER_SIZE
	.comm	_TG3_NVM_PTREV_BCVER,4,2        ## @TG3_NVM_PTREV_BCVER
	.comm	_TG3_NVM_BCVER_MAJMSK,4,2       ## @TG3_NVM_BCVER_MAJMSK
	.comm	_TG3_NVM_BCVER_MAJSFT,4,2       ## @TG3_NVM_BCVER_MAJSFT
	.comm	_TG3_NVM_BCVER_MINMSK,4,2       ## @TG3_NVM_BCVER_MINMSK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"v%d.%02d"

	.no_dead_strip	_tg3_read_bc_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_bc_ver
_tg3_read_bc_ver:                       ; @tg3_read_bc_ver
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	add	x2, sp, #24
	mov	w1, #12
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_3
; %bb.1:
	add	x2, sp, #20
	mov	x0, x19
	mov	w1, #4
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	w1, [sp, #24]
	mov	x0, x19
	bl	_tg3_nvram_logical_addr
	mov	x1, x0
	str	w0, [sp, #24]
	add	x2, sp, #28
	mov	x0, x19
	bl	_tg3_nvram_read
	cbz	x0, LBB0_4
LBB0_3:
	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
	add	sp, sp, #80
	ret
LBB0_4:
	ldr	w8, [sp, #28]
	lsr	w8, w8, #26
	cmp	w8, #3
	b.ne	LBB0_14
; %bb.5:
	ldr	w8, [sp, #24]
	add	w1, w8, #4
	add	x2, sp, #28
	mov	x0, x19
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_3
; %bb.6:
	ldr	w21, [sp, #28]
	ldr	x0, [x19]
	bl	_strlen
	mov	x20, x0
	cbnz	w21, LBB0_15
; %bb.7:
Lloh0:
	adrp	x8, _TG3_VER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TG3_VER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, w20
	cmp	w8, #16
	b.lt	LBB0_3
; %bb.8:
	ldr	w8, [sp, #24]
	add	w1, w8, #8
	add	x2, sp, #16
	mov	x0, x19
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_3
; %bb.9:
	ldp	w10, w8, [sp, #20]
	ldr	w9, [sp, #16]
	add	w8, w9, w8
	sub	w1, w8, w10
	str	w1, [sp, #24]
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_nvram_read_be32
	cbnz	x0, LBB0_3
; %bb.10:
	sxtw	x20, w20
	ldr	x8, [x19]
	add	x0, x8, x20, lsl #2
	add	x1, sp, #12
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [sp, #24]
	add	w1, w8, #4
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_nvram_read_be32
	cbnz	x0, LBB0_3
; %bb.11:
	ldr	x8, [x19]
	add	x8, x8, x20, lsl #2
	add	x0, x8, #16
	add	x1, sp, #12
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [sp, #24]
	add	w1, w8, #8
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_nvram_read_be32
	cbnz	x0, LBB0_3
; %bb.12:
	ldr	x8, [x19]
	add	x8, x8, x20, lsl #2
	add	x0, x8, #32
	add	x1, sp, #12
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [sp, #24]
	add	w1, w8, #12
	add	x2, sp, #12
	mov	x0, x19
	bl	_tg3_nvram_read_be32
	cbnz	x0, LBB0_3
; %bb.13:
	ldr	x8, [x19]
	add	x8, x8, x20, lsl #2
	add	x0, x8, #48
	add	x1, sp, #12
	mov	w2, #4
	bl	_memcpy
	b	LBB0_3
LBB0_14:
	ldr	x0, [x19]
	bl	_strlen
	mov	x20, x0
LBB0_15:
Lloh3:
	adrp	x8, _TG3_NVM_PTREV_BCVER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TG3_NVM_PTREV_BCVER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	bl	_tg3_nvram_read
	cbnz	x0, LBB0_3
; %bb.16:
	ldr	w8, [sp, #16]
Lloh6:
	adrp	x9, _TG3_NVM_BCVER_MAJMSK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TG3_NVM_BCVER_MAJMSK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh9:
	adrp	x10, _TG3_NVM_BCVER_MAJSFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TG3_NVM_BCVER_MAJSFT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	asr	w3, w9, w10
Lloh12:
	adrp	x9, _TG3_NVM_BCVER_MINMSK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TG3_NVM_BCVER_MINMSK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w4, w9, w8
	ldr	x8, [x19]
	add	x0, x8, w20, sxtw #2
Lloh15:
	adrp	x8, _TG3_VER_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TG3_VER_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	sub	w1, w8, w20
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_VER_SIZE,4,2               ; @TG3_VER_SIZE
	.comm	_TG3_NVM_PTREV_BCVER,4,2        ; @TG3_NVM_PTREV_BCVER
	.comm	_TG3_NVM_BCVER_MAJMSK,4,2       ; @TG3_NVM_BCVER_MAJMSK
	.comm	_TG3_NVM_BCVER_MAJSFT,4,2       ; @TG3_NVM_BCVER_MAJSFT
	.comm	_TG3_NVM_BCVER_MINMSK,4,2       ; @TG3_NVM_BCVER_MINMSK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"v%d.%02d"

	.no_dead_strip	_tg3_read_bc_ver
.subsections_via_symbols
