	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpk_read_packet
_vpk_read_packet:                       ## @vpk_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
	subq	$24, %rsp
	.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), %rax
	movq	16(%rdi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rbx
	movq	(%rax), %rcx
	movq	8(%rax), %rdx
	incq	%rcx
	movq	%rcx, (%rax)
	cmpq	%rdx, %rcx
	jne	LBB0_7
## %bb.1:
	movl	16(%rax), %esi
	movl	(%rbx), %edi
	movl	4(%rbx), %ecx
	movl	%esi, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r13d
	subl	%esi, %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	cmpl	$0, (%rbx)
	je	LBB0_11
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	%r13d, %esi
	imull	%r12d, %esi
	movq	%r14, %rbx
	addq	8(%r14), %rsi
	movl	%r13d, %edx
	callq	_avio_read
	movl	%eax, %r14d
	movl	(%r15), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_avio_skip
	cmpl	%r13d, %r14d
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	cmpq	%rax, %r12
	movq	%rbx, %r14
	jb	LBB0_4
## %bb.6:
	movl	%r13d, %eax
	jmp	LBB0_11
LBB0_7:
	jge	LBB0_9
## %bb.8:
	movl	(%r15), %edi
	movl	4(%rbx), %edx
	movq	%r14, %rsi
	callq	_av_get_packet
	jmp	LBB0_11
LBB0_9:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_10:
	movq	%rbx, %r14
	movq	%rbx, %rdi
	callq	_av_packet_unref
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_11:
	movq	$0, (%r14)
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_vpk_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpk_read_packet
_vpk_read_packet:                       ; @vpk_read_packet
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldp	x8, x9, [x0, #8]
	ldr	x9, [x9]
	ldr	x24, [x9]
	ldp	x9, x10, [x8]
	add	x9, x9, #1
	str	x9, [x8]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.1:
	ldr	w22, [x8, #16]
	ldp	w23, w26, [x24]
	mov	x0, x19
	mov	x1, x22
	bl	_av_new_packet
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	w8, [x24]
	cbz	w8, LBB0_10
; %bb.3:
	mov	x25, #0
	udiv	w21, w22, w23
	sub	w8, w26, w22
	udiv	w22, w8, w23
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	x8, [x19, #8]
	mul	w9, w21, w25
	add	x1, x8, x9
	mov	x2, x21
	bl	_avio_read
	mov	x23, x0
	ldr	w0, [x20]
	mov	x1, x22
	bl	_avio_skip
	cmp	w23, w21
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	ldr	w8, [x24]
	cmp	x25, x8
	b.lo	LBB0_4
	b	LBB0_10
LBB0_6:
	b.ge	LBB0_8
; %bb.7:
	ldr	w0, [x20]
	ldr	w2, [x24, #4]
	mov	x1, x19
	bl	_av_get_packet
	str	xzr, [x19]
	b	LBB0_12
LBB0_8:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_av_packet_unref
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
LBB0_10:
	str	xzr, [x19]
LBB0_11:
	mov	x0, x21
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_vpk_read_packet
.subsections_via_symbols
