	.file	"extr_file.c_init_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unable to open status file %s"
.LC1:
	.string	"unable to mmap() status file"
.LC2:
	.string	"status file is corrupt"
	.text
	.p2align 4
	.globl	init_file
	.type	init_file, @function
init_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	ebx, DWORD PTR FALSE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR HEADER_LEN[rip]
	mov	rsi, rsp
	mov	r12, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L23:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L23
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L24
.L4:
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	rdi, r14
	xor	eax, eax
	mov	r13, rsp
	call	open@PLT
	mov	QWORD PTR status_fd[rip], rax
	mov	r8, rax
	test	rax, rax
	js	.L25
.L5:
	mov	ecx, DWORD PTR MAP_SHARED[rip]
	xor	r9d, r9d
	xor	edi, edi
	mov	esi, 268435456
	mov	edx, DWORD PTR PROT_READ[rip]
	or	edx, DWORD PTR PROT_WRITE[rip]
	call	mmap@PLT
	cmp	rax, QWORD PTR MAP_FAILED[rip]
	mov	QWORD PTR status_info[rip], rax
	je	.L26
.L7:
	mov	edx, DWORD PTR SEEK_END[rip]
	mov	rdi, QWORD PTR status_fd[rip]
	xor	esi, esi
	call	lseek@PLT
	mov	QWORD PTR status_file_len[rip], rax
	test	ebx, ebx
	jne	.L8
	movsx	rsi, DWORD PTR HEADER_LEN[rip]
	cmp	rax, rsi
	jl	.L9
	mov	rdi, QWORD PTR status_info[rip]
	movsx	rdx, DWORD PTR [rdi]
	mov	rcx, rdx
	sal	rdx, 4
	add	rdx, rsi
	cmp	rax, rdx
	jl	.L9
.L10:
	test	ecx, ecx
	jle	.L15
	mov	rdx, QWORD PTR 8[rdi]
	sub	ecx, 1
	mov	rsi, QWORD PTR TRUE[rip]
	sal	rcx, 4
	lea	rax, 16[rdx]
	add	rcx, rax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L27:
	add	rax, 16
.L14:
	cmp	QWORD PTR [rdx], 0
	je	.L13
	mov	QWORD PTR 8[rdx], rsi
	mov	QWORD PTR [rdx], 0
.L13:
	mov	rdx, rax
	cmp	rcx, rax
	jne	.L27
