	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rsi, %r14
	movl	%edi, %ebx
	movq	_MAGIC_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_magic_open
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_magic_load
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$2, %ebx
	jl	LBB0_7
## %bb.5:
	cmpl	$3, %ebx
	jne	LBB0_6
## %bb.8:
	movq	8(%r14), %rsi
	movq	%r13, %rdi
	callq	_magic_file
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r15
	movq	16(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %rbx
	leaq	-48(%rbp), %rsi
	movq	%rax, %rdi
	callq	_slurp
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_fclose
	movq	8(%r14), %rsi
	leaq	L_.str.6(%rip), %rdi
	movq	%r15, %rdx
	callq	_printf
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
	jmp	LBB0_14
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$10, %eax
	jmp	LBB0_14
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_magic_error
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$11, %eax
	jmp	LBB0_14
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_7:
	movq	%r13, %rdi
	callq	_magic_close
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	8(%r14), %r14
	movq	%r13, %rdi
	callq	_magic_error
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$12, %eax
	jmp	LBB0_14
LBB0_11:
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_main.cold.1
	movl	$13, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function main.cold.1
_main.cold.1:                           ## @main.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rdx
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%edi, %edi
	popq	%rbp
	jmp	_perror                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAGIC_NONE,4,2                 ## @MAGIC_NONE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR opening MAGIC_NONE: out of memory\n"

L_.str.1:                               ## @.str.1
	.asciz	"ERROR loading with NULL file: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Usage: test TEST-FILE RESULT\n"

L_.str.3:                               ## @.str.3
	.asciz	"ERROR loading file %s: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"r"

L_.str.5:                               ## @.str.5
	.asciz	"ERROR opening `%s': "

L_.str.6:                               ## @.str.6
	.asciz	"%s: %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"Error: result was\n%s\nexpected:\n%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MAGIC_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAGIC_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_magic_open
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x1, #0
	bl	_magic_load
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.2:
	cmp	w21, #2
	b.lt	LBB0_11
; %bb.3:
	cmp	w21, #3
	b.ne	LBB0_10
; %bb.4:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_magic_file
	cbz	x0, LBB0_13
; %bb.5:
	mov	x21, x0
	ldr	x0, [x20, #16]
Lloh3:
	adrp	x1, l_.str.4@PAGE
Lloh4:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_14
; %bb.6:
	mov	x23, x0
	add	x1, sp, #24
	bl	_slurp
	mov	x22, x0
	mov	x0, x23
	bl	_fclose
	ldr	x1, [x20, #8]
Lloh5:
	adrp	x0, l_.str.6@PAGE
Lloh6:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x2, x21
	bl	_printf
	mov	x0, x21
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.7:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	stp	x21, x22, [sp]
Lloh10:
	adrp	x1, l_.str.7@PAGE
Lloh11:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	b	LBB0_12
LBB0_8:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #10
	b	LBB0_12
LBB0_9:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_magic_error
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	w0, #11
	b	LBB0_12
LBB0_10:
Lloh22:
	adrp	x8, _stderr@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
LBB0_11:
	mov	x0, x19
	bl	_magic_close
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #96
	ret
LBB0_13:
Lloh27:
	adrp	x8, _stderr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh29:
	ldr	w21, [x8]
	ldr	x20, [x20, #8]
	mov	x0, x19
	bl	_magic_error
	stp	x20, x0, [sp]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	w0, #12
	b	LBB0_12
LBB0_14:
	add	x0, x20, #16
	bl	_main.cold.1
	mov	w0, #13
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function main.cold.1
_main.cold.1:                           ; @main.cold.1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
Lloh32:
	adrp	x8, _stderr@GOTPAGE
Lloh33:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	x9, [sp]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	mov	x0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	b	_perror
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MAGIC_NONE,4,2                 ; @MAGIC_NONE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR opening MAGIC_NONE: out of memory\n"

l_.str.1:                               ; @.str.1
	.asciz	"ERROR loading with NULL file: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Usage: test TEST-FILE RESULT\n"

l_.str.3:                               ; @.str.3
	.asciz	"ERROR loading file %s: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"r"

l_.str.5:                               ; @.str.5
	.asciz	"ERROR opening `%s': "

l_.str.6:                               ; @.str.6
	.asciz	"%s: %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"Error: result was\n%s\nexpected:\n%s\n"

.subsections_via_symbols
