	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$115200, %edi                   ## imm = 0x1C200
	callq	_uart_init
	leaq	L_.str(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	callq	_BRANCHTO
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_check_head
	xorl	%eax, %eax
	callq	_uart_recv
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_uart_recv
	movl	%eax, %ebx
	shll	$8, %ebx
	orl	%r15d, %ebx
	xorl	%eax, %eax
	callq	_uart_recv
	movl	%eax, %r12d
	shll	$16, %r12d
	orl	%ebx, %r12d
	xorl	%eax, %eax
	callq	_uart_recv
	movl	%eax, %r13d
	shll	$24, %r13d
	orl	%r12d, %r13d
	movl	%r13d, %edi
	shrl	$24, %edi
	callq	_uart_send
	shrl	$16, %r12d
	movzbl	%r12b, %edi
	callq	_uart_send
	movzbl	%bh, %edi
	callq	_uart_send
	movzbl	%r15b, %edi
	callq	_uart_send
	testl	%r13d, %r13d
	jle	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_uart_recv
	movl	%eax, (%rbx)
	addq	$4, %rbx
	decl	%r13d
	cmpl	$1, %r13d
	ja	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start"

.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	w0, #49664
	movk	w0, #1, lsl #16
	bl	_uart_init
Lloh0:
	adrp	x19, l_.str@PAGE
Lloh1:
	add	x19, x19, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #0
	bl	_BRANCHTO
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x0, x19
	mov	w1, #5
	bl	_check_head
	bl	_uart_recv
	mov	x20, x0
	bl	_uart_recv
	orr	w22, w20, w0, lsl #8
	bl	_uart_recv
	orr	w23, w22, w0, lsl #16
	bl	_uart_recv
	orr	w21, w23, w0, lsl #24
	lsr	w0, w21, #24
	bl	_uart_send
	ubfx	w0, w23, #16, #8
	bl	_uart_send
	ubfx	w0, w22, #8, #8
	bl	_uart_send
	and	w0, w20, #0xff
	bl	_uart_send
	cmp	w21, #1
	b.lt	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, #0
	add	w21, w21, #1
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_uart_recv
	str	w0, [x20], #4
	sub	w21, w21, #1
	cmp	w21, #1
	b.hi	LBB0_4
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start"

.subsections_via_symbols
