	.file	"362933.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"N must be at least 1\n"
.LC1:
	.string	"r+b"
	.align 8
.LC2:
	.string	"cannot open \"%s\" for reading and writing\n"
.LC3:
	.string	"SQLite format 3"
.LC4:
	.string	"not a valid database: %s\n"
.LC5:
	.string	"Usage: %s DATABASE N\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -165[rbp], 0
	cmp	DWORD PTR -180[rbp], 3
	jne	.L18
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rcx, -160[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoll@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -160[rbp]
	cmp	rdx, rax
	je	.L19
	mov	rax, QWORD PTR -160[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L19
	cmp	QWORD PTR -144[rbp], 0
	jg	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	mov	edx, 100
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -128[rbp], rax
	cmp	QWORD PTR -128[rbp], 100
	jne	.L20
	lea	rax, -112[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L21
	movzx	eax, BYTE PTR -96[rbp]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -95[rbp]
	movzx	eax, al
	add	eax, edx
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 1
	jne	.L11
	mov	DWORD PTR -164[rbp], 65536
.L11:
	cmp	DWORD PTR -164[rbp], 511
	jle	.L22
	cmp	DWORD PTR -164[rbp], 65536
	jg	.L22
	mov	eax, DWORD PTR -164[rbp]
	sub	eax, 1
	and	eax, DWORD PTR -164[rbp]
	test	eax, eax
	jne	.L22
	movzx	eax, BYTE PTR -84[rbp]
	movzx	eax, al
	sal	eax, 24
	mov	edx, eax
	movzx	eax, BYTE PTR -83[rbp]
	movzx	eax, al
	sal	eax, 16
	add	edx, eax
	movzx	eax, BYTE PTR -82[rbp]
	movzx	eax, al
	sal	eax, 8
	add	edx, eax
	movzx	eax, BYTE PTR -81[rbp]
	movzx	eax, al
	add	eax, edx
	cdqe
	mov	QWORD PTR -120[rbp], rax
	mov	rdx, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	QWORD PTR -152[rbp], rax
	mov	eax, 4294967295
	cmp	QWORD PTR -152[rbp], rax
	jle	.L14
	mov	eax, 4294967295
	mov	QWORD PTR -152[rbp], rax
.L14:
	mov	rax, QWORD PTR -152[rbp]
	sar	rax, 24
	mov	BYTE PTR -84[rbp], al
	mov	rax, QWORD PTR -152[rbp]
	sar	rax, 16
	mov	BYTE PTR -83[rbp], al
	mov	rax, QWORD PTR -152[rbp]
	sar	rax, 8
	mov	BYTE PTR -82[rbp], al
	mov	rax, QWORD PTR -152[rbp]
	mov	BYTE PTR -81[rbp], al
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 0
	mov	esi, 28
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, -112[rbp]
	lea	rdi, 28[rdx]
	mov	rcx, rax
	mov	edx, 1
	mov	esi, 4
	call	fwrite@PLT
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	imul	rax, QWORD PTR -152[rbp]
	lea	rcx, -1[rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -165[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	jmp	.L17
.L20:
	nop
	jmp	.L9
.L21:
	nop
	jmp	.L9
.L22:
	nop
.L9:
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	nop
	jmp	.L3
.L19:
	nop
.L3:
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"362933.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"N must be at least 1\012\000"
	.align	2
.LC1:
	.ascii	"r+b\000"
	.align	2
.LC2:
	.ascii	"cannot open \"%s\" for reading and writing\012\000"
	.align	2
.LC3:
	.ascii	"SQLite format 3\000"
	.align	2
.LC4:
	.ascii	"not a valid database: %s\012\000"
	.align	2
.LC5:
	.ascii	"Usage: %s DATABASE N\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #160
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-157]
	ldr	r3, [fp, #-168]
	cmp	r3, #3
	bne	.L18
	ldr	r3, [fp, #-172]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r1, fp, #156
	mov	r2, #0
	mov	r0, r3
	bl	strtoll
	str	r0, [fp, #-132]
	str	r1, [fp, #-128]
	ldr	r3, [fp, #-172]
	add	r3, r3, #8
	ldr	r2, [r3]
	ldr	r3, [fp, #-156]
	cmp	r2, r3
	beq	.L19
	ldr	r3, [fp, #-156]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L19
	sub	r3, fp, #132
	ldmia	r3, {r2-r3}
	cmp	r2, #1
	sbcs	r3, r3, #0
	bge	.L6
	ldr	r3, .L23+4
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L23+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-172]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L23+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L23+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-172]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L23+16
	bl	fprintf
	mov	r0, #1
	bl	exit
.L7:
	sub	r0, fp, #116
	ldr	r3, [fp, #-148]
	mov	r2, #100
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmp	r3, #100
	bne	.L20
	sub	r3, fp, #116
	ldr	r1, .L23+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	ldrb	r3, [fp, #-100]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldrb	r2, [fp, #-99]	@ zero_extendqisi2
	add	r3, r3, r2
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #1
	bne	.L11
	mov	r3, #65536
	str	r3, [fp, #-152]
.L11:
	ldr	r3, [fp, #-152]
	cmp	r3, #512
	blt	.L22
	ldr	r3, [fp, #-152]
	cmp	r3, #65536
	bgt	.L22
	ldr	r3, [fp, #-152]
	sub	r2, r3, #1
	ldr	r3, [fp, #-152]
	and	r3, r3, r2
	cmp	r3, #0
	bne	.L22
	ldrb	r3, [fp, #-88]	@ zero_extendqisi2
	lsl	r2, r3, #24
	ldrb	r3, [fp, #-87]	@ zero_extendqisi2
	lsl	r3, r3, #16
	add	r2, r2, r3
	ldrb	r3, [fp, #-86]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	ldrb	r2, [fp, #-85]	@ zero_extendqisi2
	add	r3, r3, r2
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-124]
	str	r3, [fp, #-120]
	sub	r1, fp, #124
	ldmia	r1, {r0-r1}
	sub	r3, fp, #132
	ldmia	r3, {r2-r3}
	adds	r4, r0, r2
	adc	r5, r1, r3
	str	r4, [fp, #-140]
	str	r5, [fp, #-136]
	sub	r3, fp, #140
	ldmia	r3, {r2-r3}
	mvn	r0, #0
	mov	r1, #0
	cmp	r0, r2
	sbcs	r3, r1, r3
	bge	.L14
	mvn	r2, #0
	mov	r3, #0
	str	r2, [fp, #-140]
	str	r3, [fp, #-136]
.L14:
	sub	r1, fp, #140
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r0, #24
	orr	r2, r2, r1, lsl #8
	asr	r3, r1, #24
	and	r3, r2, #255
	strb	r3, [fp, #-88]
	sub	r1, fp, #140
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r0, #16
	orr	r2, r2, r1, lsl #16
	asr	r3, r1, #16
	and	r3, r2, #255
	strb	r3, [fp, #-87]
	sub	r1, fp, #140
	ldmia	r1, {r0-r1}
	mov	r2, #0
	mov	r3, #0
	lsr	r2, r0, #8
	orr	r2, r2, r1, lsl #24
	asr	r3, r1, #8
	and	r3, r2, #255
	strb	r3, [fp, #-86]
	ldrb	r3, [fp, #-140]	@ zero_extendqisi2
	strb	r3, [fp, #-85]
	mov	r2, #0
	mov	r1, #28
	ldr	r0, [fp, #-148]
	bl	fseek
	sub	r3, fp, #116
	add	r0, r3, #28
	ldr	r3, [fp, #-148]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	ldr	r3, [fp, #-140]
	ldr	r2, [fp, #-152]
	mul	r3, r2, r3
	sub	r3, r3, #1
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-148]
	bl	fseek
	sub	r0, fp, #157
	ldr	r3, [fp, #-148]
	mov	r2, #1
	mov	r1, #1
	bl	fwrite
	ldr	r0, [fp, #-148]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	b	.L17
.L20:
	nop
	b	.L9
.L21:
	nop
	b	.L9
.L22:
	nop
.L9:
	ldr	r3, .L23+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-172]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L23+24
	bl	fprintf
	mov	r0, #1
	bl	exit
.L18:
	nop
	b	.L3
.L19:
	nop
.L3:
	ldr	r3, .L23+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-172]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L23+28
	bl	fprintf
	mov	r0, #1
	bl	exit
.L17:
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
