	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vga_set_basic_mode
_vga_set_basic_mode:                    ## @vga_set_basic_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	leaq	-16(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_initregs
	movl	$3840, -16(%rbp)                ## imm = 0xF00
	leaq	-24(%rbp), %rdx
	movl	$16, %edi
	movq	%rbx, %rsi
	callq	_intcall
	movl	-20(%rbp), %ebx
	xorl	%edi, %edi
	callq	_set_fs
	movl	$1156, %edi                     ## imm = 0x484
	callq	_rdfs8
	movl	-24(%rbp), %ecx
	andl	$-5, %ecx
	cmpl	$20483, %ecx                    ## imm = 0x5003
	jne	LBB0_3
## %bb.1:
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$24, %eax
	je	LBB0_4
LBB0_3:
	movl	%ebx, %eax
	andl	$-5, %eax
	cmpl	$3, %eax
	movl	$3, %eax
	cmovnel	%eax, %ebx
	movl	%ebx, -16(%rbp)
	leaq	-16(%rbp), %rsi
	movl	$16, %edi
	xorl	%edx, %edx
	callq	_intcall
	movq	_do_restore@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_do_restore,4,2                 ## @do_restore
	.no_dead_strip	_vga_set_basic_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vga_set_basic_mode
_vga_set_basic_mode:                    ; @vga_set_basic_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	add	x0, sp, #8
	bl	_initregs
	mov	w8, #3840
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x2, sp
	mov	w0, #16
	bl	_intcall
	ldr	w19, [sp, #4]
	mov	w0, #0
	bl	_set_fs
	mov	w0, #1156
	bl	_rdfs8
	ldr	w8, [sp]
	and	w8, w8, #0xfffffffb
	mov	w9, #20483
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	cbz	w0, LBB0_4
; %bb.2:
	cmp	w0, #24
	b.eq	LBB0_4
LBB0_3:
	and	w8, w19, #0xfffffffb
	mov	w9, #3
	cmp	w8, #3
	csel	w19, w19, w9, eq
	str	w19, [sp, #8]
	add	x1, sp, #8
	mov	w0, #16
	mov	x2, #0
	bl	_intcall
Lloh0:
	adrp	x8, _do_restore@GOTPAGE
Lloh1:
	ldr	x8, [x8, _do_restore@GOTPAGEOFF]
	mov	w9, #1
Lloh2:
	str	w9, [x8]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_do_restore,4,2                 ; @do_restore
	.no_dead_strip	_vga_set_basic_mode
.subsections_via_symbols
