	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readshovel
_readshovel:                            ## @readshovel
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movl	(%r14), %r15d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %r12d
	movl	$1, %edi
	callq	_rump_pub_lwproc_newlwp
	movq	%rbx, %r13
	addq	$4, %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rax
	xorl	%edi, %edi
	movq	_PUFFS_VFS_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setb	%dil
	callq	_assert
	movq	(%rbx), %rax
	shlq	$2, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	16(%rcx), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	(%rax)
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %r14d
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_xwrite
	cmpl	%r14d, %eax
	jne	LBB0_11
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_rump_sys_read
	testl	%eax, %eax
	jle	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %eax
	xorl	%edi, %edi
	movq	_BUFSIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setl	%dil
	callq	_assert
	movl	(%rbx), %edx
	addl	$-4, %edx
	movl	%r12d, %edi
	movq	%r13, %rsi
	callq	_rump_sys_read
	testl	%eax, %eax
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%rbx), %edi
	callq	_PUFFSOP_OPCLASS
	movq	_PUFFSOP_VFS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%rbx), %edi
	callq	_PUFFSOP_OPCLASS
	movq	_PUFFSOP_VN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rax
	xorl	%edi, %edi
	movq	_PUFFS_VN_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setb	%dil
	callq	_assert
	movq	(%rbx), %rax
	shlq	$2, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addq	8(%rcx), %rax
	jmp	LBB0_9
LBB0_2:
	movl	%eax, %r14d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_12
LBB0_4:
	movl	%eax, %r14d
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
LBB0_12:
	movl	%r14d, %edx
	callq	_fprintf
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.13:
	movq	_mayquit@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.15:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%eax, %eax
	callq	_abort
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFSIZE,4,2                    ## @BUFSIZE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"readshovel r1 %zd / %d\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"readshovel r2 %zd / %d\n"

	.comm	_PUFFSOP_VFS,8,3                ## @PUFFSOP_VFS
	.comm	_PUFFS_VFS_MAX,8,3              ## @PUFFS_VFS_MAX
	.comm	_PUFFSOP_VN,8,3                 ## @PUFFSOP_VN
	.comm	_PUFFS_VN_MAX,8,3               ## @PUFFS_VN_MAX
L_.str.2:                               ## @.str.2
	.asciz	"readshovel write %zd / %d\n"

	.comm	_mayquit,4,2                    ## @mayquit
	.no_dead_strip	_readshovel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readshovel
_readshovel:                            ; @readshovel
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x25, _BUFSIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _BUFSIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldp	w21, w22, [x0]
	mov	w0, #1
	bl	_rump_pub_lwproc_newlwp
	add	x23, x20, #4
Lloh7:
	adrp	x26, _PUFFSOP_VFS@GOTPAGE
Lloh8:
	ldr	x26, [x26, _PUFFSOP_VFS@GOTPAGEOFF]
Lloh9:
	adrp	x27, _PUFFS_VFS_MAX@GOTPAGE
Lloh10:
	ldr	x27, [x27, _PUFFS_VFS_MAX@GOTPAGEOFF]
Lloh11:
	adrp	x28, _PUFFSOP_VN@GOTPAGE
Lloh12:
	ldr	x28, [x28, _PUFFSOP_VN@GOTPAGEOFF]
	b	LBB0_4
LBB0_1:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x27]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #16]
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x20]
	add	x8, x8, x9, lsl #2
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w24, [x20]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	bl	_xwrite
	cmp	w0, w24
	b.ne	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x20
	mov	w2, #4
	bl	_rump_sys_read
	cmp	w0, #0
	b.le	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x25]
	cmp	w8, w9
	cset	w0, lt
	bl	_assert
	ldr	w8, [x20]
	sub	w2, w8, #4
	mov	x0, x22
	mov	x1, x23
	bl	_rump_sys_read
	cmp	w0, #0
	b.le	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #8]
	bl	_PUFFSOP_OPCLASS
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #8]
	bl	_PUFFSOP_OPCLASS
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
Lloh13:
	adrp	x9, _PUFFS_VN_MAX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PUFFS_VN_MAX@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #8]
	b	LBB0_2
LBB0_9:
	mov	x24, x0
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x24, x0
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _errno@GOTPAGE
Lloh28:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh32:
	adrp	x8, _stderr@GOTPAGE
Lloh33:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x8, _errno@GOTPAGE
Lloh36:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_12:
	mov	x2, x24
	bl	_fprintf
	cbz	w24, LBB0_14
; %bb.13:
Lloh40:
	adrp	x8, _mayquit@GOTPAGE
Lloh41:
	ldr	x8, [x8, _mayquit@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	cbz	w8, LBB0_16
LBB0_14:
	ldur	x8, [x29, #-88]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.15:
	mov	x0, #0
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	bl	_abort
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFSIZE,4,2                    ; @BUFSIZE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"readshovel r1 %zd / %d\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"readshovel r2 %zd / %d\n"

	.comm	_PUFFSOP_VFS,8,3                ; @PUFFSOP_VFS
	.comm	_PUFFS_VFS_MAX,8,3              ; @PUFFS_VFS_MAX
	.comm	_PUFFSOP_VN,8,3                 ; @PUFFSOP_VN
	.comm	_PUFFS_VN_MAX,8,3               ; @PUFFS_VN_MAX
l_.str.2:                               ; @.str.2
	.asciz	"readshovel write %zd / %d\n"

	.comm	_mayquit,4,2                    ; @mayquit
	.no_dead_strip	_readshovel
.subsections_via_symbols
