	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hb_ts_stream_append_pkt
_hb_ts_stream_append_pkt:               ## @hb_ts_stream_append_pkt
	.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
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movslq	%esi, %r13
	leaq	(,%r13,2), %r12
	addq	%r13, %r12
	cmpq	$0, 16(%rax,%r12,8)
	jne	LBB0_5
## %bb.2:
	movl	%ecx, %ebx
	movq	%rdx, %r15
	movq	8(%rax,%r12,8), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %edi
	leal	(%rcx,%rbx), %esi
	cmpl	%edi, %esi
	jle	LBB0_4
## %bb.3:
	addl	%edi, %edi
	callq	_MAX
	movq	(%r14), %rcx
	shlq	$3, %r13
	leaq	(%r13,%r13,2), %r13
	movq	8(%rcx,%r13), %rdi
	movl	%eax, %esi
	callq	_hb_buffer_realloc
	movq	(%r14), %rax
	movq	8(%rax,%r13), %rax
	movl	(%rax), %ecx
LBB0_4:
	movslq	%ecx, %rdi
	addq	8(%rax), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movq	(%r14), %rax
	movq	8(%rax,%r12,8), %rcx
	addl	%ebx, (%rcx)
	addl	%ebx, (%rax,%r12,8)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hb_ts_stream_append_pkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hb_ts_stream_append_pkt
_hb_ts_stream_append_pkt:               ; @hb_ts_stream_append_pkt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	cmp	w3, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	mov	w9, #24
	smaddl	x9, w1, w9, x8
	ldr	x9, [x9, #16]
	cbnz	x9, LBB0_5
; %bb.2:
	mov	x19, x3
	mov	x21, x2
	sxtw	x22, w1
	mov	w9, #24
	madd	x8, x22, x9, x8
	ldr	x8, [x8, #8]
	ldp	w9, w10, [x8]
	add	w1, w9, w3
	cmp	w1, w10
	b.le	LBB0_4
; %bb.3:
	lsl	w0, w10, #1
	bl	_MAX
	mov	x1, x0
	ldr	x8, [x20]
	add	x9, x22, x22, lsl #1
	lsl	x23, x9, #3
	add	x8, x8, x23
	ldr	x0, [x8, #8]
	bl	_hb_buffer_realloc
	ldr	x8, [x20]
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	ldr	w9, [x8]
LBB0_4:
	ldr	x8, [x8, #8]
	add	x0, x8, w9, sxtw
	mov	x1, x21
	mov	x2, x19
	bl	_memcpy
	ldr	x8, [x20]
	mov	w9, #24
	madd	x8, x22, x9, x8
	ldr	x9, [x8, #8]
	ldr	w10, [x9]
	add	w10, w10, w19
	str	w10, [x9]
	ldr	w9, [x8]
	add	w9, w9, w19
	str	w9, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hb_ts_stream_append_pkt
.subsections_via_symbols
