	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wtvfile_read_packet
_wtvfile_read_packet:                   ## @wtvfile_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
	movl	$-1, %r12d
	cmpl	$0, (%rdi)
	jne	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	movq	32(%rdi), %r13
	cmpq	$0, (%r13)
	jne	LBB0_14
## %bb.2:
	movl	4(%rbx), %eax
	cmpl	8(%rbx), %eax
	jge	LBB0_4
## %bb.3:
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%r13, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%rbx), %esi
	subl	4(%rbx), %esi
	movl	%r15d, %edi
	callq	_FFMIN
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_14
## %bb.6:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_7
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %eax
	leaq	(%r14,%rax,4), %r14
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%r12d, %eax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jle	LBB0_14
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	12(%rbx), %ecx
	movl	$1, %r15d
	shll	%cl, %r15d
	leal	-1(%r15), %ecx
	andl	4(%rbx), %ecx
	subl	%ecx, %r15d
	movl	%eax, %edi
	subl	%r12d, %edi
	movl	%r15d, %esi
	callq	_FFMIN
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_avio_read
	testl	%eax, %eax
	jle	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %r13d
	addl	%eax, %r12d
	movl	4(%rbx), %eax
	addl	%r13d, %eax
	movl	%eax, 4(%rbx)
	cmpl	%r15d, %r13d
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	12(%rbx), %ecx
	sarl	%cl, %eax
	cmpl	16(%rbx), %eax
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%rbx), %rdx
	cltq
	movq	(%rdx,%rax,8), %rsi
	movq	_WTV_SECTOR_BITS@GOTPCREL(%rip), %rdi
	subl	(%rdi), %ecx
	movl	$1, %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edi
	movslq	%edi, %rcx
	addq	-8(%rdx,%rax,8), %rcx
	cmpq	%rcx, %rsi
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_seek_by_sector
	testq	%rax, %rax
	jns	LBB0_13
LBB0_12:
	movl	$1, (%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_WTV_SECTOR_BITS,4,2            ## @WTV_SECTOR_BITS
	.no_dead_strip	_wtvfile_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wtvfile_read_packet
_wtvfile_read_packet:                   ; @wtvfile_read_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0, #32]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
LBB0_2:
	mov	w22, #-1
LBB0_3:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldp	w8, w9, [x19, #4]
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.5:
	mov	x22, x2
	mov	x20, x1
	mov	x0, x21
	bl	_avio_feof
	cbz	x0, LBB0_7
LBB0_6:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	b	LBB0_3
LBB0_7:
	ldp	w9, w8, [x19, #4]
	sub	w1, w8, w9
	mov	x0, x22
	bl	_FFMIN
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.8:
	mov	x23, x0
	mov	w22, #0
	mov	w26, #1
Lloh3:
	adrp	x27, _WTV_SECTOR_BITS@GOTPAGE
Lloh4:
	ldr	x27, [x27, _WTV_SECTOR_BITS@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, w24, uxtw #2
	cmp	w23, w22
	b.le	LBB0_3
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #12]
	lsl	w8, w26, w8
	ldr	w9, [x19, #4]
	sub	w10, w8, #1
	and	w9, w10, w9
	sub	w25, w8, w9
	sub	w0, w23, w22
	mov	x1, x25
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_avio_read
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x24, x0
	add	w22, w0, w22
	ldr	w8, [x19, #4]
	add	w9, w8, w0
	str	w9, [x19, #4]
	cmp	w0, w25
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldp	w8, w10, [x19, #12]
	asr	w9, w9, w8
	cmp	w9, w10
	b.ge	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x10, [x19, #24]
	add	x9, x10, w9, sxtw #3
	ldp	x9, x1, [x9, #-8]
	ldr	w10, [x27]
	sub	w8, w8, w10
	lsl	w8, w26, w8
	add	x8, x9, w8, sxtw
	cmp	x1, x8
	b.eq	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x21
	mov	w2, #0
	bl	_seek_by_sector
	tbz	x0, #63, LBB0_9
LBB0_15:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_3
LBB0_16:
	mov	w22, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_WTV_SECTOR_BITS,4,2            ; @WTV_SECTOR_BITS
	.no_dead_strip	_wtvfile_read_packet
.subsections_via_symbols
