	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_timed
_read_timed:                            ## @read_timed
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r15
	leaq	-56(%rbp), %r13
	leaq	-60(%rbp), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cltq
	addq	%rax, %r12
	subq	%rax, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%r13, %rdx
	callq	_timersub
	cmpq	$0, -56(%rbp)
	js	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_FD_ZERO
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_FD_SET
	movq	(%r15), %rdi
	incq	%rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r8
	callq	_select
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	jne	LBB0_2
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
LBB0_13:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_generr
	jmp	LBB0_17
LBB0_14:
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_16
LBB0_15:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
LBB0_16:
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_generr
LBB0_17:
	movl	$-1, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Network read error: %s"

L_.str.1:                               ## @.str.1
	.asciz	"select: %s"

L_.str.2:                               ## @.str.2
	.asciz	"Network read timed out"

L_.str.3:                               ## @.str.3
	.asciz	"unexpected EOF from server"

	.no_dead_strip	_read_timed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_timed
_read_timed:                            ; @read_timed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cbz	x2, LBB0_11
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh2:
	adrp	x24, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EAGAIN@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x21, LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	mov	x1, x22
	mov	x2, x21
	bl	_read
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w0
	add	x22, x22, x8
	sub	x21, x21, x8
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x23]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #24
	mov	x1, #0
	bl	_gettimeofday
	add	x1, sp, #24
	add	x2, sp, #24
	mov	x0, x20
	bl	_timersub
	ldr	x8, [sp, #24]
	tbnz	x8, #63, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #20
	bl	_FD_ZERO
	ldr	x0, [x19]
	add	x1, sp, #20
	bl	_FD_SET
	ldr	x8, [x19]
	add	x0, x8, #1
	add	x1, sp, #20
	add	x4, sp, #24
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w0, LBB0_2
LBB0_10:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_11:
	mov	w0, #0
	b	LBB0_16
LBB0_12:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_13:
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_14:
	ldr	x0, [x23]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_15:
	mov	x0, x19
	bl	_generr
	mov	w0, #-1
LBB0_16:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Network read error: %s"

l_.str.1:                               ; @.str.1
	.asciz	"select: %s"

l_.str.2:                               ; @.str.2
	.asciz	"Network read timed out"

l_.str.3:                               ; @.str.3
	.asciz	"unexpected EOF from server"

	.no_dead_strip	_read_timed
.subsections_via_symbols
