	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_read                       ## -- Begin function sys_read
	.p2align	4, 0x90
_sys_read:                              ## @sys_read
	.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	%rdx, %r12
	movl	%esi, %r14d
	movl	%edi, %ebx
	movslq	%edi, %rsi
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_STRACE
	leal	1(%r12), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_f_get
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movl	8(%rbx), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	__EISDIR@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	__EBADF@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rbx
LBB0_10:
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_11
LBB0_1:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_11:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	*(%rax)
	movq	%rax, %rbx
	movb	$0, (%r15,%rax)
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_STRACE
	movl	%r14d, %edi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_user_write
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read(%d, 0x%x, %d)"

	.comm	__ENOMEM,8,3                    ## @_ENOMEM
	.comm	__EBADF,8,3                     ## @_EBADF
	.comm	__EISDIR,8,3                    ## @_EISDIR
L_.str.1:                               ## @.str.1
	.asciz	" \"%.99s\""

	.comm	__EFAULT,8,3                    ## @_EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_read                       ; -- Begin function sys_read
	.p2align	2
_sys_read:                              ; @sys_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x20, x1
	mov	x22, x0
	sxtw	x1, w22
	stp	x20, x2, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_STRACE
	add	w0, w21, #1
	bl	_malloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x0, x22
	bl	_f_get
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w0, [x22, #8]
	bl	_S_ISDIR
	cbz	x0, LBB0_7
; %bb.4:
Lloh2:
	adrp	x8, __EISDIR@GOTPAGE
Lloh3:
	ldr	x8, [x8, __EISDIR@GOTPAGEOFF]
Lloh4:
	ldr	x20, [x8]
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x8, __EBADF@GOTPAGE
Lloh6:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
Lloh7:
	ldr	x20, [x8]
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, __ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, __ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	x20, [x8]
	b	LBB0_9
LBB0_7:
	ldr	x8, [x22]
	ldr	x8, [x8]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	blr	x8
	mov	x21, x0
	strb	wzr, [x19, x0]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_STRACE
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_user_write
Lloh13:
	adrp	x8, __EFAULT@GOTPAGE
Lloh14:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x20, x21, x8, eq
LBB0_8:
	mov	x0, x19
	bl	_free
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read(%d, 0x%x, %d)"

	.comm	__ENOMEM,8,3                    ; @_ENOMEM
	.comm	__EBADF,8,3                     ; @_EBADF
	.comm	__EISDIR,8,3                    ; @_EISDIR
l_.str.1:                               ; @.str.1
	.asciz	" \"%.99s\""

	.comm	__EFAULT,8,3                    ; @_EFAULT
.subsections_via_symbols
