	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fourxm_read_packet
_fourxm_read_packet:                    ## @fourxm_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rdi
	movq	8(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %rsi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	$8, %edx
	callq	_avio_read
	testl	%eax, %eax
	js	LBB0_23
## %bb.1:
	leaq	-56(%rbp), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_avio_skip
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rbx
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_avio_read
	testl	%eax, %eax
	js	LBB0_23
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r13
	movq	%rbx, %rdi
	callq	_AV_RL32
	movl	%eax, %ebx
	leaq	-52(%rbp), %rdi
	callq	_AV_RL32
	movl	%eax, %r12d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_feof
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-129(%rbx), %eax
	cmpl	$6, %eax
	jae	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-9, %r12d
	ja	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %esi
	addl	$8, %esi
	movq	%r15, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	jne	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	16(%rcx), %eax
	movl	%eax, 16(%r15)
	movl	(%rcx), %eax
	movl	%eax, (%r15)
	movq	(%r14), %rdi
	callq	_avio_tell
	movl	%eax, 20(%r15)
	movq	8(%r15), %rdi
	movq	%r13, %rbx
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r14), %rdi
	movq	8(%r15), %rsi
	addq	$8, %rsi
	movl	%r12d, %edx
	callq	_avio_read
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_av_packet_unref
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, %ebx
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$135, %ebx
	jne	LBB0_20
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_rl32
	jmp	LBB0_21
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_avio_rl32
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_skip
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	addl	$-8, %r12d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	4(%rax), %ecx
	jae	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	%ecx, %ebx
	leaq	(%rbx,%rbx,4), %rcx
	cmpl	$0, (%rax,%rcx,4)
	jle	LBB0_20
## %bb.15:
	movq	(%r14), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_3
## %bb.16:
	movl	%eax, %r13d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	leaq	(%rbx,%rbx,4), %rbx
	movl	16(%rdi,%rbx,4), %eax
	movl	%eax, 16(%r15)
	leaq	(%rdi,%rbx,4), %r8
	addq	$4, %r8
	movl	4(%rdi,%rbx,4), %esi
	movl	%esi, (%r15)
	cmpl	$0, 12(%rdi,%rbx,4)
	movl	(%rdi,%rbx,4), %ecx
	je	LBB0_18
## %bb.17:
	subl	%ecx, %r12d
	subl	%ecx, %r12d
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	addl	%eax, %eax
	jmp	LBB0_19
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_23:
	movl	%eax, %r13d
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%eax, %r13d
	movl	%eax, %esi
	addl	$8, %esi
	movq	%r15, %rdi
	callq	_av_shrink_packet
	jmp	LBB0_24
LBB0_18:
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	movl	8(%rdi,%rbx,4), %ecx
	leal	7(%rcx), %edi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edi
	sarl	$3, %edi
	cltd
	idivl	%edi
LBB0_19:
	addl	%esi, %eax
	movl	%eax, (%r8)
	jmp	LBB0_24
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_fourxm_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fourxm_read_packet
_fourxm_read_packet:                    ; @fourxm_read_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldp	x21, x26, [x0]
	mov	x22, sp
	mov	x1, sp
	mov	x0, x21
	mov	w2, #8
	bl	_avio_read
	tbnz	w0, #31, LBB0_22
; %bb.1:
	add	x22, x22, #4
	mov	w27, #20
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	add	w8, w8, #1
	str	w8, [x26]
	mov	x0, x21
	bl	_avio_rl32
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20]
	mov	x1, sp
	mov	w2, #8
	bl	_avio_read
	tbnz	w0, #31, LBB0_22
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	bl	_AV_RL32
	mov	x24, x0
	mov	x0, x22
	bl	_AV_RL32
	mov	x23, x0
	mov	x0, x21
	bl	_avio_feof
	cbnz	x0, LBB0_21
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w24, #129
	cmp	w8, #6
	b.hs	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmn	w23, #9
	b.hi	LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w23, #8
	mov	x0, x19
	bl	_av_new_packet
	cbnz	w0, LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26, #16]
	str	w8, [x19, #16]
	ldr	w8, [x26]
	str	w8, [x19]
	ldr	x0, [x20]
	bl	_avio_tell
	str	w0, [x19, #20]
	ldr	x0, [x19, #8]
	mov	x1, sp
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [x20]
	ldr	x8, [x19, #8]
	add	x1, x8, #8
	mov	x2, x23
	bl	_avio_read
	tbz	w0, #31, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_av_packet_unref
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, #128
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	cmp	w24, #135
	b.eq	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x23
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_avio_rl32
	mov	x25, x0
	mov	x0, x21
	mov	w1, #4
	bl	_avio_skip
	sub	w24, w23, #8
	ldr	w8, [x26, #4]
	cmp	w25, w8
	b.hs	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26, #8]
	umull	x9, w25, w27
	ldr	w8, [x8, x9]
	cmp	w8, #1
	b.ge	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x24
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_avio_skip
	b	LBB0_3
LBB0_17:
	mov	x23, x0
	add	w1, w0, #8
	mov	x0, x19
	bl	_av_shrink_packet
	b	LBB0_23
LBB0_18:
	ldr	x0, [x20]
	mov	x1, x19
	mov	x2, x24
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_21
; %bb.19:
	mov	x23, x0
	mov	w10, w25
	ldr	x11, [x26, #8]
	mov	w8, #20
	madd	x12, x10, x8, x11
	ldr	w8, [x12, #16]
	str	w8, [x19, #16]
	mov	x8, x12
	ldr	w9, [x8, #4]!
	str	w9, [x19]
	ldr	w13, [x12, #12]
	ldr	w12, [x12]
	cbz	w13, LBB0_25
; %bb.20:
	sub	w10, w24, w12, lsl #1
	sdiv	w10, w10, w12
	lsl	w10, w10, #1
	b	LBB0_26
LBB0_21:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_22:
	mov	x23, x0
LBB0_23:
	ldr	x8, [sp, #8]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.24:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_25:
	sdiv	w12, w24, w12
	mov	w13, #20
	madd	x10, x10, x13, x11
	ldr	w10, [x10, #8]
	add	w11, w10, #7
	cmp	w10, #0
	csel	w10, w11, w10, lt
	asr	w10, w10, #3
	sdiv	w10, w12, w10
LBB0_26:
	add	w9, w10, w9
	str	w9, [x8]
	b	LBB0_23
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_fourxm_read_packet
.subsections_via_symbols
