	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evhttp_connection_reset_       ## -- Begin function evhttp_connection_reset_
	.p2align	4, 0x90
_evhttp_connection_reset_:              ## @evhttp_connection_reset_
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_bufferevent_disable_hard_
	cmpl	$-1, (%r14)
	je	LBB0_5
## %bb.1:
	movq	%r14, %rdi
	callq	_evhttp_connected
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	12(%r14), %esi
	movq	%r14, %rdi
	callq	*%rax
LBB0_4:
	movl	(%r14), %edi
	movq	_EVUTIL_SHUT_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shutdown
	movl	(%r14), %edi
	callq	_evutil_closesocket
	movl	8(%r14), %edi
	movl	$-1, %esi
	callq	_bufferevent_setfd
	movl	$-1, (%r14)
LBB0_5:
	movl	8(%r14), %edi
	callq	_bufferevent_get_output
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_evbuffer_get_length
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_evbuffer_drain
	movl	8(%r14), %edi
	callq	_bufferevent_get_input
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_evbuffer_get_length
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_evbuffer_drain
	movq	_EVCON_DISCONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.comm	_EVUTIL_SHUT_WR,4,2             ## @EVUTIL_SHUT_WR
	.comm	_EVCON_DISCONNECTED,4,2         ## @EVCON_DISCONNECTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_evhttp_connection_reset_       ; -- Begin function evhttp_connection_reset_
	.p2align	2
_evhttp_connection_reset_:              ; @evhttp_connection_reset_
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _EV_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
	ldr	w0, [x0, #8]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EV_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EV_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_bufferevent_disable_hard_
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_evhttp_connected
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w1, [x19, #12]
	mov	x0, x19
	blr	x8
LBB0_4:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _EVUTIL_SHUT_WR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EVUTIL_SHUT_WR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_shutdown
	ldr	w0, [x19]
	bl	_evutil_closesocket
	ldr	w0, [x19, #8]
	mov	w20, #-1
	mov	w1, #-1
	bl	_bufferevent_setfd
	str	w20, [x19]
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_bufferevent_get_output
	mov	x20, x0
	bl	_evbuffer_get_length
	mov	x1, x0
	mov	x0, x20
	bl	_evbuffer_drain
	ldr	w0, [x19, #8]
	bl	_bufferevent_get_input
	mov	x20, x0
	bl	_evbuffer_get_length
	mov	x1, x0
	mov	x0, x20
	bl	_evbuffer_drain
Lloh9:
	adrp	x8, _EVCON_DISCONNECTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EVCON_DISCONNECTED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.comm	_EVUTIL_SHUT_WR,4,2             ; @EVUTIL_SHUT_WR
	.comm	_EVCON_DISCONNECTED,4,2         ; @EVCON_DISCONNECTED
.subsections_via_symbols
