	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_sdvo_get_config
_intel_sdvo_get_config:                 ## @intel_sdvo_get_config
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	callq	_to_i915
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_to_sdvo
	movq	%rax, %r14
	movq	_INTEL_OUTPUT_SDVO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, 32(%r13)
	movl	(%r14), %edi
	callq	_I915_READ
	movl	%eax, %r15d
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_intel_sdvo_get_input_timing
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	-48(%rbp), %ecx
	movq	_DTD_FLAG_HSYNC_POSITIVE@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_DRM_MODE_FLAG_NHSYNC@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	_PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 28(%r13)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movq	_DTD_FLAG_VSYNC_POSITIVE@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_7
## %bb.6:
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_7:
	movq	_DRM_MODE_FLAG_NVSYNC@GOTPCREL(%rip), %rcx
LBB0_8:
	orl	(%rcx), %eax
LBB0_9:
	orl	%eax, 20(%r13)
	movq	%r12, %rdi
	callq	_IS_I915G
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	callq	_IS_I915GM
	testq	%rax, %rax
	je	LBB0_11
LBB0_12:
	movq	_SDVO_PORT_MULTIPLY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	%r15d, %esi
	movq	_SDVO_PORT_MULTIPLY_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %esi
	incl	%esi
	movl	%esi, (%r13)
LBB0_13:
	movl	4(%r13), %eax
	testl	%esi, %esi
	je	LBB0_15
## %bb.14:
	cltd
	idivl	%esi
LBB0_15:
	movl	%eax, 24(%r13)
	movq	_SDVO_CMD_GET_CLOCK_RATE_MULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_intel_sdvo_get_value
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movl	-44(%rbp), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_18
## %bb.17:
	cltq
	leaq	l_switch.table.intel_sdvo_get_config(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
LBB0_18:
	movl	(%r13), %edx
	xorl	%edi, %edi
	cmpl	%edx, %ecx
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_WARN
	movq	_HDMI_COLOR_RANGE_16_235@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_20
## %bb.19:
	movl	$1, 8(%r13)
LBB0_20:
	movq	_SDVO_CMD_GET_AUDIO_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_intel_sdvo_get_value
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	_SDVO_AUDIO_ELD_VALID@GOTPCREL(%rip), %rax
	movq	_SDVO_AUDIO_PRESENCE_DETECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	-44(%rbp), %eax
	notl	%eax
	testl	%eax, %ecx
	jne	LBB0_23
## %bb.22:
	movl	$1, 12(%r13)
LBB0_23:
	movq	_SDVO_CMD_GET_ENCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_intel_sdvo_get_value
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	movl	-44(%rbp), %eax
	movq	_SDVO_ENCODE_HDMI@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_26
## %bb.25:
	movl	$1, 16(%r13)
LBB0_26:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_intel_sdvo_get_avi_infoframe
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r13), %esi
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_SDVO,4,2          ## @INTEL_OUTPUT_SDVO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to retrieve SDVO DTD\n"

	.comm	_PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS,4,2 ## @PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS
	.comm	_DTD_FLAG_HSYNC_POSITIVE,4,2    ## @DTD_FLAG_HSYNC_POSITIVE
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ## @DRM_MODE_FLAG_NHSYNC
	.comm	_DTD_FLAG_VSYNC_POSITIVE,4,2    ## @DTD_FLAG_VSYNC_POSITIVE
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ## @DRM_MODE_FLAG_NVSYNC
	.comm	_SDVO_PORT_MULTIPLY_MASK,4,2    ## @SDVO_PORT_MULTIPLY_MASK
	.comm	_SDVO_PORT_MULTIPLY_SHIFT,4,2   ## @SDVO_PORT_MULTIPLY_SHIFT
	.comm	_SDVO_CMD_GET_CLOCK_RATE_MULT,4,2 ## @SDVO_CMD_GET_CLOCK_RATE_MULT
