	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read                           ## -- Begin function read
	.p2align	4, 0x90
_read:                                  ## @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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SOPEN_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jbe	LBB0_5
## %bb.1:
	movq	_files@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movslq	%edi, %rbx
	shlq	$6, %rbx
	leaq	(%r12,%rbx), %r15
	movl	(%r15), %eax
	movq	_F_READ@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	je	LBB0_5
## %bb.2:
	movq	%rsi, %r13
	movq	_F_RAW@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.3:
	movl	$4, %edi
	callq	_twiddle
	movq	56(%r12,%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	48(%r12,%rbx), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%r14), %r15d
	movq	8(%r12,%rbx), %rdi
	callq	_btodb
	leaq	-48(%rbp), %r9
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	movl	%eax, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	callq	*-80(%rbp)                      ## 8-byte Folded Reload
	movq	%rax, %rcx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_7
## %bb.4:
	leaq	(%r12,%rbx), %rax
	addq	$8, %rax
	movq	-48(%rbp), %rcx
	addq	%rcx, (%rax)
	movl	-48(%rbp), %eax
	jmp	LBB0_7
LBB0_5:
	movq	_EBADF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_6:
	movl	$-1, %eax
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rdx, -48(%rbp)
	leaq	(%r12,%rbx), %r14
	addq	$16, %r14
	movq	%rdx, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_imin
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r12
	movslq	16(%r14), %rsi
	addq	8(%r14), %rsi
	movq	%r13, %rdi
	movq	%rax, %rdx
	callq	_memmove
	addl	%r12d, 16(%r14)
	subq	%r12, (%r14)
	movq	-48(%rbp), %rbx
	subq	%r12, %rbx
	movq	%rbx, -48(%rbp)
	je	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	addq	%r12, %r13
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_SOPEN_RASIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %rbx
	jae	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	24(%r14), %rax
	movq	%r15, %rdi
	leaq	-64(%rbp), %rcx
	callq	*(%rax)
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$0, 16(%r14)
	movq	_SOPEN_RASIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	-64(%rbp), %rax
	movq	%rax, (%r14)
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rbx
	jmp	LBB0_9
LBB0_17:
	movq	24(%r14), %rax
	leaq	-64(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	*(%rax)
	movq	%rax, %rcx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	%rcx, (%rax)
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_7
## %bb.18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subl	-64(%rbp), %eax
	jmp	LBB0_22
LBB0_20:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subl	-48(%rbp), %eax
	jmp	LBB0_22
LBB0_21:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_22:
                                        ## kill: def $eax killed $eax killed $rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_files,8,3                      ## @files
	.comm	_SOPEN_MAX,4,2                  ## @SOPEN_MAX
	.comm	_F_READ,4,2                     ## @F_READ
	.comm	_EBADF,8,3                      ## @EBADF
	.comm	_errno,8,3                      ## @errno
	.comm	_F_RAW,4,2                      ## @F_RAW
	.comm	_SOPEN_RASIZE,8,3               ## @SOPEN_RASIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read                           ; -- Begin function read
	.p2align	2
_read:                                  ; @read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _SOPEN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOPEN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ls	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _files@GOTPAGE
Lloh4:
	ldr	x8, [x8, _files@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	sxtw	x23, w0
	add	x21, x22, x23, lsl #6
	ldr	w8, [x21]
Lloh6:
	adrp	x24, _F_READ@GOTPAGE
Lloh7:
	ldr	x24, [x24, _F_READ@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	mov	x19, x2
	mov	x20, x1
Lloh8:
	adrp	x9, _F_RAW@GOTPAGE
Lloh9:
	ldr	x9, [x9, _F_RAW@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	mov	w0, #4
	bl	_twiddle
	add	x23, x22, x23, lsl #6
	ldr	x0, [x23, #8]!
	ldr	x8, [x23, #48]
	ldr	x25, [x8]
	ldr	w21, [x23, #40]
	ldr	w22, [x24]
	bl	_btodb
	mov	x2, x0
	add	x5, sp, #8
	mov	x0, x21
	mov	x1, x22
	mov	x3, x19
	mov	x4, x20
	blr	x25
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	str	x0, [x8]
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	x8, [sp, #8]
	ldr	x9, [x23]
	add	x8, x9, x8
	str	x8, [x23]
	ldr	w19, [sp, #8]
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x8, _EBADF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _errno@GOTPAGE
Lloh18:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh19:
	str	x8, [x9]
LBB0_6:
	mov	w19, #-1
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	str	x19, [sp, #8]
	add	x8, x22, x23, lsl #6
	add	x25, x8, #16
	add	x26, x8, #24
	add	x27, x8, #32
	add	x28, x8, #40
Lloh20:
	adrp	x24, _SOPEN_RASIZE@GOTPAGE
Lloh21:
	ldr	x24, [x24, _SOPEN_RASIZE@GOTPAGEOFF]
	mov	x22, x19
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	mov	x1, x22
	bl	_imin
	cbz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x0
	ldr	x8, [x26]
	ldrsw	x9, [x27]
	add	x1, x8, x9
	mov	x0, x20
	mov	x2, x23
	bl	_memmove
	ldr	w8, [x27]
	add	w8, w8, w23
	str	w8, [x27]
	ldr	x8, [x25]
	sub	x8, x8, x23
	str	x8, [x25]
	ldr	x8, [sp, #8]
	subs	x22, x8, x23
	str	x22, [sp, #8]
	b.eq	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x20, x20, x23
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	x1, [x26]
	cbz	x1, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x2, [x24]
	cmp	x22, x2
	b.hs	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x28]
	ldr	x8, [x8]
	mov	x3, sp
	mov	x0, x21
	blr	x8
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	str	x0, [x8]
	cbnz	x0, LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	str	wzr, [x27]
	ldr	x8, [x24]
	ldr	x9, [sp]
	subs	x8, x8, x9
	str	x8, [x25]
	b.eq	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x22, [sp, #8]
	b	LBB0_9
LBB0_17:
	ldr	x8, [x28]
	ldr	x8, [x8]
	mov	x3, sp
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	blr	x8
Lloh25:
	adrp	x8, _errno@GOTPAGE
Lloh26:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh27:
	str	x0, [x8]
	cbnz	x0, LBB0_6
; %bb.18:
	ldr	w8, [sp]
	sub	w19, w19, w8
	b	LBB0_7
LBB0_19:
	ldr	w8, [sp, #8]
	sub	w19, w19, w8
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_files,8,3                      ; @files
	.comm	_SOPEN_MAX,4,2                  ; @SOPEN_MAX
	.comm	_F_READ,4,2                     ; @F_READ
	.comm	_EBADF,8,3                      ; @EBADF
	.comm	_errno,8,3                      ; @errno
	.comm	_F_RAW,4,2                      ; @F_RAW
	.comm	_SOPEN_RASIZE,8,3               ; @SOPEN_RASIZE
.subsections_via_symbols
