	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function DetectDisplayController
_DetectDisplayController:               ## @DetectDisplayController
	.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
	subq	$344, %rsp                      ## imm = 0x158
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	xorl	%eax, %eax
	callq	_BiosIsVesaSupported
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	%ebx, %esi
	sarl	$8, %esi
	addl	$48, %esi
	movzbl	%bl, %edx
	addl	$48, %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	cmpl	$511, %ebx                      ## imm = 0x1FF
	jle	LBB0_2
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
LBB0_2:
	leaq	L_.str.3(%rip), %rsi
LBB0_5:
	leaq	-352(%rbp), %r15
	movq	%r15, %rdi
	callq	_strcpy
	movq	_ControllerClass@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DisplayController@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-356(%rbp), %rax
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	pushq	%rax
	pushq	$0
	pushq	$0
	pushq	%r15
	callq	_FldrCreateComponentKey
	addq	$32, %rsp
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.6:
	xorl	%eax, %eax
	callq	_BiosIsVesaDdcSupported
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	xorl	%eax, %eax
	callq	_BiosVesaReadEdid
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	addq	$344, %rsp                      ## imm = 0x158
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VESA version %c.%c\n"

L_.str.1:                               ## @.str.1
	.asciz	"VESA not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"VBE Display"

L_.str.3:                               ## @.str.3
	.asciz	"VGA Display"

	.comm	_ControllerClass,4,2            ## @ControllerClass
	.comm	_DisplayController,4,2          ## @DisplayController
L_.str.4:                               ## @.str.4
	.asciz	"Created key: DisplayController\\0\n"

L_.str.5:                               ## @.str.5
	.asciz	"VESA/DDC supported!\n"

L_.str.6:                               ## @.str.6
	.asciz	"EDID data read successfully!\n"

	.no_dead_strip	_DetectDisplayController
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function DetectDisplayController
_DetectDisplayController:               ; @DetectDisplayController
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #400
	.cfi_def_cfa_offset 400
	stp	x28, x27, [sp, #352]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #368]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #384]            ; 16-byte Folded Spill
	add	x29, sp, #384
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_BiosIsVesaSupported
	mov	x19, x0
	cbz	w0, LBB0_3
; %bb.1:
	asr	w8, w19, #8
	add	w8, w8, #48
	and	w9, w19, #0xff
	add	w9, w9, #48
	stp	x8, x9, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cmp	w19, #511
	b.le	LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
LBB0_4:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_5:
	add	x0, sp, #24
	bl	_strcpy
Lloh11:
	adrp	x8, _ControllerClass@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ControllerClass@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _DisplayController@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DisplayController@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x8, sp, #20
	str	x8, [sp, #8]
	str	wzr, [sp]
	add	x6, sp, #24
	mov	x0, x20
	mov	w3, #0
	mov	w4, #0
	mov	w5, #-1
	mov	x7, #0
	bl	_FldrCreateComponentKey
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_TRACE
	cbz	w19, LBB0_9
; %bb.6:
	bl	_BiosIsVesaDdcSupported
	cbz	x0, LBB0_9
; %bb.7:
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_TRACE
	bl	_BiosVesaReadEdid
	cbz	x0, LBB0_9
; %bb.8:
Lloh21:
	adrp	x0, l_.str.6@PAGE
Lloh22:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_TRACE
LBB0_9:
	ldur	x8, [x29, #-40]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #384]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #368]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #352]            ; 16-byte Folded Reload
	add	sp, sp, #400
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VESA version %c.%c\n"

l_.str.1:                               ; @.str.1
	.asciz	"VESA not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"VBE Display"

l_.str.3:                               ; @.str.3
	.asciz	"VGA Display"

	.comm	_ControllerClass,4,2            ; @ControllerClass
	.comm	_DisplayController,4,2          ; @DisplayController
l_.str.4:                               ; @.str.4
	.asciz	"Created key: DisplayController\\0\n"

l_.str.5:                               ; @.str.5
	.asciz	"VESA/DDC supported!\n"

l_.str.6:                               ; @.str.6
	.asciz	"EDID data read successfully!\n"

	.no_dead_strip	_DetectDisplayController
.subsections_via_symbols
