	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm3510_check_firmware_version
_bcm3510_check_firmware_version:        ## @bcm3510_check_firmware_version
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	_CMD_GET_VERSION_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSGID_GET_VERSION_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, (%rsp)
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r9
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_bcm3510_do_hab_cmd
	movl	-16(%rbp), %esi
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	-24(%rbp), %r8
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movq	-40(%rbp), %rax
	movq	_BCM3510_DEF_SCRIPT_VERSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	-32(%rbp), %rax
	movq	_BCM3510_DEF_CONFIG_VERSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	-24(%rbp), %rcx
	movq	_BCM3510_DEF_DEMOD_VERSION@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %eax
LBB0_4:
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_GET_VERSION_INFO,4,2       ## @CMD_GET_VERSION_INFO
	.comm	_MSGID_GET_VERSION_INFO,4,2     ## @MSGID_GET_VERSION_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Version information: 0x%02x 0x%02x 0x%02x 0x%02x\n"

	.comm	_BCM3510_DEF_SCRIPT_VERSION,8,3 ## @BCM3510_DEF_SCRIPT_VERSION
	.comm	_BCM3510_DEF_CONFIG_VERSION,8,3 ## @BCM3510_DEF_CONFIG_VERSION
	.comm	_BCM3510_DEF_DEMOD_VERSION,8,3  ## @BCM3510_DEF_DEMOD_VERSION
L_.str.1:                               ## @.str.1
	.asciz	"version check failed\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_bcm3510_check_firmware_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm3510_check_firmware_version
_bcm3510_check_firmware_version:        ; @bcm3510_check_firmware_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, _CMD_GET_VERSION_INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_GET_VERSION_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MSGID_GET_VERSION_INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSGID_GET_VERSION_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x5, sp, #32
	mov	x3, #0
	mov	w4, #0
	mov	w6, #32
	bl	_bcm3510_do_hab_cmd
	ldr	q0, [sp, #32]
	ldr	x8, [sp, #48]
	ldr	w9, [sp, #56]
	str	x8, [sp, #24]
	stur	q0, [sp, #8]
	str	x9, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_info
	ldr	x8, [sp, #32]
Lloh8:
	adrp	x9, _BCM3510_DEF_SCRIPT_VERSION@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BCM3510_DEF_SCRIPT_VERSION@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, _BCM3510_DEF_CONFIG_VERSION@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BCM3510_DEF_CONFIG_VERSION@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [sp, #48]
Lloh14:
	adrp	x9, _BCM3510_DEF_DEMOD_VERSION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BCM3510_DEF_DEMOD_VERSION@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_deb_info
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_GET_VERSION_INFO,4,2       ; @CMD_GET_VERSION_INFO
	.comm	_MSGID_GET_VERSION_INFO,4,2     ; @MSGID_GET_VERSION_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Version information: 0x%02x 0x%02x 0x%02x 0x%02x\n"

	.comm	_BCM3510_DEF_SCRIPT_VERSION,8,3 ; @BCM3510_DEF_SCRIPT_VERSION
	.comm	_BCM3510_DEF_CONFIG_VERSION,8,3 ; @BCM3510_DEF_CONFIG_VERSION
	.comm	_BCM3510_DEF_DEMOD_VERSION,8,3  ; @BCM3510_DEF_DEMOD_VERSION
l_.str.1:                               ; @.str.1
	.asciz	"version check failed\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_bcm3510_check_firmware_version
.subsections_via_symbols
