	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm2836_mp_start_ap            ## -- Begin function bcm2836_mp_start_ap
	.p2align	4, 0x90
_bcm2836_mp_start_ap:                   ## @bcm2836_mp_start_ap
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTF
	movq	_fdtbus_bs_tag@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ARM_LOCAL_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARM_LOCAL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_bs_periph@GOTPCREL(%rip), %r8
	xorl	%ecx, %ecx
	callq	_bus_space_map
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	_mp_ncpus@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_MBOX0CLR_CORE
	movl	$4294967295, %esi               ## imm = 0xFFFFFFFF
	movl	%eax, %edi
	callq	_BSWR4
	movl	%ebx, %edi
	callq	_MBOX3CLR_CORE
	movl	$4294967295, %esi               ## imm = 0xFFFFFFFF
	movl	%eax, %edi
	callq	_BSWR4
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	callq	_wmb
	xorl	%eax, %eax
	callq	_dcache_wbinv_poc_all
	cmpl	$2, (%r13)
	jl	LBB0_12
## %bb.6:
	movl	$1, %r15d
	movq	_all_cpus@GOTPCREL(%rip), %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_dsb
	xorl	%eax, %eax
	callq	_sev
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_CPU_SET
	incl	%r15d
	cmpl	(%r13), %r15d
	jge	LBB0_12
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movl	%r15d, %edi
	callq	_MBOX3SET_CORE
	movl	%eax, %r12d
	movq	_mpentry@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pmap_kextract
	movl	%r12d, %edi
	movq	%rax, %rsi
	callq	_BSWR4
	xorl	%eax, %eax
	callq	_dsb
	xorl	%eax, %eax
	callq	_sev
	movl	$1001, %ebx                     ## imm = 0x3E9
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	callq	_MBOX3CLR_CORE
	movl	%eax, %edi
	callq	_BSRD4
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movl	$100, %edi
	callq	_DELAY
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	callq	_printf
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"platform_mp_start_ap\n"

	.comm	_fdtbus_bs_tag,4,2              ## @fdtbus_bs_tag
	.comm	_ARM_LOCAL_BASE,4,2             ## @ARM_LOCAL_BASE
	.comm	_ARM_LOCAL_SIZE,4,2             ## @ARM_LOCAL_SIZE
	.comm	_bs_periph,4,2                  ## @bs_periph
L_.str.1:                               ## @.str.1
	.asciz	"can't map local peripheral\n"

	.comm	_mp_ncpus,4,2                   ## @mp_ncpus
	.comm	_mpentry,8,3                    ## @mpentry
L_.str.2:                               ## @.str.2
	.asciz	"can't start for CPU%d\n"

	.comm	_all_cpus,4,2                   ## @all_cpus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm2836_mp_start_ap            ; -- Begin function bcm2836_mp_start_ap
	.p2align	2
_bcm2836_mp_start_ap:                   ; @bcm2836_mp_start_ap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTF
Lloh2:
	adrp	x8, _fdtbus_bs_tag@GOTPAGE
Lloh3:
	ldr	x8, [x8, _fdtbus_bs_tag@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _ARM_LOCAL_BASE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ARM_LOCAL_BASE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _ARM_LOCAL_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARM_LOCAL_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x4, _bs_periph@GOTPAGE
Lloh12:
	ldr	x4, [x4, _bs_periph@GOTPAGEOFF]
	mov	w3, #0
	bl	_bus_space_map
	cbz	x0, LBB0_2
; %bb.1:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_2:
Lloh15:
	adrp	x23, _mp_ncpus@GOTPAGE
Lloh16:
	ldr	x23, [x23, _mp_ncpus@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w19, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_MBOX0CLR_CORE
	mov	w1, #-1
	bl	_BSWR4
	mov	x0, x19
	bl	_MBOX3CLR_CORE
	mov	w1, #-1
	bl	_BSWR4
	add	w19, w19, #1
	ldr	w8, [x23]
	cmp	w19, w8
	b.lt	LBB0_4
LBB0_5:
	bl	_wmb
	bl	_dcache_wbinv_poc_all
	ldr	w8, [x23]
	cmp	w8, #1
	b.le	LBB0_12
; %bb.6:
	mov	w19, #1
Lloh17:
	adrp	x24, _mpentry@GOTPAGE
Lloh18:
	ldr	x24, [x24, _mpentry@GOTPAGEOFF]
Lloh19:
	adrp	x20, _all_cpus@GOTPAGE
Lloh20:
	ldr	x20, [x20, _all_cpus@GOTPAGEOFF]
Lloh21:
	adrp	x21, l_.str.2@PAGE
Lloh22:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_dsb
	bl	_sev
	mov	x0, x19
	mov	x1, x20
	bl	_CPU_SET
	add	w19, w19, #1
	ldr	w8, [x23]
	cmp	w19, w8
	b.ge	LBB0_12
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	x0, x19
	bl	_MBOX3SET_CORE
	mov	x22, x0
	ldr	w0, [x24]
	bl	_pmap_kextract
	mov	x1, x0
	mov	x0, x22
	bl	_BSWR4
	bl	_dsb
	bl	_sev
	mov	w22, #1001
LBB0_9:                                 ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_MBOX3CLR_CORE
	bl	_BSRD4
	cbz	x0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	w0, #100
	bl	_DELAY
	sub	w22, w22, #1
	cmp	w22, #1
	b.hi	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_printf
	b	LBB0_7
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"platform_mp_start_ap\n"

	.comm	_fdtbus_bs_tag,4,2              ; @fdtbus_bs_tag
	.comm	_ARM_LOCAL_BASE,4,2             ; @ARM_LOCAL_BASE
	.comm	_ARM_LOCAL_SIZE,4,2             ; @ARM_LOCAL_SIZE
	.comm	_bs_periph,4,2                  ; @bs_periph
l_.str.1:                               ; @.str.1
	.asciz	"can't map local peripheral\n"

	.comm	_mp_ncpus,4,2                   ; @mp_ncpus
	.comm	_mpentry,8,3                    ; @mpentry
l_.str.2:                               ; @.str.2
	.asciz	"can't start for CPU%d\n"

	.comm	_all_cpus,4,2                   ; @all_cpus
.subsections_via_symbols
