	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_openssl_ctrl
_be_openssl_ctrl:                       ## @be_openssl_ctrl
	.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	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r12
	callq	_upcast
	movq	%rax, %r15
	movl	$-1, %eax
	cmpl	$130, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_9
## %bb.2:
	cmpl	$128, %ebx
	jne	LBB0_12
## %bb.3:
	cmpl	$0, 4(%r15)
	jne	LBB0_12
## %bb.4:
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_BIO_new_socket
	movl	12(%r15), %edi
	movq	%rax, %rsi
	movq	%rax, %rdx
	callq	_SSL_set_bio
	movl	$1, (%r15)
	xorl	%eax, %eax
	cmpl	$-1, (%r14)
	setne	%al
	movl	%eax, (%r15)
	movl	8(%r15), %eax
	movq	_BUFFEREVENT_SSL_OPEN@GOTPCREL(%rip), %rcx
	movl	(%r14), %esi
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.13:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_open_callbacks             ## TAILCALL
LBB0_6:
	cmpl	$0, 4(%r15)
	jne	LBB0_12
## %bb.7:
	cmpl	$0, (%r15)
	je	LBB0_12
## %bb.8:
	movq	%r12, %rdi
	callq	_event_get_fd
	movl	%eax, (%r14)
	jmp	LBB0_11
LBB0_9:
	movl	4(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.10:
	movl	%ecx, (%r14)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_handshake_callbacks        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFEREVENT_SSL_OPEN,4,2       ## @BUFFEREVENT_SSL_OPEN
	.no_dead_strip	_be_openssl_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_openssl_ctrl
_be_openssl_ctrl:                       ; @be_openssl_ctrl
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	bl	_upcast
	mov	x20, x0
	cmp	w22, #130
	b.eq	LBB0_6
; %bb.1:
	cmp	w22, #129
	b.eq	LBB0_9
; %bb.2:
	cmp	w22, #128
	b.ne	LBB0_11
; %bb.3:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_11
; %bb.4:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_BIO_new_socket
	mov	x1, x0
	ldr	w0, [x20, #12]
	mov	x2, x1
	bl	_SSL_set_bio
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [x19]
	cmn	w8, #1
	cset	w8, ne
	str	w8, [x20]
	ldr	w8, [x20, #8]
Lloh0:
	adrp	x9, _BUFFEREVENT_SSL_OPEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUFFEREVENT_SSL_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w1, [x19]
	mov	x0, x20
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.5:
	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	_set_open_callbacks
LBB0_6:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_11
; %bb.7:
	ldr	w8, [x20]
	cbz	w8, LBB0_11
; %bb.8:
	mov	x0, x21
	bl	_event_get_fd
	mov	x8, x0
	b	LBB0_10
LBB0_9:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_11
LBB0_10:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_12
LBB0_11:
	mov	w0, #-1
LBB0_12:
	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_13:
	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	_set_handshake_callbacks
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFEREVENT_SSL_OPEN,4,2       ; @BUFFEREVENT_SSL_OPEN
	.no_dead_strip	_be_openssl_ctrl
.subsections_via_symbols
