	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdmi_prepare
_intel_hdmi_prepare:                    ## @intel_hdmi_prepare
	.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	$56, %rsp
	.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, %r14
	movl	28(%r13), %edi
	callq	_to_intel_crtc
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_enc_to_intel_hdmi
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_intel_dp_dual_mode_set_tmds_output
	movq	_SDVO_ENCODING_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %r15
	movq	%r14, %rdi
	callq	_HAS_PCH_SPLIT
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 16(%r13)
	je	LBB0_3
## %bb.2:
	movq	_HDMI_COLOR_RANGE_16_235@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_3:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rbx
	movl	24(%r13), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SDVO_VSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_SDVO_HSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_HDMI_COLOR_FORMAT_12bpc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_SDVO_COLOR_FORMAT_8bpc@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	8(%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_HDMI_MODE_SELECT_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_HAS_PCH_CPT
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_SDVO_PIPE_SEL_CPT
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_IS_CHERRYVIEW
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	callq	_SDVO_PIPE_SEL_CHV
	jmp	LBB0_8
LBB0_7:
	callq	_SDVO_PIPE_SEL
LBB0_8:
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	andl	%ecx, %r15d
	cmovel	%r15d, %r12d
	orl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	andl	%ecx, %edx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	cmovel	%edx, %ecx
	cmpl	$25, -52(%rbp)                  ## 4-byte Folded Reload
	cmovgel	-48(%rbp), %r14d                ## 4-byte Folded Reload
	orl	%ecx, %r14d
	orl	%r12d, %r14d
	xorl	%ecx, %ecx
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	cmovel	%ecx, %r13d
	orl	%eax, %r13d
	orl	%r14d, %r13d
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movl	%r13d, %esi
	callq	_I915_WRITE
	movl	(%rbx), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_POSTING_READ                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDVO_ENCODING_HDMI,4,2         ## @SDVO_ENCODING_HDMI
	.comm	_HDMI_COLOR_RANGE_16_235,4,2    ## @HDMI_COLOR_RANGE_16_235
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ## @DRM_MODE_FLAG_PVSYNC
	.comm	_SDVO_VSYNC_ACTIVE_HIGH,4,2     ## @SDVO_VSYNC_ACTIVE_HIGH
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ## @DRM_MODE_FLAG_PHSYNC
	.comm	_SDVO_HSYNC_ACTIVE_HIGH,4,2     ## @SDVO_HSYNC_ACTIVE_HIGH
	.comm	_HDMI_COLOR_FORMAT_12bpc,4,2    ## @HDMI_COLOR_FORMAT_12bpc
	.comm	_SDVO_COLOR_FORMAT_8bpc,4,2     ## @SDVO_COLOR_FORMAT_8bpc
	.comm	_HDMI_MODE_SELECT_HDMI,4,2      ## @HDMI_MODE_SELECT_HDMI
	.no_dead_strip	_intel_hdmi_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdmi_prepare
_intel_hdmi_prepare:                    ; @intel_hdmi_prepare
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x1
	mov	x19, x0
	ldr	x0, [x0]
	bl	_to_i915
	mov	x20, x0
	ldr	w0, [x22, #28]
	bl	_to_intel_crtc
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_enc_to_intel_hdmi
	mov	x19, x0
	mov	w1, #1
	bl	_intel_dp_dual_mode_set_tmds_output
Lloh0:
	adrp	x8, _SDVO_ENCODING_HDMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDVO_ENCODING_HDMI@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_HAS_PCH_SPLIT
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _HDMI_COLOR_RANGE_16_235@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_COLOR_RANGE_16_235@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_3:
	str	w21, [sp, #28]                  ; 4-byte Folded Spill
	ldr	w24, [x22, #24]
Lloh6:
	adrp	x8, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh9:
	adrp	x8, _SDVO_VSYNC_ACTIVE_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDVO_VSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
Lloh12:
	adrp	x8, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
Lloh14:
	ldr	w27, [x8]
Lloh15:
	adrp	x8, _SDVO_HSYNC_ACTIVE_HIGH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SDVO_HSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
	ldr	w28, [x22]
Lloh18:
	adrp	x8, _HDMI_COLOR_FORMAT_12bpc@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HDMI_COLOR_FORMAT_12bpc@GOTPAGEOFF]
Lloh20:
	adrp	x9, _SDVO_COLOR_FORMAT_8bpc@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SDVO_COLOR_FORMAT_8bpc@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
Lloh23:
	ldr	w25, [x9]
	ldr	x22, [x22, #8]
Lloh24:
	adrp	x8, _HDMI_MODE_SELECT_HDMI@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HDMI_MODE_SELECT_HDMI@GOTPAGEOFF]
Lloh26:
	ldr	w26, [x8]
	mov	x0, x20
	bl	_HAS_PCH_CPT
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w0, [x8]
	bl	_SDVO_PIPE_SEL_CPT
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_IS_CHERRYVIEW
	mov	x8, x0
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w0, [x9]
	cbz	x8, LBB0_7
; %bb.6:
	bl	_SDVO_PIPE_SEL_CHV
	b	LBB0_8
LBB0_7:
	bl	_SDVO_PIPE_SEL
LBB0_8:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	tst	w8, w24
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	csel	w8, wzr, w8, eq
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	orr	w8, w8, w9
	tst	w27, w24
	csel	w9, wzr, w23, eq
	orr	w8, w8, w9
	cmp	w28, #24
	csel	w9, w21, w25, gt
	orr	w8, w8, w9
	cmp	x22, #0
	csel	w9, wzr, w26, eq
	orr	w8, w8, w9
	orr	w1, w8, w0
	ldr	w0, [x19]
	bl	_I915_WRITE
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_POSTING_READ
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SDVO_ENCODING_HDMI,4,2         ; @SDVO_ENCODING_HDMI
	.comm	_HDMI_COLOR_RANGE_16_235,4,2    ; @HDMI_COLOR_RANGE_16_235
	.comm	_DRM_MODE_FLAG_PVSYNC,4,2       ; @DRM_MODE_FLAG_PVSYNC
	.comm	_SDVO_VSYNC_ACTIVE_HIGH,4,2     ; @SDVO_VSYNC_ACTIVE_HIGH
	.comm	_DRM_MODE_FLAG_PHSYNC,4,2       ; @DRM_MODE_FLAG_PHSYNC
	.comm	_SDVO_HSYNC_ACTIVE_HIGH,4,2     ; @SDVO_HSYNC_ACTIVE_HIGH
	.comm	_HDMI_COLOR_FORMAT_12bpc,4,2    ; @HDMI_COLOR_FORMAT_12bpc
	.comm	_SDVO_COLOR_FORMAT_8bpc,4,2     ; @SDVO_COLOR_FORMAT_8bpc
	.comm	_HDMI_MODE_SELECT_HDMI,4,2      ; @HDMI_MODE_SELECT_HDMI
	.no_dead_strip	_intel_hdmi_prepare
.subsections_via_symbols
