	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdmi_mode_set
_intel_hdmi_mode_set:                   ## @intel_hdmi_mode_set
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%rdi), %edi
	callq	_to_intel_crtc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r13
	movq	%rbx, %rdi
	callq	_enc_to_intel_hdmi
	movq	%rax, %rbx
	movq	_SDVO_ENCODING_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_HAS_PCH_SPLIT
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdx
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdx
	orl	32(%rbx), %r12d
LBB0_3:
	movq	%r13, %r14
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	movq	_DRM_MODE_FLAG_PVSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	%eax, %ebx
	je	LBB0_5
## %bb.4:
	movq	_SDVO_VSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_5:
	orl	%r12d, %ebx
	movq	_DRM_MODE_FLAG_PHSYNC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	%rdx, %r15
	je	LBB0_7
## %bb.6:
	movq	_SDVO_HSYNC_ACTIVE_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	orl	%eax, %ebx
	cmpl	$25, (%r13)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_8
## %bb.9:
	movq	_COLOR_FORMAT_12bpc@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_COLOR_FORMAT_8bpc@GOTPCREL(%rip), %rax
LBB0_10:
	orl	(%rax), %ebx
	cmpq	$0, 24(%r15)
	je	LBB0_13
## %bb.11:
	movq	%r12, %rdi
	callq	_HAS_PCH_CPT
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_HDMI_MODE_SELECT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_13:
	cmpq	$0, 16(%r15)
	je	LBB0_15
## %bb.14:
	movq	8(%r13), %rdi
	callq	_pipe_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_DRIVER
	movq	_SDVO_AUDIO_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SDVO_NULL_PACKETS_DURING_VSYNC@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_intel_write_eld
LBB0_15:
	movq	%r12, %rdi
	callq	_HAS_PCH_CPT
	movq	8(%r13), %rdi
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	callq	_PORT_TRANS_SEL_CPT
	orl	%eax, %ebx
	jmp	LBB0_19
LBB0_17:
	movq	_PIPE_B@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_19
## %bb.18:
	movq	_SDVO_PIPE_B_SELECT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_19:
	movl	8(%r15), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	8(%r15), %edi
	callq	_POSTING_READ
	movq	(%r15), %rax
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDVO_ENCODING_HDMI,4,2         ## @SDVO_ENCODING_HDMI
	.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	_COLOR_FORMAT_12bpc,4,2         ## @COLOR_FORMAT_12bpc
	.comm	_COLOR_FORMAT_8bpc,4,2          ## @COLOR_FORMAT_8bpc
	.comm	_HDMI_MODE_SELECT,4,2           ## @HDMI_MODE_SELECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enabling HDMI audio on pipe %c\n"

	.comm	_SDVO_AUDIO_ENABLE,4,2          ## @SDVO_AUDIO_ENABLE
	.comm	_SDVO_NULL_PACKETS_DURING_VSYNC,4,2 ## @SDVO_NULL_PACKETS_DURING_VSYNC
	.comm	_PIPE_B,8,3                     ## @PIPE_B
	.comm	_SDVO_PIPE_B_SELECT,4,2         ## @SDVO_PIPE_B_SELECT
	.no_dead_strip	_intel_hdmi_mode_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdmi_mode_set
_intel_hdmi_mode_set:                   ; @intel_hdmi_mode_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x0]
	bl	_to_intel_crtc
	mov	x23, x0
	mov	x0, x20
	bl	_enc_to_intel_hdmi
	mov	x21, x0
Lloh0:
	adrp	x8, _SDVO_ENCODING_HDMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDVO_ENCODING_HDMI@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x22
	bl	_HAS_PCH_SPLIT
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x21, #32]
	orr	w24, w8, w24
LBB0_2:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRM_MODE_FLAG_PVSYNC@GOTPAGEOFF]
Lloh5:
	adrp	x10, _SDVO_VSYNC_ACTIVE_HIGH@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SDVO_VSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh9:
	adrp	x10, _DRM_MODE_FLAG_PHSYNC@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DRM_MODE_FLAG_PHSYNC@GOTPAGEOFF]
	orr	w9, w9, w24
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _SDVO_HSYNC_ACTIVE_HIGH@GOTPAGE
Lloh13:
	ldr	x11, [x11, _SDVO_HSYNC_ACTIVE_HIGH@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _COLOR_FORMAT_12bpc@GOTPAGE
Lloh16:
	ldr	x9, [x9, _COLOR_FORMAT_12bpc@GOTPAGEOFF]
Lloh17:
	adrp	x10, _COLOR_FORMAT_8bpc@GOTPAGE
Lloh18:
	ldr	x10, [x10, _COLOR_FORMAT_8bpc@GOTPAGEOFF]
	ldr	w11, [x23]
	cmp	w11, #24
	csel	x9, x9, x10, gt
	ldr	w9, [x9]
	orr	w24, w8, w9
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x0, x22
	bl	_HAS_PCH_CPT
	cbz	x0, LBB0_5
; %bb.4:
Lloh19:
	adrp	x8, _HDMI_MODE_SELECT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HDMI_MODE_SELECT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w24, w8, w24
LBB0_5:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	x0, [x23, #8]
	bl	_pipe_name
	mov	x1, x0
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh24:
	adrp	x8, _SDVO_AUDIO_ENABLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SDVO_AUDIO_ENABLE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w8, w8, w24
Lloh27:
	adrp	x9, _SDVO_NULL_PACKETS_DURING_VSYNC@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SDVO_NULL_PACKETS_DURING_VSYNC@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w24, w8, w9
	mov	x0, x20
	mov	x1, x19
	bl	_intel_write_eld
LBB0_7:
	mov	x0, x22
	bl	_HAS_PCH_CPT
	mov	x8, x0
	ldr	x0, [x23, #8]
	cbz	x8, LBB0_9
; %bb.8:
	bl	_PORT_TRANS_SEL_CPT
	orr	w24, w0, w24
	b	LBB0_11
LBB0_9:
Lloh30:
	adrp	x8, _PIPE_B@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PIPE_B@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.10:
Lloh33:
	adrp	x8, _SDVO_PIPE_B_SELECT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SDVO_PIPE_B_SELECT@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	orr	w24, w8, w24
LBB0_11:
	ldr	w0, [x21, #8]
	mov	x1, x24
	bl	_I915_WRITE
	ldr	w0, [x21, #8]
	bl	_POSTING_READ
	ldr	x2, [x21]
	mov	x0, x20
	mov	x1, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_SDVO_ENCODING_HDMI,4,2         ; @SDVO_ENCODING_HDMI
	.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	_COLOR_FORMAT_12bpc,4,2         ; @COLOR_FORMAT_12bpc
	.comm	_COLOR_FORMAT_8bpc,4,2          ; @COLOR_FORMAT_8bpc
	.comm	_HDMI_MODE_SELECT,4,2           ; @HDMI_MODE_SELECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling HDMI audio on pipe %c\n"

	.comm	_SDVO_AUDIO_ENABLE,4,2          ; @SDVO_AUDIO_ENABLE
	.comm	_SDVO_NULL_PACKETS_DURING_VSYNC,4,2 ; @SDVO_NULL_PACKETS_DURING_VSYNC
	.comm	_PIPE_B,8,3                     ; @PIPE_B
	.comm	_SDVO_PIPE_B_SELECT,4,2         ; @SDVO_PIPE_B_SELECT
	.no_dead_strip	_intel_hdmi_mode_set
.subsections_via_symbols
