	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_read_trex
_mov_read_trex:                         ## @mov_read_trex
	.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), %rsi
	leal	1(%rsi), %eax
	movslq	%eax, %rcx
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movabsq	$-3689348814741910323, %rdx     ## imm = 0xCCCCCCCCCCCCCCCD
	mulq	%rdx
	shrq	$5, %rdx
	cmpq	%rdx, %rcx
	jae	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	addq	$8, %rdi
	incq	%rsi
	movl	$40, %edx
	callq	_av_reallocp_array
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	(%rbx), %r12
	movq	8(%rbx), %r15
	leaq	1(%r12), %rax
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_avio_r8
	movq	%r14, %rdi
	callq	_avio_rb24
	movq	%r14, %rdi
	callq	_avio_rb32
	leaq	(%r12,%r12,4), %rbx
	movq	%rax, 32(%r15,%rbx,8)
	movq	%r14, %rdi
	callq	_avio_rb32
	movq	%rax, 24(%r15,%rbx,8)
	movq	%r14, %rdi
	callq	_avio_rb32
	movq	%rax, 16(%r15,%rbx,8)
	movq	%r14, %rdi
	callq	_avio_rb32
	movq	%rax, 8(%r15,%rbx,8)
	movq	%r14, %rdi
	callq	_avio_rb32
	movq	%rax, (%r15,%rbx,8)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_3:
	movq	$0, (%rbx)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_NOPTS_VALUE,4,2             ## @AV_NOPTS_VALUE
	.no_dead_strip	_mov_read_trex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_read_trex
_mov_read_trex:                         ; @mov_read_trex
	.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
	ldr	x8, [x0]
	add	w9, w8, #1
	sxtw	x9, w9
Lloh0:
	adrp	x10, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _UINT_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x10, [x10]
	mov	x11, #-3689348814741910324
	movk	x11, #52429
	umulh	x10, x10, x11
	cmp	x9, x10, lsr #5
	b.hs	LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	add	x0, x0, #8
	add	x1, x8, #1
	mov	w2, #40
	bl	_av_reallocp_array
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x20, #16]
	str	w8, [x9]
	ldp	x22, x21, [x20]
	add	x8, x22, #1
	str	x8, [x20]
	mov	x0, x19
	bl	_avio_r8
	mov	x0, x19
	bl	_avio_rb24
	mov	x0, x19
	bl	_avio_rb32
	mov	w8, #40
	madd	x20, x22, x8, x21
	str	x0, [x20, #32]
	mov	x0, x19
	bl	_avio_rb32
	str	x0, [x20, #24]
	mov	x0, x19
	bl	_avio_rb32
	str	x0, [x20, #16]
	mov	x0, x19
	bl	_avio_rb32
	str	x0, [x20, #8]
	mov	x0, x19
	bl	_avio_rb32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x20]
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	str	xzr, [x20]
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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_NOPTS_VALUE,4,2             ; @AV_NOPTS_VALUE
	.no_dead_strip	_mov_read_trex
.subsections_via_symbols
