	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_async_new_         ## -- Begin function bufferevent_async_new_
	.p2align	4, 0x90
_bufferevent_async_new_:                ## @bufferevent_async_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	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	_BEV_OPT_THREADSAFE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	callq	_event_base_get_iocp_
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	testl	%r14d, %r14d
	js	LBB0_4
## %bb.2:
	movq	%rax, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_event_iocp_port_associate_
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_GetLastError
	movq	_ERROR_INVALID_PARAMETER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
LBB0_4:
	movl	$1, %edi
	movl	$40, %esi
	callq	_mm_calloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %r15
	movl	%r14d, %edi
	callq	_evbuffer_overlapped_new_
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	leaq	8(%r15), %r12
	movl	%r14d, %edi
	callq	_evbuffer_overlapped_new_
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	_bufferevent_ops_async@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %ecx
	callq	_bufferevent_init_common_
	testq	%rax, %rax
	js	LBB0_11
## %bb.10:
	movq	16(%r15), %rdi
	movq	_be_async_inbuf_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_evbuffer_add_cb
	movq	8(%r15), %rdi
	movq	_be_async_outbuf_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_evbuffer_add_cb
	leaq	32(%r15), %rdi
	movq	_connect_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_event_overlapped_init_
	leaq	28(%r15), %rdi
	movq	_read_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_event_overlapped_init_
	movq	%r15, %rdi
	addq	$24, %rdi
	movq	_write_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_event_overlapped_init_
	movq	%r12, %rdi
	callq	_bufferevent_init_generic_timeout_cbs_
	notl	%r14d
	shrl	$31, %r14d
	movl	%r14d, (%r15)
	jmp	LBB0_13
LBB0_8:
	movq	16(%r15), %rdi
	callq	_evbuffer_free
LBB0_6:
	movq	%r15, %rdi
	callq	_mm_free
	jmp	LBB0_12
LBB0_11:
	movq	%r12, %rdi
	callq	_bufferevent_free
LBB0_12:
	xorl	%r12d, %r12d
LBB0_13:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BEV_OPT_THREADSAFE,4,2         ## @BEV_OPT_THREADSAFE
	.comm	_ERROR_INVALID_PARAMETER,4,2    ## @ERROR_INVALID_PARAMETER
	.comm	_bufferevent_ops_async,4,2      ## @bufferevent_ops_async
	.comm	_be_async_inbuf_callback,4,2    ## @be_async_inbuf_callback
	.comm	_be_async_outbuf_callback,4,2   ## @be_async_outbuf_callback
	.comm	_connect_complete,4,2           ## @connect_complete
	.comm	_read_complete,4,2              ## @read_complete
	.comm	_write_complete,4,2             ## @write_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_async_new_         ; -- Begin function bufferevent_async_new_
	.p2align	2
_bufferevent_async_new_:                ; @bufferevent_async_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	x23, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _BEV_OPT_THREADSAFE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BEV_OPT_THREADSAFE@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	bl	_event_base_get_iocp_
	cbz	x0, LBB0_12
; %bb.1:
	tbnz	w19, #31, LBB0_4
; %bb.2:
	mov	x1, x19
	mov	w2, #1
	bl	_event_iocp_port_associate_
	tbz	x0, #63, LBB0_4
; %bb.3:
	bl	_GetLastError
Lloh3:
	adrp	x8, _ERROR_INVALID_PARAMETER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR_INVALID_PARAMETER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
LBB0_4:
	mov	w0, #1
	mov	w1, #40
	bl	_mm_calloc
	cbz	x0, LBB0_12
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_evbuffer_overlapped_new_
	str	x0, [x20, #16]
	cbz	x0, LBB0_10
; %bb.6:
	add	x21, x20, #8
	mov	x0, x19
	bl	_evbuffer_overlapped_new_
	str	x0, [x21]
	cbz	x0, LBB0_9
; %bb.7:
	orr	w3, w24, w23
Lloh6:
	adrp	x2, _bufferevent_ops_async@GOTPAGE
Lloh7:
	ldr	x2, [x2, _bufferevent_ops_async@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x22
	bl	_bufferevent_init_common_
	tbnz	x0, #63, LBB0_11
; %bb.8:
	ldr	x0, [x20, #16]
Lloh8:
	adrp	x8, _be_async_inbuf_callback@GOTPAGE
Lloh9:
	ldr	x8, [x8, _be_async_inbuf_callback@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_evbuffer_add_cb
	ldr	x0, [x20, #8]
Lloh11:
	adrp	x8, _be_async_outbuf_callback@GOTPAGE
Lloh12:
	ldr	x8, [x8, _be_async_outbuf_callback@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_evbuffer_add_cb
	add	x0, x20, #32
Lloh14:
	adrp	x8, _connect_complete@GOTPAGE
Lloh15:
	ldr	x8, [x8, _connect_complete@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_event_overlapped_init_
	add	x0, x20, #28
Lloh17:
	adrp	x8, _read_complete@GOTPAGE
Lloh18:
	ldr	x8, [x8, _read_complete@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_event_overlapped_init_
	add	x0, x20, #24
Lloh20:
	adrp	x8, _write_complete@GOTPAGE
Lloh21:
	ldr	x8, [x8, _write_complete@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_event_overlapped_init_
	mov	x0, x21
	bl	_bufferevent_init_generic_timeout_cbs_
	mvn	w8, w19
	lsr	w8, w8, #31
	str	w8, [x20]
	b	LBB0_13
LBB0_9:
	ldr	x0, [x20, #16]
	bl	_evbuffer_free
LBB0_10:
	mov	x0, x20
	bl	_mm_free
	b	LBB0_12
LBB0_11:
	mov	x0, x21
	bl	_bufferevent_free
LBB0_12:
	mov	x21, #0
LBB0_13:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BEV_OPT_THREADSAFE,4,2         ; @BEV_OPT_THREADSAFE
	.comm	_ERROR_INVALID_PARAMETER,4,2    ; @ERROR_INVALID_PARAMETER
	.comm	_bufferevent_ops_async,4,2      ; @bufferevent_ops_async
	.comm	_be_async_inbuf_callback,4,2    ; @be_async_inbuf_callback
	.comm	_be_async_outbuf_callback,4,2   ; @be_async_outbuf_callback
	.comm	_connect_complete,4,2           ; @connect_complete
	.comm	_read_complete,4,2              ; @read_complete
	.comm	_write_complete,4,2             ; @write_complete
.subsections_via_symbols
