	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function audio_read_packet
_audio_read_packet:                     ## @audio_read_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, %r14
	movq	(%rdi), %r12
	movl	24(%r12), %esi
	movq	%r14, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	20(%r12), %edi
	movl	(%r14), %edx
	movl	8(%r14), %esi
	callq	_sio_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	20(%r12), %edi
	callq	_sio_eof
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	callq	_av_packet_unref
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_5:
	movl	%r15d, (%r14)
	addl	%r15d, (%r12)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_av_gettime
	movl	%eax, %ecx
	addl	4(%r12), %r15d
	subl	(%r12), %r15d
	imull	$1000000, %r15d, %eax           ## imm = 0xF4240
	movl	12(%r12), %esi
	imull	8(%r12), %esi
	imull	16(%r12), %esi
	cltd
	idivl	%esi
	subl	%eax, %ecx
	movl	%ecx, 4(%r14)
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_audio_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function audio_read_packet
_audio_read_packet:                     ; @audio_read_packet
	.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	x19, x1
	ldr	x21, [x0]
	ldr	w1, [x21, #24]
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w0, [x21, #20]
	ldr	w1, [x19, #8]
	ldr	w2, [x19]
	bl	_sio_read
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	ldr	w0, [x21, #20]
	bl	_sio_eof
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_av_packet_unref
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	str	w20, [x19]
	ldr	w8, [x21]
	add	w8, w8, w20
	str	w8, [x21]
	bl	_av_gettime
	mov	x8, x0
	mov	w0, #0
	ldp	w10, w9, [x21]
	add	w9, w9, w20
	sub	w9, w9, w10
	mov	w10, #16960
	movk	w10, #15, lsl #16
	mul	w9, w9, w10
	ldp	w10, w11, [x21, #8]
	mul	w10, w11, w10
	ldr	w11, [x21, #16]
	mul	w10, w10, w11
	sdiv	w9, w9, w10
	sub	w8, w8, w9
	str	w8, [x19, #4]
LBB0_5:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_audio_read_packet
.subsections_via_symbols
