	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_crtc_mode_valid
_omap_crtc_mode_valid:                  ## @omap_crtc_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, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r15
	callq	_to_omap_crtc
	movq	%rax, %rbx
	movl	$0, -32(%rbp)
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_drm_display_mode_to_videomode
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rax), %rax
	movq	_OMAP_DISPLAY_TYPE_DSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
LBB0_2:
	movq	8(%r15), %rax
	movl	4(%r15), %edi
	movl	(%rbx), %esi
	leaq	-32(%rbp), %rdx
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_8
LBB0_3:
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.4:
	movl	(%r14), %eax
	imull	4(%r14), %eax
	imull	8(%r14), %eax
	movl	16(%r14), %esi
	imull	$4000, %eax, %edi               ## imm = 0xFA0
	imull	12(%r14), %esi
	callq	_div_u64
	cmpl	%eax, (%r15)
	jae	LBB0_6
## %bb.5:
	movq	_MODE_BAD@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_MODE_OK@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMAP_DISPLAY_TYPE_DSI,8,3      ## @OMAP_DISPLAY_TYPE_DSI
	.comm	_MODE_BAD,4,2                   ## @MODE_BAD
	.comm	_MODE_OK,4,2                    ## @MODE_OK
	.no_dead_strip	_omap_crtc_mode_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_crtc_mode_valid
_omap_crtc_mode_valid:                  ; @omap_crtc_mode_valid
	.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, x1
	ldr	x8, [x0]
	ldr	x21, [x8]
	bl	_to_omap_crtc
	mov	x20, x0
	str	wzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_drm_display_mode_to_videomode
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _OMAP_DISPLAY_TYPE_DSI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OMAP_DISPLAY_TYPE_DSI@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
LBB0_2:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	w0, [x21, #4]
	ldr	w1, [x20]
	add	x2, sp, #8
	blr	x8
	cbnz	w0, LBB0_8
LBB0_3:
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.4:
	ldp	w8, w9, [x19]
	mul	w8, w8, w9
	ldp	w9, w10, [x19, #8]
	mul	w8, w8, w9
	mov	w9, #4000
	mul	w0, w8, w9
	ldr	w8, [x19, #16]
	mul	w1, w8, w10
	bl	_div_u64
	ldr	w8, [x21]
	cmp	w8, w0
	b.hs	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _MODE_BAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MODE_BAD@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _MODE_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MODE_OK@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_OMAP_DISPLAY_TYPE_DSI,8,3      ; @OMAP_DISPLAY_TYPE_DSI
	.comm	_MODE_BAD,4,2                   ; @MODE_BAD
	.comm	_MODE_OK,4,2                    ; @MODE_OK
	.no_dead_strip	_omap_crtc_mode_valid
.subsections_via_symbols
