	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stream_buf_set_next
_stream_buf_set_next:                   ## @stream_buf_set_next
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	32(%rdi), %r14
	movq	32(%rdi), %rdx
	movq	40(%rdi), %rcx
	leaq	(%rcx,%rdx), %r8
	movq	%r8, 16(%rdi)
	movq	(%rdi), %rax
	movq	8(%rdi), %r10
	testq	%rax, %rax
	movq	%rax, %r9
	cmovsq	%r10, %r9
	subq	%rcx, %r9
	movq	%r9, 24(%rdi)
	movq	_D_STREAM_DEBUG@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	leaq	L_.str(%rip), %rsi
	pushq	%r10
	pushq	%rax
	callq	_dmsg
	addq	$16, %rsp
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	setg	%dil
	callq	_ASSERT
	movq	24(%rbx), %rsi
	movq	%r14, %rdi
	callq	_buf_safe
	movl	%eax, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ASSERT                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_D_STREAM_DEBUG,4,2             ## @D_STREAM_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"STREAM: SET NEXT, buf=[%d,%d] next=[%d,%d] len=%d maxlen=%d"

	.no_dead_strip	_stream_buf_set_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stream_buf_set_next
_stream_buf_set_next:                   ; @stream_buf_set_next
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x20, x0
	ldr	x2, [x20, #32]!
	ldr	x3, [x0, #40]
	add	x4, x3, x2
	ldp	x6, x7, [x0]
	cmp	x6, #0
	csel	x8, x7, x6, lt
	sub	x5, x8, x3
	stp	x4, x5, [x0, #16]
Lloh0:
	adrp	x8, _D_STREAM_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_STREAM_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dmsg
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, gt
	bl	_ASSERT
	ldr	x1, [x19, #24]
	mov	x0, x20
	bl	_buf_safe
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ASSERT
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_D_STREAM_DEBUG,4,2             ; @D_STREAM_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"STREAM: SET NEXT, buf=[%d,%d] next=[%d,%d] len=%d maxlen=%d"

	.no_dead_strip	_stream_buf_set_next
.subsections_via_symbols
