	.file	"extr_ipc-server.c_ipc_handle_connection.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Event on IPC listening socket"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Unable to accept IPC client connection"
	.align 8
.LC2:
	.string	"Unable to set CLOEXEC on IPC client socket"
	.align 8
.LC3:
	.string	"Unable to set NONBLOCK on IPC client socket"
	.section	.rodata.str1.1
.LC4:
	.string	"Unable to allocate ipc client"
	.section	.rodata.str1.8
	.align 8
.LC5:
	.string	"Unable to allocate ipc client write buffer"
	.section	.rodata.str1.1
.LC6:
	.string	"New client: fd %d"
	.text
	.p2align 4
	.globl	ipc_handle_connection
	.type	ipc_handle_connection, @function
ipc_handle_connection:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edi, DWORD PTR SWAY_DEBUG[rip]
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	lea	rsi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdx
	call	sway_log@PLT
	xor	edi, edi
	cmp	QWORD PTR WL_EVENT_READABLE[rip], rbp
	sete	dil
	call	assert@PLT
	mov	edi, DWORD PTR ipc_socket[rip]
	xor	edx, edx
	xor	esi, esi
	call	accept@PLT
	cmp	eax, -1
	je	.L18
	mov	esi, DWORD PTR F_GETFD[rip]
	mov	ebp, eax
	mov	edi, eax
	xor	eax, eax
	call	fcntl@PLT
	cmp	eax, -1
	je	.L5
	or	eax, DWORD PTR FD_CLOEXEC[rip]
	mov	esi, DWORD PTR F_SETFD[rip]
	mov	edi, ebp
	mov	edx, eax
	xor	eax, eax
	call	fcntl@PLT
	cmp	eax, -1
	je	.L5
	mov	esi, DWORD PTR F_GETFL[rip]
	xor	eax, eax
	mov	edi, ebp
	call	fcntl@PLT
	cmp	eax, -1
	je	.L7
	or	eax, DWORD PTR O_NONBLOCK[rip]
	mov	esi, DWORD PTR F_SETFL[rip]
	mov	edi, ebp
	mov	edx, eax
	xor	eax, eax
	call	fcntl@PLT
	cmp	eax, -1
	je	.L7
	mov	edi, 64
	call	malloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L19
	mov	QWORD PTR 56[rax], rbx
	mov	ecx, DWORD PTR ipc_client_handle_readable[rip]
	mov	r8, rax
	mov	esi, ebp
	mov	rdx, QWORD PTR WL_EVENT_READABLE[rip]
	mov	edi, DWORD PTR [rbx]
	mov	DWORD PTR [rax], ebp
	mov	QWORD PTR 48[rax], 0
	mov	QWORD PTR 40[rax], 0
	call	wl_event_loop_add_fd@PLT
	mov	edi, 128
	mov	QWORD PTR 24[r12], 0
	mov	DWORD PTR 32[r12], eax
	mov	DWORD PTR 4[r12], 128
	mov	QWORD PTR 16[r12], 0
	call	malloc@PLT
	mov	QWORD PTR 8[r12], rax
	test	rax, rax
	je	.L20
	mov	edi, DWORD PTR SWAY_DEBUG[rip]
	mov	edx, ebp
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	sway_log@PLT
	mov	edi, DWORD PTR ipc_client_list[rip]
	mov	rsi, r12
	call	list_add@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR SWAY_ERROR[rip]
	lea	rsi, .LC2[rip]
	call	sway_log_errno@PLT
	mov	edi, ebp
	call	close@PLT
.L3:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	edi, DWORD PTR SWAY_ERROR[rip]
	lea	rsi, .LC1[rip]
	call	sway_log_errno@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR SWAY_ERROR[rip]
	lea	rsi, .LC3[rip]
	call	sway_log_errno@PLT
	mov	edi, ebp
	call	close@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edi, DWORD PTR SWAY_ERROR[rip]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	sway_log@PLT
	mov	edi, ebp
	call	close@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR SWAY_ERROR[rip]
	lea	rsi, .LC5[rip]
	call	sway_log@PLT
	mov	edi, ebp
	call	close@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	ipc_handle_connection, .-ipc_handle_connection
	.comm	ipc_socket,4,4
	.comm	ipc_client_list,4,4
	.comm	ipc_client_handle_readable,4,4
	.comm	WL_EVENT_READABLE,8,8
	.comm	SWAY_ERROR,4,4
	.comm	SWAY_DEBUG,4,4
	.comm	O_NONBLOCK,4,4
	.comm	F_SETFL,4,4
	.comm	F_SETFD,4,4
	.comm	F_GETFL,4,4
	.comm	F_GETFD,4,4
	.comm	FD_CLOEXEC,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_ipc-server.c_ipc_handle_connection.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Event on IPC listening socket\000"
	.align	2
.LC1:
	.ascii	"Unable to accept IPC client connection\000"
	.align	2
.LC2:
	.ascii	"Unable to set CLOEXEC on IPC client socket\000"
	.align	2
