	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%esi, %esi
	movl	$52, %edx
	callq	_memset
	movl	(%r14), %esi
	movl	4(%r14), %edi
	movl	8(%r14), %ebx
	subl	%esi, %ebx
	movl	12(%r14), %r10d
	movl	16(%r14), %r9d
	subl	%r9d, %r10d
	movl	20(%r14), %eax
	subl	%edi, %eax
	movl	24(%r14), %r11d
	movl	28(%r14), %r8d
	subl	%r8d, %r11d
	subl	%esi, %r9d
	subl	%edi, %r8d
	movslq	32(%r14), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	movl	%ecx, 24(%r15)
	movzbl	%sil, %ecx
	movl	%ecx, 28(%r15)
	movzbl	%bl, %ecx
	movl	%ecx, 32(%r15)
	shrl	$4, %esi
	andl	$240, %esi
	shrl	$8, %ebx
	andl	$15, %ebx
	orl	%esi, %ebx
	movl	%ebx, 36(%r15)
	movzbl	%dil, %ecx
	movl	%ecx, 40(%r15)
	movzbl	%al, %ecx
	movl	%ecx, 44(%r15)
	shrl	$4, %edi
	andl	$240, %edi
	shrl	$8, %eax
	andl	$15, %eax
	orl	%edi, %eax
	movl	%eax, 48(%r15)
	movzbl	%r9b, %eax
	movl	%eax, (%r15)
	movzbl	%r10b, %eax
	movl	%eax, 4(%r15)
	movl	%r8d, %eax
	shll	$4, %eax
	movzbl	%al, %eax
	movl	%r11d, %ecx
	andl	$15, %ecx
	orl	%eax, %ecx
	movl	%ecx, 8(%r15)
	shrl	$2, %r9d
	andl	$192, %r9d
	shrl	$4, %r10d
	andl	$48, %r10d
	orl	%r9d, %r10d
	movl	%r8d, %eax
	shrl	$2, %eax
	andl	$12, %eax
	orl	%r10d, %eax
	shrl	$4, %r11d
	andl	$3, %r11d
	orl	%eax, %r11d
	movl	%r11d, 12(%r15)
	movl	$24, 16(%r15)
	movl	36(%r14), %eax
	movq	_DRM_MODE_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_DTD_FLAG_INTERLACE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	$24, %ecx
	movl	%ecx, 16(%r15)
	jmp	LBB0_3
LBB0_1:
	movl	$24, %ecx
LBB0_3:
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_5
## %bb.4:
	movq	_DTD_FLAG_HSYNC_POSITIVE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, 16(%r15)
LBB0_5:
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_7
## %bb.6:
	movq	_DTD_FLAG_VSYNC_POSITIVE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%r15)
LBB0_7:
	andl	$192, %r8d
	movl	%r8d, 20(%r15)
	addq	$8, %rsp
	popq	%rbx
	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:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	mov	w2, #52
	bl	_memset
	ldp	w12, w9, [x20]
	ldp	w8, w10, [x20, #8]
	sub	w15, w8, w12
	ldp	w8, w11, [x20, #16]
	sub	w10, w10, w8
	sub	w13, w11, w9
	ldp	w11, w16, [x20, #24]
	sub	w11, w11, w16
	sub	w14, w8, w12
	sub	w8, w16, w9
	mov	w17, #26215
	movk	w17, #26214, lsl #16
	ldp	w0, w16, [x20, #32]
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x0, w0
	mul	x17, x0, x17
	lsr	x0, x17, #32
	lsr	x17, x17, #63
	add	w17, w17, w0, asr #2
	and	w0, w12, #0xff
	stp	w17, w0, [x19, #24]
	and	w17, w15, #0xff
	lsr	w12, w12, #4
	and	w12, w12, #0xf0
	bfxil	w12, w15, #8, #4
	stp	w17, w12, [x19, #32]
	and	w12, w9, #0xff
	and	w15, w13, #0xff
	stp	w12, w15, [x19, #40]
	lsr	w9, w9, #4
	and	w9, w9, #0xf0
	bfxil	w9, w13, #8, #4
	str	w9, [x19, #48]
	and	w9, w14, #0xff
	and	w12, w10, #0xff
	stp	w9, w12, [x19]
	and	w9, w11, #0xf
	bfi	w9, w8, #4, #4
	lsr	w12, w14, #2
	and	w12, w12, #0xc0
	bfxil	w12, w10, #4, #6
	bfxil	w12, w8, #2, #4
	bfxil	w12, w11, #4, #2
	stp	w9, w12, [x19, #8]
	mov	w9, #24
	str	w9, [x19, #16]
Lloh0:
	adrp	x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DRM_MODE_FLAG_INTERLACE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w16
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _DTD_FLAG_INTERLACE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DTD_FLAG_INTERLACE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w9, w9, #0x18
	str	w9, [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, w16
	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	w9, w9, w10
	str	w9, [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, w16
	b.eq	LBB0_6
; %bb.5:
Lloh15:
	adrp	x10, _DTD_FLAG_VSYNC_POSITIVE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DTD_FLAG_VSYNC_POSITIVE@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w9, w10
	str	w9, [x19, #16]
LBB0_6:
	and	w8, w8, #0xc0
	str	w8, [x19, #20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	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
