	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDSoftVdp1EraseFrameBuffer    ## -- Begin function VIDSoftVdp1EraseFrameBuffer
	.p2align	4, 0x90
_VIDSoftVdp1EraseFrameBuffer:           ## @VIDSoftVdp1EraseFrameBuffer
	.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
	testb	$2, (%rdi)
	movq	_Vdp1External@GOTPCREL(%rip), %r8
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%r8)
	je	LBB0_24
LBB0_2:
	movl	4(%rdi), %r11d
	movl	%r11d, %eax
	andl	$511, %eax                      ## imm = 0x1FF
	leal	1(%rax), %r9d
	movq	_vdp1height@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	cmovgel	%ecx, %r9d
	movl	%r11d, %r15d
	shrl	$6, %r15d
	andl	$1016, %r15d                    ## imm = 0x3F8
	addl	$8, %r15d
	movq	_vdp1width@GOTPCREL(%rip), %r10
	movl	(%r10), %eax
	cmpl	%eax, %r15d
	cmovgel	%eax, %r15d
	movq	_vdp1pixelsize@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jne	LBB0_12
## %bb.3:
	movl	8(%rdi), %edx
	movl	%edx, %r12d
	andl	$511, %r12d                     ## imm = 0x1FF
	cmpl	%r9d, %r12d
	jge	LBB0_23
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	shrl	$6, %edx
	andl	$504, %edx                      ## imm = 0x1F8
	cmpl	%edx, %r15d
	jle	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%edx, %r11d
	orl	$1, %r11d
	testb	$1, %r15b
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	12(%rdi), %r14d
	movl	(%r10), %ebx
	imull	%r12d, %ebx
	addl	%edx, %ebx
	movslq	%ebx, %rdx
	movl	%r14d, (%rsi,%rdx,4)
	movl	%r11d, %edx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r11d, %r15d
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	12(%rdi), %ebx
	movslq	(%r10), %rcx
	movslq	%r12d, %rax
	imulq	%rax, %rcx
	addq	%rdx, %rcx
	movl	%ebx, (%rsi,%rcx,4)
	movl	12(%rdi), %ecx
	movslq	(%r10), %rbx
	imulq	%rax, %rbx
	addq	%rdx, %rbx
	movl	%ecx, 4(%rsi,%rbx,4)
	addq	$2, %rdx
	cmpl	%r15d, %edx
	jl	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r12d
	cmpl	%r9d, %r12d
	je	LBB0_23
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	8(%rdi), %edx
	jmp	LBB0_4
LBB0_12:
	movl	8(%rdi), %edx
	movl	%edx, %ecx
	andl	$511, %ecx                      ## imm = 0x1FF
	cmpl	%r9d, %ecx
	jge	LBB0_23
## %bb.13:
	sarl	$5, %r11d
	andl	$-16, %r11d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	shrl	$6, %edx
	andl	$504, %edx                      ## imm = 0x1F8
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=2
	addl	$2, %edx
LBB0_15:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r11d, %edx
	jge	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	(%r10), %eax
	imull	%ecx, %eax
	addl	%edx, %eax
	cmpl	$262142, %eax                   ## imm = 0x3FFFE
	jg	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movzbl	12(%rdi), %ebx
	cltq
	movl	%ebx, (%rsi,%rax,4)
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	(%r10), %eax
	imull	%ecx, %eax
	addl	%edx, %eax
	incl	%eax
	cmpl	$262142, %eax                   ## imm = 0x3FFFE
	jg	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_15 Depth=2
	movzbl	12(%rdi), %ebx
	cltq
	movl	%ebx, (%rsi,%rax,4)
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_14 Depth=1
	incl	%ecx
	cmpl	%r9d, %ecx
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	8(%rdi), %edx
	jmp	LBB0_14
LBB0_23:
	movq	$0, (%r8)
LBB0_24:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp1External,8,3               ## @Vdp1External
	.comm	_vdp1height,4,2                 ## @vdp1height
	.comm	_vdp1width,4,2                  ## @vdp1width
	.comm	_vdp1pixelsize,4,2              ## @vdp1pixelsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDSoftVdp1EraseFrameBuffer    ; -- Begin function VIDSoftVdp1EraseFrameBuffer
	.p2align	2
_VIDSoftVdp1EraseFrameBuffer:           ; @VIDSoftVdp1EraseFrameBuffer
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _Vdp1External@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Vdp1External@GOTPAGEOFF]
	ldrb	w9, [x0]
	tbz	w9, #1, LBB0_3
; %bb.1:
	ldr	x9, [x8]
	cbnz	x9, LBB0_3
; %bb.2:
	ret
LBB0_3:
	ldr	w12, [x0, #4]
	and	w9, w12, #0x1ff
Lloh2:
	adrp	x10, _vdp1height@GOTPAGE
Lloh3:
	ldr	x10, [x10, _vdp1height@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w9, w10
	csinc	w9, w10, w9, ge
	lsr	w10, w12, #6
	and	w10, w10, #0x3f8
	add	w11, w10, #8
Lloh5:
	adrp	x10, _vdp1width@GOTPAGE
Lloh6:
	ldr	x10, [x10, _vdp1width@GOTPAGEOFF]
	ldr	w13, [x10]
	cmp	w11, w13
	csel	w11, w11, w13, lt
Lloh7:
	adrp	x13, _vdp1pixelsize@GOTPAGE
Lloh8:
	ldr	x13, [x13, _vdp1pixelsize@GOTPAGEOFF]
Lloh9:
	ldr	w13, [x13]
	cmp	w13, #2
	b.ne	LBB0_10
; %bb.4:
	ldr	w13, [x0, #8]
	and	w12, w13, #0x1ff
	cmp	w12, w9
	b.ge	LBB0_19
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	lsr	w14, w13, #6
	and	w14, w14, #0x1f8
	cmp	w14, w11
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ubfx	x13, x13, #9, #6
	lsl	x13, x13, #3
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w14, [x0, #12]
	ldrsw	x15, [x10]
	sxtw	x16, w12
	madd	x15, x16, x15, x13
	str	w14, [x1, x15, lsl #2]
	add	x13, x13, #1
	cmp	w13, w11
	b.lt	LBB0_7
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w12, w12, #1
	cmp	w12, w9
	b.eq	LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w13, [x0, #8]
	b	LBB0_5
LBB0_10:
	ldr	w14, [x0, #8]
	and	w11, w14, #0x1ff
	cmp	w11, w9
	b.ge	LBB0_19
; %bb.11:
	asr	w12, w12, #5
	and	w12, w12, #0xfffffff0
	mov	w13, #262142
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	lsr	w14, w14, #6
	and	w14, w14, #0x1f8
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	w14, w14, #1
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w14, w12
	b.ge	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w15, [x10]
	madd	w15, w11, w15, w14
	cmp	w15, w13
	b.gt	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	ldrb	w16, [x0, #12]
	str	w16, [x1, w15, sxtw #2]
	b	LBB0_13
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w11, w11, #1
	cmp	w11, w9
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w14, [x0, #8]
	b	LBB0_12
LBB0_19:
	str	xzr, [x8]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp1External,8,3               ; @Vdp1External
	.comm	_vdp1height,4,2                 ; @vdp1height
	.comm	_vdp1width,4,2                  ; @vdp1width
	.comm	_vdp1pixelsize,4,2              ; @vdp1pixelsize
.subsections_via_symbols
