	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dcn20_find_secondary_pipe
_dcn20_find_secondary_pipe:             ## @dcn20_find_secondary_pipe
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.1:
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rcx), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	16(%rax,%rcx,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.3:
	movslq	(%rdx), %rcx
	jmp	LBB0_4
LBB0_7:
	movq	8(%rax,%rcx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.8:
	movslq	(%rcx), %rcx
LBB0_4:
	movq	(%r14), %rbx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	cmpq	$0, 8(%rbx,%rdx)
	je	LBB0_5
LBB0_9:
	movq	(%r15), %rcx
	movl	(%rcx), %edx
	testl	%edx, %edx
	jle	LBB0_15
## %bb.10:
	incq	%rdx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	decq	%rdx
	cmpq	$1, %rdx
	jbe	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rdx), %ecx
	leaq	(%rcx,%rcx,2), %rsi
	cmpq	$0, (%rax,%rsi,8)
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r14), %rbx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	cmpq	$0, 8(%rbx,%rsi)
	jne	LBB0_11
## %bb.14:
	addq	%rsi, %rbx
	jmp	LBB0_6
LBB0_15:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_ASSERT
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	%rax, %rcx
	shlq	$4, %rcx
	addq	$-8, %rcx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	jle	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	decq	%rax
	movq	(%r14), %rdx
	cmpq	$0, (%rdx,%rcx)
	leaq	-16(%rcx), %rcx
	jne	LBB0_16
## %bb.18:
	movl	%eax, %eax
	movq	%rax, %rcx
	shlq	$4, %rcx
	leaq	(%rdx,%rcx), %rbx
	movq	%rax, (%rdx,%rcx)
	jmp	LBB0_19
LBB0_5:
	addq	%rdx, %rbx
LBB0_6:
	movq	%rcx, (%rbx)
	movq	%rbx, %rdi
	callq	_ASSERT
LBB0_19:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dcn20_find_secondary_pipe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dcn20_find_secondary_pipe
_dcn20_find_secondary_pipe:             ; @dcn20_find_secondary_pipe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, #0
	cbz	x0, LBB0_18
; %bb.1:
	cbz	x3, LBB0_18
; %bb.2:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x9, [x3]
	mov	w10, #24
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #16]
	cbz	x10, LBB0_4
; %bb.3:
	ldrsw	x9, [x10]
	b	LBB0_6
LBB0_4:
	mov	w10, #24
	madd	x9, x9, x10, x8
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_7
; %bb.5:
	ldrsw	x9, [x9]
LBB0_6:
	ldr	x10, [x19]
	add	x21, x10, x9, lsl #4
	ldr	x10, [x21, #8]
	cbz	x10, LBB0_12
LBB0_7:
	ldr	x9, [x20]
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.8:
	add	x10, x9, #1
	mov	w11, #24
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	sub	x10, x10, #1
	cmp	x10, #1
	b.ls	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w9, w10, #2
	umull	x12, w9, w11
	ldr	x12, [x8, x12]
	cbnz	x12, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x12, [x19]
	add	x21, x12, x9, lsl #4
	ldr	x12, [x21, #8]
	cbnz	x12, LBB0_9
LBB0_12:
	str	x9, [x21]
	mov	x0, x21
	bl	_ASSERT
	b	LBB0_18
LBB0_13:
	mov	x0, #0
	bl	_ASSERT
	ldr	x8, [x20]
	ldr	w8, [x8]
	lsl	x9, x8, #4
	sub	x9, x9, #8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	sub	x8, x8, #1
	ldr	x10, [x19]
	ldr	x11, [x10, x9]
	sub	x9, x9, #16
	cbnz	x11, LBB0_14
; %bb.16:
	and	x9, x8, #0xffffffff
	add	x21, x10, w8, uxtw #4
	str	x9, [x21]
	b	LBB0_18
LBB0_17:
	mov	x21, #0
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dcn20_find_secondary_pipe
.subsections_via_symbols
