	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_main                    ## -- Begin function kernel_main
	.p2align	4, 0x90
_kernel_main:                           ## @kernel_main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_getmpid
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_uart_init
LBB0_2:
	movq	_cur_proc@GOTPCREL(%rip), %r14
	cmpq	%rbx, (%r14)
	jne	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_uart_send_string
	leaq	48(%rbx), %rdi
	callq	_uart_send
	leaq	L_.str.1(%rip), %rdi
	callq	_uart_send_string
	movq	(%r14), %rax
	incq	%rax
	movq	%rax, (%r14)
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_3
LBB0_5:
	cmpq	$4, %rax
	jne	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_uart_recv
	movq	%rax, %rdi
	callq	_uart_send
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_cur_proc,8,3                   ## @cur_proc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hello, from processor "

L_.str.1:                               ## @.str.1
	.asciz	"\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_main                    ; -- Begin function kernel_main
	.p2align	2
_kernel_main:                           ; @kernel_main
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_getmpid
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_uart_init
LBB0_2:
Lloh0:
	adrp	x20, _cur_proc@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cur_proc@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, x19
	b.ne	LBB0_5
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_uart_send_string
	add	x0, x19, #48
	bl	_uart_send
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_uart_send_string
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	cbz	x19, LBB0_6
; %bb.4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_5
LBB0_6:
	cmp	x8, #4
	b.ne	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bl	_uart_recv
	bl	_uart_send
	b	LBB0_7
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_cur_proc,8,3                   ; @cur_proc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hello, from processor "

l_.str.1:                               ; @.str.1
	.asciz	"\r\n"

.subsections_via_symbols
