	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connect_complete
_connect_complete:                      ## @connect_complete
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdi, %r15
	callq	_upcast_connect
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_BEV_LOCK
	movq	8(%rbx), %rdi
	callq	_EVUTIL_ASSERT
	movq	$0, 8(%rbx)
	movl	4(%rbx), %edi
	callq	_evbuffer_overlapped_get_fd_
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_SO_UPDATE_CONNECT_CONTEXT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_setsockopt
	movq	%rbx, %rdi
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	callq	_bufferevent_async_set_connected_
	testl	%r14d, %r14d
	jne	LBB0_4
LBB0_5:
	movq	_BEV_EVENT_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	%r15, %rsi
	callq	_bev_async_set_wsa_error
	testl	%r14d, %r14d
	je	LBB0_5
LBB0_4:
	movq	_BEV_EVENT_CONNECTED@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bufferevent_run_eventcb_
	movl	(%rbx), %edi
	callq	_event_base_del_virtual_
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bufferevent_decref_and_unlock_ ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_UPDATE_CONNECT_CONTEXT,4,2  ## @SO_UPDATE_CONNECT_CONTEXT
	.comm	_BEV_EVENT_CONNECTED,4,2        ## @BEV_EVENT_CONNECTED
	.comm	_BEV_EVENT_ERROR,4,2            ## @BEV_EVENT_ERROR
	.no_dead_strip	_connect_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connect_complete
_connect_complete:                      ; @connect_complete
	.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	x20, x3
	mov	x21, x0
	bl	_upcast_connect
	mov	x19, x0
	bl	_BEV_LOCK
	ldr	x0, [x19, #8]
	bl	_EVUTIL_ASSERT
	str	xzr, [x19, #8]
	ldr	w0, [x19, #4]
	bl	_evbuffer_overlapped_get_fd_
Lloh0:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SO_UPDATE_CONNECT_CONTEXT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SO_UPDATE_CONNECT_CONTEXT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x3, #0
	mov	w4, #0
	bl	_setsockopt
	mov	x0, x19
	cbz	w20, LBB0_2
; %bb.1:
	bl	_bufferevent_async_set_connected_
	b	LBB0_3
LBB0_2:
	mov	x1, x21
	bl	_bev_async_set_wsa_error
LBB0_3:
Lloh6:
	adrp	x8, _BEV_EVENT_CONNECTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BEV_EVENT_CONNECTED@GOTPAGEOFF]
Lloh8:
	adrp	x9, _BEV_EVENT_ERROR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BEV_EVENT_ERROR@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bufferevent_run_eventcb_
	ldr	w0, [x19]
	bl	_event_base_del_virtual_
	mov	x0, x19
	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	_bufferevent_decref_and_unlock_
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_UPDATE_CONNECT_CONTEXT,4,2  ; @SO_UPDATE_CONNECT_CONTEXT
	.comm	_BEV_EVENT_CONNECTED,4,2        ; @BEV_EVENT_CONNECTED
	.comm	_BEV_EVENT_ERROR,4,2            ; @BEV_EVENT_ERROR
	.no_dead_strip	_connect_complete
.subsections_via_symbols
