	.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
	movl	%edi, %ebx
	testl	%edi, %edi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_pl011_uart_init
LBB0_2:
	movq	_semaphore@GOTPCREL(%rip), %r14
	cmpl	%ebx, (%r14)
	jne	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_pl011_uart_send_string
	leal	48(%rbx), %eax
	movsbl	%al, %edi
	callq	_pl011_uart_send
	leaq	L_.str.1(%rip), %rdi
	callq	_pl011_uart_send_string
	incl	(%r14)
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_pl011_uart_recv
	movsbl	%al, %edi
	callq	_pl011_uart_send
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_semaphore,4,2                  ## @semaphore
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hello, world 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
	mov	x19, x0
	cbnz	w0, LBB0_2
; %bb.1:
	bl	_pl011_uart_init
LBB0_2:
Lloh0:
	adrp	x20, _semaphore@GOTPAGE
Lloh1:
	ldr	x20, [x20, _semaphore@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, w19
	b.ne	LBB0_5
; %bb.3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pl011_uart_send_string
	add	w8, w19, #48
	sxtb	w0, w8
	bl	_pl011_uart_send
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pl011_uart_send_string
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	cbz	w19, 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:                                 ; =>This Inner Loop Header: Depth=1
	bl	_pl011_uart_recv
	bl	_pl011_uart_send
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_semaphore,4,2                  ; @semaphore
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hello, world from processor "

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

.subsections_via_symbols
