	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLSetBorder                   ## -- Begin function VGLSetBorder
	.p2align	4, 0x90
_VGLSetBorder:                          ## @VGLSetBorder
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_VGLModeInfo@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_V_INFO_MM_DIRECT@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.1:
	movq	_KDENABIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_ioctl
	testq	%rax, %rax
	jne	LBB0_3
LBB0_2:
	xorl	%eax, %eax
	callq	_VGLCheckSwitch
	movl	$986, %edi                      ## imm = 0x3DA
	callq	_inb
	movl	$960, %edi                      ## imm = 0x3C0
	movl	$17, %esi
	callq	_outb
	movl	$960, %edi                      ## imm = 0x3C0
	movl	%ebx, %esi
	callq	_outb
	movl	$986, %edi                      ## imm = 0x3DA
	callq	_inb
	movl	$960, %edi                      ## imm = 0x3C0
	movl	$32, %esi
	callq	_outb
	movq	_VGLBorderColor@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	(%r14), %rax
	cmpq	(%r15), %rax
	jne	LBB0_3
## %bb.4:
	movq	_KDDISABIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ioctl                          ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VGLModeInfo,8,3                ## @VGLModeInfo
	.comm	_V_INFO_MM_DIRECT,8,3           ## @V_INFO_MM_DIRECT
	.comm	_KDENABIO,4,2                   ## @KDENABIO
	.comm	_VGLBorderColor,4,2             ## @VGLBorderColor
	.comm	_KDDISABIO,4,2                  ## @KDDISABIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLSetBorder                   ; -- Begin function VGLSetBorder
	.p2align	2
_VGLSetBorder:                          ; @VGLSetBorder
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _VGLModeInfo@GOTPAGE
Lloh1:
	ldr	x20, [x20, _VGLModeInfo@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _V_INFO_MM_DIRECT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _V_INFO_MM_DIRECT@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _KDENABIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _KDENABIO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #0
	mov	w2, #0
	bl	_ioctl
	cbnz	x0, LBB0_4
LBB0_2:
	bl	_VGLCheckSwitch
	mov	w0, #986
	bl	_inb
	mov	w0, #960
	mov	w1, #17
	bl	_outb
	mov	w0, #960
	mov	x1, x19
	bl	_outb
	mov	w0, #986
	bl	_inb
	mov	w0, #960
	mov	w1, #32
	bl	_outb
Lloh7:
	adrp	x8, _VGLBorderColor@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VGLBorderColor@GOTPAGEOFF]
Lloh9:
	str	w19, [x8]
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x8, _KDDISABIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _KDDISABIO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w0, #0
	mov	w2, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ioctl
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VGLModeInfo,8,3                ; @VGLModeInfo
	.comm	_V_INFO_MM_DIRECT,8,3           ; @V_INFO_MM_DIRECT
	.comm	_KDENABIO,4,2                   ; @KDENABIO
	.comm	_VGLBorderColor,4,2             ; @VGLBorderColor
	.comm	_KDDISABIO,4,2                  ; @KDDISABIO
.subsections_via_symbols
