	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_whole_file
_read_whole_file:                       ## @read_whole_file
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r13
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %ebx
	movl	%r15d, %eax
	subl	%ecx, %eax
	cmpl	$1023, %eax                     ## imm = 0x3FF
	jg	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	%r15d, %r15d
	movl	%r15d, %edi
	movl	$8192, %esi                     ## imm = 0x2000
	callq	_FFMAX
	movl	%eax, %edi
	movl	%r12d, %esi
	callq	_FFMIN
	movl	%eax, %r15d
	subl	%ebx, %eax
	cmpl	$2, %eax
	jl	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_av_realloc_f
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edx
	notl	%edx
	addl	%r15d, %edx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_avio_read
                                        ## kill: def $eax killed $eax def $rax
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	(%rax,%rbx), %ecx
	testl	%eax, %eax
	jns	LBB0_1
	jmp	LBB0_9
LBB0_10:
	movslq	%ebx, %rax
	movb	$0, (%r14,%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	jmp	LBB0_11
LBB0_3:
	movq	_EFBIG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	xorl	%r14d, %r14d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_av_free
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFBIG,4,2                      ## @EFBIG
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_read_whole_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_whole_file
_read_whole_file:                       ; @read_whole_file
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	mov	x19, #0
	mov	w8, #0
	mov	w24, #0
Lloh0:
	adrp	x25, _EFBIG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EFBIG@GOTPAGEOFF]
Lloh2:
	adrp	x26, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x26, [x26, _ENOMEM@GOTPAGEOFF]
Lloh4:
	adrp	x27, _AVERROR_EOF@GOTPAGE
Lloh5:
	ldr	x27, [x27, _AVERROR_EOF@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x8
	sub	w8, w24, w8
	cmp	w8, #1023
	b.gt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	lsl	w0, w24, #1
	mov	w1, #8192
	bl	_FFMAX
	mov	x1, x22
	bl	_FFMIN
	sub	w8, w0, w21
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x24, x0
	mov	x0, x19
	mov	x1, x24
	mov	w2, #1
	bl	_av_realloc_f
	mov	x19, x0
	cbz	x0, LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mvn	w8, w21
	add	w2, w24, w8
	mov	x0, x23
	mov	x1, x19
	bl	_avio_read
	ldr	w8, [x27]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w0, w21
	tbz	w0, #31, LBB0_1
	b	LBB0_9
LBB0_6:
	strb	wzr, [x19, w21, sxtw]
	str	x19, [x20]
	b	LBB0_10
LBB0_7:
	mov	x25, x26
LBB0_8:
	ldr	w0, [x25]
	bl	_AVERROR
	mov	x21, x0
LBB0_9:
	mov	x0, x19
	bl	_av_free
LBB0_10:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EFBIG,4,2                      ; @EFBIG
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_read_whole_file
.subsections_via_symbols
