	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdi_check_timings
_sdi_check_timings:                     ## @sdi_check_timings
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_dssdev_to_sdi
	movslq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	imulq	$1000, %rcx, %r14               ## imm = 0x3E8
	leaq	-40(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_sdi_calc_clock_div
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movq	-40(%rbp), %rax
	movq	-56(%rbp), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	movq	-48(%rbp), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.8:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r12
	jmp	LBB0_9
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r12d
LBB0_9:
	xorl	%ebx, %ebx
	cmpq	%r14, %r12
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_DSSWARN
	shrq	$3, %r12
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	movq	%r12, %rax
	mulq	%rcx
	shrq	$4, %rdx
	movl	%edx, (%r15)
LBB0_11:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Pixel clock adjusted from %lu Hz to %lu Hz\n"

	.no_dead_strip	_sdi_check_timings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdi_check_timings
_sdi_check_timings:                     ; @sdi_check_timings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	_dssdev_to_sdi
	ldrsw	x8, [x19]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w9, #1000
	mul	x20, x8, x9
	add	x2, sp, #8
	add	x3, sp, #16
	mov	x1, x20
	bl	_sdi_calc_clock_div
	cbnz	w0, LBB0_6
; %bb.2:
	ldp	x8, x9, [sp, #8]
	ldr	x10, [sp, #24]
	udiv	x8, x8, x9
	udiv	x21, x8, x10
	cmp	x21, x20
	b.ne	LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_DSSWARN
	mov	w0, #0
	lsr	x8, x21, #3
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	umulh	x8, x8, x9
	lsr	x8, x8, #4
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Pixel clock adjusted from %lu Hz to %lu Hz\n"

	.no_dead_strip	_sdi_check_timings
.subsections_via_symbols
