	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLCheckSwitch                 ## -- Begin function VGLCheckSwitch
	.p2align	4, 0x90
_VGLCheckSwitch:                        ## @VGLCheckSwitch
	.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
	movq	_VGLAbortPending@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_32
## %bb.1:
	movq	_VGLSwitchPending@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_31
## %bb.2:
	movq	_VGLOnDisplay@GOTPCREL(%rip), %r14
	movq	_VGLDisplay@GOTPCREL(%rip), %r12
	movq	_VGLModeInfo@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdx), %rax
	movq	%rax, 16(%rdi)
LBB0_24:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, 24(%rdi)
	movl	16(%r13), %eax
	movl	%eax, 12(%rdi)
	movl	12(%r13), %eax
	movl	%eax, 4(%rdi)
	movl	(%rdi), %edx
	movl	8(%rdi), %esi
	callq	_VGLSetVScreenSize
	xorl	%eax, %eax
	callq	_VGLRestoreBlank
	xorl	%eax, %eax
	callq	_VGLRestoreBorder
	xorl	%eax, %eax
	callq	_VGLMouseRestore
	movq	(%r12), %rdi
	movl	32(%rdi), %edx
	movl	36(%rdi), %esi
	callq	_VGLPanScreen
	movq	(%r12), %rcx
	movl	(%rcx), %eax
	movl	8(%rcx), %ebx
	movq	_VGLVDisplay@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%rbx
	callq	_VGLBitmapCopy
	addq	$16, %rsp
	xorl	%eax, %eax
	callq	_VGLRestorePalette
	movq	_VT_RELDISP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VT_ACKACQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_ioctl
