	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hds_write_packet
_hds_write_packet:                      ## @hds_write_packet
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rsi), %rdx
	movq	(%rax,%rdx,8), %rax
	imulq	$56, (%rax), %r12
	movq	8(%rcx), %rbx
	movl	(%rbx,%r12), %edx
	imull	(%rcx), %edx
	movq	8(%rax), %rcx
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_2
## %bb.1:
	movq	8(%r15), %rcx
	movq	%rcx, 8(%rax)
LBB0_2:
	cmpl	$0, 48(%rbx,%r12)
	je	LBB0_4
## %bb.3:
	movq	24(%rax), %rsi
	movq	(%rsi), %rsi
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_8
LBB0_4:
	movq	8(%r15), %rdi
	subq	%rcx, %rdi
	movl	16(%rax), %esi
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_av_compare_ts
	testq	%rax, %rax
	js	LBB0_8
## %bb.5:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r15)
	je	LBB0_8
## %bb.6:
	cmpq	$0, 40(%rbx,%r12)
	je	LBB0_8
## %bb.7:
	leaq	(%rbx,%r12), %rsi
	movq	8(%r15), %rcx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_hds_flush
	testl	%eax, %eax
	js	LBB0_11
LBB0_8:
	leaq	(%rbx,%r12), %rax
	addq	$40, %rax
	movq	40(%rbx,%r12), %rcx
	movq	8(%r15), %rdx
	testq	%rcx, %rcx
	jne	LBB0_10
## %bb.9:
	movq	%rdx, 8(%rbx,%r12)
LBB0_10:
	movq	%rdx, 16(%rbx,%r12)
	incq	%rcx
	movq	%rcx, (%rax)
	movl	32(%rbx,%r12), %edi
	movq	(%r15), %rsi
	subq	24(%rbx,%r12), %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_write_chained               ## TAILCALL
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_hds_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hds_write_packet
_hds_write_packet:                      ; @hds_write_packet
	.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
	mov	x20, x1
	mov	x19, x0
	ldp	x8, x11, [x0]
	ldr	x9, [x1]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x22, [x11, #8]
	mov	w10, #56
	ldp	x23, x9, [x8]
	madd	x21, x23, x10, x22
	ldr	w10, [x21]
	ldr	w11, [x11]
Lloh0:
	adrp	x12, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x12, [x12, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x12, [x12]
	cmp	x9, x12
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x20, #8]
	str	x9, [x8, #8]
LBB0_2:
	mov	w12, #56
	madd	x12, x23, x12, x22
	ldr	w12, [x12, #48]
	cbz	w12, LBB0_4
; %bb.3:
	ldr	x12, [x8, #24]
	ldr	x12, [x12]
Lloh3:
	adrp	x13, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh4:
	ldr	x13, [x13, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh5:
	ldr	x13, [x13]
	cmp	x12, x13
	b.ne	LBB0_8
LBB0_4:
	mul	w2, w10, w11
	ldr	x10, [x20, #8]
	sub	x0, x10, x9
	ldr	w1, [x8, #16]
Lloh6:
	adrp	x8, _AV_TIME_BASE_Q@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_TIME_BASE_Q@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_av_compare_ts
	tbnz	x0, #63, LBB0_8
; %bb.5:
	ldr	w8, [x20, #16]
Lloh9:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	mov	w8, #56
	madd	x8, x23, x8, x22
	ldr	x8, [x8, #40]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x3, [x20, #8]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_hds_flush
	tbnz	w0, #31, LBB0_11
LBB0_8:
	mov	w8, #56
	madd	x8, x23, x8, x22
	ldr	x9, [x8, #40]!
	ldr	x10, [x20, #8]
	cbnz	x9, LBB0_10
; %bb.9:
	mov	w11, #56
	madd	x11, x23, x11, x22
	str	x10, [x11, #8]
LBB0_10:
	mov	w11, #56
	madd	x11, x23, x11, x22
	str	x10, [x11, #16]
	add	x9, x9, #1
	str	x9, [x8]
	ldr	w0, [x11, #32]
	ldr	x8, [x20]
	ldr	x9, [x11, #24]
	sub	x1, x8, x9
	mov	x2, x20
	mov	x3, x19
	mov	w4, #0
	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
	b	_ff_write_chained
LBB0_11:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_hds_write_packet
.subsections_via_symbols
