	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_magic                     ## -- Begin function read_magic
	.p2align	4, 0x90
_read_magic:                            ## @read_magic
	.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	%rdi, %r12
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	_bootext_block@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_ERRS
	movl	$-1, %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%rax, %r14
	movq	$0, (%rbx)
	movq	%r12, %rdi
	movl	$2, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fread
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.4:
	movq	(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_ERRS
	movl	$-1, %ebx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_fclose
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_bootext_block,8,3              ## @bootext_block
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

L_.str.1:                               ## @.str.1
	.asciz	"unable to open file: %s"

L_.str.2:                               ## @.str.2
	.asciz	"unable to read from file: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_magic                     ; -- Begin function read_magic
	.p2align	2
_read_magic:                            ; @read_magic
	.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
	mov	x20, x0
Lloh0:
	adrp	x22, _errno@GOTPAGE
Lloh1:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	str	xzr, [x22]
Lloh2:
	adrp	x21, _bootext_block@GOTPAGE
Lloh3:
	ldr	x21, [x21, _bootext_block@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	ldr	x8, [x22]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	ldr	w1, [x8]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERRS
	mov	w20, #-1
	b	LBB0_6
LBB0_2:
	mov	x19, x0
	str	xzr, [x22]
	mov	x0, x20
	mov	w1, #2
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	w1, [x8]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERRS
	mov	w20, #-1
	b	LBB0_5
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_fclose
LBB0_6:
	mov	x0, x20
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_bootext_block,8,3              ; @bootext_block
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

l_.str.1:                               ; @.str.1
	.asciz	"unable to open file: %s"

l_.str.2:                               ; @.str.2
	.asciz	"unable to read from file: %s"

.subsections_via_symbols
