	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_gpu_conn_mode_valid
_virtio_gpu_conn_mode_valid:            ## @virtio_gpu_conn_mode_valid
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_drm_connector_to_virtio_gpu_output
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_le32_to_cpu
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_le32_to_cpu
	movq	_DRM_MODE_TYPE_PREFERRED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MODE_OK@GOTPCREL(%rip), %rcx
	testl	%edx, (%r15)
	je	LBB0_8
## %bb.1:
	movl	4(%r15), %esi
	movq	_XRES_DEF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %esi
	jne	LBB0_3
## %bb.2:
	movl	8(%r15), %edx
	movq	_YRES_DEF@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %edx
	je	LBB0_8
LBB0_3:
	movl	8(%r15), %edx
	cmpl	%r14d, %esi
	jg	LBB0_7
## %bb.4:
	addl	$-16, %r14d
	cmpl	%r14d, %esi
	jl	LBB0_7
## %bb.5:
	cmpl	%eax, %edx
	jg	LBB0_7
## %bb.6:
	addl	$-16, %eax
	cmpl	%eax, %edx
	jge	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_MODE_BAD@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ## @DRM_MODE_TYPE_PREFERRED
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.comm	_XRES_DEF,4,2                   ## @XRES_DEF
	.comm	_YRES_DEF,4,2                   ## @YRES_DEF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"del mode: %dx%d\n"

	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
	.no_dead_strip	_virtio_gpu_conn_mode_valid
.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_mode_valid
_virtio_gpu_conn_mode_valid:            ; @virtio_gpu_conn_mode_valid
	.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, x1
	bl	_drm_connector_to_virtio_gpu_output
	mov	x21, x0
	ldr	w0, [x0, #4]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [x21]
	bl	_le32_to_cpu
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_MODE_TYPE_PREFERRED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	ldr	w1, [x19, #4]
Lloh3:
	adrp	x8, _XRES_DEF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XRES_DEF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w1, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x19, #8]
Lloh6:
	adrp	x9, _YRES_DEF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _YRES_DEF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_6
LBB0_3:
	sub	w8, w20, #16
	ldr	w2, [x19, #8]
	cmp	w1, w20
	ccmp	w1, w8, #8, le
	b.lt	LBB0_5
; %bb.4:
	sub	w8, w0, #16
	cmp	w2, w0
	ccmp	w2, w8, #8, le
	b.ge	LBB0_6
LBB0_5:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh11:
	adrp	x8, _MODE_BAD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MODE_BAD@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_TYPE_PREFERRED,4,2    ; @DRM_MODE_TYPE_PREFERRED
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.comm	_XRES_DEF,4,2                   ; @XRES_DEF
	.comm	_YRES_DEF,4,2                   ; @YRES_DEF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"del mode: %dx%d\n"

	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
	.no_dead_strip	_virtio_gpu_conn_mode_valid
.subsections_via_symbols
