	.file	"extr_dbbackup.c_parse_tabdesc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"r"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Cannot parse table descriptor."
	.text
	.p2align 4
	.type	parse_tabdesc, @function
parse_tabdesc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	fopen@PLT
	test	rax, rax
	je	.L9
	mov	edx, DWORD PTR SEEK_END[rip]
	mov	r13, rax
	xor	esi, esi
	mov	rdi, rax
	call	fseek@PLT
	mov	rdi, r13
	call	ftell@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	xor	esi, esi
	mov	rdi, r13
	lea	r12d, 1[rax]
	call	fseek@PLT
	movsx	r12, r12d
	mov	rdi, r12
	call	malloc@PLT
	mov	QWORD PTR g_tabdesc_buffer[rip], rax
	mov	rbx, rax
	test	rax, rax
	je	.L3
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r13
	call	feof@PLT
	test	eax, eax
	jne	.L11
.L8:
	mov	rdi, r13
	call	ferror@PLT
	test	eax, eax
	jne	.L11
	mov	rsi, QWORD PTR g_tabdesc_buffer[rip]
	mov	rax, rbx
	sub	rax, rsi
	cmp	rax, r12
	jge	.L11
	add	rsi, r12
	mov	rdx, r13
	mov	rdi, rbx
	sub	rsi, rbx
	call	fgets@PLT
	test	rax, rax
	je	.L4
	add	ebp, 1
	.p2align 4,,10
	.p2align 3
.L6:
	movzx	eax, BYTE PTR [rbx]
	add	rbx, 1
	test	al, al
	je	.L4
	cmp	al, 10
	jne	.L6
	mov	rdi, r13
	mov	BYTE PTR -1[rbx], 0
	call	feof@PLT
	test	eax, eax
	je	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, r13
	call	fclose@PLT
	mov	esi, 16
	mov	edi, ebp
	call	calloc@PLT
	mov	QWORD PTR g_tabdesc[rip], rax
	test	rax, rax
	je	.L9
	mov	rsi, QWORD PTR g_tabdesc_buffer[rip]
	test	ebp, ebp
	je	.L13
	lea	edi, -1[rbp]
	xor	ecx, ecx
	sal	rdi, 4
	.p2align 4,,10
	.p2align 3
.L17:
	mov	QWORD PTR [rax+rcx], rsi
	movzx	eax, BYTE PTR [rsi]
	lea	rdx, 1[rsi]
	test	al, al
	je	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	cmp	al, 124
	jne	.L15
	mov	BYTE PTR -1[rdx], 0
	mov	rax, QWORD PTR g_tabdesc[rip]
	mov	QWORD PTR 8[rax+rcx], rdx
.L15:
	movzx	eax, BYTE PTR [rdx]
	add	rdx, 1
	test	al, al
	jne	.L16
.L14:
	cmp	rcx, rdi
	je	.L13
	mov	rax, QWORD PTR g_tabdesc[rip]
	add	rcx, 16
	mov	rsi, rdx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L13:
	mov	DWORD PTR g_num_tabdesc[rip], ebp
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR MMBAK_LOG_ERROR[rip]
	lea	rsi, .LC1[rip]
	call	print_log@PLT
.L19:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	exit@PLT
.L3:
	.cfi_restore_state
	mov	edi, DWORD PTR MMBAK_LOG_ERROR[rip]
	lea	rsi, .LC1[rip]
	call	print_log@PLT
	mov	rdi, r13
	call	fclose@PLT
	jmp	.L19
	.cfi_endproc
.LFE0:
	.size	parse_tabdesc, .-parse_tabdesc
	.comm	g_tabdesc_buffer,8,8
	.comm	g_tabdesc,8,8
	.comm	g_num_tabdesc,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	MMBAK_LOG_ERROR,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_dbbackup.c_parse_tabdesc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"Cannot parse table descriptor.\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_tabdesc, %function
parse_tabdesc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, .L35
	bl	fopen
	subs	r6, r0, #0
	beq	.L9
	ldr	r3, .L35+4
	mov	r1, #0
	ldr	r2, [r3]
	bl	fseek
	mov	r0, r6
	bl	ftell
	ldr	r3, .L35+8
	mov	r1, #0
	ldr	r2, [r3]
	add	r7, r0, #1
	mov	r0, r6
	bl	fseek
	mov	r0, r7
	bl	malloc
	ldr	r8, .L35+12
	cmp	r0, #0
	mov	r4, r0
	str	r0, [r8]
	beq	.L3
	mov	r5, #0
	mov	r9, r5
.L4:
	mov	r0, r6
	bl	feof
	cmp	r0, #0
	bne	.L11
.L8:
	mov	r0, r6
	bl	ferror
	cmp	r0, #0
	bne	.L11
	ldr	r1, [r8]
	sub	r3, r4, r1
	cmp	r3, r7
	bge	.L11
	add	r1, r1, r7
	mov	r2, r6
	mov	r0, r4
	sub	r1, r1, r4
	bl	fgets
	cmp	r0, #0
	addne	r5, r5, #1
	beq	.L4
.L6:
	ldrb	r3, [r4], #1	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L4
	cmp	r3, #10
	bne	.L6
	mov	r0, r6
	strb	r9, [r4, #-1]
	bl	feof
	cmp	r0, #0
	beq	.L8
.L11:
	mov	r0, r6
	bl	fclose
	mov	r1, #8
	mov	r0, r5
	bl	calloc
	ldr	ip, .L35+16
	cmp	r0, #0
	str	r0, [ip]
	beq	.L9
	cmp	r5, #0
	ldr	r3, [r8]
	beq	.L13
	mov	r1, #0
	mov	lr, r1
.L17:
	mov	r2, r3
	str	r3, [r0, r1, lsl #3]
	ldrb	r3, [r2], #1	@ zero_extendqisi2
	lsl	r0, r1, #3
	cmp	r3, #0
	beq	.L14
.L16:
	cmp	r3, #124
	strbeq	lr, [r2, #-1]
	ldreq	r3, [ip]
	addeq	r3, r3, r0
	streq	r2, [r3, #4]
	ldrb	r3, [r2], #1	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L16
.L14:
	add	r1, r1, #1
	cmp	r5, r1
	movne	r3, r2
	ldrne	r0, [ip]
	bne	.L17
.L13:
	ldr	r3, .L35+20
	str	r5, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	ldr	r3, .L35+24
	ldr	r1, .L35+28
	ldr	r0, [r3]
	bl	print_log
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r0, #1
	b	exit
.L3:
	ldr	r3, .L35+24
	ldr	r1, .L35+28
	ldr	r0, [r3]
	bl	print_log
	mov	r0, r6
	bl	fclose
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r0, #1
	b	exit
.L36:
	.align	2
.L35:
	.word	.LC0
	.word	SEEK_END
	.word	SEEK_SET
	.word	g_tabdesc_buffer
	.word	g_tabdesc
	.word	g_num_tabdesc
	.word	MMBAK_LOG_ERROR
	.word	.LC1
	.size	parse_tabdesc, .-parse_tabdesc
	.comm	g_tabdesc_buffer,4,4
	.comm	g_tabdesc,4,4
	.comm	g_num_tabdesc,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_END,4,4
	.comm	MMBAK_LOG_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
