	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_file
_read_file:                             ## @read_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	%r14
	pushq	%rbx
	movl	$4144, %eax                     ## imm = 0x1030
	callq	____chkstk_darwin
	subq	%rax, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	$0, -4136(%rbp)
	movq	$0, -4144(%rbp)
	movq	_AVIO_FLAG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-4136(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_avio_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	-4144(%rbp), %rdi
	callq	_avio_open_dyn_buf
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movq	-4136(%rbp), %rdi
	leaq	-4128(%rbp), %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_avio_read
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	leaq	-4128(%rbp), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-4144(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_avio_write
	movq	-4136(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_avio_read
	testl	%eax, %eax
	jg	LBB0_5
LBB0_6:
	movq	-4144(%rbp), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_avio_w8
	leaq	-4136(%rbp), %rdi
	callq	_avio_closep
	movq	-4144(%rbp), %rdi
	leaq	-4152(%rbp), %rsi
	callq	_avio_close_dyn_buf
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	-4152(%rbp), %r14
	jmp	LBB0_8
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movq	%rbx, %rcx
	callq	_av_log
	jmp	LBB0_8
LBB0_10:
	leaq	-4136(%rbp), %rdi
	callq	_avio_closep
	xorl	%r14d, %r14d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	movq	%r14, %rax
	addq	$4144, %rsp                     ## imm = 0x1030
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_READ,4,2             ## @AVIO_FLAG_READ
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error opening file %s.\n"

	.no_dead_strip	_read_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_file
_read_file:                             ; @read_file
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w9, #4128
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #32
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	stp	xzr, xzr, [sp, #8]
Lloh5:
	adrp	x8, _AVIO_FLAG_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVIO_FLAG_READ@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	add	x0, sp, #16
	mov	x1, x19
	bl	_avio_open
	tbnz	w0, #31, LBB0_6
; %bb.1:
	add	x0, sp, #8
	bl	_avio_open_dyn_buf
	tbnz	w0, #31, LBB0_7
; %bb.2:
	ldr	x0, [sp, #16]
	add	x1, sp, #24
	mov	w2, #4096
	bl	_avio_read
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x2, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp, #8]
	add	x1, sp, #24
	bl	_avio_write
	ldr	x0, [sp, #16]
	add	x1, sp, #24
	mov	w2, #4096
	bl	_avio_read
	mov	x2, x0
	cmp	w0, #0
	b.gt	LBB0_4
LBB0_5:
	ldr	x0, [sp, #8]
	mov	w1, #0
	bl	_avio_w8
	add	x0, sp, #16
	bl	_avio_closep
	ldr	x0, [sp, #8]
	mov	x1, sp
	bl	_avio_close_dyn_buf
	ldr	x8, [sp]
	cmp	w0, #0
	csel	x0, xzr, x8, lt
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	mov	x3, x19
	bl	_av_log
	b	LBB0_8
LBB0_7:
	add	x0, sp, #16
	bl	_avio_closep
LBB0_8:
	mov	x0, #0
LBB0_9:
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #32
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_READ,4,2             ; @AVIO_FLAG_READ
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error opening file %s.\n"

	.no_dead_strip	_read_file
.subsections_via_symbols
