	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_g_metadata_read                ## -- Begin function g_metadata_read
	.p2align	4, 0x90
_g_metadata_read:                       ## @g_metadata_read
	.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	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %rbx
	xorl	%esi, %esi
	callq	_g_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_g_mediasize
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r15d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	callq	_g_sectorsize
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.5:
	movl	%eax, %r13d
	xorl	%edi, %edi
	cmpl	%r14d, %eax
	setge	%dil
	callq	_assert
	movl	%r13d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	subl	%r13d, %r15d
	movl	%r12d, %edi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	callq	_pread
	cmpl	%r13d, %eax
	jne	LBB0_8
## %bb.9:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.10:
	leaq	-56(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_std_metadata_decode
	movl	-56(%rbp), %edi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_memmove
	xorl	%ebx, %ebx
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_14:
	movl	%r12d, %edi
	callq	_g_close
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_g_metadata_read                ; -- Begin function g_metadata_read
	.p2align	2
_g_metadata_read:                       ; @g_metadata_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	w1, #0
	bl	_g_open
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x0
	bl	_g_mediasize
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.2:
	mov	x24, x0
	mov	x0, x19
	bl	_g_sectorsize
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.3:
	mov	x25, x0
	cmp	w0, w20
	cset	w0, ge
	bl	_assert
	mov	x0, x25
	bl	_malloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x23, x0
	sub	w3, w24, w25
	mov	x0, x19
	mov	x1, x23
	mov	x2, x25
	bl	_pread
	cmp	w0, w25
	b.ne	LBB0_11
; %bb.5:
	cbz	x22, LBB0_12
; %bb.6:
	add	x1, sp, #8
	mov	x0, x23
	bl	_std_metadata_decode
	ldr	w0, [sp, #8]
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.7:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_8:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_14
LBB0_9:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_10:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	b	LBB0_14
LBB0_11:
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_12:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_memmove
	mov	w20, #0
LBB0_13:
	mov	x0, x23
	bl	_free
LBB0_14:
	mov	x0, x19
	bl	_g_close
LBB0_15:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
