	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function evhttp_read_body
_evhttp_read_body:                      ## @evhttp_read_body
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_bufferevent_get_input
	movq	%rax, %r15
	cmpq	$0, 56(%rbx)
	je	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_evhttp_handle_chunked_read
                                        ## kill: def $eax killed $eax def $rax
	leal	-130(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_5
## %bb.2:
	cmpl	$128, %eax
	je	LBB0_24
## %bb.3:
	cmpl	$132, %eax
	jne	LBB0_14
## %bb.4:
	movq	_EVCON_READING_TRAILER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evhttp_read_trailer            ## TAILCALL
LBB0_7:
	cmpq	$0, (%rbx)
	js	LBB0_8
## %bb.11:
	cmpq	$0, 40(%rbx)
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	cmpq	(%rbx), %rax
	jb	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	movq	(%rbx), %rcx
	movq	24(%rbx), %rsi
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	subq	%rax, %rcx
	movq	%rcx, (%rbx)
	addq	%rax, 8(%rbx)
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_evbuffer_remove_buffer
	jmp	LBB0_14
LBB0_5:
	movq	_EVREQ_HTTP_DATA_TOO_LONG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	movq	8(%rbx), %r12
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	addq	%r12, %rax
	cmpq	8(%rbx), %rax
	jae	LBB0_10
## %bb.9:
	movq	_EVREQ_HTTP_INVALID_HEADER@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evhttp_connection_fail_        ## TAILCALL
LBB0_10:
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	addq	%rax, 8(%rbx)
	movq	24(%rbx), %rdi
	movq	%r15, %rsi
	callq	_evbuffer_add_buffer
LBB0_14:
	movq	48(%rbx), %rax
	movq	(%rax), %rax
	cmpq	%rax, 8(%rbx)
	jbe	LBB0_15
LBB0_23:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evhttp_lingering_fail          ## TAILCALL
LBB0_15:
	cmpq	$0, 56(%rbx)
	je	LBB0_16
LBB0_18:
	movq	24(%rbx), %rdi
	callq	_evbuffer_get_length
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	40(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_EVHTTP_REQ_DEFER_FREE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	orl	%ecx, 16(%rbx)
	movl	32(%rbx), %esi
	movq	%rbx, %rdi
	callq	*%rax
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, 16(%rbx)
	movq	24(%rbx), %r15
	movq	%r15, %rdi
	callq	_evbuffer_get_length
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_evbuffer_drain
	movq	_EVHTTP_REQ_NEEDS_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_21
LBB0_24:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evhttp_request_free_auto       ## TAILCALL
LBB0_21:
	cmpq	$0, (%rbx)
	je	LBB0_25
## %bb.22:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	(%rbx), %rcx
	testq	%rcx, %rcx
	js	LBB0_18
## %bb.17:
	cmpq	%rax, %rcx
	ja	LBB0_23
	jmp	LBB0_18
LBB0_25:
	movl	(%r14), %edi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bufferevent_disable
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_evhttp_connection_done         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EVCON_READING_TRAILER,4,2      ## @EVCON_READING_TRAILER
	.comm	_EVREQ_HTTP_DATA_TOO_LONG,4,2   ## @EVREQ_HTTP_DATA_TOO_LONG
	.comm	_EVREQ_HTTP_INVALID_HEADER,4,2  ## @EVREQ_HTTP_INVALID_HEADER
	.comm	_EVHTTP_REQ_DEFER_FREE,4,2      ## @EVHTTP_REQ_DEFER_FREE
	.comm	_EVHTTP_REQ_NEEDS_FREE,4,2      ## @EVHTTP_REQ_NEEDS_FREE
	.comm	_EV_READ,4,2                    ## @EV_READ
	.no_dead_strip	_evhttp_read_body
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function evhttp_read_body
_evhttp_read_body:                      ; @evhttp_read_body
	.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, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_bufferevent_get_input
	mov	x21, x0
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_evhttp_handle_chunked_read
	sub	w8, w0, #130
	cmp	w8, #2
	b.lo	LBB0_9
; %bb.2:
	cmp	w0, #128
	b.eq	LBB0_20
; %bb.3:
	cmp	w0, #132
	b.ne	LBB0_14
; %bb.4:
Lloh0:
	adrp	x8, _EVCON_READING_TRAILER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVCON_READING_TRAILER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	mov	x1, x20
	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
	b	_evhttp_read_trailer
LBB0_5:
	ldr	x8, [x20]
	tbnz	x8, #63, LBB0_10
; %bb.6:
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_evbuffer_get_length
	ldr	x8, [x20]
	cmp	x0, x8
	b.lo	LBB0_14
LBB0_8:
	mov	x0, x21
	bl	_evbuffer_get_length
	ldp	x8, x9, [x20]
	cmp	x0, x8
	csel	x2, x0, x8, lo
	sub	x8, x8, x2
	add	x9, x9, x2
	stp	x8, x9, [x20]
	ldr	x1, [x20, #24]
	mov	x0, x21
	bl	_evbuffer_remove_buffer
	b	LBB0_14
LBB0_9:
Lloh3:
	adrp	x8, _EVREQ_HTTP_DATA_TOO_LONG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVREQ_HTTP_DATA_TOO_LONG@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	ldr	x22, [x20, #8]
	mov	x0, x21
	bl	_evbuffer_get_length
	ldr	x8, [x20, #8]
	add	x9, x0, x22
	cmp	x9, x8
	b.hs	LBB0_13
; %bb.11:
Lloh5:
	adrp	x8, _EVREQ_HTTP_INVALID_HEADER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EVREQ_HTTP_INVALID_HEADER@GOTPAGEOFF]
LBB0_12:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_evhttp_connection_fail_
LBB0_13:
	mov	x0, x21
	bl	_evbuffer_get_length
	ldr	x8, [x20, #8]
	add	x8, x8, x0
	str	x8, [x20, #8]
	ldr	x0, [x20, #24]
	mov	x1, x21
	bl	_evbuffer_add_buffer
LBB0_14:
	ldr	x9, [x20, #8]
	ldr	x8, [x20, #48]
	ldr	x8, [x8]
	cmp	x9, x8
	b.ls	LBB0_16
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	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
	b	_evhttp_lingering_fail
LBB0_16:
	ldr	x9, [x20, #56]
	cbz	x9, LBB0_23
LBB0_17:
	ldr	x0, [x20, #24]
	bl	_evbuffer_get_length
	cbz	x0, LBB0_21
; %bb.18:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_21
; %bb.19:
Lloh7:
	adrp	x21, _EVHTTP_REQ_DEFER_FREE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _EVHTTP_REQ_DEFER_FREE@GOTPAGEOFF]
	ldr	w9, [x21]
	ldr	w10, [x20, #16]
	orr	w9, w10, w9
	str	w9, [x20, #16]
	ldr	w1, [x20, #32]
	mov	x0, x20
	blr	x8
	ldr	w8, [x21]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
	ldr	x21, [x20, #24]
	mov	x0, x21
	bl	_evbuffer_get_length
	mov	x1, x0
	mov	x0, x21
	bl	_evbuffer_drain
	ldr	w8, [x20, #16]
Lloh9:
	adrp	x9, _EVHTTP_REQ_NEEDS_FREE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EVHTTP_REQ_NEEDS_FREE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_20:
	mov	x0, x20
	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
	b	_evhttp_request_free_auto
LBB0_21:
	ldr	x8, [x20]
	cbz	x8, LBB0_25
; %bb.22:
	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_23:
	ldr	x9, [x20]
	tbnz	x9, #63, LBB0_17
; %bb.24:
	cmp	x9, x8
	b.hi	LBB0_15
	b	LBB0_17
LBB0_25:
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _EV_READ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_bufferevent_disable
	mov	x0, x19
	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
	b	_evhttp_connection_done
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EVCON_READING_TRAILER,4,2      ; @EVCON_READING_TRAILER
	.comm	_EVREQ_HTTP_DATA_TOO_LONG,4,2   ; @EVREQ_HTTP_DATA_TOO_LONG
	.comm	_EVREQ_HTTP_INVALID_HEADER,4,2  ; @EVREQ_HTTP_INVALID_HEADER
	.comm	_EVHTTP_REQ_DEFER_FREE,4,2      ; @EVHTTP_REQ_DEFER_FREE
	.comm	_EVHTTP_REQ_NEEDS_FREE,4,2      ; @EVHTTP_REQ_NEEDS_FREE
	.comm	_EV_READ,4,2                    ; @EV_READ
	.no_dead_strip	_evhttp_read_body
.subsections_via_symbols
