	.file	"extr_log.c_log_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"stderr"
.LC1:
	.string	"syslog"
.LC2:
	.string	"switching log to %s"
.LC3:
	.string	"a"
.LC4:
	.string	"Could not open logfile %s: %s"
	.text
	.p2align 4
	.globl	log_init
	.type	log_init, @function
log_init:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR key_created[rip]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	test	eax, eax
	je	.L26
.L2:
	lea	rdi, log_lock[rip]
	call	lock_quick_lock@PLT
	cmp	QWORD PTR logfile[rip], 0
	je	.L4
	lea	rdi, log_lock[rip]
	call	lock_quick_unlock@PLT
	lea	rdx, .LC1[rip]
	test	ebx, ebx
	je	.L27
.L5:
	mov	edi, DWORD PTR VERB_QUERY[rip]
	lea	rsi, .LC2[rip]
	call	verbose@PLT
	lea	rdi, log_lock[rip]
	call	lock_quick_lock@PLT
	mov	rdi, QWORD PTR logfile[rip]
	test	rdi, rdi
	je	.L4
	cmp	rdi, QWORD PTR stderr[rip]
	je	.L4
	mov	QWORD PTR logfile[rip], 0
	call	fclose@PLT
.L4:
	test	rbp, rbp
	je	.L7
	cmp	BYTE PTR 0[rbp], 0
	je	.L7
	test	r12, r12
	je	.L10
	cmp	BYTE PTR [r12], 0
	jne	.L28
.L10:
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	call	fopen@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L29
	mov	edx, DWORD PTR _IOLBF[rip]
	mov	rdi, rax
	xor	ecx, ecx
	xor	esi, esi
	call	setvbuf@PLT
	mov	QWORD PTR logfile[rip], rbx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, log_lock[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	lock_quick_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	lea	rdx, .LC0[rip]
	test	rbp, rbp
	je	.L5
	cmp	BYTE PTR 0[rbp], 0
	cmovne	rdx, rbp
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR stderr[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, log_lock[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	mov	QWORD PTR logfile[rip], rax
	jmp	lock_quick_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	xor	esi, esi
	lea	rdi, logkey[rip]
	mov	DWORD PTR key_created[rip], 1
	call	ub_thread_key_create@PLT
	lea	rdi, log_lock[rip]
	call	lock_quick_init@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, r12
	call	strlen@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	edx, eax
	call	strncmp@PLT
	test	rax, rax
	jne	.L10
	mov	rdi, r12
	call	strlen@PLT
	cdqe
	add	rbp, rax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	lea	rdi, log_lock[rip]
	call	lock_quick_unlock@PLT
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rsi, rbp
	lea	rdi, .LC4[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	edx, eax
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	log_err@PLT
	.cfi_endproc
.LFE0:
	.size	log_init, .-log_init
	.comm	stderr,8,8
	.comm	logkey,4,4
	.comm	logging_to_syslog,4,4
	.comm	logfile,8,8
	.comm	log_lock,4,4
	.comm	key_created,4,4
	.comm	ident,4,4
	.comm	errno,4,4
	.comm	_IOLBF,8,8
	.comm	VERB_QUERY,4,4
	.comm	LOG_NDELAY,4,4
	.comm	LOG_DAEMON,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_log.c_log_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"stderr\000"
	.align	2
.LC1:
	.ascii	"syslog\000"
	.align	2
.LC2:
	.ascii	"switching log to %s\000"
	.align	2
.LC3:
	.ascii	"a\000"
	.align	2
.LC4:
	.ascii	"Could not open logfile %s: %s\000"
	.text
	.align	2
	.global	log_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	log_init, %function
log_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L31
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r3]
	mov	r7, r1
	cmp	r0, #0
	mov	r5, r2
	beq	.L28
.L2:
	ldr	r6, .L31+4
	ldr	r0, .L31+8
	bl	lock_quick_lock
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L31+8
	bl	lock_quick_unlock
	ldr	r3, .L31+12
	cmp	r7, #0
	ldr	r0, [r3]
	beq	.L29
	ldr	r2, .L31+16
.L5:
	ldr	r1, .L31+20
	bl	verbose
	ldr	r0, .L31+8
	bl	lock_quick_lock
	ldr	r0, [r6]
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L31+24
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L4
	mov	r3, #0
	str	r3, [r6]
	bl	fclose
.L4:
	cmp	r4, #0
	beq	.L7
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L7
	cmp	r5, #0
	beq	.L9
	ldrb	r3, [r5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L9
	mov	r0, r5
	bl	strlen
	mov	r1, r5
	mov	r7, r0
	mov	r2, r0
	mov	r0, r4
	bl	strncmp
	cmp	r0, #0
	addeq	r4, r4, r7
.L9:
	mov	r0, r4
	ldr	r1, .L31+28
	bl	fopen
	subs	r5, r0, #0
	beq	.L30
	mov	r3, #0
	ldr	r2, .L31+32
	mov	r1, r3
	ldr	r2, [r2]
	bl	setvbuf
	str	r5, [r6]
	ldr	r0, .L31+8
	pop	{r4, r5, r6, r7, r8, lr}
	b	lock_quick_unlock
.L29:
	cmp	r4, #0
	beq	.L12
	ldrb	r3, [r4]	@ zero_extendqisi2
	ldr	r2, .L31+36
	cmp	r3, #0
	movne	r2, r4
	b	.L5
.L7:
	ldr	r3, .L31+24
	ldr	r0, .L31+8
	ldr	r3, [r3]
	str	r3, [r6]
	pop	{r4, r5, r6, r7, r8, lr}
	b	lock_quick_unlock
.L28:
	mov	r2, #1
	mov	r1, r0
	ldr	r0, .L31+40
	str	r2, [r3]
	bl	ub_thread_key_create
	ldr	r0, .L31+8
	bl	lock_quick_init
	b	.L2
.L30:
	ldr	r0, .L31+8
	bl	lock_quick_unlock
	ldr	r3, .L31+44
	ldr	r0, [r3]
	bl	strerror
	mov	r1, r4
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r2, r0
	ldr	r0, .L31+48
	b	log_err
.L12:
	ldr	r2, .L31+36
	b	.L5
.L32:
	.align	2
.L31:
	.word	key_created
	.word	logfile
	.word	log_lock
	.word	VERB_QUERY
	.word	.LC1
	.word	.LC2
	.word	stderr
	.word	.LC3
	.word	_IOLBF
	.word	.LC0
	.word	logkey
	.word	errno
	.word	.LC4
	.size	log_init, .-log_init
	.comm	stderr,4,4
	.comm	logkey,4,4
	.comm	logging_to_syslog,4,4
	.comm	logfile,4,4
	.comm	log_lock,4,4
	.comm	key_created,4,4
	.comm	ident,4,4
	.comm	errno,4,4
	.comm	_IOLBF,4,4
	.comm	VERB_QUERY,4,4
	.comm	LOG_NDELAY,4,4
	.comm	LOG_DAEMON,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