LBB0_30:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, (%r15)
	je	LBB0_31
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_28 Depth 2
	movq	$0, (%r15)
	cmpq	$0, (%r14)
	je	LBB0_25
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$131, (%r13)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_KDENABIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_ioctl
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_KDSETMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KD_GRAPHICS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_ioctl
	movq	_VGLMode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_ioctl
	movq	_VGLCurWindow@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MAP_FILE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rcx
	movq	_VGLMem@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	movq	_VIDBUF8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rdi
	movq	%rax, 16(%rdi)
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_24
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	movq	_VIDBUF8X@GOTPCREL(%rip), %rdx
	jmpq	*%rax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, 4(%r13)
	jne	LBB0_24
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, 8(%r13)
	jne	LBB0_24
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VGLBufSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$2, %esi
	movq	_VIDBUF4@GOTPCREL(%rip), %rdx
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jle	LBB0_23
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VIDBUF4S@GOTPCREL(%rip), %rdx
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_VGLMem@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	(%r12), %rax
	movq	24(%rax), %rdi
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_munmap
	movq	_VGLOldMode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_ioctl
	movq	_KDSETMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KD_TEXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_ioctl
	cmpl	$131, (%r13)
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_KDDISABIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_ioctl
LBB0_27:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_VT_RELDISP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VT_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	callq	_ioctl
	movq	_VGLBuf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	%rax, 24(%rcx)
	movq	_MEMBUF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rcx)
	movl	(%rcx), %eax
	movl	8(%rcx), %edx
	movl	%edx, 12(%rcx)
	movl	%eax, 4(%rcx)
	cmpq	$0, (%r14)
	jne	LBB0_30
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_pause
	cmpq	$0, (%r14)
	je	LBB0_28
	jmp	LBB0_30
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$8, 4(%r13)
	jne	LBB0_24
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VGLBufSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	8(%r13)
	movq	_VIDBUF8S@GOTPCREL(%rip), %rdx
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jg	LBB0_23
	jmp	LBB0_24
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	20(%r13), %eax
	cmpl	$4, %eax
	je	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$3, %eax
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$2, %eax
	jne	LBB0_24
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VGLBufSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	8(%r13)
	movq	_VIDBUF16@GOTPCREL(%rip), %rdx
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jle	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VIDBUF16S@GOTPCREL(%rip), %rdx
	jmp	LBB0_23
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_VGLBufSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	8(%r13)
	movq	_VIDBUF32@GOTPCREL(%rip), %rdx
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jle	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VIDBUF32S@GOTPCREL(%rip), %rdx
	jmp	LBB0_23
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_VGLBufSize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	8(%r13)
	movq	_VIDBUF24@GOTPCREL(%rip), %rdx
	movq	_VGLAdpInfo@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %eax
	jle	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_VIDBUF24S@GOTPCREL(%rip), %rdx
	jmp	LBB0_23
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	xorl	%eax, %eax
	callq	_VGLEnd
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_23
	.long	L0_0_set_8
	.long	L0_0_set_12
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_VGLAbortPending,8,3            ## @VGLAbortPending
	.comm	_VGLSwitchPending,8,3           ## @VGLSwitchPending
	.comm	_VGLOnDisplay,8,3               ## @VGLOnDisplay
	.comm	_VGLModeInfo,24,2               ## @VGLModeInfo
	.comm	_KDENABIO,4,2                   ## @KDENABIO
	.comm	_KDSETMODE,4,2                  ## @KDSETMODE
	.comm	_KD_GRAPHICS,4,2                ## @KD_GRAPHICS
	.comm	_VGLMode,4,2                    ## @VGLMode
	.comm	_VGLCurWindow,8,3               ## @VGLCurWindow
	.comm	_VGLAdpInfo,4,2                 ## @VGLAdpInfo
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_FILE,4,2                   ## @MAP_FILE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_VGLMem,8,3                     ## @VGLMem
	.comm	_VIDBUF8,8,3                    ## @VIDBUF8
	.comm	_VGLDisplay,8,3                 ## @VGLDisplay
	.comm	_VGLBufSize,4,2                 ## @VGLBufSize
	.comm	_VIDBUF4S,8,3                   ## @VIDBUF4S
	.comm	_VIDBUF4,8,3                    ## @VIDBUF4
	.comm	_VIDBUF8S,8,3                   ## @VIDBUF8S
	.comm	_VIDBUF8X,8,3                   ## @VIDBUF8X
	.comm	_VIDBUF16S,8,3                  ## @VIDBUF16S
	.comm	_VIDBUF16,8,3                   ## @VIDBUF16
	.comm	_VIDBUF24S,8,3                  ## @VIDBUF24S
	.comm	_VIDBUF24,8,3                   ## @VIDBUF24
	.comm	_VIDBUF32S,8,3                  ## @VIDBUF32S
	.comm	_VIDBUF32,8,3                   ## @VIDBUF32
	.comm	_VGLVDisplay,4,2                ## @VGLVDisplay
	.comm	_VT_RELDISP,4,2                 ## @VT_RELDISP
	.comm	_VT_ACKACQ,4,2                  ## @VT_ACKACQ
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_VGLOldMode,4,2                 ## @VGLOldMode
	.comm	_KD_TEXT,4,2                    ## @KD_TEXT
	.comm	_KDDISABIO,4,2                  ## @KDDISABIO
	.comm	_VT_TRUE,4,2                    ## @VT_TRUE
	.comm	_VGLBuf,8,3                     ## @VGLBuf
	.comm	_MEMBUF,8,3                     ## @MEMBUF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLCheckSwitch                 ; -- Begin function VGLCheckSwitch
	.p2align	2
_VGLCheckSwitch:                        ; @VGLCheckSwitch
	.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
Lloh0:
	adrp	x8, _VGLAbortPending@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VGLAbortPending@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_28
; %bb.1:
Lloh3:
	adrp	x20, _VGLSwitchPending@GOTPAGE
