	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apprentice_1
_apprentice_1:                          ## @apprentice_1
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -56(%rbp)
	movl	$0, -44(%rbp)
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rcx, %r15
	movq	%rdi, %rbx
	movq	$0, 8(%rdi)
	movq	_magicsize@GOTPCREL(%rip), %rax
	movq	_FILE_MAGICSIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	cmpq	%r8, (%rax)
	jne	LBB0_2
## %bb.3:
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rsi, (%rbx)
	movq	_FILE_COMPILE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_6
## %bb.4:
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	movl	%r13d, %r8d
	callq	_apprentice_load
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	callq	_apprentice_compile
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi
	callq	_free
	jmp	LBB0_14
LBB0_2:
	leaq	L_.str(%rip), %rdx
	movl	$4, %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_file_error
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	callq	_apprentice_map
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.9:
	cmpq	$0, -56(%rbp)
	je	LBB0_10
LBB0_11:
	movl	%eax, %r12d
	movl	$40, %edi
	callq	_malloc
	movq	-56(%rbp), %rdi
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rdi, 32(%rax)
	movl	-44(%rbp), %ecx
	movl	%ecx, 24(%rax)
	movl	%r12d, (%rax)
	movq	8(%r15), %rcx
	movq	%rax, 16(%rcx)
	movq	%rcx, 8(%rax)
	movq	%r15, 16(%rax)
	movq	%rax, 8(%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_7:
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	movl	%r13d, %r8d
	callq	_apprentice_load
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	xorl	%eax, %eax
	cmpq	$0, -56(%rbp)
	jne	LBB0_11
LBB0_10:
	movl	-44(%rbp), %edx
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_file_delmagic
	jmp	LBB0_14
LBB0_12:
	movl	-44(%rbp), %edx
	movl	%r12d, %esi
	callq	_file_delmagic
	movq	%rbx, %rdi
	movl	$40, %esi
	callq	_file_oomem
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_magicsize,8,3                  ## @magicsize
	.comm	_FILE_MAGICSIZE,8,3             ## @FILE_MAGICSIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"magic element size %lu != %lu"

	.comm	_FILE_COMPILE,4,2               ## @FILE_COMPILE
	.no_dead_strip	_apprentice_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apprentice_1
_apprentice_1:                          ; @apprentice_1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	str	wzr, [sp, #4]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _magicsize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _magicsize@GOTPAGEOFF]
	str	xzr, [x0, #8]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _FILE_MAGICSIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FILE_MAGICSIZE@GOTPAGEOFF]
Lloh5:
	ldr	x4, [x9]
	cmp	x8, x4
	b.ne	LBB0_5
; %bb.2:
	mov	x22, x2
	mov	x21, x1
	str	x1, [x19]
Lloh6:
	adrp	x8, _FILE_COMPILE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FILE_COMPILE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_8
; %bb.3:
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x19
	mov	x3, x21
	mov	x4, x22
	bl	_apprentice_load
	cbnz	w0, LBB0_6
; %bb.4:
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x19
	mov	x3, x21
	bl	_apprentice_compile
	mov	x19, x0
	ldr	x0, [sp, #8]
	bl	_free
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	mov	w3, #4
	bl	_file_error
LBB0_6:
	mov	w19, #-1
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	mov	x20, x3
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x19
	mov	x3, x21
	bl	_apprentice_map
	mov	x23, x0
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.9:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_14
LBB0_10:
	mov	w0, #40
	bl	_malloc
	ldr	x8, [sp, #8]
	cbz	x0, LBB0_15
; %bb.11:
	mov	w19, #0
	str	x8, [x0, #32]
	ldr	w8, [sp, #4]
	str	w8, [x0, #24]
	str	w23, [x0]
	ldr	x8, [x20, #8]
	str	x0, [x8, #16]
	stp	x8, x20, [x0, #8]
	str	x0, [x20, #8]
	b	LBB0_7
LBB0_12:
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x0, x19
	mov	x3, x21
	mov	x4, x22
	bl	_apprentice_load
	cbnz	w0, LBB0_6
; %bb.13:
	mov	w23, #0
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_10
LBB0_14:
	ldr	w2, [sp, #4]
	mov	x0, #0
	mov	x1, x23
	bl	_file_delmagic
	b	LBB0_6
LBB0_15:
	ldr	w2, [sp, #4]
	mov	x0, x8
	mov	x1, x23
	bl	_file_delmagic
	mov	x0, x19
	mov	w1, #40
	bl	_file_oomem
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_magicsize,8,3                  ; @magicsize
	.comm	_FILE_MAGICSIZE,8,3             ; @FILE_MAGICSIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"magic element size %lu != %lu"

	.comm	_FILE_COMPILE,4,2               ; @FILE_COMPILE
	.no_dead_strip	_apprentice_1
.subsections_via_symbols
