	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_chip_dmp_erom_scan
_brcmf_chip_dmp_erom_scan:              ## @brcmf_chip_dmp_erom_scan
	.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
	movq	$0, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movl	(%rdi), %r14d
	movq	_SI_ENUM_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_eromptr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CORE_CC_REG
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	*%r15
	movq	%rax, -72(%rbp)
	movq	_DMP_DESC_EOT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	je	LBB0_16
## %bb.1:
	leaq	-72(%rbp), %r15
	leaq	-48(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax
	movq	_DMP_DESC_EOT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_brcmf_chip_dmp_get_desc
	movq	%rax, %r13
	movq	_DMP_DESC_VALID@GOTPCREL(%rip), %rax
	testq	%r13, (%rax)
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax
	movq	_DMP_DESC_EMPTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_DMP_DESC_COMPONENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_DMP_COMP_PARTNUM@GOTPCREL(%rip), %rax
	andq	(%rax), %r13
	movq	_DMP_COMP_PARTNUM_S@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarq	%cl, %r13
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_brcmf_chip_dmp_get_desc
	movq	%rax, %r14
	movq	_DMP_DESC_TYPE_MSK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%r14, %rax
	xorl	%edi, %edi
	movq	_DMP_DESC_COMPONENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_DMP_COMP_NUM_MWRAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	%r14, %rax
	movq	_DMP_COMP_NUM_MWRAP_S@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarq	%cl, %rax
	movq	_DMP_COMP_NUM_SWRAP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	andq	%r14, %rdx
	movq	_DMP_COMP_NUM_SWRAP_S@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarq	%cl, %rdx
	movq	_DMP_COMP_REVISION@GOTPCREL(%rip), %rcx
	andq	(%rcx), %r14
	movq	_DMP_COMP_REVISION_S@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarq	%cl, %r14
	addq	%rax, %rdx
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BCMA_CORE_PMU@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BCMA_CORE_GCI@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	callq	_brcmf_chip_dmp_get_regaddr
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_brcmf_chip_add_core
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, (%r13)
	jmp	LBB0_14
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_6:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r13, %rdi
	callq	_PTR_ERR
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_SI_ENUM_BASE,4,2               ## @SI_ENUM_BASE
	.comm	_eromptr,4,2                    ## @eromptr
	.comm	_DMP_DESC_EOT,8,3               ## @DMP_DESC_EOT
	.comm	_DMP_DESC_VALID,8,3             ## @DMP_DESC_VALID
	.comm	_DMP_DESC_EMPTY,8,3             ## @DMP_DESC_EMPTY
	.comm	_DMP_DESC_COMPONENT,8,3         ## @DMP_DESC_COMPONENT
	.comm	_DMP_COMP_PARTNUM,8,3           ## @DMP_COMP_PARTNUM
	.comm	_DMP_COMP_PARTNUM_S,8,3         ## @DMP_COMP_PARTNUM_S
	.comm	_DMP_DESC_TYPE_MSK,8,3          ## @DMP_DESC_TYPE_MSK
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_DMP_COMP_NUM_MPORT,8,3         ## @DMP_COMP_NUM_MPORT
	.comm	_DMP_COMP_NUM_MPORT_S,8,3       ## @DMP_COMP_NUM_MPORT_S
	.comm	_DMP_COMP_NUM_SPORT,8,3         ## @DMP_COMP_NUM_SPORT
	.comm	_DMP_COMP_NUM_SPORT_S,8,3       ## @DMP_COMP_NUM_SPORT_S
	.comm	_DMP_COMP_NUM_MWRAP,8,3         ## @DMP_COMP_NUM_MWRAP
	.comm	_DMP_COMP_NUM_MWRAP_S,8,3       ## @DMP_COMP_NUM_MWRAP_S
	.comm	_DMP_COMP_NUM_SWRAP,8,3         ## @DMP_COMP_NUM_SWRAP
	.comm	_DMP_COMP_NUM_SWRAP_S,8,3       ## @DMP_COMP_NUM_SWRAP_S
	.comm	_DMP_COMP_REVISION,8,3          ## @DMP_COMP_REVISION
	.comm	_DMP_COMP_REVISION_S,8,3        ## @DMP_COMP_REVISION_S
	.comm	_BCMA_CORE_PMU,8,3              ## @BCMA_CORE_PMU
	.comm	_BCMA_CORE_GCI,8,3              ## @BCMA_CORE_GCI
	.no_dead_strip	_brcmf_chip_dmp_erom_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_chip_dmp_erom_scan
_brcmf_chip_dmp_erom_scan:              ; @brcmf_chip_dmp_erom_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	str	xzr, [sp, #16]
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	ldr	w20, [x0]
Lloh0:
	adrp	x8, _SI_ENUM_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SI_ENUM_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _eromptr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _eromptr@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_CORE_CC_REG
	mov	x1, x0
	mov	x0, x20
	blr	x21
	str	x0, [sp, #24]
Lloh6:
	adrp	x22, _DMP_DESC_EOT@GOTPAGE
Lloh7:
	ldr	x22, [x22, _DMP_DESC_EOT@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_12
; %bb.1:
Lloh8:
	adrp	x23, _DMP_DESC_VALID@GOTPAGE
Lloh9:
	ldr	x23, [x23, _DMP_DESC_VALID@GOTPAGEOFF]
Lloh10:
	adrp	x24, _DMP_DESC_EMPTY@GOTPAGE
Lloh11:
	ldr	x24, [x24, _DMP_DESC_EMPTY@GOTPAGEOFF]
Lloh12:
	adrp	x25, _DMP_DESC_COMPONENT@GOTPAGE
Lloh13:
	ldr	x25, [x25, _DMP_DESC_COMPONENT@GOTPAGEOFF]
Lloh14:
	adrp	x28, _DMP_COMP_REVISION_S@GOTPAGE
Lloh15:
	ldr	x28, [x28, _DMP_COMP_REVISION_S@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x19
	bl	_brcmf_chip_dmp_get_desc
	ldr	x8, [x23]
	tst	x8, x0
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #16]
	ldr	x9, [x24]
	ldr	x10, [x25]
	cmp	x8, x9
	ccmp	x8, x10, #0, ne
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x0
Lloh16:
	adrp	x8, _DMP_COMP_PARTNUM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMP_COMP_PARTNUM@GOTPAGEOFF]
Lloh18:
	ldr	x26, [x8]
Lloh19:
	adrp	x8, _DMP_COMP_PARTNUM_S@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DMP_COMP_PARTNUM_S@GOTPAGEOFF]
Lloh21:
	ldr	x27, [x8]
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x19
	bl	_brcmf_chip_dmp_get_desc
	mov	x20, x0
Lloh22:
	adrp	x8, _DMP_DESC_TYPE_MSK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DMP_DESC_TYPE_MSK@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	and	x8, x8, x0
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	cbnz	x0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	and	x8, x26, x21
	asr	x21, x8, x27
Lloh25:
	adrp	x8, _DMP_COMP_NUM_MWRAP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DMP_COMP_NUM_MWRAP@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	and	x8, x8, x20
Lloh28:
	adrp	x9, _DMP_COMP_NUM_MWRAP_S@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DMP_COMP_NUM_MWRAP_S@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	asr	x8, x8, x9
Lloh31:
	adrp	x9, _DMP_COMP_NUM_SWRAP@GOTPAGE
Lloh32:
	ldr	x9, [x9, _DMP_COMP_NUM_SWRAP@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	and	x9, x9, x20
Lloh34:
	adrp	x10, _DMP_COMP_NUM_SWRAP_S@GOTPAGE
Lloh35:
	ldr	x10, [x10, _DMP_COMP_NUM_SWRAP_S@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	asr	x9, x9, x10
Lloh37:
	adrp	x10, _DMP_COMP_REVISION@GOTPAGE
Lloh38:
	ldr	x10, [x10, _DMP_COMP_REVISION@GOTPAGEOFF]
Lloh39:
	ldr	x27, [x10]
	ldr	x26, [x28]
	cmn	x8, x9
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh40:
	adrp	x8, _BCMA_CORE_PMU@GOTPAGE
Lloh41:
	ldr	x8, [x8, _BCMA_CORE_PMU@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh43:
	adrp	x8, _BCMA_CORE_GCI@GOTPAGE
Lloh44:
	ldr	x8, [x8, _BCMA_CORE_GCI@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #24
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x19
	bl	_brcmf_chip_dmp_get_regaddr
	cbnz	w0, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldp	x3, x2, [sp]
	mov	x0, x19
	mov	x1, x21
	bl	_brcmf_chip_add_core
	mov	x21, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	and	x8, x27, x20
	asr	x8, x8, x26
	str	x8, [x21]
	b	LBB0_2
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
Lloh46:
	adrp	x8, _EFAULT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_15:
	mov	x0, x21
	bl	_PTR_ERR
	b	LBB0_13
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_SI_ENUM_BASE,4,2               ; @SI_ENUM_BASE
	.comm	_eromptr,4,2                    ; @eromptr
	.comm	_DMP_DESC_EOT,8,3               ; @DMP_DESC_EOT
	.comm	_DMP_DESC_VALID,8,3             ; @DMP_DESC_VALID
	.comm	_DMP_DESC_EMPTY,8,3             ; @DMP_DESC_EMPTY
	.comm	_DMP_DESC_COMPONENT,8,3         ; @DMP_DESC_COMPONENT
	.comm	_DMP_COMP_PARTNUM,8,3           ; @DMP_COMP_PARTNUM
	.comm	_DMP_COMP_PARTNUM_S,8,3         ; @DMP_COMP_PARTNUM_S
	.comm	_DMP_DESC_TYPE_MSK,8,3          ; @DMP_DESC_TYPE_MSK
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_DMP_COMP_NUM_MPORT,8,3         ; @DMP_COMP_NUM_MPORT
	.comm	_DMP_COMP_NUM_MPORT_S,8,3       ; @DMP_COMP_NUM_MPORT_S
	.comm	_DMP_COMP_NUM_SPORT,8,3         ; @DMP_COMP_NUM_SPORT
	.comm	_DMP_COMP_NUM_SPORT_S,8,3       ; @DMP_COMP_NUM_SPORT_S
	.comm	_DMP_COMP_NUM_MWRAP,8,3         ; @DMP_COMP_NUM_MWRAP
	.comm	_DMP_COMP_NUM_MWRAP_S,8,3       ; @DMP_COMP_NUM_MWRAP_S
	.comm	_DMP_COMP_NUM_SWRAP,8,3         ; @DMP_COMP_NUM_SWRAP
	.comm	_DMP_COMP_NUM_SWRAP_S,8,3       ; @DMP_COMP_NUM_SWRAP_S
	.comm	_DMP_COMP_REVISION,8,3          ; @DMP_COMP_REVISION
	.comm	_DMP_COMP_REVISION_S,8,3        ; @DMP_COMP_REVISION_S
	.comm	_BCMA_CORE_PMU,8,3              ; @BCMA_CORE_PMU
	.comm	_BCMA_CORE_GCI,8,3              ; @BCMA_CORE_GCI
	.no_dead_strip	_brcmf_chip_dmp_erom_scan
.subsections_via_symbols
