	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_mixer_assign              ## -- Begin function mdp5_mixer_assign
	.p2align	4, 0x90
_mdp5_mixer_assign:                     ## @mdp5_mixer_assign
	.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
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r13
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_to_mdp_kms
	movl	%eax, %edi
	callq	_to_mdp5_kms
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_mdp5_get_global_state
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.23:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	cmpl	$0, (%r15)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rsi
	jle	LBB0_16
## %bb.2:
	movl	%r14d, %edi
	xorl	%r14d, %r14d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r13), %eax
	notl	%eax
	testl	%edi, %eax
	je	LBB0_6
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movslq	(%r15), %rax
	cmpq	%rax, %r14
	jge	LBB0_16
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r14,8), %r13
	movq	(%rbx), %rax
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r12, %rax
	jne	LBB0_15
	jmp	LBB0_5
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %r12
	movl	12(%r13), %esi
	movq	%r15, %rdi
	callq	_get_right_pair_idx
	testl	%eax, %eax
	js	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rcx
	movl	%eax, %eax
	cmpq	$0, (%rcx,%rax,8)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%rdx)
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, (%rsi)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_MDP_LM_CAP_PAIR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, (%rsi)
	jmp	LBB0_15
LBB0_16:
	movq	(%rsi), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.19:
	cmpq	$0, (%rdx)
	je	LBB0_17
LBB0_20:
	movq	%rsi, %r14
	movl	12(%rax), %esi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%r15d, %r15d
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	testq	%r8, %r8
	je	LBB0_22
## %bb.21:
	movq	(%r8), %rax
	movl	12(%rax), %esi
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%r8, %r14
	callq	_DBG
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	jmp	LBB0_22
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_22:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MDP_LM_CAP_PAIR,4,2            ## @MDP_LM_CAP_PAIR
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"assigning Layer Mixer %d to crtc %s"

L_.str.1:                               ## @.str.1
	.asciz	"assigning Right Layer Mixer %d to crtc %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdp5_mixer_assign              ; -- Begin function mdp5_mixer_assign
	.p2align	2
_mdp5_mixer_assign:                     ; @mdp5_mixer_assign
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_to_mdp_kms
	bl	_to_mdp5_kms
	mov	x24, x0
	mov	x0, x22
	bl	_mdp5_get_global_state
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.3:
	mov	x25, #0
Lloh0:
	adrp	x26, _MDP_LM_CAP_PAIR@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MDP_LM_CAP_PAIR@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	x27, [x21]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.ge	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #8]
	ldr	x27, [x8, x25, lsl #3]
	ldr	x8, [x22]
	ldr	x9, [x27]
	ldr	x8, [x8, x9, lsl #3]
	cmp	x8, #0
	ccmp	x8, x20, #4, ne
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27, #8]
	bics	wzr, w23, w8
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x19, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x27, #12]
	mov	x0, x24
	bl	_get_right_pair_idx
	tbnz	w0, #31, LBB0_23
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x22]
	ldr	x8, [x8, w0, uxtw #3]
	cbnz	x8, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	w8, w0
	ldr	x9, [x24, #8]
	ldr	x8, [x9, x8, lsl #3]
	str	x8, [x19]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x27, #8]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_4
	b	LBB0_5
LBB0_14:
	ldr	x8, [x21]
	cbz	x8, LBB0_19
; %bb.15:
	cbz	x19, LBB0_17
; %bb.16:
	ldr	x9, [x19]
	cbz	x9, LBB0_19
LBB0_17:
	ldr	w1, [x8, #12]
	ldr	w2, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	x8, [x22]
	ldr	x9, [x21]
	ldr	x9, [x9]
	str	x20, [x8, x9, lsl #3]
	cbz	x19, LBB0_21
; %bb.18:
	ldr	x8, [x19]
	ldr	w1, [x8, #12]
	ldr	w2, [x20]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DBG
	mov	w0, #0
	ldr	x8, [x22]
	ldr	x9, [x19]
	ldr	x9, [x9]
	str	x20, [x8, x9, lsl #3]
	b	LBB0_22
LBB0_19:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_22
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_23:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MDP_LM_CAP_PAIR,4,2            ; @MDP_LM_CAP_PAIR
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"assigning Layer Mixer %d to crtc %s"

l_.str.1:                               ; @.str.1
	.asciz	"assigning Right Layer Mixer %d to crtc %s"

.subsections_via_symbols
