	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function early_vga_write
_early_vga_write:                       ## @early_vga_write
	.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
	movb	(%rsi), %al
	testb	%al, %al
	je	LBB0_23
## %bb.1:
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	_current_ypos@GOTPCREL(%rip), %r12
	movq	_VGABASE@GOTPCREL(%rip), %r13
	movq	_max_xpos@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_current_xpos@GOTPCREL(%rip), %rcx
	movl	$0, (%rcx)
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%eax
	movl	%eax, (%r12)
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movb	(%r14), %al
	testb	%al, %al
	je	LBB0_23
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
                                        ##     Child Loop BB0_13 Depth 2
	subl	$1, %ebx
	jb	LBB0_23
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movl	(%r12), %eax
	movq	_max_ypos@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	movl	(%r15), %eax
	cmpl	$2, %ecx
	jl	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	incl	%ebx
	incl	%r12d
	cmpl	%ecx, %ebx
	jge	LBB0_11
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	testl	%eax, %eax
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_6 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	imull	%ebx, %eax
	addl	%r14d, %eax
	addl	%eax, %eax
	movslq	%eax, %rdi
	addq	(%r13), %rdi
	callq	_readw
	movl	(%r15), %ecx
	imull	%r12d, %ecx
	addl	%r14d, %ecx
	addl	%ecx, %ecx
	movslq	%ecx, %rsi
	addq	(%r13), %rsi
	movl	%eax, %edi
	callq	_writew
	incl	%r14d
	movl	(%r15), %eax
	cmpl	%eax, %r14d
	jl	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_max_ypos@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jle	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	imull	%r12d, %eax
	addl	%ebx, %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	addq	(%r13), %rsi
	movl	$1824, %edi                     ## imm = 0x720
	callq	_writew
	incl	%ebx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jl	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_max_ypos@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	decl	%ecx
	movq	_current_ypos@GOTPCREL(%rip), %r12
	movl	%ecx, (%r12)
	movl	%ecx, %eax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movb	-41(%rbp), %cl                  ## 1-byte Reload
	cmpb	$13, %cl
	je	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$10, %cl
	je	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movsbl	%cl, %ecx
	orl	$1792, %ecx                     ## imm = 0x700
	movzwl	%cx, %edi
	imull	(%r15), %eax
	movq	_current_xpos@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ecx
	leal	1(%rcx), %edx
	movl	%edx, (%rsi)
	addl	%ecx, %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	addq	(%r13), %rsi
	callq	_writew
	movq	_current_xpos@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%r15), %eax
	jl	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_current_xpos@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	(%r12), %eax
	jmp	LBB0_21
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current_ypos,4,2               ## @current_ypos
	.comm	_max_ypos,4,2                   ## @max_ypos
	.comm	_max_xpos,4,2                   ## @max_xpos
	.comm	_VGABASE,8,3                    ## @VGABASE
	.comm	_current_xpos,4,2               ## @current_xpos
	.no_dead_strip	_early_vga_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function early_vga_write
_early_vga_write:                       ; @early_vga_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldrb	w26, [x1]
	cbz	w26, LBB0_24
; %bb.1:
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x21, _current_ypos@GOTPAGE
Lloh1:
	ldr	x21, [x21, _current_ypos@GOTPAGEOFF]
Lloh2:
	adrp	x22, _max_ypos@GOTPAGE
Lloh3:
	ldr	x22, [x22, _max_ypos@GOTPAGEOFF]
Lloh4:
	adrp	x24, _VGABASE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _VGABASE@GOTPAGEOFF]
Lloh6:
	adrp	x25, _max_xpos@GOTPAGE
Lloh7:
	ldr	x25, [x25, _max_xpos@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh8:
	adrp	x9, _current_xpos@GOTPAGE
Lloh9:
	ldr	x9, [x9, _current_xpos@GOTPAGEOFF]
Lloh10:
	str	wzr, [x9]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w8, #1
	str	w8, [x21]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w26, [x20, #1]!
	cbz	w26, LBB0_24
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;     Child Loop BB0_17 Depth 2
	cbz	w19, LBB0_24
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x22]
	cmp	w8, w9
	b.lt	LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	cmp	w9, #1
	b.le	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #0
	mov	w28, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	w28, w28, #1
	add	w27, w27, #1
	cmp	w28, w9
	b.ge	LBB0_15
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	w23, #0
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x9, [x24]
	madd	w8, w28, w8, w23
	lsl	w8, w8, #1
	add	x0, x9, w8, sxtw
	bl	_readw
	ldr	x8, [x24]
	ldr	w9, [x25]
	madd	w9, w27, w9, w23
	lsl	w9, w9, #1
	add	x1, x8, w9, sxtw
	bl	_writew
	add	w23, w23, #1
	ldr	w8, [x25]
	cmp	w23, w8
	b.lt	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w9, [x22]
	b	LBB0_9
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #0
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w23, #0
LBB0_17:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x24]
	madd	w8, w8, w27, w23
	lsl	w8, w8, #1
	add	x1, x9, w8, sxtw
	mov	w0, #1824
	bl	_writew
	add	w23, w23, #1
	ldr	w8, [x25]
	cmp	w23, w8
	b.lt	LBB0_17
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x22]
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w9, #1
	str	w8, [x21]
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w19, w19, #1
	and	w9, w26, #0xff
	cmp	w9, #13
	b.eq	LBB0_4
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w9, #10
	b.eq	LBB0_2
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	sxtb	w9, w26
	and	w9, w9, #0xffff
	orr	w0, w9, #0x700
	ldr	x9, [x24]
	ldr	w10, [x25]
Lloh11:
	adrp	x23, _current_xpos@GOTPAGE
Lloh12:
	ldr	x23, [x23, _current_xpos@GOTPAGEOFF]
	ldr	w11, [x23]
	add	w12, w11, #1
	str	w12, [x23]
	madd	w8, w8, w10, w11
	lsl	w8, w8, #1
	add	x1, x9, w8, sxtw
	bl	_writew
	ldr	w8, [x23]
	ldr	w9, [x25]
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.23:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh13:
	adrp	x8, _current_xpos@GOTPAGE
Lloh14:
	ldr	x8, [x8, _current_xpos@GOTPAGEOFF]
Lloh15:
	str	wzr, [x8]
	ldr	w8, [x21]
	b	LBB0_3
LBB0_24:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_current_ypos,4,2               ; @current_ypos
	.comm	_max_ypos,4,2                   ; @max_ypos
	.comm	_max_xpos,4,2                   ; @max_xpos
	.comm	_VGABASE,8,3                    ; @VGABASE
	.comm	_current_xpos,4,2               ; @current_xpos
	.no_dead_strip	_early_vga_write
.subsections_via_symbols
