	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cin_read_packet
_cin_read_packet:                       ## @cin_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	%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	%rsi, %r14
	movq	(%rdi), %r15
	movq	8(%rdi), %r12
	movq	(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movl	16(%r12), %eax
	movl	%eax, 24(%r14)
	movq	8(%r12), %rax
	movq	%rax, (%r14)
	movq	(%r12), %rcx
	cmpq	$1, %rax
	sbbq	$0, %rcx
	movq	%rcx, 16(%r14)
	addq	%rax, %rcx
	movq	%rcx, 8(%r12)
	movq	$0, (%r12)
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_4:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_cin_read_frame_header
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movl	32(%r12), %eax
	xorl	%ecx, %ecx
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	negl	%eax
	movl	%eax, 32(%r12)
	movl	$1, %ecx
LBB0_7:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leal	3(%rcx), %esi
	imull	%eax, %esi
	addl	36(%r12), %esi
	movq	%r15, %rdi
	callq	_ffio_limit
	movl	%eax, %r13d
	leal	4(%r13), %esi
	movq	%r14, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_12
## %bb.8:
	movl	24(%r12), %eax
	movl	%eax, 24(%r14)
	movslq	20(%r12), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 20(%r12)
	movq	%rax, (%r14)
	movq	8(%r14), %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%rsi)
	movzbl	32(%r12), %eax
	movl	%eax, 4(%rsi)
	movl	32(%r12), %eax
	sarl	$8, %eax
	movl	%eax, 8(%rsi)
	movl	40(%r12), %eax
	movl	%eax, 12(%rsi)
	addq	$16, %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_avio_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_15
## %bb.9:
	cmpl	%r13d, %ebx
	jge	LBB0_11
## %bb.10:
	addl	$4, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_av_shrink_packet
LBB0_11:
	movq	48(%r12), %rax
	movq	%rax, (%r12)
	jmp	LBB0_3
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r14, %rdi
	callq	_av_packet_unref
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_cin_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cin_read_packet
_cin_read_packet:                       ; @cin_read_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
	ldp	x21, x19, [x0]
	ldr	x2, [x19]
	cbz	x2, LBB0_3
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_12
; %bb.2:
	mov	w22, #0
	ldr	w8, [x19, #16]
	str	w8, [x20, #24]
	ldp	x9, x8, [x19]
	str	x8, [x20]
	cmp	x8, #0
	cset	w10, eq
	sub	x9, x9, x10
	add	x8, x9, x8
	str	x9, [x20, #16]
	stp	xzr, x8, [x19]
	b	LBB0_13
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	bl	_cin_read_frame_header
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	w8, [x19, #32]
	tbnz	w8, #31, LBB0_6
; %bb.5:
	mov	w24, #0
	b	LBB0_7
LBB0_6:
	neg	w8, w8
	str	w8, [x19, #32]
	mov	w24, #1
LBB0_7:
	add	w9, w24, #3
	ldr	w10, [x19, #36]
	madd	w1, w9, w8, w10
	mov	x0, x21
	bl	_ffio_limit
	mov	x23, x0
	add	w1, w0, #4
	mov	x0, x20
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_12
; %bb.8:
	ldp	w9, w8, [x19, #20]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	str	w8, [x20, #24]
	add	w8, w9, #1
	str	w8, [x19, #20]
	str	x9, [x20]
	ldr	x8, [x20, #8]
	str	w24, [x8]
	ldrb	w9, [x19, #32]
	str	w9, [x8, #4]
	ldr	w9, [x19, #32]
	asr	w9, w9, #8
	str	w9, [x8, #8]
	ldr	w9, [x19, #40]
	str	w9, [x8, #12]
	add	x1, x8, #16
	mov	x0, x21
	mov	x2, x23
	bl	_avio_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_14
; %bb.9:
	cmp	w22, w23
	b.ge	LBB0_11
; %bb.10:
	add	w1, w22, #4
	mov	x0, x20
	bl	_av_shrink_packet
LBB0_11:
	mov	w22, #0
	ldr	x8, [x19, #48]
	str	x8, [x19]
	b	LBB0_13
LBB0_12:
	mov	x22, x0
LBB0_13:
	mov	x0, x22
	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
LBB0_14:
	mov	x0, x20
	bl	_av_packet_unref
	b	LBB0_13
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_cin_read_packet
.subsections_via_symbols