.L15:
	mov	eax, DWORD PTR 4[rdi]
	add	eax, 2
	or	eax, 1
	mov	DWORD PTR 4[rdi], eax
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L28
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	call	warnx@PLT
	mov	eax, DWORD PTR TRUE[rip]
	test	eax, eax
	jne	.L8
	mov	rdi, QWORD PTR status_info[rip]
	mov	ecx, DWORD PTR [rdi]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rax, QWORD PTR ENOENT[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L29
.L6:
	mov	rdx, r14
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	errx@PLT
	mov	r8, QWORD PTR status_fd[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, r12d
	xor	esi, esi
	mov	rdi, r13
	call	memset@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	rdi, QWORD PTR status_fd[rip]
	xor	esi, esi
	call	lseek@PLT
	mov	edx, DWORD PTR HEADER_LEN[rip]
	mov	rdi, QWORD PTR status_fd[rip]
	mov	rsi, r13
	call	write@PLT
	movsx	rax, DWORD PTR HEADER_LEN[rip]
	mov	QWORD PTR status_file_len[rip], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	lea	rsi, .LC1[rip]
	mov	edi, 1
	call	err@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	mov	esi, DWORD PTR O_RDWR[rip]
	mov	edx, 420
	mov	rdi, r14
	xor	eax, eax
	or	esi, DWORD PTR O_CREAT[rip]
	call	open@PLT
	mov	ebx, DWORD PTR TRUE[rip]
	mov	QWORD PTR status_fd[rip], rax
	mov	r8, rax
	test	rax, rax
	jns	.L5
	jmp	.L6
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	init_file, .-init_file
	.comm	status_info,8,8
	.comm	status_file_len,8,8
	.comm	status_fd,8,8
	.comm	errno,8,8
	.comm	TRUE,8,8
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	O_RDWR,4,4
	.comm	O_CREAT,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,8,8
	.comm	HEADER_LEN,4,4
	.comm	FALSE,4,4
	.comm	ENOENT,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_file.c_init_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to open status file %s\000"
	.align	2
.LC1:
	.ascii	"unable to mmap() status file\000"
	.align	2
.LC2:
	.ascii	"status file is corrupt\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_file, %function
init_file:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	r5, .L24
	ldr	r10, .L24+4
	ldr	r7, [r5]
	ldr	r2, .L24+8
	add	r3, r7, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L24+12
	ldr	r1, [r10]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r6, r0
	ldr	r9, [r2]
	bl	open
	ldr	r4, .L24+16
	cmp	r0, #0
	mov	r3, r0
	add	r8, sp, #8
	str	r0, [r4]
	blt	.L20
.L2:
	mov	r0, #0
	ldr	r1, .L24+20
	ldr	r2, .L24+24
	ldr	ip, [r1]
	ldr	r2, [r2]
	ldr	r1, .L24+28
	str	r3, [sp]
	str	r0, [sp, #4]
	ldr	r3, [r1]
	orr	r2, ip, r2
	mov	r1, #268435456
	bl	mmap
	ldr	r3, .L24+32
	ldr	r6, .L24+36
	ldr	r3, [r3]
	str	r0, [r6]
	cmp	r0, r3
	beq	.L21
.L4:
	ldr	r3, .L24+40
	mov	r1, #0
	ldr	r2, [r3]
	ldr	r0, [r4]
	bl	lseek
	ldr	r10, .L24+44
	cmp	r9, #0
	str	r0, [r10]
	bne	.L5
	ldr	r3, [r5]
	cmp	r0, r3
	blt	.L6
	ldr	ip, [r6]
	ldr	r1, [ip]
	add	r3, r3, r1, lsl #3
	cmp	r0, r3
	blt	.L6
.L7:
	cmp	r1, #0
	ble	.L12
	mov	lr, #0
	ldr	r3, [ip, #8]
	ldr	r2, .L24+48
	add	r1, r3, r1, lsl #3
	ldr	r0, [r2]
	add	r1, r1, #4
	add	r3, r3, #4
.L11:
	ldr	r2, [r3, #-4]
	add	r3, r3, #8
	cmp	r2, #0
	strne	r0, [r3, #-8]
	strne	lr, [r3, #-12]
	cmp	r3, r1
	bne	.L11
.L12:
	ldr	r3, [ip, #4]
	add	r3, r3, #2
	orr	r3, r3, #1
	str	r3, [ip, #4]
	b	.L1
.L5:
	mov	r2, r7
	mov	r1, #0
	mov	r0, r8
	bl	memset
	ldr	r3, .L24+52
	mov	r1, #0
	ldr	r2, [r3]
	ldr	r0, [r4]
	bl	lseek
	mov	r1, r8
	ldr	r0, [r4]
	ldr	r2, [r5]
	bl	write
	ldr	r3, [r5]
	str	r3, [r10]
.L1:
	ldr	r3, .L24+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r0, .L24+56
	bl	warnx
	ldr	r3, .L24+48
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L5
	ldr	ip, [r6]
	ldr	r1, [ip]
	b	.L7
.L20:
	ldr	r2, .L24+60
	ldr	r3, .L24+64
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L23
.L3:
	mov	r2, r6
	mov	r0, #1
	ldr	r1, .L24+68
	bl	errx
	ldr	r3, [r4]
	b	.L2
.L21:
	ldr	r1, .L24+72
	mov	r0, #1
	bl	err
	b	.L4
.L23:
	ldr	r3, .L24+76
	ldr	r1, [r10]
	ldr	r3, [r3]
	mov	r2, #420
	orr	r1, r1, r3
	mov	r0, r6
	bl	open
	ldr	r2, .L24+48
	cmp	r0, #0
	mov	r3, r0
	ldr	r9, [r2]
	str	r0, [r4]
	bge	.L2
	b	.L3
.L22:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	HEADER_LEN
	.word	O_RDWR
	.word	FALSE
	.word	.LC3
	.word	status_fd
	.word	PROT_READ
	.word	PROT_WRITE
	.word	MAP_SHARED
	.word	MAP_FAILED
	.word	status_info
	.word	SEEK_END
	.word	status_file_len
	.word	TRUE
	.word	SEEK_SET
	.word	.LC2
	.word	errno
	.word	ENOENT
	.word	.LC0
	.word	.LC1
	.word	O_CREAT
	.size	init_file, .-init_file
	.comm	status_info,4,4
	.comm	status_file_len,4,4
	.comm	status_fd,4,4
	.comm	errno,4,4
	.comm	TRUE,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	PROT_WRITE,4,4
	.comm	PROT_READ,4,4
	.comm	O_RDWR,4,4
	.comm	O_CREAT,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,4,4
	.comm	HEADER_LEN,4,4
	.comm	FALSE,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
