	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_prepare_hdmi_ddi_buffers
_intel_prepare_hdmi_ddi_buffers:        ## @intel_prepare_hdmi_ddi_buffers
	.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
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r13
	movl	(%rbx), %ebx
	leaq	-44(%rbp), %rsi
	movq	%rax, %rdi
	callq	_intel_ddi_get_buf_trans_hdmi
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	cmpl	%r12d, -44(%rbp)
	setle	%dil
	callq	_WARN_ON_ONCE
	movl	-44(%rbp), %r14d
	decl	%r14d
	testq	%rax, %rax
	cmovel	%r12d, %r14d
	movq	%r13, %rdi
	callq	_IS_GEN9_BC
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	(%r13), %rax
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_5
## %bb.4:
	movq	_DDI_BUF_BALANCE_LEG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	xorl	%ebx, %ebx
LBB0_5:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %edi
	movl	$9, %esi
	callq	_DDI_BUF_TRANS_LO
	movslq	%r14d, %r14
	orl	(%r15,%r14,8), %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	%r12d, %edi
	movl	$9, %esi
	callq	_DDI_BUF_TRANS_HI
	movl	4(%r15,%r14,8), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DDI_BUF_BALANCE_LEG_ENABLE,4,2 ## @DDI_BUF_BALANCE_LEG_ENABLE
	.no_dead_strip	_intel_prepare_hdmi_ddi_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_prepare_hdmi_ddi_buffers
_intel_prepare_hdmi_ddi_buffers:        ; @intel_prepare_hdmi_ddi_buffers
	.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	x22, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x21, x0
	ldr	w19, [x19]
	add	x1, sp, #12
	bl	_intel_ddi_get_buf_trans_hdmi
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbnz	x0, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, w22
	cset	w0, le
	bl	_WARN_ON_ONCE
	ldr	w8, [sp, #12]
	sub	w8, w8, #1
	cmp	x0, #0
	csel	w22, w22, w8, eq
	mov	x0, x21
	bl	_IS_GEN9_BC
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x21]
	ldr	x8, [x8, x19, lsl #3]
Lloh0:
	adrp	x9, _DDI_BUF_BALANCE_LEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DDI_BUF_BALANCE_LEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w21, wzr, w9, eq
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
	mov	x0, x19
	mov	w1, #9
	bl	_DDI_BUF_TRANS_LO
	add	x20, x20, w22, sxtw #3
	ldr	w8, [x20]
	orr	w1, w8, w21
	bl	_I915_WRITE
	mov	x0, x19
	mov	w1, #9
	bl	_DDI_BUF_TRANS_HI
	ldr	w1, [x20, #4]
	bl	_I915_WRITE
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DDI_BUF_BALANCE_LEG_ENABLE,4,2 ; @DDI_BUF_BALANCE_LEG_ENABLE
	.no_dead_strip	_intel_prepare_hdmi_ddi_buffers
.subsections_via_symbols
