	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_graph
_read_graph:                            ## @read_graph
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rsi
	movq	_AVIO_FLAG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rdi
	callq	_avio_open
	testq	%rax, %rax
	js	LBB0_7
## %bb.1:
	movq	-32(%rbp), %rdi
	callq	_avio_size
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_av_malloc
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %rbx
	movq	-32(%rbp), %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_avio_read
	movq	%rax, %r15
	leaq	-32(%rbp), %rdi
	callq	_avio_closep
	cmpq	%r14, %r15
	jne	LBB0_6
## %bb.3:
	xorl	%eax, %eax
	callq	_TF_NewBuffer
	movq	%rbx, 16(%rax)
	movq	%r14, (%rax)
	movq	_free_buffer@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	jmp	LBB0_8
LBB0_5:
	leaq	-32(%rbp), %rdi
	callq	_avio_closep
	jmp	LBB0_7
LBB0_6:
	leaq	-40(%rbp), %rdi
	callq	_av_freep
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIO_FLAG_READ,4,2             ## @AVIO_FLAG_READ
	.comm	_free_buffer,4,2                ## @free_buffer
	.no_dead_strip	_read_graph
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_graph
_read_graph:                            ; @read_graph
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x1, x0
Lloh0:
	adrp	x8, _AVIO_FLAG_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVIO_FLAG_READ@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, sp
	bl	_avio_open
	tbnz	x0, #63, LBB0_6
; %bb.1:
	ldr	x0, [sp]
	bl	_avio_size
	mov	x19, x0
	bl	_av_malloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	x0, [sp]
	mov	x1, x20
	mov	x2, x19
	bl	_avio_read
	mov	x21, x0
	mov	x0, sp
	bl	_avio_closep
	cmp	x21, x19
	b.ne	LBB0_5
; %bb.3:
	bl	_TF_NewBuffer
	str	x20, [x0, #16]
	str	x19, [x0]
Lloh3:
	adrp	x8, _free_buffer@GOTPAGE
Lloh4:
	ldr	x8, [x8, _free_buffer@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	b	LBB0_7
LBB0_4:
	mov	x0, sp
	bl	_avio_closep
	b	LBB0_6
LBB0_5:
	add	x0, sp, #8
	bl	_av_freep
LBB0_6:
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIO_FLAG_READ,4,2             ; @AVIO_FLAG_READ
	.comm	_free_buffer,4,2                ; @free_buffer
	.no_dead_strip	_read_graph
.subsections_via_symbols