.LC3:
	.ascii	"Unable to set NONBLOCK on IPC client socket\000"
	.align	2
.LC4:
	.ascii	"Unable to allocate ipc client\000"
	.align	2
.LC5:
	.ascii	"Unable to allocate ipc client write buffer\000"
	.align	2
.LC6:
	.ascii	"New client: fd %d\000"
	.text
	.align	2
	.global	ipc_handle_connection
	.syntax unified
	.arm
	.fpu softvfp
	.type	ipc_handle_connection, %function
ipc_handle_connection:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r1
	ldr	r7, .L21
	ldr	r8, .L21+4
	ldr	r1, .L21+8
	sub	sp, sp, #12
	ldr	r0, [r7]
	mov	r5, r2
	bl	sway_log
	ldr	r0, [r8]
	sub	r0, r0, r4
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r2, #0
	ldr	r3, .L21+12
	mov	r1, r2
	ldr	r0, [r3]
	bl	accept
	cmn	r0, #1
	beq	.L18
	ldr	r3, .L21+16
	mov	r4, r0
	ldr	r1, [r3]
	bl	fcntl
	cmn	r0, #1
	beq	.L5
	ldr	r2, .L21+20
	ldr	r3, .L21+24
	ldr	r2, [r2]
	ldr	r1, [r3]
	orr	r2, r0, r2
	mov	r0, r4
	bl	fcntl
	cmn	r0, #1
	beq	.L5
	ldr	r3, .L21+28
	mov	r0, r4
	ldr	r1, [r3]
	bl	fcntl
	cmn	r0, #1
	beq	.L7
	ldr	r2, .L21+32
	ldr	r3, .L21+36
	ldr	r2, [r2]
	ldr	r1, [r3]
	orr	r2, r0, r2
	mov	r0, r4
	bl	fcntl
	cmn	r0, #1
	beq	.L7
	mov	r0, #36
	bl	malloc
	subs	r6, r0, #0
	beq	.L19
	mov	r9, #0
	ldr	r3, .L21+40
	mov	r1, r4
	ldr	r3, [r3]
	ldr	r2, [r8]
	ldr	r0, [r5]
	str	r5, [r6, #32]
	str	r4, [r6]
	str	r9, [r6, #28]
	str	r9, [r6, #24]
	str	r6, [sp]
	bl	wl_event_loop_add_fd
	mov	r3, #128
	str	r0, [r6, #20]
	str	r9, [r6, #16]
	mov	r0, r3
	str	r9, [r6, #12]
	str	r3, [r6, #4]
	bl	malloc
	cmp	r0, r9
	str	r0, [r6, #8]
	beq	.L20
	ldr	r1, .L21+44
	mov	r2, r4
	ldr	r0, [r7]
	bl	sway_log
	ldr	r3, .L21+48
	mov	r1, r6
	ldr	r0, [r3]
	bl	list_add
.L3:
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	ldr	r3, .L21+52
	ldr	r1, .L21+56
	ldr	r0, [r3]
	bl	sway_log_errno
	mov	r0, r4
	bl	close
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L18:
	ldr	r3, .L21+52
	ldr	r1, .L21+60
	ldr	r0, [r3]
	bl	sway_log_errno
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L7:
	ldr	r3, .L21+52
	ldr	r1, .L21+64
	ldr	r0, [r3]
	bl	sway_log_errno
	mov	r0, r4
	bl	close
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L20:
	ldr	r3, .L21+52
	ldr	r1, .L21+68
	ldr	r0, [r3]
	bl	sway_log
	mov	r0, r4
	bl	close
	b	.L3
.L19:
	ldr	r3, .L21+52
	ldr	r1, .L21+72
	ldr	r0, [r3]
	bl	sway_log
	mov	r0, r4
	bl	close
	b	.L3
.L22:
	.align	2
.L21:
	.word	SWAY_DEBUG
	.word	WL_EVENT_READABLE
	.word	.LC0
	.word	ipc_socket
	.word	F_GETFD
	.word	FD_CLOEXEC
	.word	F_SETFD
	.word	F_GETFL
	.word	O_NONBLOCK
	.word	F_SETFL
	.word	ipc_client_handle_readable
	.word	.LC6
	.word	ipc_client_list
	.word	SWAY_ERROR
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.word	.LC5
	.word	.LC4
	.size	ipc_handle_connection, .-ipc_handle_connection
	.comm	ipc_socket,4,4
	.comm	ipc_client_list,4,4
	.comm	ipc_client_handle_readable,4,4
	.comm	WL_EVENT_READABLE,4,4
	.comm	SWAY_ERROR,4,4
	.comm	SWAY_DEBUG,4,4
	.comm	O_NONBLOCK,4,4
	.comm	F_SETFL,4,4
	.comm	F_SETFD,4,4
	.comm	F_GETFL,4,4
	.comm	F_GETFD,4,4
	.comm	FD_CLOEXEC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
