	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_crtc_setup_pipeline       ## -- Begin function mdp5_crtc_setup_pipeline
	.p2align	4, 0x90
_mdp5_crtc_setup_pipeline:              ## @mdp5_crtc_setup_pipeline
	.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	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_to_mdp5_crtc_state
	movq	%rax, %r13
	leaq	24(%rax), %rbx
	movq	24(%rax), %rdx
	movq	40(%rax), %rcx
	addq	$40, %rax
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	%rax, %r8
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.2:
	movq	%rax, %r8
	jmp	LBB0_4
LBB0_3:
	xorl	%r8d, %r8d
	testq	%rcx, %rcx
	jne	LBB0_5
LBB0_4:
	testq	%rdx, %rdx
	je	LBB0_5
LBB0_11:
	movq	%rbx, %r15
	movq	32(%r13), %rbx
	movl	16(%rbx), %edi
	callq	_intf2err
	movl	%eax, 20(%r13)
	movq	24(%r13), %rdi
	movq	%rbx, %rsi
	callq	_intf2vblank
	movl	%eax, 16(%r13)
	movq	(%rbx), %rax
	movq	_INTF_DSI@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.13:
	movq	8(%rbx), %rax
	movq	_MDP5_INTF_DSI_MODE_COMMAND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.14:
	movq	(%r15), %rdi
	callq	_lm2ppdone
	movl	$1, %ecx
	jmp	LBB0_15
LBB0_12:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
LBB0_15:
	movq	%rax, 8(%r13)
	movl	%ecx, (%r13)
	jmp	LBB0_16
LBB0_5:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_MDP_LM_CAP_DISPLAY@GOTPCREL(%rip), %rax
	movl	%r15d, %edx
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	_MDP_LM_CAP_PAIR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_7:
	orl	(%rax), %edx
	movl	(%r12), %edi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	callq	_mdp5_mixer_assign
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_8
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	(%r12), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_mdp5_mixer_release
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_11
## %bb.9:
	movl	(%r12), %edi
	callq	_mdp5_mixer_release
	testl	%r15d, %r15d
	jne	LBB0_11
## %bb.10:
	movq	$0, (%r14)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MDP_LM_CAP_DISPLAY,4,2         ## @MDP_LM_CAP_DISPLAY
	.comm	_MDP_LM_CAP_PAIR,4,2            ## @MDP_LM_CAP_PAIR
	.comm	_INTF_DSI,8,3                   ## @INTF_DSI
	.comm	_MDP5_INTF_DSI_MODE_COMMAND,8,3 ## @MDP5_INTF_DSI_MODE_COMMAND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_crtc_setup_pipeline       ; -- Begin function mdp5_crtc_setup_pipeline
	.p2align	2
_mdp5_crtc_setup_pipeline:              ; @mdp5_crtc_setup_pipeline
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x22, x1
	mov	x25, x0
	mov	x0, x1
	bl	_to_mdp5_crtc_state
	mov	x19, x0
	mov	x20, x0
	ldr	x24, [x20, #24]!
	mov	x26, x0
	ldr	x23, [x26, #40]!
	cmp	x23, #0
	cbz	w21, LBB0_2
; %bb.1:
	ccmp	x24, #0, #4, ne
	mov	x4, x26
	b.eq	LBB0_4
	b	LBB0_8
LBB0_2:
	ccmp	x24, #0, #4, eq
	b.ne	LBB0_8
; %bb.3:
	mov	x4, #0
LBB0_4:
Lloh0:
	adrp	x8, _MDP_LM_CAP_DISPLAY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MDP_LM_CAP_DISPLAY@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MDP_LM_CAP_PAIR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MDP_LM_CAP_PAIR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	cmp	w21, #0
	csel	w9, wzr, w9, eq
	orr	w2, w9, w8
	ldr	w0, [x22]
	mov	x1, x25
	mov	x3, x20
	bl	_mdp5_mixer_assign
	mov	x8, x0
	cbnz	w0, LBB0_13
; %bb.5:
	ldr	w0, [x22]
	mov	x1, x24
	bl	_mdp5_mixer_release
	cbz	x23, LBB0_8
; %bb.6:
	ldr	w0, [x22]
	mov	x1, x23
	bl	_mdp5_mixer_release
	cbnz	w21, LBB0_8
; %bb.7:
	str	xzr, [x26]
LBB0_8:
	ldr	x21, [x19, #32]
	ldr	w0, [x21, #16]
	bl	_intf2err
	str	w0, [x19, #20]
	ldr	x0, [x19, #24]
	mov	x1, x21
	bl	_intf2vblank
	str	w0, [x19, #16]
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _INTF_DSI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INTF_DSI@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x21, #8]
Lloh9:
	adrp	x9, _MDP5_INTF_DSI_MODE_COMMAND@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MDP5_INTF_DSI_MODE_COMMAND@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	x0, [x20]
	bl	_lm2ppdone
	mov	w9, #1
	b	LBB0_12
LBB0_11:
	mov	x0, #0
	mov	w9, #0
LBB0_12:
	mov	w8, #0
	str	x0, [x19, #8]
	str	w9, [x19]
LBB0_13:
	mov	x0, x8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MDP_LM_CAP_DISPLAY,4,2         ; @MDP_LM_CAP_DISPLAY
	.comm	_MDP_LM_CAP_PAIR,4,2            ; @MDP_LM_CAP_PAIR
	.comm	_INTF_DSI,8,3                   ; @INTF_DSI
	.comm	_MDP5_INTF_DSI_MODE_COMMAND,8,3 ; @MDP5_INTF_DSI_MODE_COMMAND
.subsections_via_symbols
