	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sti_mixer_set_plane_depth      ## -- Begin function sti_mixer_set_plane_depth
	.p2align	4, 0x90
_sti_mixer_set_plane_depth:             ## @sti_mixer_set_plane_depth
	.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	%rsi, %rbx
	movl	(%rsi), %esi
	leal	-128(%rsi), %ecx
	cmpl	$5, %ecx
	ja	LBB0_5
## %bb.1:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	_GAM_DEPTH_GDP0_ID@GOTPCREL(%rip), %rax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_4:
	movq	_GAM_DEPTH_VID0_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DRM_ERROR
	movl	$1, %r14d
	jmp	LBB0_13
LBB0_3:
	movq	_GAM_DEPTH_GDP3_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_GAM_DEPTH_GDP2_ID@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_GAM_DEPTH_GDP1_ID@GOTPCREL(%rip), %rax
LBB0_7:
	movq	%rsi, %r14
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r13d
	movq	_GAM_MIXER_CRB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_sti_mixer_reg_read
	movl	%eax, %r12d
	movq	_GAM_MIXER_NB_DEPTH_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GAM_DEPTH_MASK_ID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	decl	%eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edx
	shll	%cl, %edx
	movl	%edx, %esi
	movl	%r13d, %edi
	shll	%cl, %edi
	andl	%r12d, %esi
	subl	$1, %eax
	setb	%bl
	cmpl	%edi, %esi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	addl	$3, %ecx
	testb	%bl, %bl
	je	LBB0_10
	jmp	LBB0_12
LBB0_8:
                                        ## implicit-def: $edx
LBB0_12:
	leal	(%r14,%r14,2), %ecx
	shll	%cl, %r15d
	orl	%edx, %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_sti_mixer_to_str
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_sti_plane_to_str
	leaq	L_.str.1(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_DRM_DEBUG_DRIVER
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r13d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	notl	%r15d
	andl	%r15d, %r12d
	orl	%r13d, %r12d
	movq	_GAM_MIXER_CRB@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_sti_mixer_reg_write
	movl	(%rbx), %r15d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_sti_mixer_reg_read
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_GAM_DEPTH_GDP0_ID,4,2          ## @GAM_DEPTH_GDP0_ID
	.comm	_GAM_DEPTH_GDP1_ID,4,2          ## @GAM_DEPTH_GDP1_ID
	.comm	_GAM_DEPTH_GDP2_ID,4,2          ## @GAM_DEPTH_GDP2_ID
	.comm	_GAM_DEPTH_GDP3_ID,4,2          ## @GAM_DEPTH_GDP3_ID
	.comm	_GAM_DEPTH_VID0_ID,4,2          ## @GAM_DEPTH_VID0_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown plane %d\n"

	.comm	_GAM_MIXER_CRB,4,2              ## @GAM_MIXER_CRB
	.comm	_GAM_MIXER_NB_DEPTH_LEVEL,4,2   ## @GAM_MIXER_NB_DEPTH_LEVEL
	.comm	_GAM_DEPTH_MASK_ID,4,2          ## @GAM_DEPTH_MASK_ID
L_.str.1:                               ## @.str.1
	.asciz	"%s %s depth=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"GAM_MIXER_CRB val 0x%x mask 0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Read GAM_MIXER_CRB 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sti_mixer_set_plane_depth      ; -- Begin function sti_mixer_set_plane_depth
	.p2align	2
_sti_mixer_set_plane_depth:             ; @sti_mixer_set_plane_depth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x1
	ldr	w1, [x1]
	sub	w9, w1, #128
	cmp	w9, #5
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w0, #0
	ldr	x8, [x21, #8]
	ldr	w20, [x8]
Lloh0:
	adrp	x8, _GAM_DEPTH_GDP0_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GAM_DEPTH_GDP0_ID@GOTPAGEOFF]
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
Lloh4:
	adrp	x8, _GAM_DEPTH_VID0_ID@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GAM_DEPTH_VID0_ID@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	mov	w0, #1
	b	LBB0_12
LBB0_4:
Lloh8:
	adrp	x8, _GAM_DEPTH_GDP3_ID@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GAM_DEPTH_GDP3_ID@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _GAM_DEPTH_GDP2_ID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GAM_DEPTH_GDP2_ID@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _GAM_DEPTH_GDP1_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GAM_DEPTH_GDP1_ID@GOTPAGEOFF]
LBB0_7:
	ldr	w23, [x8]
Lloh14:
	adrp	x25, _GAM_MIXER_CRB@GOTPAGE
Lloh15:
	ldr	x25, [x25, _GAM_MIXER_CRB@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_sti_mixer_reg_read
	mov	x22, x0
Lloh16:
	adrp	x8, _GAM_MIXER_NB_DEPTH_LEVEL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GAM_MIXER_NB_DEPTH_LEVEL@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x8]
Lloh19:
	adrp	x8, _GAM_DEPTH_MASK_ID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GAM_DEPTH_MASK_ID@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cbz	w10, LBB0_10
; %bb.8:
	mov	w9, #0
	sub	w11, w10, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w10, w8, w9
	and	w12, w10, w22
	lsl	w13, w23, w9
	cmp	w12, w13
	ccmp	w11, #0, #4, ne
	sub	w11, w11, #1
	add	w9, w9, #3
	b.ne	LBB0_9
	b	LBB0_11
LBB0_10:
                                        ; implicit-def: $w10
LBB0_11:
	add	w9, w20, w20, lsl #1
	lsl	w8, w8, w9
	orr	w26, w8, w10
	lsl	w23, w23, w9
	mov	x0, x19
	bl	_sti_mixer_to_str
	mov	x24, x0
	mov	x0, x21
	bl	_sti_plane_to_str
	mov	x2, x0
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	mov	x3, x20
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x19]
	str	x26, [sp]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	bl	_dev_dbg
	bic	w8, w22, w26
	orr	w2, w8, w23
	ldr	w1, [x25]
	mov	x0, x19
	bl	_sti_mixer_reg_write
	ldr	w20, [x19]
	ldr	w1, [x25]
	mov	x0, x19
	bl	_sti_mixer_reg_read
	mov	x2, x0
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.comm	_GAM_DEPTH_GDP0_ID,4,2          ; @GAM_DEPTH_GDP0_ID
	.comm	_GAM_DEPTH_GDP1_ID,4,2          ; @GAM_DEPTH_GDP1_ID
	.comm	_GAM_DEPTH_GDP2_ID,4,2          ; @GAM_DEPTH_GDP2_ID
	.comm	_GAM_DEPTH_GDP3_ID,4,2          ; @GAM_DEPTH_GDP3_ID
	.comm	_GAM_DEPTH_VID0_ID,4,2          ; @GAM_DEPTH_VID0_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown plane %d\n"

	.comm	_GAM_MIXER_CRB,4,2              ; @GAM_MIXER_CRB
	.comm	_GAM_MIXER_NB_DEPTH_LEVEL,4,2   ; @GAM_MIXER_NB_DEPTH_LEVEL
	.comm	_GAM_DEPTH_MASK_ID,4,2          ; @GAM_DEPTH_MASK_ID
l_.str.1:                               ; @.str.1
	.asciz	"%s %s depth=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"GAM_MIXER_CRB val 0x%x mask 0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Read GAM_MIXER_CRB 0x%x\n"

.subsections_via_symbols
