	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stream_write
_stream_write:                          ## @stream_write
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdx), %r12
	movl	(%r12), %eax
	movl	(%rdx), %edi
	movl	%eax, %ecx
	subl	%edi, %ecx
	cmpl	%esi, %ecx
	jge	LBB0_4
## %bb.1:
	movl	%ebx, %esi
	subl	%ecx, %esi
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	movl	(%rcx), %ecx
	subl	%eax, %ecx
	movl	$-1, %r13d
	cmpl	%ecx, %esi
	jg	LBB0_5
## %bb.2:
	movq	%r12, %rdi
	callq	_av_grow_packet
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movl	(%r14), %edi
LBB0_4:
	addl	4(%r12), %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	addl	%ebx, (%r14)
	movl	%ebx, %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.no_dead_strip	_stream_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stream_write
_stream_write:                          ; @stream_write
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x22, [x2, #8]
	ldr	w8, [x22]
	ldr	w9, [x2]
	sub	w10, w8, w9
	cmp	w10, w1
	b.ge	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x11, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh3:
	ldr	x11, [x11, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	ldr	w11, [x11]
	add	w8, w8, w11
	sub	w8, w9, w8
	sub	w1, w19, w10
	cmp	w1, w8
	b.gt	LBB0_3
; %bb.2:
	mov	x0, x22
	bl	_av_grow_packet
	cbz	x0, LBB0_4
LBB0_3:
	mov	w19, #-1
	b	LBB0_6
LBB0_4:
	ldr	w9, [x20]
LBB0_5:
	ldr	w8, [x22, #4]
	add	w0, w9, w8
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	w8, [x20]
	add	w8, w8, w19
	str	w8, [x20]
LBB0_6:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.no_dead_strip	_stream_write
.subsections_via_symbols
