	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm63xx_detect_cfe
_bcm63xx_detect_cfe:                    ## @bcm63xx_detect_cfe
	.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	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_BCM963XX_CFE_VERSION_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rcx
	leaq	-33(%rbp), %r8
	movl	$5, %edx
	callq	_mtd_read
	movq	-48(%rbp), %rcx
	movb	$0, -33(%rbp,%rcx)
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rdi
	leaq	-33(%rbp), %rsi
	movl	$5, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_BCM963XX_CFE_MAGIC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rcx
	leaq	-33(%rbp), %r14
	movq	%rbx, %rdi
	movl	$8, %edx
	movq	%r14, %r8
	callq	_mtd_read
	movq	-48(%rbp), %rax
	movb	$0, -33(%rbp,%rax)
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movl	$8, %edx
	callq	_strncmp
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BCM963XX_CFE_VERSION_OFFSET,4,2 ## @BCM963XX_CFE_VERSION_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cfe-v"

	.comm	_BCM963XX_CFE_MAGIC_OFFSET,4,2  ## @BCM963XX_CFE_MAGIC_OFFSET
L_.str.1:                               ## @.str.1
	.asciz	"CFE1CFE1"

	.no_dead_strip	_bcm63xx_detect_cfe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm63xx_detect_cfe
_bcm63xx_detect_cfe:                    ; @bcm63xx_detect_cfe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _BCM963XX_CFE_VERSION_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCM963XX_CFE_VERSION_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x20, sp, #15
	mov	x3, sp
	add	x4, sp, #15
	mov	w2, #5
	bl	_mtd_read
	ldr	x8, [sp]
	strb	wzr, [x20, x8]
	cbnz	w0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	add	x20, sp, #15
	add	x1, sp, #15
	mov	w2, #5
	bl	_strncmp
	cbz	w0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _BCM963XX_CFE_MAGIC_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BCM963XX_CFE_MAGIC_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x3, sp
	add	x4, sp, #15
	mov	x0, x19
	mov	w2, #8
	bl	_mtd_read
	ldr	x8, [sp]
	strb	wzr, [x20, x8]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #15
	mov	w2, #8
	bl	_strncmp
LBB0_3:
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BCM963XX_CFE_VERSION_OFFSET,4,2 ; @BCM963XX_CFE_VERSION_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cfe-v"

	.comm	_BCM963XX_CFE_MAGIC_OFFSET,4,2  ; @BCM963XX_CFE_MAGIC_OFFSET
l_.str.1:                               ; @.str.1
	.asciz	"CFE1CFE1"

	.no_dead_strip	_bcm63xx_detect_cfe
.subsections_via_symbols
