	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_update_hw_spec             ## -- Begin function lbs_update_hw_spec
	.p2align	4, 0x90
_lbs_update_hw_spec:                    ## @lbs_update_hw_spec
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-72(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$28, %edx
	callq	_memset
	movl	$28, %edi
	callq	_cpu_to_le16
	movl	%eax, -48(%rbp)
	movl	-72(%rbp), %edi
	movq	(%rbx), %rsi
	movq	_ETH_ALEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_memcpy
	movq	_CMD_GET_HW_SPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_lbs_cmd_with_response
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movl	-52(%rbp), %edi
	callq	_le32_to_cpu
	movq	%rax, 40(%rbx)
	movl	-56(%rbp), %edi
	callq	_le32_to_cpu
	roll	$8, %eax
	movl	%eax, 8(%rbx)
	movl	-72(%rbp), %edx
	movl	%eax, %esi
	movzbl	%ah, %ecx
	movl	%ecx, %r9d
	movzbl	%al, %r10d
	movl	%eax, %ecx
	shrl	$24, %ecx
	shrl	$16, %esi
	movzbl	%sil, %r8d
	movq	32(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	pushq	40(%rbx)
	pushq	%r10
	callq	_netdev_info
	addq	$16, %rsp
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_lbs_deb_cmd
	movl	8(%rbx), %edi
	callq	_MRVL_FW_MAJOR_REV
	movq	%rax, %r15
	movq	_MRVL_FW_V4@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	-68(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, %ecx
	shrl	$8, %ecx
	cmpq	%r13, %r15
	cmovnel	%eax, %ecx
	movzbl	%cl, %eax
	movl	%eax, 12(%rbx)
	movq	_MRVDRV_MAX_REGION_CODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.2:
	movq	_lbs_region_code_to_index@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%rdx,%rsi,4), %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_4
LBB0_5:
	movl	$16, 12(%rbx)
	movq	32(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_info
LBB0_6:
	movq	(%rbx), %rdi
	cmpl	$255, (%rdi)
	jne	LBB0_8
## %bb.7:
	movl	-72(%rbp), %esi
	movl	(%r12), %edx
	callq	_memmove
LBB0_8:
	cmpl	$0, 16(%rbx)
	jne	LBB0_12
## %bb.9:
	movq	(%rbx), %rsi
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	callq	_memcpy
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	(%rax), %edi
	movq	(%rbx), %rsi
	movl	(%r12), %edx
	callq	_memcpy
LBB0_11:
	movl	$1, 16(%rbx)
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_CMD_GET_HW_SPEC,4,2            ## @CMD_GET_HW_SPEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%pM, fw %u.%u.%up%u, cap 0x%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n"

	.comm	_MRVL_FW_V4,8,3                 ## @MRVL_FW_V4
	.comm	_MRVDRV_MAX_REGION_CODE,8,3     ## @MRVDRV_MAX_REGION_CODE
	.comm	_lbs_region_code_to_index,8,3   ## @lbs_region_code_to_index
L_.str.2:                               ## @.str.2
	.asciz	"unidentified region code; using the default (USA)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lbs_update_hw_spec             ; -- Begin function lbs_update_hw_spec
	.p2align	2
_lbs_update_hw_spec:                    ; @lbs_update_hw_spec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x0
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #28
	bl	_memset
	mov	w0, #28
	bl	_cpu_to_le16
	str	w0, [sp, #72]
	ldr	w0, [sp, #48]
	ldr	x1, [x19]
Lloh0:
	adrp	x22, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_memcpy
Lloh2:
	adrp	x8, _CMD_GET_HW_SPEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_GET_HW_SPEC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #48
	mov	x0, x19
	bl	_lbs_cmd_with_response
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.1:
	ldr	w0, [sp, #68]
	bl	_le32_to_cpu
	str	x0, [x19, #40]
	ldr	w0, [sp, #64]
	bl	_le32_to_cpu
	ror	w8, w0, #24
	str	w8, [x19, #8]
	lsr	w9, w8, #24
	ubfx	w10, w8, #16, #8
	ubfx	w11, w8, #8, #8
	and	w8, w8, #0xff
	ldp	x0, x12, [x19, #32]
	ldr	w13, [sp, #48]
	stp	x8, x12, [sp, #32]
	stp	x10, x11, [sp, #16]
	stp	x13, x9, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_info
	ldp	w2, w1, [sp, #56]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lbs_deb_cmd
	ldr	w0, [x19, #8]
	bl	_MRVL_FW_MAJOR_REV
	mov	x21, x0
Lloh9:
	adrp	x8, _MRVL_FW_V4@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MRVL_FW_V4@GOTPAGEOFF]
Lloh11:
	ldr	x23, [x8]
	ldr	w0, [sp, #52]
	bl	_le16_to_cpu
	lsr	w8, w0, #8
	cmp	x21, x23
	csel	w8, w8, w0, eq
	and	w8, w8, #0xff
	str	w8, [x19, #12]
Lloh12:
	adrp	x9, _MRVDRV_MAX_REGION_CODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MRVDRV_MAX_REGION_CODE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cbz	x9, LBB0_5
; %bb.2:
Lloh15:
	adrp	x10, _lbs_region_code_to_index@GOTPAGE
Lloh16:
	ldr	x10, [x10, _lbs_region_code_to_index@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cmp	w8, w11
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #4
	subs	x9, x9, #1
	b.ne	LBB0_3
LBB0_5:
	mov	w8, #16
	str	w8, [x19, #12]
	ldr	x0, [x19, #32]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_info
LBB0_6:
	ldr	x0, [x19]
	ldr	w8, [x0]
	cmp	w8, #255
	b.ne	LBB0_8
; %bb.7:
	ldr	w1, [sp, #48]
	ldr	w2, [x22]
	bl	_memmove
LBB0_8:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_12
; %bb.9:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	ldr	x1, [x19]
	ldr	w2, [x22]
	bl	_memcpy
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w0, [x8]
	ldr	x1, [x19]
	ldr	w2, [x22]
	bl	_memcpy
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_CMD_GET_HW_SPEC,4,2            ; @CMD_GET_HW_SPEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%pM, fw %u.%u.%up%u, cap 0x%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n"

	.comm	_MRVL_FW_V4,8,3                 ; @MRVL_FW_V4
	.comm	_MRVDRV_MAX_REGION_CODE,8,3     ; @MRVDRV_MAX_REGION_CODE
	.comm	_lbs_region_code_to_index,8,3   ; @lbs_region_code_to_index
l_.str.2:                               ; @.str.2
	.asciz	"unidentified region code; using the default (USA)\n"

.subsections_via_symbols
