	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_find_top_pipe_for_stream       ## -- Begin function find_top_pipe_for_stream
	.p2align	4, 0x90
_find_top_pipe_for_stream:              ## @find_top_pipe_for_stream
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	(%rsi), %r9
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r8
	xorl	%eax, %eax
	xorl	%esi, %esi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$24, %rsi
	cmpq	%rsi, %r8
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 16(%r9,%rsi)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdi), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, 16(%rcx,%rsi)
	je	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdx, 8(%r9,%rsi)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 4(%r9,%rsi)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r9,%rsi)
	jne	LBB0_8
## %bb.9:
	addq	%rsi, %r9
	movq	%r9, %rax
LBB0_10:
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_find_top_pipe_for_stream       ; -- Begin function find_top_pipe_for_stream
	.p2align	2
_find_top_pipe_for_stream:              ; @find_top_pipe_for_stream
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0, #8]
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x8, #0
	ldr	x9, [x1]
	add	x10, x10, x10, lsl #1
	lsl	x10, x10, #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #24
	cmp	x10, x8
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x9, x8
	ldr	w12, [x11, #16]
	cbnz	w12, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x12, [x0]
	ldr	x12, [x12]
	add	x12, x12, x8
	ldr	w12, [x12, #16]
	cbz	w12, LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x11, #8]
	cmp	x11, x2
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x9, x8
	ldr	w11, [x11, #4]
	cbnz	w11, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w11, [x9, x8]
	cbnz	w11, LBB0_2
; %bb.8:
	add	x0, x9, x8
	ret
LBB0_9:
	mov	x0, #0
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
