	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_conn_get_modes
_virtio_gpu_conn_get_modes:             ## @virtio_gpu_conn_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_drm_connector_to_virtio_gpu_output
	movq	%rax, %rbx
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_drm_add_edid_modes
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_6
LBB0_2:
	movl	4(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movq	_XRES_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_YRES_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_drm_add_modes_noedid
	movl	%eax, %r13d
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.5:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_DRM_DEBUG
	movl	(%r14), %edi
	movl	$0, (%rsp)
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	$60, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_drm_cvt_mode
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_drm_mode_probed_add
	incl	%r13d
	jmp	LBB0_6
LBB0_4:
	movq	_XRES_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_YRES_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_drm_set_preferred_mode
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XRES_MAX,4,2                   ## @XRES_MAX
	.comm	_YRES_MAX,4,2                   ## @YRES_MAX
	.comm	_XRES_DEF,4,2                   ## @XRES_DEF
	.comm	_YRES_DEF,4,2                   ## @YRES_DEF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add mode: %dx%d\n"

	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_virtio_gpu_conn_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtio_gpu_conn_get_modes
_virtio_gpu_conn_get_modes:             ; @virtio_gpu_conn_get_modes
	.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
	bl	_drm_connector_to_virtio_gpu_output
	mov	x22, x0
	ldr	x1, [x0, #8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_drm_add_edid_modes
	mov	x20, x0
	cbnz	w0, LBB0_5
LBB0_2:
	ldr	w0, [x22, #4]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x22]
	bl	_le32_to_cpu
	mov	x22, x0
Lloh0:
	adrp	x8, _XRES_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XRES_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _YRES_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _YRES_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_drm_add_modes_noedid
	mov	x20, x0
	cmp	w21, #0
	ccmp	w22, #0, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _XRES_DEF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XRES_DEF@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _YRES_DEF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _YRES_DEF@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_drm_set_preferred_mode
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_DRM_DEBUG
	ldr	w0, [x19]
	mov	x1, x21
	mov	x2, x22
	mov	w3, #60
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_drm_cvt_mode
	mov	x1, x0
Lloh14:
	adrp	x8, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x0]
	orr	w8, w9, w8
	str	w8, [x0]
	mov	x0, x19
	bl	_drm_mode_probed_add
	add	w20, w20, #1
LBB0_5:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_XRES_MAX,4,2                   ; @XRES_MAX
	.comm	_YRES_MAX,4,2                   ; @YRES_MAX
	.comm	_XRES_DEF,4,2                   ; @XRES_DEF
	.comm	_YRES_DEF,4,2                   ; @YRES_DEF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add mode: %dx%d\n"

	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.no_dead_strip	_virtio_gpu_conn_get_modes
.subsections_via_symbols
