	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_openssl_socket_new ## -- Begin function bufferevent_openssl_socket_new
	.p2align	4, 0x90
_bufferevent_openssl_socket_new:        ## @bufferevent_openssl_socket_new
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_SSL_get_wbio
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_BIO_get_fd
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	testq	%rbx, %rbx
	js	LBB0_3
## %bb.4:
	cmpq	%rbx, %rax
	je	LBB0_5
## %bb.9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	testq	%rbx, %rbx
	js	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_BIO_new_socket
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%rax, %rdx
	callq	_SSL_set_bio
	jmp	LBB0_8
LBB0_3:
	movq	%rax, %rbx
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_BIO_set_close
LBB0_8:
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movl	%r13d, %r8d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bufferevent_openssl_new_impl   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_openssl_socket_new ; -- Begin function bufferevent_openssl_socket_new
	.p2align	2
_bufferevent_openssl_socket_new:        ; @bufferevent_openssl_socket_new
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x0, x2
	bl	_SSL_get_wbio
	cbz	x0, LBB0_5
; %bb.1:
	mov	x24, x0
	mov	x1, #0
	bl	_BIO_get_fd
	tbnz	x0, #63, LBB0_5
; %bb.2:
	tbnz	x22, #63, LBB0_7
; %bb.3:
	cmp	x0, x22
	b.eq	LBB0_8
; %bb.4:
	mov	x0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	tbnz	x22, #63, LBB0_9
; %bb.6:
	mov	x0, x22
	mov	w1, #0
	bl	_BIO_new_socket
	mov	x1, x0
	mov	x0, x21
	mov	x2, x1
	bl	_SSL_set_bio
	b	LBB0_9
LBB0_7:
	mov	x22, x0
LBB0_8:
	mov	x0, x24
	mov	w1, #0
	bl	_BIO_set_close
LBB0_9:
	mov	x0, x23
	mov	x1, #0
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_bufferevent_openssl_new_impl
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
