	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_imx6_mp_setmaxid               ## -- Begin function imx6_mp_setmaxid
	.p2align	4, 0x90
_imx6_mp_setmaxid:                      ## @imx6_mp_setmaxid
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_mp_ncpus@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jne	LBB0_4
## %bb.1:
	movq	_fdtbus_bs_tag@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SCU_PHYSBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCU_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	-40(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_bus_space_map
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_3:
	movl	(%r15), %edi
	movl	-40(%rbp), %esi
	movq	_SCU_CONFIG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bus_space_read_4
	movl	%eax, %ebx
	movq	_SCU_CONFIG_REG_NCPU_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	incl	%ebx
	movl	(%r15), %edi
	movl	-40(%rbp), %esi
	movl	(%r12), %edx
	callq	_bus_space_unmap
	movl	%ebx, -36(%rbp)
	leaq	L_.str.1(%rip), %rdi
	leaq	-36(%rbp), %rsi
	callq	_TUNABLE_INT_FETCH
	movl	-36(%rbp), %eax
	cmpl	%ebx, %eax
	movl	%eax, %ecx
	cmovgl	%ebx, %ecx
	testl	%eax, %eax
	cmovlel	%ebx, %ecx
	movl	%ecx, (%r14)
	decl	%ecx
	movq	_mp_maxid@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mp_ncpus,4,2                   ## @mp_ncpus
	.comm	_fdtbus_bs_tag,4,2              ## @fdtbus_bs_tag
	.comm	_SCU_PHYSBASE,4,2               ## @SCU_PHYSBASE
	.comm	_SCU_SIZE,4,2                   ## @SCU_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't map the SCU\n"

	.comm	_SCU_CONFIG_REG,4,2             ## @SCU_CONFIG_REG
	.comm	_SCU_CONFIG_REG_NCPU_MASK,4,2   ## @SCU_CONFIG_REG_NCPU_MASK
L_.str.1:                               ## @.str.1
	.asciz	"hw.ncpu"

	.comm	_mp_maxid,4,2                   ## @mp_maxid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_imx6_mp_setmaxid               ; -- Begin function imx6_mp_setmaxid
	.p2align	2
_imx6_mp_setmaxid:                      ; @imx6_mp_setmaxid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	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
	.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	x19, _mp_ncpus@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mp_ncpus@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x20, _fdtbus_bs_tag@GOTPAGE
Lloh3:
	ldr	x20, [x20, _fdtbus_bs_tag@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x8, _SCU_PHYSBASE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SCU_PHYSBASE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x21, _SCU_SIZE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _SCU_SIZE@GOTPAGEOFF]
	ldr	w2, [x21]
	add	x4, sp, #12
	mov	w3, #0
	bl	_bus_space_map
	cbz	x0, LBB0_3
; %bb.2:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_3:
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
Lloh11:
	adrp	x8, _SCU_CONFIG_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCU_CONFIG_REG@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_bus_space_read_4
Lloh14:
	adrp	x8, _SCU_CONFIG_REG_NCPU_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCU_CONFIG_REG_NCPU_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w22, w8, w0
	add	w23, w22, #1
	ldr	w0, [x20]
	ldr	w1, [sp, #12]
	ldr	w2, [x21]
	bl	_bus_space_unmap
	str	w23, [sp, #8]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #8
	bl	_TUNABLE_INT_FETCH
	ldr	w8, [sp, #8]
	cmp	w8, w23
	ccmp	w8, #1, #8, le
	csinc	w8, w8, w22, ge
	str	w8, [x19]
	sub	w8, w8, #1
Lloh19:
	adrp	x9, _mp_maxid@GOTPAGE
Lloh20:
	ldr	x9, [x9, _mp_maxid@GOTPAGEOFF]
Lloh21:
	str	w8, [x9]
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_mp_ncpus,4,2                   ; @mp_ncpus
	.comm	_fdtbus_bs_tag,4,2              ; @fdtbus_bs_tag
	.comm	_SCU_PHYSBASE,4,2               ; @SCU_PHYSBASE
	.comm	_SCU_SIZE,4,2                   ; @SCU_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't map the SCU\n"

	.comm	_SCU_CONFIG_REG,4,2             ; @SCU_CONFIG_REG
	.comm	_SCU_CONFIG_REG_NCPU_MASK,4,2   ; @SCU_CONFIG_REG_NCPU_MASK
l_.str.1:                               ; @.str.1
	.asciz	"hw.ncpu"

	.comm	_mp_maxid,4,2                   ; @mp_maxid
.subsections_via_symbols
