	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_nflash_init               ## -- Begin function bcma_nflash_init
	.p2align	4, 0x90
_bcma_nflash_init:                      ## @bcma_nflash_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	16(%rdi), %rcx
	movq	8(%rcx), %rax
	movq	(%rax), %rdx
	movq	_BCMA_CHIP_ID_BCM4706@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_4
## %bb.1:
	cmpl	$38, (%rcx)
	jne	LBB0_2
LBB0_4:
	movq	_BCMA_CC_CAP_NFLASH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rdi)
	je	LBB0_5
## %bb.6:
	leaq	8(%rdi), %rax
	movl	$1, 8(%rdi)
	cmpl	$38, (%rcx)
	jne	LBB0_9
## %bb.7:
	movq	_BCMA_CC_CHIPST_5357_NAND_BOOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rdi)
	je	LBB0_9
## %bb.8:
	movl	$1, 12(%rdi)
LBB0_9:
	movq	_bcma_nflash_dev@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_bcma_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_bcma_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMA_CHIP_ID_BCM4706,8,3       ## @BCMA_CHIP_ID_BCM4706
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NAND flash on unsupported board!\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_BCMA_CC_CAP_NFLASH,4,2         ## @BCMA_CC_CAP_NFLASH
L_.str.1:                               ## @.str.1
	.asciz	"NAND flash not present according to ChipCommon\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_BCMA_CC_CHIPST_5357_NAND_BOOT,4,2 ## @BCMA_CC_CHIPST_5357_NAND_BOOT
	.comm	_bcma_nflash_dev,8,3            ## @bcma_nflash_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_nflash_init               ; -- Begin function bcma_nflash_init
	.p2align	2
_bcma_nflash_init:                      ; @bcma_nflash_init
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x9, [x0, #16]
	ldr	x8, [x9, #8]
	ldr	x10, [x8]
Lloh0:
	adrp	x11, _BCMA_CHIP_ID_BCM4706@GOTPAGE
Lloh1:
	ldr	x11, [x11, _BCMA_CHIP_ID_BCM4706@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_2
; %bb.1:
	ldr	w10, [x9]
	cmp	w10, #38
	b.ne	LBB0_8
LBB0_2:
	ldr	w10, [x0]
Lloh3:
	adrp	x11, _BCMA_CC_CAP_NFLASH@GOTPAGE
Lloh4:
	ldr	x11, [x11, _BCMA_CC_CAP_NFLASH@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.3:
	mov	w10, #1
	mov	x8, x0
	str	w10, [x8, #8]!
	ldr	w9, [x9]
	cmp	w9, #38
	b.ne	LBB0_6
; %bb.4:
	ldr	w9, [x0, #4]
Lloh6:
	adrp	x10, _BCMA_CC_CHIPST_5357_NAND_BOOT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _BCMA_CC_CHIPST_5357_NAND_BOOT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
	mov	w9, #1
	str	w9, [x0, #12]
LBB0_6:
	mov	w0, #0
Lloh9:
	adrp	x9, _bcma_nflash_dev@GOTPAGE
Lloh10:
	ldr	x9, [x9, _bcma_nflash_dev@GOTPAGEOFF]
Lloh11:
	str	x8, [x9]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_bcma_err
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_bcma_err
Lloh18:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMA_CHIP_ID_BCM4706,8,3       ; @BCMA_CHIP_ID_BCM4706
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NAND flash on unsupported board!\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_BCMA_CC_CAP_NFLASH,4,2         ; @BCMA_CC_CAP_NFLASH
l_.str.1:                               ; @.str.1
	.asciz	"NAND flash not present according to ChipCommon\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_BCMA_CC_CHIPST_5357_NAND_BOOT,4,2 ; @BCMA_CC_CHIPST_5357_NAND_BOOT
	.comm	_bcma_nflash_dev,8,3            ; @bcma_nflash_dev
.subsections_via_symbols
