	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_async_connect_     ## -- Begin function bufferevent_async_connect_
	.p2align	4, 0x90
_bufferevent_async_connect_:            ## @bufferevent_async_connect_
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_upcast
	movq	%rax, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_event_get_win32_extension_fns_
	movq	%rax, %r15
	testq	%rax, %rax
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	testq	%r13, %r13
	js	LBB0_4
## %bb.2:
	cmpq	$0, (%r15)
	je	LBB0_4
## %bb.3:
	xorl	%ebx, %ebx
	testq	%r12, %r12
	setne	%bl
LBB0_4:
	movl	%ebx, %edi
	callq	_EVUTIL_ASSERT
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r12), %rax
	movq	_AF_INET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_AF_INET6@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.7:
	movq	_in6addr_any@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_bind
	testq	%rax, %rax
	jns	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_WSAGetLastError
	movq	_WSAEINVAL@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_10:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_event_base_add_virtual_
	movq	%rbx, %rdi
	callq	_bufferevent_incref_
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	*(%r15)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.11:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_WSAGetLastError
	movq	_ERROR_IO_PENDING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.12:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_event_base_del_virtual_
	movq	%rbx, %rdi
	callq	_bufferevent_decref_
	movl	$-1, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_AF_INET6,8,3                   ## @AF_INET6
	.comm	_in6addr_any,4,2                ## @in6addr_any
	.comm	_WSAEINVAL,8,3                  ## @WSAEINVAL
	.comm	_ERROR_IO_PENDING,8,3           ## @ERROR_IO_PENDING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bufferevent_async_connect_     ; -- Begin function bufferevent_async_connect_
	.p2align	2
_bufferevent_async_connect_:            ; @bufferevent_async_connect_
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_upcast
	mov	x23, x0
	bl	_event_get_win32_extension_fns_
	mov	x24, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x24]
	cmp	x21, #0
	cset	w9, ne
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	tst	x22, #0x8000000000000000
	csel	w0, wzr, w8, ne
LBB0_2:
	bl	_EVUTIL_ASSERT
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _AF_INET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x9, _AF_INET6@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AF_INET6@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.5:
Lloh8:
	adrp	x8, _in6addr_any@GOTPAGE
Lloh9:
	ldr	x8, [x8, _in6addr_any@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x22
	mov	w2, #4
	bl	_bind
	tbz	x0, #63, LBB0_8
; %bb.7:
	bl	_WSAGetLastError
Lloh10:
	adrp	x8, _WSAEINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WSAEINVAL@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
LBB0_8:
	ldr	w0, [x19]
	bl	_event_base_add_virtual_
	mov	x0, x19
	bl	_bufferevent_incref_
	ldr	x8, [x24]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, #0
	mov	w4, #0
	mov	x5, #0
	mov	x6, x23
	blr	x8
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_13
; %bb.9:
	bl	_WSAGetLastError
Lloh13:
	adrp	x8, _ERROR_IO_PENDING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERROR_IO_PENDING@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_13
LBB0_11:
	ldr	w0, [x19]
	bl	_event_base_del_virtual_
	mov	x0, x19
	bl	_bufferevent_decref_
LBB0_12:
	mov	w0, #-1
LBB0_13:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_AF_INET6,8,3                   ; @AF_INET6
	.comm	_in6addr_any,4,2                ; @in6addr_any
	.comm	_WSAEINVAL,8,3                  ; @WSAEINVAL
	.comm	_ERROR_IO_PENDING,8,3           ; @ERROR_IO_PENDING
.subsections_via_symbols
