	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_handshake_callbacks
_set_handshake_callbacks:               ## @set_handshake_callbacks
	.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	%rdi, %rbx
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.10:
	movq	_be_openssl_handshakecb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_be_openssl_eventcb@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edx, %esi
	movq	%rbx, %r8
	callq	_bufferevent_setcb
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_do_handshake                   ## TAILCALL
LBB0_1:
	movl	%esi, %r14d
	testl	%esi, %esi
	jns	LBB0_4
## %bb.2:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	leaq	16(%rbx), %rdi
	callq	_event_get_fd
	movl	%eax, %r14d
LBB0_4:
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	leaq	16(%rbx), %rdi
	callq	_event_del
	leaq	8(%rbx), %rdi
	callq	_event_del
LBB0_6:
	leaq	16(%rbx), %r15
	movl	20(%rbx), %esi
	movq	_EV_READ@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_EV_FINALIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_be_openssl_handshakeeventcb@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	%r15, %rdi
	movl	%r14d, %edx
	movq	%rbx, %r9
	callq	_event_assign
	leaq	8(%rbx), %r12
	movq	_EV_WRITE@GOTPCREL(%rip), %rax
	movq	_EV_PERSIST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	20(%rbx), %esi
	movq	_EV_FINALIZE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	(%r13), %r8d
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%rbx, %r9
	callq	_event_assign
	testl	%r14d, %r14d
	js	LBB0_7
## %bb.8:
	leaq	4(%rbx), %r14
	leaq	12(%rbx), %rsi
	movq	%r15, %rdi
	callq	_bufferevent_add_event_
	movl	%eax, %r15d
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_bufferevent_add_event_
	movl	$1, (%rbx)
	orl	%r15d, %eax
	sarl	$31, %eax
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_be_openssl_handshakecb,4,2     ## @be_openssl_handshakecb
	.comm	_be_openssl_eventcb,4,2         ## @be_openssl_eventcb
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_EV_PERSIST,4,2                 ## @EV_PERSIST
	.comm	_EV_FINALIZE,4,2                ## @EV_FINALIZE
	.comm	_be_openssl_handshakeeventcb,4,2 ## @be_openssl_handshakeeventcb
	.comm	_EV_WRITE,4,2                   ## @EV_WRITE
	.no_dead_strip	_set_handshake_callbacks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_handshake_callbacks
_set_handshake_callbacks:               ; @set_handshake_callbacks
	.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
	mov	x19, x0
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _be_openssl_handshakecb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _be_openssl_handshakecb@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _be_openssl_eventcb@GOTPAGE
Lloh4:
	ldr	x8, [x8, _be_openssl_eventcb@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x2, x1
	mov	x4, x19
	bl	_bufferevent_setcb
	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	_do_handshake
LBB0_2:
	mov	x20, x1
	tbz	w1, #31, LBB0_5
; %bb.3:
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.4:
	add	x0, x19, #16
	bl	_event_get_fd
	mov	x20, x0
LBB0_5:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.6:
	add	x0, x19, #16
	bl	_event_del
	add	x0, x19, #8
	bl	_event_del
LBB0_7:
	add	x21, x19, #16
	ldr	w1, [x19, #20]
Lloh6:
	adrp	x8, _EV_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x23, _EV_PERSIST@GOTPAGE
Lloh10:
	ldr	x23, [x23, _EV_PERSIST@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh11:
	adrp	x24, _EV_FINALIZE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _EV_FINALIZE@GOTPAGEOFF]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w3, w8, w9
Lloh13:
	adrp	x25, _be_openssl_handshakeeventcb@GOTPAGE
Lloh14:
	ldr	x25, [x25, _be_openssl_handshakeeventcb@GOTPAGEOFF]
	ldr	w4, [x25]
	mov	x0, x21
	mov	x2, x20
	mov	x5, x19
	bl	_event_assign
	add	x22, x19, #8
	ldr	w1, [x19, #20]
Lloh15:
	adrp	x8, _EV_WRITE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EV_WRITE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w3, w8, w9
	ldr	w4, [x25]
	mov	x0, x22
	mov	x2, x20
	mov	x5, x19
	bl	_event_assign
	tbnz	w20, #31, LBB0_9
; %bb.8:
	add	x20, x19, #4
	add	x1, x19, #12
	mov	x0, x21
	bl	_bufferevent_add_event_
	mov	x21, x0
	mov	x0, x22
	mov	x1, x20
	bl	_bufferevent_add_event_
	mov	w8, #1
	str	w8, [x19]
	orr	w8, w21, w0
	asr	w0, w8, #31
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_be_openssl_handshakecb,4,2     ; @be_openssl_handshakecb
	.comm	_be_openssl_eventcb,4,2         ; @be_openssl_eventcb
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_EV_PERSIST,4,2                 ; @EV_PERSIST
	.comm	_EV_FINALIZE,4,2                ; @EV_FINALIZE
	.comm	_be_openssl_handshakeeventcb,4,2 ; @be_openssl_handshakeeventcb
	.comm	_EV_WRITE,4,2                   ; @EV_WRITE
	.no_dead_strip	_set_handshake_callbacks
.subsections_via_symbols
