	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tve200_display_check
_tve200_display_check:                  ## @tve200_display_check
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	(%rsi), %r15
	movl	4(%rdx), %eax
	cmpl	$352, %eax                      ## imm = 0x160
	je	LBB0_4
## %bb.1:
	cmpl	$640, %eax                      ## imm = 0x280
	je	LBB0_9
## %bb.2:
	cmpl	$720, %eax                      ## imm = 0x2D0
	jne	LBB0_3
## %bb.6:
	movl	8(%r14), %edx
	cmpl	$480, %edx                      ## imm = 0x1E0
	je	LBB0_10
## %bb.7:
	cmpl	$576, %edx                      ## imm = 0x240
	je	LBB0_10
	jmp	LBB0_8
LBB0_4:
	movl	8(%r14), %edx
	cmpl	$240, %edx
	je	LBB0_10
## %bb.5:
	cmpl	$288, %edx                      ## imm = 0x120
	je	LBB0_10
	jmp	LBB0_8
LBB0_9:
	movl	8(%r14), %edx
	cmpl	$480, %edx                      ## imm = 0x1E0
	jne	LBB0_8
LBB0_10:
	xorl	%ebx, %ebx
	testq	%r15, %r15
	je	LBB0_20
## %bb.11:
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_drm_fb_cma_get_gem_addr
	testb	$3, %al
	je	LBB0_15
## %bb.12:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_13
LBB0_3:
	movl	8(%r14), %edx
LBB0_8:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_14
LBB0_15:
	movq	(%r15), %rcx
	movq	8(%r15), %rax
	movq	(%rax), %rdx
	movl	(%rdx), %edx
	imull	4(%r14), %edx
	cmpl	%edx, (%rcx)
	jne	LBB0_16
## %bb.17:
	xorl	%ebx, %ebx
	testq	%r12, %r12
	je	LBB0_20
## %bb.18:
	cmpq	%rax, 8(%r12)
	je	LBB0_20
## %bb.19:
	movl	$1, (%r14)
	jmp	LBB0_20
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
LBB0_13:
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported display mode (%u x %u)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"FB not 32-bit aligned\n"

L_.str.2:                               ## @.str.2
	.asciz	"can't handle pitches\n"

	.no_dead_strip	_tve200_display_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tve200_display_check
_tve200_display_check:                  ; @tve200_display_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	x20, [x1]
	ldr	w8, [x2, #4]
	cmp	w8, #352
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #640
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #720
	b.ne	LBB0_11
; %bb.3:
	ldr	w9, [x19, #8]
	cmp	w9, #480
	b.eq	LBB0_8
; %bb.4:
	cmp	w9, #576
	b.eq	LBB0_8
	b	LBB0_12
LBB0_5:
	ldr	w9, [x19, #8]
	cmp	w9, #240
	b.eq	LBB0_8
; %bb.6:
	cmp	w9, #288
	b.eq	LBB0_8
	b	LBB0_12
LBB0_7:
	ldr	w9, [x19, #8]
	cmp	w9, #480
	b.ne	LBB0_12
LBB0_8:
	cbz	x20, LBB0_18
; %bb.9:
	mov	x0, x20
	mov	w2, #0
	bl	_drm_fb_cma_get_gem_addr
	tst	w0, #0x3
	b.eq	LBB0_14
; %bb.10:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
	ldr	w9, [x19, #8]
LBB0_12:
	stp	x8, x9, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_13:
	bl	_DRM_DEBUG_KMS
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_14:
	ldp	x9, x8, [x20]
	ldr	w9, [x9]
	ldr	w10, [x19, #4]
	ldr	x11, [x8]
	ldr	w11, [x11]
	mul	w10, w11, w10
	cmp	w9, w10
	b.ne	LBB0_20
; %bb.15:
	cbz	x21, LBB0_18
; %bb.16:
	ldr	x9, [x21, #8]
	cmp	x9, x8
	b.eq	LBB0_18
; %bb.17:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_19
LBB0_18:
	mov	w0, #0
LBB0_19:
	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
	add	sp, sp, #64
	ret
LBB0_20:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported display mode (%u x %u)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"FB not 32-bit aligned\n"

l_.str.2:                               ; @.str.2
	.asciz	"can't handle pitches\n"

	.no_dead_strip	_tve200_display_check
.subsections_via_symbols
