	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eventcb
_eventcb:                               ## @eventcb
	.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	_BEV_EVENT_EOF@GOTPCREL(%rip), %rcx
	movq	_BEV_EVENT_ERROR@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
	movzwl	(%rcx), %ecx
	orw	%ax, %cx
	testw	%si, %cx
	je	LBB0_12
## %bb.1:
	movq	%rdx, %rbx
	movq	%rdi, %r12
	testw	%si, %ax
	je	LBB0_7
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_bufferevent_get_openssl_error
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ERR_reason_error_string
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_ERR_lib_error_string
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_ERR_func_error_string
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movq	%r14, %rcx
	movq	%rax, %r8
	callq	_fprintf
	movq	%r12, %rdi
	callq	_bufferevent_get_openssl_error
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_6
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_8:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_readcb
	movq	%rbx, %rdi
	callq	_bufferevent_get_output
	movl	%eax, %edi
	callq	_evbuffer_get_length
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_close_on_finished_writecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	_eventcb(%rip), %rcx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_bufferevent_setcb
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bufferevent_disable
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rdi
	callq	_bufferevent_free
LBB0_11:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bufferevent_free               ## TAILCALL
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	testq	%rbx, %rbx
	jne	LBB0_8
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_EVENT_EOF,2,1              ## @BEV_EVENT_EOF
	.comm	_BEV_EVENT_ERROR,2,1            ## @BEV_EVENT_ERROR
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s in %s %s\n"

	.comm	_errno,8,3                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"connection error"

	.comm	_close_on_finished_writecb,4,2  ## @close_on_finished_writecb
	.comm	_EV_READ,4,2                    ## @EV_READ
	.no_dead_strip	_eventcb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eventcb
_eventcb:                               ; @eventcb
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	and	w8, w1, #0xffff
Lloh0:
	adrp	x9, _BEV_EVENT_EOF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BEV_EVENT_EOF@GOTPAGEOFF]
	ldrh	w10, [x9]
Lloh2:
	adrp	x9, _BEV_EVENT_ERROR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BEV_EVENT_ERROR@GOTPAGEOFF]
	ldrh	w9, [x9]
	orr	w10, w9, w10
	tst	w10, w8
	b.eq	LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x19, x0
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_bufferevent_get_openssl_error
	cbz	x0, LBB0_5
; %bb.3:
	mov	x22, x0
Lloh4:
	adrp	x25, _stderr@GOTPAGE
Lloh5:
	ldr	x25, [x25, _stderr@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str@PAGE
Lloh7:
	add	x21, x21, l_.str@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_ERR_reason_error_string
	mov	x23, x0
	mov	x0, x22
	bl	_ERR_lib_error_string
	mov	x24, x0
	mov	x0, x22
	bl	_ERR_func_error_string
	mov	x4, x0
	ldr	w0, [x25]
	mov	x1, x21
	mov	x2, x23
	mov	x3, x24
	bl	_fprintf
	mov	x0, x19
	bl	_bufferevent_get_openssl_error
	mov	x22, x0
	cbnz	x0, LBB0_4
LBB0_5:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbnz	x8, LBB0_12
LBB0_6:
	cbz	x20, LBB0_11
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_readcb
	mov	x0, x20
	bl	_bufferevent_get_output
	bl	_evbuffer_get_length
	cbz	x0, LBB0_10
; %bb.8:
Lloh11:
	adrp	x8, _close_on_finished_writecb@GOTPAGE
Lloh12:
	ldr	x8, [x8, _close_on_finished_writecb@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x3, _eventcb@PAGE
Lloh15:
	add	x3, x3, _eventcb@PAGEOFF
	mov	x0, x20
	mov	x1, #0
	mov	x4, #0
	bl	_bufferevent_setcb
Lloh16:
	adrp	x8, _EV_READ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_bufferevent_disable
	b	LBB0_11
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x20
	bl	_bufferevent_free
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bufferevent_free
LBB0_12:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	cbnz	x20, LBB0_7
	b	LBB0_11
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_EVENT_EOF,2,1              ; @BEV_EVENT_EOF
	.comm	_BEV_EVENT_ERROR,2,1            ; @BEV_EVENT_ERROR
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s in %s %s\n"

	.comm	_errno,8,3                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"connection error"

	.comm	_close_on_finished_writecb,4,2  ; @close_on_finished_writecb
	.comm	_EV_READ,4,2                    ; @EV_READ
	.no_dead_strip	_eventcb
.subsections_via_symbols
