	.file	"extr_subr_log.c_logwakeup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	logwakeup
	.type	logwakeup, @function
logwakeup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	call	oslog_is_safe@PLT
	cmp	rax, QWORD PTR FALSE[rip]
	je	.L1
	xor	eax, eax
	call	LOG_LOCK@PLT
	mov	eax, DWORD PTR log_open[rip]
	test	eax, eax
	je	.L5
	mov	rbp, QWORD PTR logsoftc[rip+16]
	test	rbx, rbx
	je	.L4
	cmp	rbx, rbp
	je	.L4
.L5:
	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
	jmp	LOG_UNLOCK@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.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
.L4:
	.cfi_restore_state
	lea	rdi, logsoftc[rip+8]
	call	selwakeup@PLT
	mov	eax, DWORD PTR logsoftc[rip]
	test	DWORD PTR LOG_ASYNC[rip], eax
	jne	.L21
.L6:
	test	DWORD PTR LOG_RDWAIT[rip], eax
	je	.L5
	mov	edi, ebp
	call	wakeup@PLT
	mov	eax, DWORD PTR LOG_RDWAIT[rip]
	not	eax
	and	DWORD PTR logsoftc[rip], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	mov	r12d, DWORD PTR logsoftc[rip+4]
	xor	eax, eax
	call	LOG_UNLOCK@PLT
	test	r12d, r12d
	js	.L22
	mov	esi, DWORD PTR SIGIO[rip]
	mov	edi, r12d
	call	proc_signal@PLT
.L8:
	xor	eax, eax
	call	LOG_LOCK@PLT
	mov	eax, DWORD PTR logsoftc[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edi, r12d
	mov	esi, DWORD PTR SIGIO[rip]
	neg	edi
	call	gsignal@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	logwakeup, .-logwakeup
	.comm	logsoftc,24,16
	.comm	log_open,4,4
	.comm	SIGIO,4,4
	.comm	LOG_RDWAIT,4,4
	.comm	LOG_ASYNC,4,4
	.comm	FALSE,8,8
	.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_subr_log.c_logwakeup.c"
	.text
	.align	2
	.global	logwakeup
	.syntax unified
	.arm
	.fpu softvfp
	.type	logwakeup, %function
logwakeup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bl	oslog_is_safe
	ldr	r3, .L23
	ldr	r3, [r3]
	cmp	r0, r3
	popeq	{r4, r5, r6, pc}
	bl	LOG_LOCK
	ldr	r3, .L23+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L5
	ldr	r5, .L23+8
	cmp	r4, #0
	ldr	r6, [r5, #12]
	beq	.L4
	cmp	r4, r6
	beq	.L4
.L5:
	pop	{r4, r5, r6, lr}
	b	LOG_UNLOCK
.L4:
	ldr	r4, .L23+12
	mov	r0, r4
	bl	selwakeup
	ldr	r2, .L23+16
	ldr	r3, [r4, #-8]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L21
.L6:
	ldr	r4, .L23+20
	ldr	r2, [r4]
	tst	r3, r2
	beq	.L5
	mov	r0, r6
	bl	wakeup
	ldr	r3, [r5]
	ldr	r2, [r4]
	bic	r3, r3, r2
	str	r3, [r5]
	b	.L5
.L21:
	ldr	r4, [r5, #4]
	bl	LOG_UNLOCK
	cmp	r4, #0
	ldr	r3, .L23+24
	blt	.L22
	mov	r0, r4
	ldr	r1, [r3]
	bl	proc_signal
.L8:
	bl	LOG_LOCK
	ldr	r3, [r5]
	b	.L6
.L22:
	ldr	r1, [r3]
	rsb	r0, r4, #0
	bl	gsignal
	b	.L8
.L24:
	.align	2
.L23:
	.word	FALSE
	.word	log_open
	.word	logsoftc
	.word	logsoftc+8
	.word	LOG_ASYNC
	.word	LOG_RDWAIT
	.word	SIGIO
	.size	logwakeup, .-logwakeup
	.comm	logsoftc,16,4
	.comm	log_open,4,4
	.comm	SIGIO,4,4
	.comm	LOG_RDWAIT,4,4
	.comm	LOG_ASYNC,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
