	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_read
_do_read:                               ## @do_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%r14d, %r14d
	cmpq	$0, 24(%rdi)
	je	LBB0_1
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.23:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %ebx
	movq	%rdi, %r13
	addq	$24, %rdi
	movq	32(%r13), %r15
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	callq	_bufferevent_get_read_max_
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$2, %ecx
	callq	_evbuffer_reserve_space
	testl	%eax, %eax
	js	LBB0_24
## %bb.2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %r12d
	testq	%r12, %r12
	je	LBB0_22
## %bb.3:
	leaq	32(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, -64(%rbp,%rbx,8)
	incq	%rbx
	movq	%r13, %rdi
	callq	_decrement_buckets
	cmpq	%rbx, %r12
	je	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, (%rax)
	jne	LBB0_19
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	16(%r13), %edi
	movl	-64(%rbp,%rbx,8), %edx
	movl	-60(%rbp,%rbx,8), %esi
	callq	_SSL_read
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_OP_MADE_PROGRESS@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	cmpq	$0, 8(%r13)
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_clear_rbow
	testq	%rax, %rax
	jns	LBB0_17
LBB0_8:
	movq	_OP_ERR@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_22
LBB0_24:
	movq	_OP_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_22
LBB0_9:
	movl	16(%r13), %edi
	movl	%r15d, %esi
	callq	_SSL_get_error
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_print_err
	cmpl	$128, %r12d
	je	LBB0_13
## %bb.10:
	cmpl	$129, %r12d
	jne	LBB0_15
## %bb.11:
	cmpq	$0, 8(%r13)
	je	LBB0_16
## %bb.12:
	movq	%r13, %rdi
	callq	_clear_rbow
	testq	%rax, %rax
	jns	LBB0_16
	jmp	LBB0_8
LBB0_18:
	movl	%r12d, %ebx
	jmp	LBB0_19
LBB0_13:
	cmpq	$0, 8(%r13)
	jne	LBB0_16
## %bb.14:
	movq	%r13, %rdi
	callq	_set_rbow
	testl	%eax, %eax
	jns	LBB0_16
	jmp	LBB0_8
LBB0_15:
	movq	_BEV_EVENT_READING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_conn_closed
LBB0_16:
	movq	_OP_BLOCKED@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_19:
	testl	%ebx, %ebx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_22
## %bb.20:
	leaq	-64(%rbp), %rsi
	movl	%ebx, %edx
	callq	_evbuffer_commit_space
	cmpq	$0, (%r13)
	je	LBB0_22
## %bb.21:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BEV_RESET_GENERIC_READ_TIMEOUT
	jmp	LBB0_22
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OP_ERR,4,2                     ## @OP_ERR
	.comm	_OP_MADE_PROGRESS,4,2           ## @OP_MADE_PROGRESS
	.comm	_BEV_EVENT_READING,4,2          ## @BEV_EVENT_READING
	.comm	_OP_BLOCKED,4,2                 ## @OP_BLOCKED
	.no_dead_strip	_do_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_read
_do_read:                               ; @do_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x24, x0
	ldr	x8, [x24, #24]!
	cbz	x8, LBB0_4
LBB0_1:
	mov	w19, #0
LBB0_2:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	mov	x19, x1
	mov	x20, x0
	mov	x21, x0
	ldr	x22, [x21, #32]!
	mov	x0, x24
	bl	_bufferevent_get_read_max_
	cmp	w0, w19
	csel	w1, w0, w19, lt
	add	x2, sp, #8
	mov	x0, x22
	mov	w3, #2
	bl	_evbuffer_reserve_space
	tbnz	w0, #31, LBB0_13
; %bb.5:
	mov	w26, w0
	cbz	w26, LBB0_1
; %bb.6:
	mov	x23, #0
	mov	w19, #0
	add	x27, sp, #8
Lloh6:
	adrp	x28, _OP_MADE_PROGRESS@GOTPAGE
Lloh7:
	ldr	x28, [x28, _OP_MADE_PROGRESS@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	str	w25, [x27], #8
	mov	x0, x20
	bl	_decrement_buckets
	cmp	x26, x23
	b.eq	LBB0_18
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	cbnz	x8, LBB0_23
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x20, #16]
	ldp	w2, w1, [x27]
	bl	_SSL_read
	mov	x25, x0
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x28]
	orr	w19, w8, w19
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x20
	bl	_clear_rbow
	tbz	x0, #63, LBB0_7
LBB0_12:
Lloh8:
	adrp	x8, _OP_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OP_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w19, w8, w19
	b	LBB0_2
LBB0_13:
Lloh11:
	adrp	x8, _OP_ERR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OP_ERR@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
	b	LBB0_2
LBB0_14:
	ldr	w0, [x20, #16]
	mov	x1, x25
	bl	_SSL_get_error
	mov	x24, x0
	bl	_print_err
	cmp	w24, #128
	b.eq	LBB0_19
; %bb.15:
	cmp	w24, #129
	b.ne	LBB0_21
; %bb.16:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_22
; %bb.17:
	mov	x0, x20
	bl	_clear_rbow
	tbz	x0, #63, LBB0_22
	b	LBB0_12
LBB0_18:
	mov	x23, x26
	b	LBB0_23
LBB0_19:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_22
; %bb.20:
	mov	x0, x20
	bl	_set_rbow
	tbz	w0, #31, LBB0_22
	b	LBB0_12
LBB0_21:
Lloh14:
	adrp	x8, _BEV_EVENT_READING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BEV_EVENT_READING@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x24
	mov	x3, x25
	bl	_conn_closed
LBB0_22:
Lloh17:
	adrp	x8, _OP_BLOCKED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OP_BLOCKED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	orr	w19, w8, w19
LBB0_23:
	cbz	w23, LBB0_2
; %bb.24:
	add	x1, sp, #8
	mov	x0, x22
	mov	x2, x23
	bl	_evbuffer_commit_space
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.25:
	mov	x0, x21
	bl	_BEV_RESET_GENERIC_READ_TIMEOUT
	b	LBB0_2
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_OP_ERR,4,2                     ; @OP_ERR
	.comm	_OP_MADE_PROGRESS,4,2           ; @OP_MADE_PROGRESS
	.comm	_BEV_EVENT_READING,4,2          ; @BEV_EVENT_READING
	.comm	_OP_BLOCKED,4,2                 ; @OP_BLOCKED
	.no_dead_strip	_do_read
.subsections_via_symbols
