	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function riscv64_cpu_attach
_riscv64_cpu_attach:                    ## @riscv64_cpu_attach
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_device_get_unit
	movq	%rax, %r15
	movq	_MAXCPU@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jae	LBB0_2
## %bb.1:
	movq	_mp_maxid@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	ja	LBB0_2
## %bb.3:
	movq	_cpu_list@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%r15,8)
	sete	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cpu_get_cpuid
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %rbx
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_device_printf
	cmpq	$0, -48(%rbp)
	je	LBB0_8
## %bb.6:
	leaq	L_.str.3(%rip), %r13
	leaq	L_.str.4(%rip), %r14
	leaq	L_.str.2(%rip), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r15, %r15
	movq	%r14, %rsi
	cmoveq	%r13, %rsi
	movl	(%rbx,%r15,4), %edx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_printf
	incq	%r15
	cmpq	%r15, -48(%rbp)
	ja	LBB0_7
LBB0_8:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	_cpu_list@GOTPCREL(%rip), %r12
LBB0_9:
	movq	(%r12), %rax
	movq	%r14, (%rax,%r15,8)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXCPU,8,3                     ## @MAXCPU
	.comm	_mp_maxid,8,3                   ## @mp_maxid
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cpu_list,8,3                   ## @cpu_list
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"register <"

L_.str.2:                               ## @.str.2
	.asciz	"%s%x"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	" "

L_str:                                  ## @str
	.asciz	">"

	.no_dead_strip	_riscv64_cpu_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function riscv64_cpu_attach
_riscv64_cpu_attach:                    ; @riscv64_cpu_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	bl	_device_get_unit
Lloh0:
	adrp	x8, _MAXCPU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAXCPU@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _mp_maxid@GOTPAGE
Lloh4:
	ldr	x9, [x9, _mp_maxid@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #2, lo
	b.hi	LBB0_8
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x23, _cpu_list@GOTPAGE
Lloh7:
	ldr	x23, [x23, _cpu_list@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x8, [x8, x0, lsl #3]
	cmp	x8, #0
	cset	w0, eq
	mov	x1, x20
	bl	_KASSERT
	add	x1, sp, #24
	mov	x0, x19
	bl	_cpu_get_cpuid
	cbz	x0, LBB0_8
; %bb.2:
Lloh8:
	adrp	x8, _bootverbose@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.3:
	mov	x21, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_printf
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x24, #0
Lloh13:
	adrp	x25, l_.str.4@PAGE
Lloh14:
	add	x25, x25, l_.str.4@PAGEOFF
Lloh15:
	adrp	x26, l_.str.3@PAGE
Lloh16:
	add	x26, x26, l_.str.3@PAGEOFF
Lloh17:
	adrp	x22, l_.str.2@PAGE
Lloh18:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x24, #0
	csel	x8, x26, x25, eq
	ldr	w9, [x21, x24, lsl #2]
	stp	x8, x9, [sp]
	mov	x0, x22
	bl	_printf
	add	x24, x24, #1
	ldr	x8, [sp, #24]
	cmp	x8, x24
	b.hi	LBB0_5
LBB0_6:
Lloh19:
	adrp	x0, l_str@PAGE
Lloh20:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_7:
	mov	w0, #0
	ldr	x8, [x23]
	str	x19, [x8, x20, lsl #3]
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXCPU,8,3                     ; @MAXCPU
	.comm	_mp_maxid,8,3                   ; @mp_maxid
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cpu_list,8,3                   ; @cpu_list
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"register <"

l_.str.2:                               ; @.str.2
	.asciz	"%s%x"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	" "

l_str:                                  ; @str
	.asciz	">"

	.no_dead_strip	_riscv64_cpu_attach
.subsections_via_symbols
