	.file	"394097.c"
	.intel_syntax noprefix
	.text
	.globl	total_number_of_books
	.bss
	.align 8
	.type	total_number_of_books, @object
	.size	total_number_of_books, 8
total_number_of_books:
	.zero	8
	.globl	total_number_of_pages
	.align 8
	.type	total_number_of_pages, @object
	.size	total_number_of_pages, 8
total_number_of_pages:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\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
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -52[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR total_number_of_books[rip], rax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR total_number_of_pages[rip], rax
	mov	DWORD PTR -32[rbp], 0
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR total_number_of_books[rip]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	rdx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	add	DWORD PTR -32[rbp], 1
.L2:
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -32[rbp], eax
	jl	.L3
	jmp	.L4
.L10:
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, 1
	jne	.L5
	lea	rdx, -36[rbp]
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rdx, QWORD PTR total_number_of_books[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	add	edx, 1
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR total_number_of_books[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 1
	jne	.L6
	mov	rdx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	jmp	.L7
.L6:
	mov	rdx, QWORD PTR total_number_of_books[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 3
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, QWORD PTR total_number_of_pages[rip]
	mov	ecx, DWORD PTR -40[rbp]
	movsx	rcx, ecx
	sal	rcx, 3
	lea	rbx, [rsi+rcx]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR [rbx], rax
.L7:
	mov	rdx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rcx, QWORD PTR total_number_of_books[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cdqe
	sal	rax, 2
	sub	rax, 4
	add	rdx, rax
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, 2
	jne	.L9
	lea	rdx, -36[rbp]
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rdx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L9:
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rdx, QWORD PTR total_number_of_books[rip]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	eax, DWORD PTR -48[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -48[rbp], edx
	test	eax, eax
	jne	.L10
	mov	rax, QWORD PTR total_number_of_books[rip]
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR total_number_of_books[rip]
	mov	rdi, rax
	call	free@PLT
.L11:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L12
.L14:
	mov	rdx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L13
	mov	rdx, QWORD PTR total_number_of_pages[rip]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
.L13:
	add	DWORD PTR -28[rbp], 1
.L12:
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jl	.L14
	mov	rax, QWORD PTR total_number_of_pages[rip]
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR total_number_of_pages[rip]
	mov	rdi, rax
	call	free@PLT
.L15:
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	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	"394097.c"
	.text
	.comm	total_number_of_books,4,4
	.comm	total_number_of_pages,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"%d %d\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L18+8
	str	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L18+12
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L2
.L3:
	ldr	r3, .L18+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L3
	b	.L4
.L10:
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L5
	sub	r2, fp, #28
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L18+16
	bl	__isoc99_scanf
	ldr	r3, .L18+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	add	r2, r2, #1
	str	r2, [r3]
	ldr	r3, .L18+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L6
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	b	.L7
.L6:
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, .L18+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	lsl	r1, r3, #2
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r4, r2, r3
	bl	realloc
	mov	r3, r0
	str	r3, [r4]
.L7:
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L18+8
	ldr	r1, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	str	r2, [r3]
	b	.L4
.L5:
	ldr	r3, [fp, #-36]
	cmp	r3, #2
	bne	.L9
	sub	r2, fp, #28
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L18+16
	bl	__isoc99_scanf
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18+20
	bl	printf
	b	.L4
.L9:
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	ldr	r3, .L18+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18+20
	bl	printf
.L4:
	ldr	r3, [fp, #-40]
	sub	r2, r3, #1
	str	r2, [fp, #-40]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L18+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L18+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L11:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L12
.L14:
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L18+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L13:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L14
	ldr	r3, .L18+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
	ldr	r3, .L18+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L15:
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC3
	.word	.LC0
	.word	total_number_of_books
	.word	total_number_of_pages
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
