	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readfile
_readfile:                              ## @readfile
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SPL_BUFSIZ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_EXCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_FILMOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_open
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_frecverr
LBB0_2:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_ack
	testq	%r13, %r13
	je	LBB0_10
## %bb.3:
	movl	(%rbx), %eax
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movslq	%eax, %r12
	leaq	(%rbx,%r12), %rax
	movq	%r13, %rcx
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	subq	%rbx, %rcx
	cmpq	%r13, %rax
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	cmovaq	%rcx, %r12
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movslq	%r14d, %rax
	addq	%rax, %r13
	subq	%rax, %r12
	je	LBB0_8
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_read
	movl	%eax, %r14d
	testl	%eax, %eax
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_frecverr
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_SPL_BUFSIZ@GOTPCREL(%rip), %r14
	movslq	(%r14), %rax
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	leaq	(%rbx,%rax), %rcx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	cmpq	%r13, %rcx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	cmovbeq	%rax, %r12
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_write
	cmpq	%r12, %rax
	jne	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	(%r14), %rax
	addq	%rax, %rbx
	cmpq	%r13, %rbx
	jb	LBB0_4
LBB0_10:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_17:
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_frecverr
LBB0_11:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_noresponse
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	callq	_unlink
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
	callq	_ack
	movl	$1, %r14d
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.16:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SPL_BUFSIZ,4,2                 ## @SPL_BUFSIZ
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_FILMOD,4,2                     ## @FILMOD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: readfile: error on open(%s): %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
L_.str.1:                               ## @.str.1
	.asciz	"%s: lost connection"

L_.str.2:                               ## @.str.2
	.asciz	"%s: write error on close(%s)"

	.no_dead_strip	_readfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readfile
_readfile:                              ; @readfile
	.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, #32
	mov	x21, x2
	mov	x19, x1
	mov	x20, 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	x22, _SPL_BUFSIZ@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SPL_BUFSIZ@GOTPAGEOFF]
	ldr	w8, [x22]
	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	x27, x9, x8
	mov	sp, x27
Lloh7:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _O_WRONLY@GOTPAGE
Lloh14:
	ldr	x10, [x10, _O_WRONLY@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh15:
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh16:
	adrp	x8, _FILMOD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FILMOD@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_open
	stur	w0, [x29, #-92]                 ; 4-byte Folded Spill
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w24, [x20]
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp, #-16]!
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	bl	_frecverr
	add	sp, sp, #16
LBB0_2:
	stur	x19, [x29, #-104]               ; 8-byte Folded Spill
	bl	_ack
	cbz	x21, LBB0_10
; %bb.3:
	mov	x19, #0
	ldr	w8, [x22]
Lloh24:
	adrp	x28, _STDOUT_FILENO@GOTPAGE
Lloh25:
	ldr	x28, [x28, _STDOUT_FILENO@GOTPAGEOFF]
Lloh26:
	adrp	x24, l_.str.1@PAGE
Lloh27:
	add	x24, x24, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	sxtw	x8, w8
	sub	x23, x21, x19
	add	x9, x19, x8
	mov	x22, x21
	cmp	x9, x21
	csel	x25, x23, x8, hi
	mov	x21, x27
	mov	x26, x27
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	sxtw	x8, w27
	add	x26, x26, x8
	subs	x25, x25, x8
	b.eq	LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	mov	x1, x26
	mov	x2, x25
	bl	_read
	mov	x27, x0
	cmp	w0, #0
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w1, [x20]
	mov	x0, x24
	bl	_frecverr
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh28:
	adrp	x26, _SPL_BUFSIZ@GOTPAGE
Lloh29:
	ldr	x26, [x26, _SPL_BUFSIZ@GOTPAGEOFF]
	ldrsw	x8, [x26]
	add	x9, x19, x8
	cmp	x9, x22
	csel	x25, x23, x8, hi
	ldur	w0, [x29, #-92]                 ; 4-byte Folded Reload
	mov	x27, x21
	mov	x1, x21
	mov	x2, x25
	bl	_write
	cmp	x0, x25
	b.ne	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x26]
	add	x19, x19, x8
	cmp	x19, x22
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	mov	x21, x22
	b.lo	LBB0_4
LBB0_10:
	ldur	w0, [x29, #-92]                 ; 4-byte Folded Reload
	bl	_close
	ldur	x19, [x29, #-104]               ; 8-byte Folded Reload
	bl	_noresponse
	cbz	x0, LBB0_15
LBB0_11:
	mov	x0, x19
	mov	w1, #47
	bl	_strchr
	cbnz	x0, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_unlink
LBB0_13:
	mov	w0, #0
	b	LBB0_16
LBB0_14:
	ldur	w0, [x29, #-92]                 ; 4-byte Folded Reload
	bl	_close
	ldr	w1, [x20]
	ldur	x19, [x29, #-104]               ; 8-byte Folded Reload
	str	x19, [sp, #-16]!
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_frecverr
	add	sp, sp, #16
	bl	_noresponse
	cbnz	x0, LBB0_11
LBB0_15:
	bl	_ack
	mov	w0, #1
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	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_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SPL_BUFSIZ,4,2                 ; @SPL_BUFSIZ
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_FILMOD,4,2                     ; @FILMOD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: readfile: error on open(%s): %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
l_.str.1:                               ; @.str.1
	.asciz	"%s: lost connection"

l_.str.2:                               ; @.str.2
	.asciz	"%s: write error on close(%s)"

	.no_dead_strip	_readfile
.subsections_via_symbols
