	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_sdvo_get_dtd_from_mode
_intel_sdvo_get_dtd_from_mode:          ## @intel_sdvo_get_dtd_from_mode
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rsi), %r13d
	movl	4(%rsi), %edx
	movl	8(%rsi), %r15d
	subl	%r13d, %r15d
	movl	12(%rsi), %eax
	movl	16(%rsi), %ecx
	subl	%ecx, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	20(%rsi), %r14d
	subl	%edx, %r14d
	movl	24(%rsi), %r12d
	movl	28(%rsi), %eax
	subl	%eax, %r12d
	subl	%r13d, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	subl	%edx, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movslq	32(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_intel_mode_get_pixel_multiplier
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	testq	%rax, %rax
	movl	$1, %ecx
	cmovneq	%rax, %rcx
	movq	%rdx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_3
LBB0_1:
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_3:
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%eax, 40(%rbx)
	movzbl	%r13b, %eax
	movl	%eax, 44(%rbx)
	movzbl	%r15b, %eax
	movl	%eax, 48(%rbx)
	shrl	$4, %r13d
	andl	$240, %r13d
	shrl	$8, %r15d
	andl	$15, %r15d
	orl	%r13d, %r15d
	movl	%r15d, 52(%rbx)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movzbl	%cl, %eax
	movl	%eax, 56(%rbx)
	movzbl	%r14b, %eax
	movl	%eax, 60(%rbx)
	shrl	$4, %ecx
	andl	$240, %ecx
	shrl	$8, %r14d
	andl	$15, %r14d
	orl	%ecx, %r14d
	movl	%r14d, 64(%rbx)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movzbl	%dil, %eax
	movl	%eax, (%rbx)
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movzbl	%dl, %eax
	movl	%eax, 4(%rbx)
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %eax
	shll	$4, %eax
	movzbl	%al, %eax
	movl	%r12d, %ecx
	andl	$15, %ecx
	orl	%eax, %ecx
	movl	%ecx, 8(%rbx)
	shrl	$2, %edi
	andl	$192, %edi
	shrl	$4, %edx
	andl	$48, %edx
	orl	%edi, %edx
	movl	%esi, %eax
	shrl	$2, %eax
	andl	$12, %eax
	orl	%edx, %eax
	shrl	$4, %r12d
	andl	$3, %r12d
	orl	%eax, %r12d
	movl	%r12d, 12(%rbx)
	movl	$24, 16(%rbx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	36(%rax), %eax
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	_DTD_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	$24, %ecx
	movl	%ecx, 16(%rbx)
	jmp	LBB0_6
LBB0_4:
	movl	$24, %ecx
LBB0_6:
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_8
## %bb.7:
	movq	_DTD_FLAG_HSYNC_POSITIVE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 16(%rbx)
LBB0_8:
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_10
## %bb.9:
	movq	_DTD_FLAG_VSYNC_POSITIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
LBB0_10:
	andl	$192, %esi
	movl	%esi, 20(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ## @DRM_MODE_FLAG_INTERLACE
	.comm	_DTD_FLAG_INTERLACE,4,2         ## @DTD_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_DTD_FLAG_HSYNC_POSITIVE,4,2    ## @DTD_FLAG_HSYNC_POSITIVE
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_DTD_FLAG_VSYNC_POSITIVE,4,2    ## @DTD_FLAG_VSYNC_POSITIVE
	.no_dead_strip	_intel_sdvo_get_dtd_from_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_sdvo_get_dtd_from_mode
_intel_sdvo_get_dtd_from_mode:          ; @intel_sdvo_get_dtd_from_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldp	w22, w23, [x1]
	ldp	w8, w9, [x1, #8]
	sub	w24, w8, w22
	ldp	w8, w10, [x1, #16]
	sub	w25, w9, w8
	sub	w26, w10, w23
	ldp	w9, w10, [x1, #24]
	sub	w9, w9, w10
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	sub	w28, w8, w22
	sub	w27, w10, w23
	ldrsw	x21, [x1, #32]
	mov	x0, x1
	bl	_intel_mode_get_pixel_multiplier
	cmp	x0, #0
	csinc	x8, x0, xzr, ne
	sdiv	x8, x21, x8
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #2
	and	w9, w22, #0xff
	stp	w8, w9, [x19, #40]
	and	w8, w24, #0xff
	lsr	w9, w22, #4
	and	w9, w9, #0xf0
	bfxil	w9, w24, #8, #4
	stp	w8, w9, [x19, #48]
	and	w8, w23, #0xff
	and	w9, w26, #0xff
	stp	w8, w9, [x19, #56]
	lsr	w8, w23, #4
	and	w8, w8, #0xf0
	bfxil	w8, w26, #8, #4
	str	w8, [x19, #64]
	and	w8, w28, #0xff
	and	w9, w25, #0xff
	stp	w8, w9, [x19]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	and	w8, w10, #0xf
	bfi	w8, w27, #4, #4
	lsr	w9, w28, #2
	and	w9, w9, #0xc0
	bfxil	w9, w25, #4, #6
	bfxil	w9, w27, #2, #4
	bfxil	w9, w10, #4, #2
	stp	w8, w9, [x19, #8]
	mov	w8, #24
	str	w8, [x19, #16]
	ldr	w9, [x20, #36]
Lloh0:
	adrp	x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _DTD_FLAG_INTERLACE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DTD_FLAG_INTERLACE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w8, w8, #0x18
	str	w8, [x19, #16]
LBB0_2:
Lloh6:
	adrp	x10, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x10, _DTD_FLAG_HSYNC_POSITIVE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DTD_FLAG_HSYNC_POSITIVE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w8, w8, w10
	str	w8, [x19, #16]
LBB0_4:
Lloh12:
	adrp	x10, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x9, _DTD_FLAG_VSYNC_POSITIVE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DTD_FLAG_VSYNC_POSITIVE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #16]
LBB0_6:
	and	w8, w27, #0xc0
	str	w8, [x19, #20]
	stp	xzr, xzr, [x19, #24]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_MODE_FLAG_INTERLACE,4,2    ; @DRM_MODE_FLAG_INTERLACE
	.comm	_DTD_FLAG_INTERLACE,4,2         ; @DTD_FLAG_INTERLACE
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_DTD_FLAG_HSYNC_POSITIVE,4,2    ; @DTD_FLAG_HSYNC_POSITIVE
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_DTD_FLAG_VSYNC_POSITIVE,4,2    ; @DTD_FLAG_VSYNC_POSITIVE
	.no_dead_strip	_intel_sdvo_get_dtd_from_mode
.subsections_via_symbols