L_.str.1:                               ## @.str.1
	.asciz	"SDVO pixel multiplier mismatch, port: %i, encoder: %i\n"

	.comm	_HDMI_COLOR_RANGE_16_235,4,2    ## @HDMI_COLOR_RANGE_16_235
	.comm	_SDVO_CMD_GET_AUDIO_STAT,4,2    ## @SDVO_CMD_GET_AUDIO_STAT
	.comm	_SDVO_AUDIO_ELD_VALID,4,2       ## @SDVO_AUDIO_ELD_VALID
	.comm	_SDVO_AUDIO_PRESENCE_DETECT,4,2 ## @SDVO_AUDIO_PRESENCE_DETECT
	.comm	_SDVO_CMD_GET_ENCODE,4,2        ## @SDVO_CMD_GET_ENCODE
	.comm	_SDVO_ENCODE_HDMI,4,2           ## @SDVO_ENCODE_HDMI
	.no_dead_strip	_intel_sdvo_get_config
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.intel_sdvo_get_config
l_switch.table.intel_sdvo_get_config:
	.long	4                               ## 0x4
	.long	2                               ## 0x2
	.long	1                               ## 0x1

.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_config
_intel_sdvo_get_config:                 ; @intel_sdvo_get_config
	.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
	mov	x20, x0
	ldr	x0, [x0]
	bl	_to_i915
	mov	x22, x0
	mov	x0, x20
	bl	_to_sdvo
	mov	x20, x0
