	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bs_read                        ## -- Begin function bs_read
	.p2align	4, 0x90
_bs_read:                               ## @bs_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r13
	callq	_rid_lookup
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	testq	%r13, %r13
	js	LBB0_3
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rax
	subq	%r14, %rax
	cmpq	%r13, %rax
	jge	LBB0_5
LBB0_3:
	movq	_ESPIPE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	addq	8(%rbx), %r13
	movq	16(%rbx), %rax
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.6:
	cmpq	$4, %r14
	ja	LBB0_8
## %bb.7:
	movl	$22, %ecx
	btq	%r14, %rcx
	jae	LBB0_8
## %bb.11:
	movl	(%rax,%r13), %eax
	movl	%eax, (%r15)
LBB0_12:
	movl	$1, %r12d
	jmp	LBB0_13
LBB0_9:
	movl	24(%rbx), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rsi
	callq	_lseek
	cmpq	%r13, %rax
	jne	LBB0_13
## %bb.10:
	movl	24(%rbx), %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_read
	cmpq	%r14, %rax
	jne	LBB0_13
	jmp	LBB0_12
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ESPIPE,4,2                     ## @ESPIPE
	.comm	_errno,4,2                      ## @errno
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bs_read                        ; -- Begin function bs_read
	.p2align	2
_bs_read:                               ; @bs_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x3
	mov	x19, x2
	mov	x22, x1
	bl	_rid_lookup
	cbz	x0, LBB0_5
; %bb.1:
	tbnz	x22, #63, LBB0_3
; %bb.2:
	mov	x21, x0
	ldr	x8, [x0]
	sub	x8, x8, x20
	cmp	x8, x22
	b.ge	LBB0_6
LBB0_3:
	mov	w0, #0
Lloh0:
	adrp	x8, _ESPIPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ESPIPE@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _errno@GOTPAGE
Lloh3:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh4:
	str	w8, [x9]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldp	x9, x8, [x21, #8]
	add	x22, x9, x22
Lloh5:
	adrp	x9, _MAP_FAILED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAP_FAILED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.7:
	cmp	x20, #4
	b.hi	LBB0_14
; %bb.8:
	mov	w9, #1
	lsl	x9, x9, x20
	mov	w10, #22
	tst	x9, x10
	b.eq	LBB0_14
; %bb.9:
	ldr	w8, [x8, x22]
	str	w8, [x19]
LBB0_10:
	mov	w0, #1
	b	LBB0_5
LBB0_11:
	ldr	w0, [x21, #24]
Lloh8:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_lseek
	cmp	x0, x22
	b.ne	LBB0_13
; %bb.12:
	ldr	w0, [x21, #24]
	mov	x1, x19
	mov	x2, x20
	bl	_read
	cmp	x0, x20
	b.eq	LBB0_10
LBB0_13:
	mov	w0, #0
	b	LBB0_5
LBB0_14:
	mov	w0, #0
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ESPIPE,4,2                     ; @ESPIPE
	.comm	_errno,4,2                      ; @errno
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
.subsections_via_symbols
