	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_pair_new           ## -- Begin function bufferevent_pair_new
	.p2align	4, 0x90
_bufferevent_pair_new:                  ## @bufferevent_pair_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
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_BEV_OPT_DEFER_CALLBACKS@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_BEV_OPT_THREADSAFE@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movl	%ebx, %esi
	callq	_bufferevent_pair_elt_new
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r13
	notl	%r14d
	andl	%ebx, %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_bufferevent_pair_elt_new
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r12
	testl	%ebx, (%r15)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_downcast
	movl	8(%r13), %esi
	movq	%rax, %rdi
	callq	_bufferevent_enable_locking_
LBB0_4:
	movq	%r12, (%r13)
	movq	%r13, (%r12)
	movq	%r13, %rdi
	callq	_downcast
	movl	4(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_evbuffer_freeze
	movq	%r13, %rdi
	callq	_downcast
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_evbuffer_freeze
	movq	%r12, %rdi
	callq	_downcast
	movl	4(%rax), %edi
	xorl	%esi, %esi
	callq	_evbuffer_freeze
	movq	%r12, %rdi
	callq	_downcast
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_evbuffer_freeze
	movq	%r13, %rdi
	callq	_downcast
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	%r12, %rdi
	callq	_downcast
	movq	%rax, 8(%rbx)
	jmp	LBB0_8
LBB0_6:
	movq	%r13, %rdi
	callq	_downcast
	movq	%rax, %rdi
	callq	_bufferevent_free
LBB0_7:
	movl	$-1, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_OPT_DEFER_CALLBACKS,4,2    ## @BEV_OPT_DEFER_CALLBACKS
	.comm	_BEV_OPT_THREADSAFE,4,2         ## @BEV_OPT_THREADSAFE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_pair_new           ; -- Begin function bufferevent_pair_new
	.p2align	2
_bufferevent_pair_new:                  ; @bufferevent_pair_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, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _BEV_OPT_DEFER_CALLBACKS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BEV_OPT_DEFER_CALLBACKS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w22, w8, w1
Lloh3:
	adrp	x23, _BEV_OPT_THREADSAFE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BEV_OPT_THREADSAFE@GOTPAGEOFF]
	ldr	w24, [x23]
	mov	x1, x22
	bl	_bufferevent_pair_elt_new
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	bic	w1, w22, w24
	mov	x0, x21
	bl	_bufferevent_pair_elt_new
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	w8, [x23]
	tst	w8, w22
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_downcast
	ldr	w1, [x20, #8]
	bl	_bufferevent_enable_locking_
LBB0_4:
	str	x21, [x20]
	str	x20, [x21]
	mov	x0, x20
	bl	_downcast
	ldr	w0, [x0, #4]
	mov	w1, #0
	bl	_evbuffer_freeze
	mov	x0, x20
	bl	_downcast
	ldr	w0, [x0]
	mov	w1, #1
	bl	_evbuffer_freeze
	mov	x0, x21
	bl	_downcast
	ldr	w0, [x0, #4]
	mov	w1, #0
	bl	_evbuffer_freeze
	mov	x0, x21
	bl	_downcast
	ldr	w0, [x0]
	mov	w1, #1
	bl	_evbuffer_freeze
	mov	x0, x20
	bl	_downcast
	str	x0, [x19]
	mov	x0, x21
	bl	_downcast
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_downcast
	bl	_bufferevent_free
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_OPT_DEFER_CALLBACKS,4,2    ; @BEV_OPT_DEFER_CALLBACKS
	.comm	_BEV_OPT_THREADSAFE,4,2         ; @BEV_OPT_THREADSAFE
.subsections_via_symbols
