	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_prepare_dp_ddi_buffers
_intel_prepare_dp_ddi_buffers:          ## @intel_prepare_dp_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r15
	movl	(%rbx), %r14d
	movq	_INTEL_OUTPUT_ANALOG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_intel_crtc_has_type
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	-36(%rbp), %rsi
	movq	%r15, %rdi
	callq	_intel_ddi_get_buf_trans_fdi
	jmp	LBB0_5
LBB0_2:
	movq	_INTEL_OUTPUT_EDP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_intel_crtc_has_type
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	callq	_intel_ddi_get_buf_trans_edp
	jmp	LBB0_5
LBB0_4:
	callq	_intel_ddi_get_buf_trans_dp
LBB0_5:
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_IS_GEN9_BC
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	(%r15), %rax
	xorl	%r15d, %r15d
	cmpq	$0, (%rax,%r14,8)
	je	LBB0_9
## %bb.8:
	movq	_DDI_BUF_BALANCE_LEG_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_9:
	cmpl	$0, -36(%rbp)
	jg	LBB0_10
	jmp	LBB0_12
LBB0_6:
	xorl	%r15d, %r15d
	cmpl	$0, -36(%rbp)
	jle	LBB0_12
LBB0_10:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_DDI_BUF_TRANS_LO
	movl	(%r12,%rbx,8), %esi
	orl	%r15d, %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_DDI_BUF_TRANS_HI
	movl	4(%r12,%rbx,8), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	incq	%rbx
	movslq	-36(%rbp), %rax
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INTEL_OUTPUT_ANALOG,4,2        ## @INTEL_OUTPUT_ANALOG
	.comm	_INTEL_OUTPUT_EDP,4,2           ## @INTEL_OUTPUT_EDP
	.comm	_DDI_BUF_BALANCE_LEG_ENABLE,4,2 ## @DDI_BUF_BALANCE_LEG_ENABLE
	.no_dead_strip	_intel_prepare_dp_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_dp_ddi_buffers
_intel_prepare_dp_ddi_buffers:          ; @intel_prepare_dp_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	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_to_i915
	mov	x20, x0
	ldr	w19, [x19]
Lloh0:
	adrp	x8, _INTEL_OUTPUT_ANALOG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_OUTPUT_ANALOG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_intel_crtc_has_type
	cbz	x0, LBB0_2
; %bb.1:
	add	x1, sp, #12
	mov	x0, x20
	bl	_intel_ddi_get_buf_trans_fdi
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _INTEL_OUTPUT_EDP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTEL_OUTPUT_EDP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_intel_crtc_has_type
	add	x2, sp, #12
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x19
	bl	_intel_ddi_get_buf_trans_edp
	b	LBB0_5
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	bl	_intel_ddi_get_buf_trans_dp
LBB0_5:
	mov	x21, x0
	mov	x0, x20
	bl	_IS_GEN9_BC
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x20]
	ldr	x8, [x8, x19, lsl #3]
Lloh6:
	adrp	x9, _DDI_BUF_BALANCE_LEG_ENABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DDI_BUF_BALANCE_LEG_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w22, wzr, w9, eq
	b	LBB0_8
LBB0_7:
	mov	w22, #0
LBB0_8:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x20, #0
	add	x21, x21, #4
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_DDI_BUF_TRANS_LO
	ldur	w8, [x21, #-4]
	orr	w1, w8, w22
	bl	_I915_WRITE
	mov	x0, x19
	mov	x1, x20
	bl	_DDI_BUF_TRANS_HI
	ldr	w1, [x21], #8
	bl	_I915_WRITE
	add	x20, x20, #1
	ldrsw	x8, [sp, #12]
	cmp	x20, x8
	b.lt	LBB0_10
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INTEL_OUTPUT_ANALOG,4,2        ; @INTEL_OUTPUT_ANALOG
	.comm	_INTEL_OUTPUT_EDP,4,2           ; @INTEL_OUTPUT_EDP
	.comm	_DDI_BUF_BALANCE_LEG_ENABLE,4,2 ; @DDI_BUF_BALANCE_LEG_ENABLE
	.no_dead_strip	_intel_prepare_dp_ddi_buffers
.subsections_via_symbols
