	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function madt_add_cpu
_madt_add_cpu:                          ## @madt_add_cpu
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	movl	%edi, %r14d
	movq	_bootverbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ACPI_MADT_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
LBB0_2:
	movq	_ACPI_MADT_ENABLED@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_max_apic_id@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jge	LBB0_4
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_lapics@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movslq	%r15d, %rbx
	xorl	%edi, %edi
	cmpl	$0, (%r12,%rbx,8)
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movl	$1, (%r12,%rbx,8)
	movl	%r14d, 4(%r12,%rbx,8)
	movl	%r15d, %edi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lapic_create                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MADT: Found CPU APIC ID %u ACPI ID %u: %s\n"

	.comm	_ACPI_MADT_ENABLED,4,2          ## @ACPI_MADT_ENABLED
L_.str.1:                               ## @.str.1
	.asciz	"enabled"

L_.str.2:                               ## @.str.2
	.asciz	"disabled"

	.comm	_max_apic_id,4,2                ## @max_apic_id
L_.str.3:                               ## @.str.3
	.asciz	"MADT: Ignoring local APIC ID %u (too high)\n"

	.comm	_lapics,8,3                     ## @lapics
	.no_dead_strip	_madt_add_cpu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function madt_add_cpu
_madt_add_cpu:                          ; @madt_add_cpu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _bootverbose@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x22, _ACPI_MADT_ENABLED@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ACPI_MADT_ENABLED@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x22]
Lloh5:
	adrp	x9, l_.str.1@PAGE
Lloh6:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh7:
	adrp	x10, l_.str.2@PAGE
Lloh8:
	add	x10, x10, l_.str.2@PAGEOFF
	tst	w8, w21
	csel	x8, x10, x9, eq
	stp	x20, x8, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_printf
LBB0_2:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _max_apic_id@GOTPAGE
Lloh12:
	ldr	x8, [x8, _max_apic_id@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ge	LBB0_6
; %bb.4:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	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
	add	sp, sp, #64
	b	_printf
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
Lloh16:
	adrp	x8, _lapics@GOTPAGE
Lloh17:
	ldr	x8, [x8, _lapics@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	sxtw	x1, w19
	add	x21, x8, w19, sxtw #3
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w0, eq
	bl	_KASSERT
	mov	w8, #1
	stp	w8, w20, [x21]
	mov	x0, x19
	mov	w1, #0
	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
	add	sp, sp, #64
	b	_lapic_create
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MADT: Found CPU APIC ID %u ACPI ID %u: %s\n"

	.comm	_ACPI_MADT_ENABLED,4,2          ; @ACPI_MADT_ENABLED
l_.str.1:                               ; @.str.1
	.asciz	"enabled"

l_.str.2:                               ; @.str.2
	.asciz	"disabled"

	.comm	_max_apic_id,4,2                ; @max_apic_id
l_.str.3:                               ; @.str.3
	.asciz	"MADT: Ignoring local APIC ID %u (too high)\n"

	.comm	_lapics,8,3                     ; @lapics
	.no_dead_strip	_madt_add_cpu
.subsections_via_symbols
