	.file	"extr_af_x25.c_x25_wait_for_connection_establishment.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	x25_wait_for_connection_establishment, @function
x25_wait_for_connection_establishment:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR current[rip]
	mov	edi, DWORD PTR wait[rip]
	call	DECLARE_WAITQUEUE@PLT
	mov	rdi, rbp
	call	sk_sleep@PLT
	lea	rsi, wait[rip]
	mov	edi, eax
	call	add_wait_queue_exclusive@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbp
	call	sock_error@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L8
	mov	rax, QWORD PTR TCP_ESTABLISHED[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L4
	mov	rdi, rbp
	call	release_sock@PLT
	xor	eax, eax
	call	schedule@PLT
	mov	rdi, rbp
	call	lock_sock@PLT
.L5:
	mov	edi, DWORD PTR TASK_INTERRUPTIBLE[rip]
	call	__set_current_state@PLT
	mov	edi, DWORD PTR current[rip]
	mov	r12d, DWORD PTR ERESTARTSYS[rip]
	call	signal_pending@PLT
	test	rax, rax
	je	.L9
	neg	r12d
.L4:
	mov	edi, DWORD PTR TASK_RUNNING[rip]
	call	__set_current_state@PLT
	mov	rdi, rbp
	call	sk_sleep@PLT
	lea	rsi, wait[rip]
	mov	edi, eax
	call	remove_wait_queue@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR SS_UNCONNECTED[rip]
	mov	DWORD PTR [rax], edx
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	x25_wait_for_connection_establishment, .-x25_wait_for_connection_establishment
	.comm	wait,4,4
	.comm	current,4,4
	.comm	TCP_ESTABLISHED,8,8
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	SS_UNCONNECTED,4,4
	.comm	ERESTARTSYS,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_af_x25.c_x25_wait_for_connection_establishment.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	x25_wait_for_connection_establishment, %function
x25_wait_for_connection_establishment:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r4, .L10
	ldr	r6, .L10+4
	ldr	r0, [r4]
	ldr	r1, [r6]
	bl	DECLARE_WAITQUEUE
	mov	r0, r5
	bl	sk_sleep
	mov	r1, r4
	bl	add_wait_queue_exclusive
	ldr	r8, .L10+8
	ldr	r7, .L10+12
	ldr	r9, .L10+16
	b	.L5
.L9:
	mov	r0, r5
	bl	sock_error
	subs	r4, r0, #0
	bne	.L8
	ldr	r2, [r5]
	ldr	r3, [r9]
	cmp	r2, r3
	beq	.L4
	mov	r0, r5
	bl	release_sock
	bl	schedule
	mov	r0, r5
	bl	lock_sock
.L5:
	ldr	r0, [r8]
	bl	__set_current_state
	ldr	r0, [r6]
	ldr	r4, [r7]
	bl	signal_pending
	cmp	r0, #0
	beq	.L9
	rsb	r4, r4, #0
.L4:
	ldr	r3, .L10+20
	ldr	r0, [r3]
	bl	__set_current_state
	mov	r0, r5
	bl	sk_sleep
	ldr	r1, .L10
	bl	remove_wait_queue
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	ldr	r2, .L10+24
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	str	r2, [r3]
	b	.L4
.L11:
	.align	2
.L10:
	.word	wait
	.word	current
	.word	TASK_INTERRUPTIBLE
	.word	ERESTARTSYS
	.word	TCP_ESTABLISHED
	.word	TASK_RUNNING
	.word	SS_UNCONNECTED
	.size	x25_wait_for_connection_establishment, .-x25_wait_for_connection_establishment
	.comm	wait,4,4
	.comm	current,4,4
	.comm	TCP_ESTABLISHED,4,4
	.comm	TASK_RUNNING,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	SS_UNCONNECTED,4,4
	.comm	ERESTARTSYS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
