	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function configure_dual_link_mode
_configure_dual_link_mode:              ## @configure_dual_link_mode
	.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	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rbx, %rdi
	callq	_enc_to_intel_dsi
	movq	%rax, %r15
	movq	_DSS_CTL1@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_I915_READ
	movq	_SPLITTER_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_OVERLAP_PIXELS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r15), %edi
	callq	_OVERLAP_PIXELS
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	8(%r15), %rax
	movq	_DSI_DUAL_LINK_FRONT_BACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movl	(%r12), %eax
	movq	_DUAL_LINK_MODE_INTERLEAVE@GOTPCREL(%rip), %rcx
	movl	%eax, %r12d
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	addl	(%r15), %r12d
	movl	(%rcx), %ebx
	movq	_MAX_DL_BUFFER_TARGET_DEPTH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_3:
	movq	_LEFT_DL_BUF_TARGET_DEPTH_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	notl	%ebx
	andl	%ebx, %r14d
	movl	%r12d, %edi
	callq	_LEFT_DL_BUF_TARGET_DEPTH
	movl	%eax, %r15d
	orl	%r14d, %r15d
	movq	_DSS_CTL2@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_RIGHT_DL_BUF_TARGET_DEPTH_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	%r12d, %edi
	callq	_RIGHT_DL_BUF_TARGET_DEPTH
	orl	%eax, %ebx
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	jmp	LBB0_5
LBB0_4:
	movq	_DUAL_LINK_MODE_INTERLEAVE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, %r15d
LBB0_5:
	movl	(%r13), %edi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DSS_CTL1,4,2                   ## @DSS_CTL1
	.comm	_SPLITTER_ENABLE,4,2            ## @SPLITTER_ENABLE
	.comm	_OVERLAP_PIXELS_MASK,4,2        ## @OVERLAP_PIXELS_MASK
	.comm	_DSI_DUAL_LINK_FRONT_BACK,8,3   ## @DSI_DUAL_LINK_FRONT_BACK
	.comm	_DUAL_LINK_MODE_INTERLEAVE,4,2  ## @DUAL_LINK_MODE_INTERLEAVE
	.comm	_MAX_DL_BUFFER_TARGET_DEPTH,4,2 ## @MAX_DL_BUFFER_TARGET_DEPTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DL buffer depth exceed max value\n"

	.comm	_LEFT_DL_BUF_TARGET_DEPTH_MASK,4,2 ## @LEFT_DL_BUF_TARGET_DEPTH_MASK
	.comm	_DSS_CTL2,4,2                   ## @DSS_CTL2
	.comm	_RIGHT_DL_BUF_TARGET_DEPTH_MASK,4,2 ## @RIGHT_DL_BUF_TARGET_DEPTH_MASK
	.no_dead_strip	_configure_dual_link_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function configure_dual_link_mode
_configure_dual_link_mode:              ; @configure_dual_link_mode
	.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, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x0, x20
	bl	_enc_to_intel_dsi
	mov	x20, x0
Lloh0:
	adrp	x21, _DSS_CTL1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DSS_CTL1@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_I915_READ
Lloh2:
	adrp	x8, _SPLITTER_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPLITTER_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh5:
	adrp	x9, _OVERLAP_PIXELS_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OVERLAP_PIXELS_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	bic	w22, w8, w9
	ldr	w0, [x20]
	bl	_OVERLAP_PIXELS
	orr	w22, w0, w22
	ldr	x8, [x20, #8]
Lloh8:
	adrp	x9, _DSI_DUAL_LINK_FRONT_BACK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DSI_DUAL_LINK_FRONT_BACK@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh11:
	adrp	x9, _DUAL_LINK_MODE_INTERLEAVE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DUAL_LINK_MODE_INTERLEAVE@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x9]
	cmp	w8, #0
	cinc	w8, w8, lt
	ldr	w9, [x20]
	add	w19, w9, w8, asr #1
Lloh14:
	adrp	x8, _MAX_DL_BUFFER_TARGET_DEPTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_DL_BUFFER_TARGET_DEPTH@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w19, w8
	b.le	LBB0_3
; %bb.2:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_3:
Lloh19:
	adrp	x8, _LEFT_DL_BUF_TARGET_DEPTH_MASK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LEFT_DL_BUF_TARGET_DEPTH_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w8, w8, w23
	bic	w20, w22, w8
	mov	x0, x19
	bl	_LEFT_DL_BUF_TARGET_DEPTH
	orr	w20, w20, w0
Lloh22:
	adrp	x22, _DSS_CTL2@GOTPAGE
Lloh23:
	ldr	x22, [x22, _DSS_CTL2@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh24:
	adrp	x8, _RIGHT_DL_BUF_TARGET_DEPTH_MASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RIGHT_DL_BUF_TARGET_DEPTH_MASK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	bic	w23, w0, w8
	mov	x0, x19
	bl	_RIGHT_DL_BUF_TARGET_DEPTH
	orr	w1, w23, w0
	ldr	w0, [x22]
	bl	_I915_WRITE
	b	LBB0_5
LBB0_4:
Lloh27:
	adrp	x8, _DUAL_LINK_MODE_INTERLEAVE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _DUAL_LINK_MODE_INTERLEAVE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	orr	w20, w8, w22
LBB0_5:
	ldr	w0, [x21]
	mov	x1, x20
	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
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DSS_CTL1,4,2                   ; @DSS_CTL1
	.comm	_SPLITTER_ENABLE,4,2            ; @SPLITTER_ENABLE
	.comm	_OVERLAP_PIXELS_MASK,4,2        ; @OVERLAP_PIXELS_MASK
	.comm	_DSI_DUAL_LINK_FRONT_BACK,8,3   ; @DSI_DUAL_LINK_FRONT_BACK
	.comm	_DUAL_LINK_MODE_INTERLEAVE,4,2  ; @DUAL_LINK_MODE_INTERLEAVE
	.comm	_MAX_DL_BUFFER_TARGET_DEPTH,4,2 ; @MAX_DL_BUFFER_TARGET_DEPTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DL buffer depth exceed max value\n"

	.comm	_LEFT_DL_BUF_TARGET_DEPTH_MASK,4,2 ; @LEFT_DL_BUF_TARGET_DEPTH_MASK
	.comm	_DSS_CTL2,4,2                   ; @DSS_CTL2
	.comm	_RIGHT_DL_BUF_TARGET_DEPTH_MASK,4,2 ; @RIGHT_DL_BUF_TARGET_DEPTH_MASK
	.no_dead_strip	_configure_dual_link_mode
.subsections_via_symbols
