	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_enable_ddi
_intel_enable_ddi:                      ## @intel_enable_ddi
	.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	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	16(%rdi), %rdi
	callq	_to_intel_crtc
	movq	%rax, %r13
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_intel_ddi_get_encoder_port
	movl	%eax, %r12d
	movl	(%rbx), %eax
	movq	_INTEL_OUTPUT_HDMI@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_enc_to_dig_port
	movq	%rax, %rbx
	movl	%r12d, %edi
	callq	_DDI_BUF_CTL
	movq	_DDI_BUF_CTL_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rbx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	jmp	LBB0_4
LBB0_2:
	movq	_INTEL_OUTPUT_EDP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_enc_to_intel_dp
	movq	%rax, %rdi
	callq	_ironlake_edp_backlight_on
LBB0_4:
	cmpq	$0, 8(%r13)
	je	LBB0_5
## %bb.6:
	movq	_HSW_AUD_PIN_ELD_CP_VLD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_AUDIO_OUTPUT_ENABLE_A@GOTPCREL(%rip), %rcx
	movq	_AUDIO_ELD_VALID_A@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	shll	$2, %r14d
	movl	%r14d, %ecx
	shll	%cl, %esi
	orl	%eax, %esi
	movl	(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_HDMI,4,2          ## @INTEL_OUTPUT_HDMI
	.comm	_DDI_BUF_CTL_ENABLE,4,2         ## @DDI_BUF_CTL_ENABLE
	.comm	_INTEL_OUTPUT_EDP,4,2           ## @INTEL_OUTPUT_EDP
	.comm	_HSW_AUD_PIN_ELD_CP_VLD,4,2     ## @HSW_AUD_PIN_ELD_CP_VLD
	.comm	_AUDIO_OUTPUT_ENABLE_A,4,2      ## @AUDIO_OUTPUT_ENABLE_A
	.comm	_AUDIO_ELD_VALID_A,4,2          ## @AUDIO_ELD_VALID_A
	.no_dead_strip	_intel_enable_ddi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_enable_ddi
_intel_enable_ddi:                      ; @intel_enable_ddi
	.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	x22, x0
	add	x20, x0, #8
	ldr	x0, [x0, #16]
	bl	_to_intel_crtc
	mov	x19, x0
	ldr	w23, [x0]
	mov	x0, x22
	bl	_intel_ddi_get_encoder_port
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _INTEL_OUTPUT_HDMI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INTEL_OUTPUT_HDMI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	x21, x0
	mov	x0, x20
	bl	_enc_to_dig_port
	mov	x20, x0
	mov	x0, x21
	bl	_DDI_BUF_CTL
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _DDI_BUF_CTL_ENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DDI_BUF_CTL_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_I915_WRITE
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x9, _INTEL_OUTPUT_EDP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INTEL_OUTPUT_EDP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_enc_to_intel_dp
	bl	_ironlake_edp_backlight_on
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh9:
	adrp	x19, _HSW_AUD_PIN_ELD_CP_VLD@GOTPAGE
Lloh10:
	ldr	x19, [x19, _HSW_AUD_PIN_ELD_CP_VLD@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_I915_READ
Lloh11:
	adrp	x8, _AUDIO_OUTPUT_ENABLE_A@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AUDIO_OUTPUT_ENABLE_A@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _AUDIO_ELD_VALID_A@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AUDIO_ELD_VALID_A@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	lsl	w9, w23, #2
	lsl	w8, w8, w9
	orr	w1, w8, w0
	ldr	w0, [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
	b	_I915_WRITE
LBB0_6:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_HDMI,4,2          ; @INTEL_OUTPUT_HDMI
	.comm	_DDI_BUF_CTL_ENABLE,4,2         ; @DDI_BUF_CTL_ENABLE
	.comm	_INTEL_OUTPUT_EDP,4,2           ; @INTEL_OUTPUT_EDP
	.comm	_HSW_AUD_PIN_ELD_CP_VLD,4,2     ; @HSW_AUD_PIN_ELD_CP_VLD
	.comm	_AUDIO_OUTPUT_ENABLE_A,4,2      ; @AUDIO_OUTPUT_ENABLE_A
	.comm	_AUDIO_ELD_VALID_A,4,2          ; @AUDIO_ELD_VALID_A
	.no_dead_strip	_intel_enable_ddi
.subsections_via_symbols