Lloh0:
	adrp	x8, _INTEL_OUTPUT_SDVO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_OUTPUT_SDVO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_BIT
	ldr	w8, [x19, #32]
	orr	w8, w8, w0
	str	w8, [x19, #32]
	ldr	w0, [x20]
	bl	_I915_READ
	mov	x21, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_intel_sdvo_get_input_timing
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w9, [sp, #8]
Lloh3:
	adrp	x8, _DTD_FLAG_HSYNC_POSITIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DTD_FLAG_HSYNC_POSITIVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x10, _DRM_MODE_FLAG_NHSYNC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DRM_MODE_FLAG_NHSYNC@GOTPAGEOFF]
Lloh8:
	adrp	x11, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh9:
	ldr	x11, [x11, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
	tst	w8, w9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
Lloh10:
	adrp	x10, _DTD_FLAG_VSYNC_POSITIVE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _DTD_FLAG_VSYNC_POSITIVE@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.2:
Lloh13:
	adrp	x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	w8, #0
Lloh17:
	adrp	x9, _PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	ldr	w10, [x19, #28]
	orr	w9, w10, w9
	str	w9, [x19, #28]
	b	LBB0_6
LBB0_4:
Lloh20:
	adrp	x9, _DRM_MODE_FLAG_NVSYNC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DRM_MODE_FLAG_NVSYNC@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_6:
	ldr	w9, [x19, #20]
	orr	w8, w9, w8
	str	w8, [x19, #20]
	mov	x0, x22
	bl	_IS_I915G
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x22
	bl	_IS_I915GM
	cbz	x0, LBB0_22
LBB0_8:
Lloh22:
	adrp	x8, _SDVO_PORT_MULTIPLY_MASK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SDVO_PORT_MULTIPLY_MASK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh25:
	adrp	x9, _SDVO_PORT_MULTIPLY_SHIFT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SDVO_PORT_MULTIPLY_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	asr	w8, w8, w9
	add	w8, w8, #1
	str	w8, [x19]
LBB0_9:
	ldr	w9, [x19, #4]
	sdiv	w10, w9, w8
	cmp	w8, #0
	csel	w8, w9, w10, eq
	str	w8, [x19, #24]
Lloh28:
	adrp	x8, _SDVO_CMD_GET_CLOCK_RATE_MULT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SDVO_CMD_GET_CLOCK_RATE_MULT@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x20
	mov	w3, #1
	bl	_intel_sdvo_get_value
	cbz	x0, LBB0_12
; %bb.10:
	ldr	w8, [sp, #4]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_12
; %bb.11:
Lloh31:
	adrp	x9, l_switch.table.intel_sdvo_get_config@PAGE
Lloh32:
	add	x9, x9, l_switch.table.intel_sdvo_get_config@PAGEOFF
	ldr	w3, [x9, w8, sxtw #2]
	b	LBB0_13
LBB0_12:
	mov	w3, #0
LBB0_13:
	ldr	w2, [x19]
	cmp	w3, w2
	cset	w0, ne
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_WARN
Lloh35:
	adrp	x8, _HDMI_COLOR_RANGE_16_235@GOTPAGE
Lloh36:
	ldr	x8, [x8, _HDMI_COLOR_RANGE_16_235@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_15:
Lloh38:
	adrp	x8, _SDVO_CMD_GET_AUDIO_STAT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _SDVO_CMD_GET_AUDIO_STAT@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x20
	mov	w3, #1
	bl	_intel_sdvo_get_value
	cbz	x0, LBB0_18
; %bb.16:
Lloh41:
	adrp	x8, _SDVO_AUDIO_ELD_VALID@GOTPAGE
Lloh42:
	ldr	x8, [x8, _SDVO_AUDIO_ELD_VALID@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _SDVO_AUDIO_PRESENCE_DETECT@GOTPAGE
Lloh45:
	ldr	x9, [x9, _SDVO_AUDIO_PRESENCE_DETECT@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #4]
	bics	wzr, w8, w9
	b.ne	LBB0_18
; %bb.17:
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_18:
Lloh47:
	adrp	x8, _SDVO_CMD_GET_ENCODE@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SDVO_CMD_GET_ENCODE@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x20
	mov	w3, #1
	bl	_intel_sdvo_get_value
	cbz	x0, LBB0_21
; %bb.19:
	ldr	w8, [sp, #4]
Lloh50:
	adrp	x9, _SDVO_ENCODE_HDMI@GOTPAGE
Lloh51:
	ldr	x9, [x9, _SDVO_ENCODE_HDMI@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_21
; %bb.20:
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_21:
	mov	x0, x20
	mov	x1, x19
	bl	_intel_sdvo_get_avi_infoframe
	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_22:
	ldr	w8, [x19]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_SDVO,4,2          ; @INTEL_OUTPUT_SDVO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to retrieve SDVO DTD\n"

	.comm	_PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS,4,2 ; @PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS
	.comm	_DTD_FLAG_HSYNC_POSITIVE,4,2    ; @DTD_FLAG_HSYNC_POSITIVE
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_DRM_MODE_FLAG_NHSYNC,4,2       ; @DRM_MODE_FLAG_NHSYNC
	.comm	_DTD_FLAG_VSYNC_POSITIVE,4,2    ; @DTD_FLAG_VSYNC_POSITIVE
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_DRM_MODE_FLAG_NVSYNC,4,2       ; @DRM_MODE_FLAG_NVSYNC
	.comm	_SDVO_PORT_MULTIPLY_MASK,4,2    ; @SDVO_PORT_MULTIPLY_MASK
	.comm	_SDVO_PORT_MULTIPLY_SHIFT,4,2   ; @SDVO_PORT_MULTIPLY_SHIFT
	.comm	_SDVO_CMD_GET_CLOCK_RATE_MULT,4,2 ; @SDVO_CMD_GET_CLOCK_RATE_MULT
l_.str.1:                               ; @.str.1
	.asciz	"SDVO pixel multiplier mismatch, port: %i, encoder: %i\n"

	.comm	_HDMI_COLOR_RANGE_16_235,4,2    ; @HDMI_COLOR_RANGE_16_235
	.comm	_SDVO_CMD_GET_AUDIO_STAT,4,2    ; @SDVO_CMD_GET_AUDIO_STAT
	.comm	_SDVO_AUDIO_ELD_VALID,4,2       ; @SDVO_AUDIO_ELD_VALID
	.comm	_SDVO_AUDIO_PRESENCE_DETECT,4,2 ; @SDVO_AUDIO_PRESENCE_DETECT
	.comm	_SDVO_CMD_GET_ENCODE,4,2        ; @SDVO_CMD_GET_ENCODE
	.comm	_SDVO_ENCODE_HDMI,4,2           ; @SDVO_ENCODE_HDMI
	.no_dead_strip	_intel_sdvo_get_config
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.intel_sdvo_get_config
l_switch.table.intel_sdvo_get_config:
	.long	4                               ; 0x4
	.long	2                               ; 0x2
	.long	1                               ; 0x1

.subsections_via_symbols
