	.file	"extr_bufferevent_async.c_connect_complete.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	connect_complete, @function
connect_complete:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, ecx
	call	upcast_connect@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	BEV_LOCK@PLT
	mov	rdi, QWORD PTR 8[rbp]
	call	EVUTIL_ASSERT@PLT
	mov	QWORD PTR 8[rbp], 0
	mov	edi, DWORD PTR 4[rbp]
	call	evbuffer_overlapped_get_fd_@PLT
	mov	edx, DWORD PTR SO_UPDATE_CONNECT_CONTEXT[rip]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	esi, DWORD PTR SOL_SOCKET[rip]
	mov	edi, eax
	call	setsockopt@PLT
	test	ebx, ebx
	je	.L2
	mov	rdi, rbp
	call	bufferevent_async_set_connected_@PLT
	mov	esi, DWORD PTR BEV_EVENT_CONNECTED[rip]
.L3:
	mov	rdi, rbp
	xor	edx, edx
	call	bufferevent_run_eventcb_@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	event_base_del_virtual_@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	bufferevent_decref_and_unlock_@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rsi, r12
	mov	rdi, rbp
	call	bev_async_set_wsa_error@PLT
	mov	esi, DWORD PTR BEV_EVENT_ERROR[rip]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	connect_complete, .-connect_complete
	.comm	SO_UPDATE_CONNECT_CONTEXT,4,4
	.comm	SOL_SOCKET,4,4
	.comm	BEV_EVENT_ERROR,4,4
	.comm	BEV_EVENT_CONNECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bufferevent_async.c_connect_complete.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	connect_complete, %function
connect_complete:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	sub	sp, sp, #12
	mov	r5, r3
	mov	r7, r0
	bl	upcast_connect
	mov	r4, r0
	mov	r6, #0
	bl	BEV_LOCK
	ldr	r0, [r4, #8]
	bl	EVUTIL_ASSERT
	ldr	r0, [r4, #4]
	str	r6, [r4, #8]
	bl	evbuffer_overlapped_get_fd_
	ldr	r2, .L6
	ldr	r1, .L6+4
	str	r6, [sp]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, [r1]
	bl	setsockopt
	cmp	r5, r6
	beq	.L2
	mov	r0, r4
	bl	bufferevent_async_set_connected_
	ldr	r3, .L6+8
	ldr	r1, [r3]
.L3:
	mov	r2, #0
	mov	r0, r4
	bl	bufferevent_run_eventcb_
	ldr	r0, [r4]
	bl	event_base_del_virtual_
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	bufferevent_decref_and_unlock_
.L2:
	mov	r1, r7
	mov	r0, r4
	bl	bev_async_set_wsa_error
	ldr	r3, .L6+12
	ldr	r1, [r3]
	b	.L3
.L7:
	.align	2
.L6:
	.word	SO_UPDATE_CONNECT_CONTEXT
	.word	SOL_SOCKET
	.word	BEV_EVENT_CONNECTED
	.word	BEV_EVENT_ERROR
	.size	connect_complete, .-connect_complete
	.comm	SO_UPDATE_CONNECT_CONTEXT,4,4
	.comm	SOL_SOCKET,4,4
	.comm	BEV_EVENT_ERROR,4,4
	.comm	BEV_EVENT_CONNECTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
