	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLClear                       ## -- Begin function VGLClear
	.p2align	4, 0x90
_VGLClear:                              ## @VGLClear
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	%esi, -44(%rbp)
	xorl	%eax, %eax
	callq	_VGLCheckSwitch
	movq	_VGLDisplay@GOTPCREL(%rip), %r12
	cmpq	%r13, (%r12)
	je	LBB0_9
## %bb.1:
	cmpl	$139, (%r13)
	je	LBB0_2
	jmp	LBB0_19
LBB0_9:
	xorl	%eax, %eax
	callq	_VGLMouseFreeze
	movq	_VGLVDisplay@GOTPCREL(%rip), %rdi
	movl	%r14d, %esi
	callq	_VGLClear
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$11, %eax
	ja	LBB0_17
## %bb.10:
	movl	$4070, %ecx                     ## imm = 0xFE6
	btl	%eax, %ecx
	jae	LBB0_11
LBB0_2:
	movl	$139, -88(%rbp)
	movl	32(%r13), %eax
	movl	%eax, -56(%rbp)
	movl	4(%r13), %edi
	movl	%edi, -84(%rbp)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -80(%rbp)
	movq	$0, -64(%rbp)
	imull	16(%r13), %edi
	callq	_alloca
	movl	%eax, %r15d
	movl	%eax, -68(%rbp)
	movl	16(%r13), %eax
	movl	%eax, -72(%rbp)
	movl	%r14d, %edi
	callq	_htole32
	movl	%eax, -44(%rbp)
	movl	4(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r13), %edx
	movl	%edx, %esi
	imull	%ebx, %esi
	addl	%r15d, %esi
	movq	%r14, %rdi
	callq	_bcopy
	incl	%ebx
	movl	4(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_4
LBB0_5:
	cmpl	$0, 12(%r13)
	jle	LBB0_17
## %bb.6:
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$-1
	pushq	%rax
	callq	___VGLBitmapCopy
	addq	$16, %rsp
	cmpl	$2, 12(%r13)
	jl	LBB0_17
## %bb.7:
	movl	$1, %ebx
	leaq	-88(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %eax
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	movl	%ebx, %r9d
	pushq	$-1
	pushq	%rax
	callq	___VGLBitmapCopy
	addq	$16, %rsp
	incl	%ebx
	cmpl	12(%r13), %ebx
	jl	LBB0_8
LBB0_17:
	cmpq	%r13, (%r12)
	jne	LBB0_19
LBB0_18:
	xorl	%eax, %eax
	callq	_VGLMouseUnFreeze
LBB0_19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	$24, %ecx
	btl	%eax, %ecx
	jae	LBB0_12
## %bb.13:
	movq	_VGL_MOUSEHIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___VGLMouseMode
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$964, %edi                      ## imm = 0x3C4
	movl	$2, %esi
	callq	_outb
	movl	$965, %edi                      ## imm = 0x3C5
	movl	$15, %esi
	callq	_outb
	movl	$974, %edi                      ## imm = 0x3CE
	movl	$5, %esi
	callq	_outb
	movl	$975, %edi                      ## imm = 0x3CF
	movl	$2, %esi
	callq	_outb
	movl	$974, %edi                      ## imm = 0x3CE
	movl	$1, %esi
	callq	_outb
	xorl	%r12d, %r12d
	movl	$975, %edi                      ## imm = 0x3CF
	xorl	%esi, %esi
	callq	_outb
	movl	$974, %edi                      ## imm = 0x3CE
	movl	$8, %esi
	callq	_outb
	movl	$975, %edi                      ## imm = 0x3CF
	movl	$255, %esi
	callq	_outb
	movq	_VGLAdpInfo@GOTPCREL(%rip), %r15
	movl	12(%r13), %eax
	imull	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_VGLSetSegment
	movl	12(%r13), %edi
	imull	4(%r13), %edi
	subl	%r12d, %edi
	movl	4(%r15), %esi
	callq	_min
	movl	%eax, %ebx
	movl	20(%r13), %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_memset
	addl	%ebx, %r12d
	movl	12(%r13), %eax
	imull	(%r15), %eax
	cmpl	%eax, %r12d
	jl	LBB0_14
LBB0_15:
	movl	$974, %edi                      ## imm = 0x3CE
	movl	$5, %esi
	callq	_outb
	movl	$975, %edi                      ## imm = 0x3CF
	xorl	%esi, %esi
	callq	_outb
	movq	_VGLDisplay@GOTPCREL(%rip), %r12
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_12:
	movq	_VGL_MOUSEHIDE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___VGLMouseMode
	movl	%eax, %ebx
	movl	$966, %edi                      ## imm = 0x3C6
	movl	$255, %esi
	callq	_outb
	movl	$964, %edi                      ## imm = 0x3C4
	movl	$2, %esi
	callq	_outb
	movl	$965, %edi                      ## imm = 0x3C5
	movl	$15, %esi
	callq	_outb
	movl	12(%r13), %edx
	movl	20(%r13), %edi
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rax
	imull	(%rax), %edx
	movl	%r14d, %esi
	callq	_memset
LBB0_16:
	movl	%ebx, %edi
	callq	___VGLMouseMode
	cmpq	%r13, (%r12)
	jne	LBB0_19
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_VGLDisplay,8,3                 ## @VGLDisplay
	.comm	_VGLVDisplay,36,2               ## @VGLVDisplay
	.comm	_VGL_MOUSEHIDE,4,2              ## @VGL_MOUSEHIDE
	.comm	_VGLAdpInfo,8,2                 ## @VGLAdpInfo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLClear                       ; -- Begin function VGLClear
	.p2align	2
_VGLClear:                              ; @VGLClear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x1
	mov	x19, x0
	str	w1, [sp, #44]
	bl	_VGLCheckSwitch
Lloh0:
	adrp	x24, _VGLDisplay@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VGLDisplay@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x19
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #139
	b.eq	LBB0_4
	b	LBB0_20
LBB0_2:
	bl	_VGLMouseFreeze
Lloh2:
	adrp	x0, _VGLVDisplay@GOTPAGE
Lloh3:
	ldr	x0, [x0, _VGLVDisplay@GOTPAGEOFF]
	mov	x1, x20
	bl	_VGLClear
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #11
	b.hi	LBB0_18
; %bb.3:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #4070
	tst	w8, w9
	b.eq	LBB0_11
LBB0_4:
	mov	w8, #139
	ldr	w9, [x19, #32]
	str	w9, [sp, #40]
	ldr	w9, [x19, #4]
	stp	w8, w9, [sp, #8]
	movi.2s	v0, #1
	str	d0, [sp, #16]
	str	xzr, [sp, #32]
	ldr	w8, [x19, #16]
	mul	w0, w8, w9
	bl	_alloca
	mov	x21, x0
	ldr	w8, [x19, #16]
	stp	w8, w0, [sp, #24]
	mov	x0, x20
	bl	_htole32
	str	w0, [sp, #44]
	ldr	w6, [x19, #4]
	cmp	w6, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19, #16]
	madd	w1, w2, w20, w21
	add	x0, sp, #44
	bl	_bcopy
	add	w20, w20, #1
	ldr	w6, [x19, #4]
	cmp	w20, w6
	b.lt	LBB0_6
LBB0_7:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.8:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	mov	w4, #0
	mov	w5, #0
	mov	w7, #-1
	bl	___VGLBitmapCopy
	ldr	w8, [x19, #12]
	cmp	w8, #2
	b.lt	LBB0_18
; %bb.9:
	mov	w20, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w6, [x19, #4]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	mov	w4, #0
	mov	x5, x20
	mov	w7, #-1
	bl	___VGLBitmapCopy
	add	w20, w20, #1
	ldr	w8, [x19, #12]
	cmp	w20, w8
	b.lt	LBB0_10
	b	LBB0_18
LBB0_11:
	tst	w8, #0x18
	b.eq	LBB0_16
; %bb.12:
Lloh4:
	adrp	x8, _VGL_MOUSEHIDE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VGL_MOUSEHIDE@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	___VGLMouseMode
	mov	x21, x0
	mov	w0, #964
	mov	w1, #2
	bl	_outb
	mov	w0, #965
	mov	w1, #15
	bl	_outb
	mov	w0, #974
	mov	w1, #5
	bl	_outb
	mov	w0, #975
	mov	w1, #2
	bl	_outb
	mov	w0, #974
	mov	w1, #1
	bl	_outb
	mov	w0, #975
	mov	w1, #0
	bl	_outb
	mov	w0, #974
	mov	w1, #8
	bl	_outb
	mov	w0, #975
	mov	w1, #255
	bl	_outb
Lloh7:
	adrp	x25, _VGLAdpInfo@GOTPAGE
Lloh8:
	ldr	x25, [x25, _VGLAdpInfo@GOTPAGEOFF]
	ldr	w8, [x25]
	ldr	w9, [x19, #12]
	mul	w8, w9, w8
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	w22, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_VGLSetSegment
	ldr	w8, [x19, #4]
	ldr	w9, [x19, #12]
	neg	w10, w22
	madd	w0, w9, w8, w10
	ldr	w1, [x25, #4]
	bl	_min
	mov	x23, x0
	ldr	w0, [x19, #20]
	mov	x1, x20
	mov	x2, x23
	bl	_memset
	ldr	w8, [x25]
	ldr	w9, [x19, #12]
	mul	w8, w9, w8
	add	w22, w23, w22
	cmp	w22, w8
	b.lt	LBB0_14
LBB0_15:
	mov	w0, #974
	mov	w1, #5
	bl	_outb
	mov	w0, #975
	mov	w1, #0
	bl	_outb
	b	LBB0_17
LBB0_16:
Lloh9:
	adrp	x8, _VGL_MOUSEHIDE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VGL_MOUSEHIDE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	___VGLMouseMode
	mov	x21, x0
	mov	w0, #966
	mov	w1, #255
	bl	_outb
	mov	w0, #964
	mov	w1, #2
	bl	_outb
	mov	w0, #965
	mov	w1, #15
	bl	_outb
	ldr	w0, [x19, #20]
Lloh12:
	adrp	x8, _VGLAdpInfo@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VGLAdpInfo@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19, #12]
	mul	w2, w9, w8
	mov	x1, x20
	bl	_memset
LBB0_17:
	mov	x0, x21
	bl	___VGLMouseMode
LBB0_18:
	ldr	x8, [x24]
	cmp	x8, x19
	b.ne	LBB0_20
; %bb.19:
	bl	_VGLMouseUnFreeze
LBB0_20:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VGLDisplay,8,3                 ; @VGLDisplay
	.comm	_VGLVDisplay,36,2               ; @VGLVDisplay
	.comm	_VGL_MOUSEHIDE,4,2              ; @VGL_MOUSEHIDE
	.comm	_VGLAdpInfo,8,2                 ; @VGLAdpInfo
.subsections_via_symbols