Lloh4:
	ldr	x20, [x20, _VGLSwitchPending@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_27
; %bb.2:
Lloh5:
	adrp	x21, _VGLOnDisplay@GOTPAGE
Lloh6:
	ldr	x21, [x21, _VGLOnDisplay@GOTPAGEOFF]
Lloh7:
	adrp	x23, _VGLMem@GOTPAGE
Lloh8:
	ldr	x23, [x23, _VGLMem@GOTPAGEOFF]
Lloh9:
	adrp	x24, _VGLDisplay@GOTPAGE
Lloh10:
	ldr	x24, [x24, _VGLDisplay@GOTPAGEOFF]
Lloh11:
	adrp	x25, _VGLAdpInfo@GOTPAGE
Lloh12:
	ldr	x25, [x25, _VGLAdpInfo@GOTPAGEOFF]
Lloh13:
	adrp	x27, _KDSETMODE@GOTPAGE
Lloh14:
	ldr	x27, [x27, _KDSETMODE@GOTPAGEOFF]
Lloh15:
	adrp	x22, _VGLModeInfo@GOTPAGE
Lloh16:
	ldr	x22, [x22, _VGLModeInfo@GOTPAGEOFF]
Lloh17:
	adrp	x26, _VT_RELDISP@GOTPAGE
Lloh18:
	ldr	x26, [x26, _VT_RELDISP@GOTPAGEOFF]
Lloh19:
	adrp	x19, _VGLVDisplay@GOTPAGE
Lloh20:
	ldr	x19, [x19, _VGLVDisplay@GOTPAGEOFF]
Lloh21:
	adrp	x28, _VT_ACKACQ@GOTPAGE
Lloh22:
	ldr	x28, [x28, _VT_ACKACQ@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:                                 ;   in Loop: Header=BB0_8 Depth=1
Lloh23:
	adrp	x9, _VGLBufSize@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VGLBufSize@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	ldr	w10, [x22, #8]
	sdiv	w9, w9, w10
	ldr	w10, [x25]
	cmp	w9, w10
Lloh26:
	adrp	x9, _VIDBUF32@GOTPAGE
Lloh27:
	ldr	x9, [x9, _VIDBUF32@GOTPAGEOFF]
Lloh28:
	adrp	x10, _VIDBUF32S@GOTPAGE
Lloh29:
	ldr	x10, [x10, _VIDBUF32S@GOTPAGEOFF]
LBB0_4:                                 ;   in Loop: Header=BB0_8 Depth=1
	csel	x9, x10, x9, gt
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x9]
	str	x9, [x0, #16]
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	x8, [x0, #24]
	ldp	w9, w8, [x22, #12]
	str	w8, [x0, #12]
	str	w9, [x0, #4]
	ldr	w1, [x0, #8]
	ldr	w2, [x0]
	bl	_VGLSetVScreenSize
	bl	_VGLRestoreBlank
	bl	_VGLRestoreBorder
	bl	_VGLMouseRestore
	ldr	x0, [x24]
	ldp	w2, w1, [x0, #32]
	bl	_VGLPanScreen
	ldr	x3, [x24]
	ldr	w6, [x3, #8]
	ldr	w7, [x3]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	bl	_VGLBitmapCopy
	bl	_VGLRestorePalette
	ldr	w1, [x26]
	ldr	w2, [x28]
	mov	w0, #0
	bl	_ioctl
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_27
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	str	xzr, [x20]
	ldr	x8, [x21]
	cbz	x8, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x22]
	cmp	w8, #131
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh30:
	adrp	x8, _KDENABIO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _KDENABIO@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	w0, #0
	mov	w2, #0
	bl	_ioctl
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x27]
Lloh33:
	adrp	x8, _KD_GRAPHICS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _KD_GRAPHICS@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_ioctl
Lloh36:
	adrp	x8, _VGLMode@GOTPAGE
Lloh37:
	ldr	x8, [x8, _VGLMode@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	w0, #0
	mov	w2, #0
	bl	_ioctl
Lloh39:
	adrp	x8, _VGLCurWindow@GOTPAGE
Lloh40:
	ldr	x8, [x8, _VGLCurWindow@GOTPAGEOFF]
Lloh41:
	str	xzr, [x8]
	ldr	w1, [x25]
Lloh42:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh43:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh46:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh48:
	adrp	x8, _MAP_FILE@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MAP_FILE@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
Lloh51:
	adrp	x9, _MAP_SHARED@GOTPAGE
Lloh52:
	ldr	x9, [x9, _MAP_SHARED@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w0, #0
	mov	w4, #0
	mov	w5, #0
	bl	_mmap
	mov	x8, x0
	str	x0, [x23]
Lloh54:
	adrp	x9, _VIDBUF8@GOTPAGE
Lloh55:
	ldr	x9, [x9, _VIDBUF8@GOTPAGEOFF]
Lloh56:
	ldr	x9, [x9]
	ldr	x0, [x24]
	str	x9, [x0, #16]
	ldr	w9, [x22]
	sub	w9, w9, #128
	cmp	w9, #3
	b.hi	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh57:
	adrp	x12, lJTI0_0@PAGE
Lloh58:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x12, x9]
	add	x10, x10, x11, lsl #2
Lloh59:
	adrp	x9, _VIDBUF8X@GOTPAGE
Lloh60:
	ldr	x9, [x9, _VIDBUF8X@GOTPAGEOFF]
	br	x10
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x22, #4]
	cmp	w9, #4
	b.ne	LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x22, #8]
	cmp	w9, #4
	b.ne	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh61:
	adrp	x9, _VGLBufSize@GOTPAGE
Lloh62:
	ldr	x9, [x9, _VGLBufSize@GOTPAGEOFF]
Lloh63:
	ldr	w9, [x9]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	ldr	w10, [x25]
	cmp	w10, w9, asr #2
Lloh64:
	adrp	x9, _VIDBUF4@GOTPAGE
Lloh65:
	ldr	x9, [x9, _VIDBUF4@GOTPAGEOFF]
Lloh66:
	adrp	x10, _VIDBUF4S@GOTPAGE
Lloh67:
	ldr	x10, [x10, _VIDBUF4S@GOTPAGEOFF]
	csel	x9, x10, x9, lt
	b	LBB0_5
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh68:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh69:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh70:
	ldr	x8, [x8]
	str	x8, [x23]
	ldr	x8, [x24]
	ldr	x0, [x8, #24]
	ldr	w1, [x25]
	bl	_munmap
Lloh71:
	adrp	x8, _VGLOldMode@GOTPAGE
Lloh72:
	ldr	x8, [x8, _VGLOldMode@GOTPAGEOFF]
Lloh73:
	ldr	w1, [x8]
	mov	w0, #0
	mov	w2, #0
	bl	_ioctl
	ldr	w1, [x27]
Lloh74:
	adrp	x8, _KD_TEXT@GOTPAGE
Lloh75:
	ldr	x8, [x8, _KD_TEXT@GOTPAGEOFF]
Lloh76:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_ioctl
	ldr	w8, [x22]
	cmp	w8, #131
	b.eq	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh77:
	adrp	x8, _KDDISABIO@GOTPAGE
Lloh78:
	ldr	x8, [x8, _KDDISABIO@GOTPAGEOFF]
Lloh79:
	ldr	w1, [x8]
	mov	w0, #0
	mov	w2, #0
	bl	_ioctl
LBB0_18:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x26]
Lloh80:
	adrp	x8, _VT_TRUE@GOTPAGE
Lloh81:
	ldr	x8, [x8, _VT_TRUE@GOTPAGEOFF]
Lloh82:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_ioctl
Lloh83:
	adrp	x8, _VGLBuf@GOTPAGE
Lloh84:
	ldr	x8, [x8, _VGLBuf@GOTPAGEOFF]
Lloh85:
	ldr	x8, [x8]
	ldr	x9, [x24]
Lloh86:
	adrp	x10, _MEMBUF@GOTPAGE
Lloh87:
	ldr	x10, [x10, _MEMBUF@GOTPAGEOFF]
Lloh88:
	ldr	x10, [x10]
	stp	x10, x8, [x9, #16]
	ldr	w8, [x9, #8]
	str	w8, [x9, #12]
	ldr	w8, [x9]
	str	w8, [x9, #4]
	ldr	x8, [x21]
	cbnz	x8, LBB0_7
LBB0_19:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_pause
	ldr	x8, [x21]
	cbz	x8, LBB0_19
	b	LBB0_7
LBB0_20:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x22, #4]
	cmp	w9, #8
	b.ne	LBB0_6
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh89:
	adrp	x9, _VGLBufSize@GOTPAGE
Lloh90:
	ldr	x9, [x9, _VGLBufSize@GOTPAGEOFF]
Lloh91:
	ldr	w9, [x9]
	ldr	w10, [x22, #8]
	sdiv	w10, w9, w10
	ldr	w11, [x25]
Lloh92:
	adrp	x9, _VIDBUF8S@GOTPAGE
Lloh93:
	ldr	x9, [x9, _VIDBUF8S@GOTPAGEOFF]
	cmp	w10, w11
	b.gt	LBB0_5
	b	LBB0_6
LBB0_22:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x22, #20]
	cmp	w9, #4
	b.eq	LBB0_3
; %bb.23:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w9, #3
	b.eq	LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	w9, #2
	b.ne	LBB0_6
; %bb.25:                               ;   in Loop: Header=BB0_8 Depth=1
Lloh94:
	adrp	x9, _VGLBufSize@GOTPAGE
Lloh95:
	ldr	x9, [x9, _VGLBufSize@GOTPAGEOFF]
Lloh96:
	ldr	w9, [x9]
	ldr	w10, [x22, #8]
	sdiv	w9, w9, w10
	ldr	w10, [x25]
	cmp	w9, w10
Lloh97:
	adrp	x9, _VIDBUF16@GOTPAGE
Lloh98:
	ldr	x9, [x9, _VIDBUF16@GOTPAGEOFF]
Lloh99:
	adrp	x10, _VIDBUF16S@GOTPAGE
Lloh100:
	ldr	x10, [x10, _VIDBUF16S@GOTPAGEOFF]
	b	LBB0_4
LBB0_26:                                ;   in Loop: Header=BB0_8 Depth=1
Lloh101:
	adrp	x9, _VGLBufSize@GOTPAGE
Lloh102:
	ldr	x9, [x9, _VGLBufSize@GOTPAGEOFF]
Lloh103:
	ldr	w9, [x9]
	ldr	w10, [x22, #8]
	sdiv	w9, w9, w10
	ldr	w10, [x25]
	cmp	w9, w10
Lloh104:
	adrp	x9, _VIDBUF24@GOTPAGE
Lloh105:
	ldr	x9, [x9, _VIDBUF24@GOTPAGEOFF]
Lloh106:
	adrp	x10, _VIDBUF24S@GOTPAGE
Lloh107:
	ldr	x10, [x10, _VIDBUF24S@GOTPAGEOFF]
	b	LBB0_4
LBB0_27:
	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
LBB0_28:
	bl	_VGLEnd
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGot	Lloh92, Lloh93
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGot	Lloh99, Lloh100
	.loh AdrpLdrGot	Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.loh AdrpLdrGot	Lloh106, Lloh107
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_13-LBB0_5)>>2
	.byte	(LBB0_20-LBB0_5)>>2
	.byte	(LBB0_22-LBB0_5)>>2
                                        ; -- End function
	.comm	_VGLAbortPending,8,3            ; @VGLAbortPending
	.comm	_VGLSwitchPending,8,3           ; @VGLSwitchPending
	.comm	_VGLOnDisplay,8,3               ; @VGLOnDisplay
	.comm	_VGLModeInfo,24,2               ; @VGLModeInfo
	.comm	_KDENABIO,4,2                   ; @KDENABIO
	.comm	_KDSETMODE,4,2                  ; @KDSETMODE
	.comm	_KD_GRAPHICS,4,2                ; @KD_GRAPHICS
	.comm	_VGLMode,4,2                    ; @VGLMode
	.comm	_VGLCurWindow,8,3               ; @VGLCurWindow
	.comm	_VGLAdpInfo,4,2                 ; @VGLAdpInfo
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_FILE,4,2                   ; @MAP_FILE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_VGLMem,8,3                     ; @VGLMem
	.comm	_VIDBUF8,8,3                    ; @VIDBUF8
	.comm	_VGLDisplay,8,3                 ; @VGLDisplay
	.comm	_VGLBufSize,4,2                 ; @VGLBufSize
	.comm	_VIDBUF4S,8,3                   ; @VIDBUF4S
	.comm	_VIDBUF4,8,3                    ; @VIDBUF4
	.comm	_VIDBUF8S,8,3                   ; @VIDBUF8S
	.comm	_VIDBUF8X,8,3                   ; @VIDBUF8X
	.comm	_VIDBUF16S,8,3                  ; @VIDBUF16S
	.comm	_VIDBUF16,8,3                   ; @VIDBUF16
	.comm	_VIDBUF24S,8,3                  ; @VIDBUF24S
	.comm	_VIDBUF24,8,3                   ; @VIDBUF24
	.comm	_VIDBUF32S,8,3                  ; @VIDBUF32S
	.comm	_VIDBUF32,8,3                   ; @VIDBUF32
	.comm	_VGLVDisplay,4,2                ; @VGLVDisplay
	.comm	_VT_RELDISP,4,2                 ; @VT_RELDISP
	.comm	_VT_ACKACQ,4,2                  ; @VT_ACKACQ
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_VGLOldMode,4,2                 ; @VGLOldMode
	.comm	_KD_TEXT,4,2                    ; @KD_TEXT
	.comm	_KDDISABIO,4,2                  ; @KDDISABIO
	.comm	_VT_TRUE,4,2                    ; @VT_TRUE
	.comm	_VGLBuf,8,3                     ; @VGLBuf
	.comm	_MEMBUF,8,3                     ; @MEMBUF
.subsections_via_symbols
