	.file	"extr_stream.c_sk_stream_wait_close.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sk_stream_wait_close
	.type	sk_stream_wait_close, @function
sk_stream_wait_close:
.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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	QWORD PTR 8[rsp], rsi
	test	rsi, rsi
	jne	.L8
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	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	esi, DWORD PTR woken_wake_function[rip]
	mov	rbp, rdi
	mov	edi, DWORD PTR wait[rip]
	lea	r12, 8[rsp]
	lea	rbx, wait[rip]
	call	DEFINE_WAIT_FUNC@PLT
	mov	rdi, rbp
	call	sk_sleep@PLT
	lea	rsi, wait[rip]
	mov	edi, eax
	call	add_wait_queue@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR current[rip]
	call	signal_pending@PLT
	test	eax, eax
	jne	.L3
	cmp	QWORD PTR 8[rsp], 0
	je	.L3
.L4:
	mov	rdi, rbp
	call	sk_stream_closing@PLT
	xor	edx, edx
	mov	rcx, rbx
	mov	rsi, r12
	test	eax, eax
	mov	rdi, rbp
	sete	dl
	call	sk_wait_event@PLT
	test	rax, rax
	je	.L9
.L3:
	mov	rdi, rbp
	call	sk_sleep@PLT
	lea	rsi, wait[rip]
	mov	edi, eax
	call	remove_wait_queue@PLT
	add	rsp, 16
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sk_stream_wait_close, .-sk_stream_wait_close
	.comm	woken_wake_function,4,4
	.comm	wait,4,4
	.comm	current,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_stream.c_sk_stream_wait_close.c"
	.text
	.align	2
	.global	sk_stream_wait_close
	.syntax unified
	.arm
	.fpu softvfp
	.type	sk_stream_wait_close, %function
sk_stream_wait_close:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	cmp	r1, #0
	sub	sp, sp, #8
	str	r1, [sp, #4]
	bne	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L11:
	mov	r4, r0
	ldr	r3, .L13
	ldr	r5, .L13+4
	ldr	r1, [r3]
	ldr	r0, [r5]
	bl	DEFINE_WAIT_FUNC
	mov	r0, r4
	bl	sk_sleep
	mov	r1, r5
	bl	add_wait_queue
	ldr	r6, .L13+8
	b	.L4
.L12:
	ldr	r0, [r6]
	bl	signal_pending
	cmp	r0, #0
	bne	.L3
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L3
.L4:
	mov	r0, r4
	bl	sk_stream_closing
	clz	r2, r0
	mov	r3, r5
	mov	r0, r4
	add	r1, sp, #4
	lsr	r2, r2, #5
	bl	sk_wait_event
	cmp	r0, #0
	beq	.L12
.L3:
	mov	r0, r4
	bl	sk_sleep
	ldr	r1, .L13+4
	bl	remove_wait_queue
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	woken_wake_function
	.word	wait
	.word	current
	.size	sk_stream_wait_close, .-sk_stream_wait_close
	.comm	woken_wake_function,4,4
	.comm	wait,4,4
	.comm	current,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
