	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movslq	%esi, %rdi
	callq	_TT_BLATHER
	movq	_BEV_EVENT_CONNECTED@GOTPCREL(%rip), %rax
	testw	%bx, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_n_connected@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	%r15, %rdi
	callq	_bufferevent_openssl_get_ssl
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_tt_assert
	movq	%rbx, %rdi
	callq	_SSL_get_peer_certificate
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	testq	%rbx, %rbx
	setne	%cl
	sete	%dl
	testq	%rax, %rax
	cmovel	%edx, %ecx
	movzbl	%cl, %edi
	callq	_tt_assert
	movq	_stop_when_connected@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.2:
	movq	_pending_connect_events@GOTPCREL(%rip), %rax
	decq	(%rax)
	je	LBB0_3
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_BEV_EVENT_EOF@GOTPCREL(%rip), %rax
	testw	%bx, (%rax)
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	_TT_BLATHER
	movq	_got_close@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_exit_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_event_base_loopexit            ## TAILCALL
LBB0_7:
	movq	_BEV_EVENT_ERROR@GOTPCREL(%rip), %rax
	testw	%bx, (%rax)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	callq	_TT_BLATHER
	movq	_got_error@GOTPCREL(%rip), %rax
LBB0_6:
	incl	(%rax)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bufferevent_free               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_EVENT_CONNECTED,2,1        ## @BEV_EVENT_CONNECTED
	.comm	_n_connected,4,2                ## @n_connected
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"server"

	.comm	_stop_when_connected,8,3        ## @stop_when_connected
	.comm	_pending_connect_events,8,3     ## @pending_connect_events
	.comm	_exit_base,4,2                  ## @exit_base
	.comm	_BEV_EVENT_EOF,2,1              ## @BEV_EVENT_EOF
L_.str.2:                               ## @.str.2
	.asciz	"Got a good EOF"

	.comm	_got_close,4,2                  ## @got_close
	.comm	_BEV_EVENT_ERROR,2,1            ## @BEV_EVENT_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"Got an error."

	.comm	_got_error,4,2                  ## @got_error
	.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	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, x2
	mov	x21, x1
	mov	x19, x0
	sxtw	x0, w21
	bl	_TT_BLATHER
Lloh0:
	adrp	x8, _BEV_EVENT_CONNECTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BEV_EVENT_CONNECTED@GOTPAGEOFF]
	ldrh	w8, [x8]
	and	w8, w8, w21
	tst	w8, #0xffff
	b.eq	LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _n_connected@GOTPAGE
Lloh3:
	ldr	x8, [x8, _n_connected@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x0, x19
	bl	_bufferevent_openssl_get_ssl
	mov	x19, x0
	bl	_tt_assert
	mov	x0, x19
	bl	_SSL_get_peer_certificate
	mov	x19, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cmp	x19, #0
	cset	w8, ne
	cset	w9, eq
	cmp	x0, #0
	csel	w0, w9, w8, eq
	bl	_tt_assert
Lloh6:
	adrp	x8, _stop_when_connected@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stop_when_connected@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _pending_connect_events@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pending_connect_events@GOTPAGEOFF]
	ldr	x9, [x8]
	subs	x9, x9, #1
	str	x9, [x8]
	b.eq	LBB0_6
LBB0_3:
	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_4:
Lloh11:
	adrp	x8, _BEV_EVENT_EOF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BEV_EVENT_EOF@GOTPAGEOFF]
	ldrh	w8, [x8]
	tst	w21, w8
	b.eq	LBB0_7
; %bb.5:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TT_BLATHER
Lloh15:
	adrp	x8, _got_close@GOTPAGE
Lloh16:
	ldr	x8, [x8, _got_close@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh17:
	adrp	x8, _exit_base@GOTPAGE
Lloh18:
	ldr	x8, [x8, _exit_base@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, #0
	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	_event_base_loopexit
LBB0_7:
Lloh20:
	adrp	x8, _BEV_EVENT_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BEV_EVENT_ERROR@GOTPAGEOFF]
	ldrh	w8, [x8]
	tst	w21, w8
	b.eq	LBB0_3
; %bb.8:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_TT_BLATHER
Lloh24:
	adrp	x8, _got_error@GOTPAGE
Lloh25:
	ldr	x8, [x8, _got_error@GOTPAGEOFF]
LBB0_9:
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [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	_bufferevent_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_EVENT_CONNECTED,2,1        ; @BEV_EVENT_CONNECTED
	.comm	_n_connected,4,2                ; @n_connected
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"server"

	.comm	_stop_when_connected,8,3        ; @stop_when_connected
	.comm	_pending_connect_events,8,3     ; @pending_connect_events
	.comm	_exit_base,4,2                  ; @exit_base
	.comm	_BEV_EVENT_EOF,2,1              ; @BEV_EVENT_EOF
l_.str.2:                               ; @.str.2
	.asciz	"Got a good EOF"

	.comm	_got_close,4,2                  ; @got_close
	.comm	_BEV_EVENT_ERROR,2,1            ; @BEV_EVENT_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"Got an error."

	.comm	_got_error,4,2                  ; @got_error
	.no_dead_strip	_eventcb
.subsections_via_symbols
