	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vga_probe
_vga_probe:                             ## @vga_probe
	.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	$40, %rsp
	.cfi_offset %rbx, -24
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_initregs
	movabsq	$68719481344, %rax              ## imm = 0x1000001200
	movq	%rax, -40(%rbp)
	leaq	-24(%rbp), %rdx
	movl	$16, %edi
	movq	%rbx, %rsi
	callq	_intcall
	movl	-20(%rbp), %eax
	movl	-12(%rbp), %ecx
	movq	_boot_params@GOTPCREL(%rip), %rbx
	movl	%ecx, 4(%rbx)
	cmpl	$16, %eax
	jne	LBB0_1
## %bb.4:
	movq	_ADAPTER_CGA@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movl	$6656, -40(%rbp)                ## imm = 0x1A00
	leaq	-40(%rbp), %rsi
	leaq	-24(%rbp), %rdx
	movl	$16, %edi
	callq	_intcall
	cmpl	$26, -16(%rbp)
	jne	LBB0_3
## %bb.2:
	movq	_ADAPTER_VGA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_adapter@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$1, (%rbx)
	jmp	LBB0_6
LBB0_3:
	movq	_ADAPTER_EGA@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	_adapter@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_6:
	leaq	_vga_probe.mode_lists(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	movq	_video_vga@GOTPCREL(%rip), %rdx
	movq	%rcx, 8(%rdx)
	leaq	_reltable.vga_probe(%rip), %rcx
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	movq	%rsi, (%rdx)
	leaq	_vga_probe.mode_count(%rip), %rcx
	movl	(%rcx,%rax,4), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.vga_probe
_reltable.vga_probe:
	.long	L_.str-_reltable.vga_probe
	.long	L_.str.1-_reltable.vga_probe
	.long	L_.str.2-_reltable.vga_probe

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CGA/MDA/HGC"

L_.str.1:                               ## @.str.1
	.asciz	"EGA"

L_.str.2:                               ## @.str.2
	.asciz	"VGA"

	.section	__TEXT,__const
	.p2align	4                               ## @vga_probe.mode_lists
_vga_probe.mode_lists:
	.quad	130
	.quad	129
	.quad	128

	.p2align	2                               ## @vga_probe.mode_count
_vga_probe.mode_count:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1

	.comm	_boot_params,8,2                ## @boot_params
	.comm	_ADAPTER_VGA,8,3                ## @ADAPTER_VGA
	.comm	_adapter,8,3                    ## @adapter
	.comm	_ADAPTER_EGA,8,3                ## @ADAPTER_EGA
	.comm	_ADAPTER_CGA,8,3                ## @ADAPTER_CGA
	.comm	_video_vga,16,3                 ## @video_vga
	.no_dead_strip	_vga_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function vga_probe
lCPI0_0:
	.long	4608                            ; 0x1200
	.long	16                              ; 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_vga_probe:                             ; @vga_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	x0, sp, #16
	bl	_initregs
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #16]
	add	x1, sp, #16
	mov	x2, sp
	mov	w0, #16
	bl	_intcall
Lloh2:
	adrp	x19, _boot_params@GOTPAGE
Lloh3:
	ldr	x19, [x19, _boot_params@GOTPAGEOFF]
	ldr	w8, [sp, #12]
	ldr	w9, [sp, #4]
	str	w8, [x19, #4]
	cmp	w9, #16
	b.ne	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ADAPTER_CGA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ADAPTER_CGA@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	w8, #6656
	str	w8, [sp, #16]
	add	x1, sp, #16
	mov	x2, sp
	mov	w0, #16
	bl	_intcall
	ldr	w8, [sp, #8]
	cmp	w8, #26
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _ADAPTER_VGA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADAPTER_VGA@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _adapter@GOTPAGE
Lloh10:
	ldr	x9, [x9, _adapter@GOTPAGEOFF]
Lloh11:
	str	x8, [x9]
	mov	w9, #1
	str	w9, [x19]
	b	LBB0_6
LBB0_4:
Lloh12:
	adrp	x8, _ADAPTER_EGA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ADAPTER_EGA@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _adapter@GOTPAGE
Lloh15:
	ldr	x9, [x9, _adapter@GOTPAGEOFF]
Lloh16:
	str	x8, [x9]
LBB0_6:
	lsl	x9, x8, #3
Lloh17:
	adrp	x10, _vga_probe.mode_lists@PAGE
Lloh18:
	add	x10, x10, _vga_probe.mode_lists@PAGEOFF
	ldr	x10, [x10, x9]
Lloh19:
	adrp	x11, _video_vga@GOTPAGE
Lloh20:
	ldr	x11, [x11, _video_vga@GOTPAGEOFF]
Lloh21:
	adrp	x12, _vga_probe.card_name@PAGE
Lloh22:
	add	x12, x12, _vga_probe.card_name@PAGEOFF
	ldr	x9, [x12, x9]
	stp	x9, x10, [x11]
Lloh23:
	adrp	x9, _vga_probe.mode_count@PAGE
Lloh24:
	add	x9, x9, _vga_probe.mode_count@PAGEOFF
	ldr	w0, [x9, x8, lsl #2]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @vga_probe.card_name
_vga_probe.card_name:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CGA/MDA/HGC"

l_.str.1:                               ; @.str.1
	.asciz	"EGA"

l_.str.2:                               ; @.str.2
	.asciz	"VGA"

	.section	__TEXT,__const
	.p2align	3                               ; @vga_probe.mode_lists
_vga_probe.mode_lists:
	.quad	130
	.quad	129
	.quad	128

	.p2align	2                               ; @vga_probe.mode_count
_vga_probe.mode_count:
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1

	.comm	_boot_params,8,2                ; @boot_params
	.comm	_ADAPTER_VGA,8,3                ; @ADAPTER_VGA
	.comm	_adapter,8,3                    ; @adapter
	.comm	_ADAPTER_EGA,8,3                ; @ADAPTER_EGA
	.comm	_ADAPTER_CGA,8,3                ; @ADAPTER_CGA
	.comm	_video_vga,16,3                 ; @video_vga
	.no_dead_strip	_vga_probe
.subsections_via_symbols
