	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vbox_get_modes
_vbox_get_modes:                        ## @vbox_get_modes
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_to_vbox_connector
	movq	%rax, %r15
	movq	8(%r13), %rax
	movq	(%rax), %r14
	movl	8(%r14), %ebx
	movq	%r14, %rdi
	callq	_GUEST_HEAP_OFFSET
	movq	_HOST_FLAGS_OFFSET@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_hgsmi_report_flags_location
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_vbox_report_caps
LBB0_2:
	movq	%r13, %rdi
	movl	$2560, %esi                     ## imm = 0xA00
	movl	$1600, %edx                     ## imm = 0x640
	callq	_drm_add_modes_noedid
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %eax
	movl	12(%r15), %ecx
	testl	%eax, %eax
	movl	$1024, %ebx                     ## imm = 0x400
	cmovnel	%eax, %ebx
	testl	%ecx, %ecx
	movl	$768, %r12d                     ## imm = 0x300
	cmovnel	%ecx, %r12d
	movq	8(%r13), %rdi
	movl	$0, (%rsp)
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	$60, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_drm_cvt_mode
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_probed_add
	incl	-44(%rbp)                       ## 4-byte Folded Spill
LBB0_4:
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_vbox_set_edid
	movq	(%r15), %rax
	movl	8(%rax), %edx
	cmpl	$-1, %edx
	movl	4(%r14), %esi
	movl	$0, %ebx
	cmovel	%ebx, %edx
	movq	%r13, %rdi
	callq	_drm_object_property_set_value
	movq	(%r15), %rax
	movl	12(%rax), %edx
	cmpl	$-1, %edx
	cmovel	%ebx, %edx
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_drm_object_property_set_value
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOST_FLAGS_OFFSET,8,3          ## @HOST_FLAGS_OFFSET
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_vbox_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vbox_get_modes
_vbox_get_modes:                        ; @vbox_get_modes
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_to_vbox_connector
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x20, [x8]
	ldr	w22, [x20, #8]
	mov	x0, x20
	bl	_GUEST_HEAP_OFFSET
Lloh0:
	adrp	x8, _HOST_FLAGS_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOST_FLAGS_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x1, x8, x0
	mov	x0, x22
	bl	_hgsmi_report_flags_location
	ldr	x8, [x21]
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_vbox_report_caps
LBB0_2:
	mov	x0, x19
	mov	w1, #2560
	mov	w2, #1600
	bl	_drm_add_modes_noedid
	mov	x22, x0
	mov	w8, #1024
	ldp	w9, w10, [x21, #8]
	cmp	w9, #0
	csel	w23, w8, w9, eq
	mov	w8, #768
	cmp	w10, #0
	csel	w24, w8, w10, eq
	ldr	x0, [x19, #8]
	mov	x1, x23
	mov	x2, x24
	mov	w3, #60
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_drm_cvt_mode
	cbz	x0, LBB0_4
; %bb.3:
	mov	x1, x0
Lloh3:
	adrp	x8, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	mov	x0, x19
	bl	_drm_mode_probed_add
	add	w22, w22, #1
LBB0_4:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	bl	_vbox_set_edid
	ldr	x8, [x21]
	ldr	w8, [x8, #8]
	ldr	w1, [x20, #4]
	cmn	w8, #1
	csel	w2, wzr, w8, eq
	mov	x0, x19
	bl	_drm_object_property_set_value
	ldr	x8, [x21]
	ldr	w8, [x8, #12]
	cmn	w8, #1
	csel	w2, wzr, w8, eq
	ldr	w1, [x20]
	mov	x0, x19
	bl	_drm_object_property_set_value
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HOST_FLAGS_OFFSET,8,3          ; @HOST_FLAGS_OFFSET
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_vbox_get_modes
.subsections_via_symbols
