	.file	"138371.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"cls"
.LC1:
	.string	"%i"
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	aloca_aluno
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	aloca_livro
.L11:
	lea	rdi, .LC0[rip]
	call	system@PLT
	mov	eax, 0
	call	printar_menu
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 10
	ja	.L2
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L4[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L4[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L2-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L7-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	cadastro_aluno
	jmp	.L2
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	cadastro_livro
	jmp	.L2
.L8:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	consulta_aluno
	jmp	.L2
.L7:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	consulta_livro
	jmp	.L2
.L6:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	emprestimo_reserva
	jmp	.L2
.L5:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	devolucao_livro
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	excluir_livro
	nop
.L2:
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	jne	.L11
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC2:
	.string	"@"
.LC3:
	.string	"\nRegistro: %i"
.LC4:
	.string	"\n\tTitulo: %s"
.LC5:
	.string	"\n\tAutor: %s\n"
.LC6:
	.string	"\n\t%i\247 Status: "
.LC7:
	.string	"Disponivel"
.LC8:
	.string	"Emprestado"
.LC9:
	.string	"\n\t\tRA: %s"
.LC10:
	.string	"\n\t\tRetirado: ---"
.LC11:
	.string	"\n\t\tDevolucao: ---"
.LC12:
	.string	"\n\t\tRetirado: %i/%i"
.LC13:
	.string	"\n\t\tDevolucao: %i/%i"
.LC14:
	.string	"Reservado"
	.align 8
.LC15:
	.string	"\n\t\tEspera-se retirar em: %i/%i"
	.align 8
.LC16:
	.string	"\n\t\tEspera-se devolver em: %i/%i"
	.align 8
.LC17:
	.string	"\n-------------------------------------------"
	.text
	.globl	printar_livro
	.type	printar_livro, @function
printar_livro:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L23
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 84
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L16
.L22:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 76
	jne	.L17
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L17:
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 69
	jne	.L19
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	add	rax, 1
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, -1
	jne	.L20
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L20:
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	add	rax, rsi
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	add	rax, rsi
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L19:
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	add	rax, 1
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, -1
	jne	.L21
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L18
.L21:
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	add	rax, rsi
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	add	rax, rsi
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	add	DWORD PTR -4[rbp], 1
.L16:
	cmp	DWORD PTR -4[rbp], 1
	jle	.L22
	lea	rdi, .LC17[rip]
	call	puts@PLT
.L23:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	printar_livro, .-printar_livro
	.section	.rodata
.LC18:
	.string	"rb"
.LC19:
	.string	"livros.bin"
	.align 8
.LC20:
	.string	"\nFalha ao abrir o arquivo dos livros (Consulta).\n\t-> Possivelmente nao ha livros cadastrados!\n"
.LC21:
	.string	"PAUSE"
.LC22:
	.string	"\nLista de livros (Total)"
	.align 8
.LC23:
	.string	"-------------------------------------------"
	.align 8
.LC24:
	.string	"\nStatus do livro para buscar (L/E/R): "
.LC25:
	.string	"%c"
	.align 8
.LC26:
	.string	"\nTitulo do livro para buscar: "
	.align 8
.LC27:
	.string	"\nTitulo Invalido. Tente novamente!"
	.text
	.globl	consulta_livro
	.type	consulta_livro, @function
consulta_livro:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	DWORD PTR -140[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -104[rbp], 0
	mov	eax, 0
	call	verificar_qtd_livros
	mov	DWORD PTR -112[rbp], eax
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L25
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L34
.L25:
	cmp	DWORD PTR -140[rbp], 5
	jne	.L27
	lea	rdi, .LC22[rip]
	call	puts@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	mov	DWORD PTR -116[rbp], 0
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	printar_livro
	add	DWORD PTR -116[rbp], 1
.L28:
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, DWORD PTR -112[rbp]
	jl	.L29
	jmp	.L30
.L27:
	cmp	DWORD PTR -140[rbp], 6
	jne	.L31
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -117[rbp]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	movzx	eax, BYTE PTR -117[rbp]
	movsx	edx, al
	mov	rax, QWORD PTR -136[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	buscar_status
	jmp	.L30
.L31:
	cmp	DWORD PTR -140[rbp], 7
	jne	.L30
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_titulo
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], -1
	jne	.L32
	lea	rdi, .LC27[rip]
	call	puts@PLT
	jmp	.L30
.L32:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	printar_livro
.L30:
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L34:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	consulta_livro, .-consulta_livro
	.section	.rodata
	.align 8
.LC28:
	.string	"\nErro ao abrir o arquivo de livros (Busca pelo titulo)\n"
	.text
	.globl	buscar_titulo
	.type	buscar_titulo, @function
buscar_titulo:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], -1
	mov	eax, 0
	call	verificar_qtd_livros
	mov	DWORD PTR -12[rbp], eax
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L36
	lea	rdi, .LC28[rip]
	call	puts@PLT
	jmp	.L35
.L36:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L38
.L41:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L39
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L40
.L39:
	add	DWORD PTR -20[rbp], 1
.L38:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L41
.L40:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -16[rbp]
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	buscar_titulo, .-buscar_titulo
	.section	.rodata
	.align 8
.LC29:
	.string	"\nErro ao abrir o arquivo de livros (Busca pelo status)\n"
	.align 8
.LC30:
	.string	"\nStatus Invalido. Tente novamente!"
	.text
	.globl	buscar_status
	.type	buscar_status, @function
buscar_status:
.LFB10:
	.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	QWORD PTR -56[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -60[rbp], al
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -32[rbp], -1
	mov	eax, 0
	call	verificar_qtd_livros
	mov	DWORD PTR -28[rbp], eax
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L44
	lea	rdi, .LC29[rip]
	call	puts@PLT
	jmp	.L43
.L44:
	mov	DWORD PTR -40[rbp], 0
	jmp	.L46
.L51:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L47
.L50:
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	ebx, al
	movsx	eax, BYTE PTR -60[rbp]
	mov	edi, eax
	call	toupper@PLT
	cmp	ebx, eax
	jne	.L48
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	printar_livro
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -32[rbp], eax
	jmp	.L49
.L48:
	add	DWORD PTR -36[rbp], 1
.L47:
	cmp	DWORD PTR -36[rbp], 1
	jle	.L50
.L49:
	add	DWORD PTR -40[rbp], 1
.L46:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L51
	cmp	DWORD PTR -32[rbp], -1
	jne	.L52
	lea	rdi, .LC30[rip]
	call	puts@PLT
.L52:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -32[rbp]
.L43:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	buscar_status, .-buscar_status
	.section	.rodata
	.align 8
.LC31:
	.string	"\nErro na alocacao dinamica do livro\n"
	.text
	.globl	aloca_livro
	.type	aloca_livro, @function
aloca_livro:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 212
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L56
	lea	rdi, .LC31[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L56:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	aloca_livro, .-aloca_livro
	.section	.rodata
.LC32:
	.string	"\nInforme o nome do livro: "
.LC33:
	.string	"Informe o nome do autor: "
.LC34:
	.string	"\nRegistro do livro: %i"
	.text
	.globl	cadastro_livro
	.type	cadastro_livro, @function
cadastro_livro:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], -1
	mov	DWORD PTR -8[rbp], 0
	mov	eax, 0
	call	verificar_qtd_livros
	test	eax, eax
	jle	.L58
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	verificar_vago_livro
	mov	DWORD PTR -12[rbp], eax
	jmp	.L59
.L58:
	mov	DWORD PTR -8[rbp], 1
.L59:
	cmp	DWORD PTR -12[rbp], -1
	je	.L60
	lea	rdi, .LC32[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 84
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L61
.L60:
	mov	eax, 0
	call	verificar_qtd_livros
	add	eax, 1000
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC34[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC32[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 84
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	DWORD PTR -8[rbp], 1
.L61:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L62
.L63:
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	BYTE PTR [rax], 76
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	add	rax, 1
	mov	DWORD PTR [rax], 2960685
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR 12[rax], -1
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR 20[rax], -1
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR 8[rax], -1
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR 16[rax], -1
	add	DWORD PTR -16[rbp], 1
.L62:
	cmp	DWORD PTR -16[rbp], 1
	jle	.L63
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	cmp	DWORD PTR -8[rbp], 1
	jne	.L64
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	escrever_arquivo_livros
.L64:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L66
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_livro
.L66:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	cadastro_livro, .-cadastro_livro
	.section	.rodata
	.align 8
.LC35:
	.string	"\nErro ao abrir o arquivo de livros (Busca pelo lugar vago)\n"
	.text
	.globl	verificar_vago_livro
	.type	verificar_vago_livro, @function
verificar_vago_livro:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], -1
	mov	eax, 0
	call	verificar_qtd_livros
	mov	DWORD PTR -12[rbp], eax
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L68
	lea	rdi, .LC35[rip]
	call	puts@PLT
	jmp	.L67
.L68:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L70
.L73:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 4
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L71
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L72
.L71:
	add	DWORD PTR -20[rbp], 1
.L70:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L73
.L72:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -16[rbp]
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	verificar_vago_livro, .-verificar_vago_livro
	.section	.rodata
.LC36:
	.string	"ab"
	.align 8
.LC37:
	.string	"\n\nFalha ao abrir o arquivo dos livros (Escrita).\n"
	.text
	.globl	escrever_arquivo_livros
	.type	escrever_arquivo_livros, @function
escrever_arquivo_livros:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC36[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L76
	lea	rdi, .LC37[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L77
.L76:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fwrite@PLT
.L77:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	escrever_arquivo_livros, .-escrever_arquivo_livros
	.globl	verificar_qtd_livros
	.type	verificar_qtd_livros, @function
verificar_qtd_livros:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L79
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L80
.L79:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ftell@PLT
	shr	rax, 2
	movabs	rdx, 5568828399610430677
	mul	rdx
	mov	rax, rdx
	shr	rax, 4
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
.L80:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	verificar_qtd_livros, .-verificar_qtd_livros
	.section	.rodata
.LC38:
	.string	"rb+"
	.align 8
.LC39:
	.string	"\nFalha ao abrir o arquivo de livros (Atualizar o arquivo)\n"
	.text
	.globl	atualizar_livro
	.type	atualizar_livro, @function
atualizar_livro:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC38[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L82
	lea	rdi, .LC39[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L83
.L82:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fwrite@PLT
.L83:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	atualizar_livro, .-atualizar_livro
	.globl	verificar_reservas
	.type	verificar_reservas, @function
verificar_reservas:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L85
.L88:
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 82
	jne	.L86
	mov	eax, 0
	jmp	.L87
.L86:
	add	DWORD PTR -4[rbp], 1
.L85:
	cmp	DWORD PTR -4[rbp], 1
	jle	.L88
	mov	eax, 1
.L87:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	verificar_reservas, .-verificar_reservas
	.section	.rodata
	.align 8
.LC40:
	.string	"\nTitulo do livro a ser deletado: "
	.align 8
.LC41:
	.string	"\nEscolha o numero do registro que deseja: "
	.align 8
.LC42:
	.string	"\nRegistro invalido, retornando ao menu."
	.align 8
.LC43:
	.string	"\nMulta para deletar o livro: RS 150.00\n"
	.align 8
.LC44:
	.string	"\nFalha ao obter o RA de emprestimo, retornando ao menu."
	.align 8
.LC45:
	.string	"\nFalha ao obter o RA de reserva, retornando ao menu."
	.text
	.globl	excluir_livro
	.type	excluir_livro, @function
excluir_livro:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L90:
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC40[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	mostrar_titulo
	test	eax, eax
	je	.L90
	lea	rdi, .LC41[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	edx, DWORD PTR -112[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	buscar_reg
	mov	DWORD PTR -104[rbp], eax
	cmp	DWORD PTR -104[rbp], -1
	jne	.L91
	lea	rdi, .LC42[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L89
.L91:
	mov	rax, QWORD PTR -120[rbp]
	movzx	eax, BYTE PTR 164[rax]
	cmp	al, 69
	jne	.L93
	mov	rax, QWORD PTR -120[rbp]
	mov	BYTE PTR 164[rax], 76
	lea	rdi, .LC43[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	mov	rax, QWORD PTR -120[rbp]
	lea	rdx, 165[rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_ra
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], -1
	jne	.L94
	lea	rdi, .LC44[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L89
.L94:
	mov	DWORD PTR -108[rbp], 0
	jmp	.L95
.L98:
	mov	rax, QWORD PTR -128[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L96
	mov	rax, QWORD PTR -128[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], 76
	mov	rax, QWORD PTR -128[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR 4[rax], -1
	jmp	.L97
.L96:
	add	DWORD PTR -108[rbp], 1
.L95:
	cmp	DWORD PTR -108[rbp], 3
	jle	.L98
.L97:
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 88[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	DWORD PTR 88[rax], edx
	mov	edx, DWORD PTR -100[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_aluno
.L93:
	mov	rax, QWORD PTR -120[rbp]
	movzx	eax, BYTE PTR 188[rax]
	cmp	al, 82
	jne	.L99
	mov	rax, QWORD PTR -120[rbp]
	mov	BYTE PTR 188[rax], 76
	mov	rax, QWORD PTR -120[rbp]
	lea	rdx, 189[rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_ra
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], -1
	jne	.L100
	lea	rdi, .LC45[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L89
.L100:
	mov	DWORD PTR -108[rbp], 0
	jmp	.L101
.L104:
	mov	rax, QWORD PTR -128[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L102
	mov	rax, QWORD PTR -128[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], 76
	mov	rax, QWORD PTR -128[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR 4[rax], -1
	jmp	.L103
.L102:
	add	DWORD PTR -108[rbp], 1
.L101:
	cmp	DWORD PTR -108[rbp], 3
	jle	.L104
.L103:
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 92[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	DWORD PTR 92[rax], edx
	mov	edx, DWORD PTR -100[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_aluno
.L99:
	mov	rax, QWORD PTR -120[rbp]
	add	rax, 4
	mov	WORD PTR [rax], 64
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_livro
.L89:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L106
	call	__stack_chk_fail@PLT
.L106:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	excluir_livro, .-excluir_livro
	.section	.rodata
	.align 8
.LC46:
	.string	"\nErro ao abrir o arquivo de livros (Mostrar titulos)\n"
.LC47:
	.string	"\nTitulo: %s"
.LC48:
	.string	"\nRegistro: %i\n\n"
	.align 8
.LC49:
	.string	"\nTitulo invalido, verifique novamente.\n"
	.text
	.globl	mostrar_titulo
	.type	mostrar_titulo, @function
mostrar_titulo:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	eax, 0
	call	verificar_qtd_livros
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L108
	lea	rdi, .LC46[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L108:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L109
.L111:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L110
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC48[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -16[rbp], 1
.L110:
	add	DWORD PTR -20[rbp], 1
.L109:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L111
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -16[rbp], 1
	je	.L112
	lea	rdi, .LC49[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	mov	eax, 0
	jmp	.L113
.L112:
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 1
.L113:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	mostrar_titulo, .-mostrar_titulo
	.section	.rodata
	.align 8
.LC50:
	.string	"\nErro ao abrir o arquivo de livros (Busca pelo registro)\n"
	.align 8
.LC51:
	.string	"\nRegistro Invalido. Tente novamente!"
	.text
	.globl	buscar_reg
	.type	buscar_reg, @function
buscar_reg:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], -1
	mov	eax, 0
	call	verificar_qtd_livros
	mov	DWORD PTR -12[rbp], eax
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L115
	lea	rdi, .LC50[rip]
	call	puts@PLT
	jmp	.L114
.L115:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L117
.L120:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	imul	rax, rax, 212
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 212
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jne	.L118
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L119
.L118:
	add	DWORD PTR -20[rbp], 1
.L117:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L120
.L119:
	cmp	DWORD PTR -16[rbp], -1
	jne	.L121
	lea	rdi, .LC51[rip]
	call	puts@PLT
.L121:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -16[rbp]
.L114:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	buscar_reg, .-buscar_reg
	.section	.rodata
.LC52:
	.string	"\nNome: "
.LC53:
	.string	"RA: "
	.text
	.globl	cadastro_aluno
	.type	cadastro_aluno, @function
cadastro_aluno:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	lea	rdi, .LC52[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, .LC53[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 80
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 88[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 92[rax], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L124
.L125:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], 76
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR 4[rax], -1
	add	DWORD PTR -4[rbp], 1
.L124:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L125
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	escrever_arquivo_aluno
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	cadastro_aluno, .-cadastro_aluno
	.section	.rodata
.LC54:
	.string	"alunos.bin"
	.align 8
.LC55:
	.string	"\n\nFalha ao abrir o arquivo dos alunos (Escrita).\n"
	.text
	.globl	escrever_arquivo_aluno
	.type	escrever_arquivo_aluno, @function
escrever_arquivo_aluno:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC36[rip]
	lea	rdi, .LC54[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L127
	lea	rdi, .LC55[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L128
.L127:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 128
	mov	rdi, rax
	call	fwrite@PLT
.L128:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	escrever_arquivo_aluno, .-escrever_arquivo_aluno
	.section	.rodata
	.align 8
.LC56:
	.string	"\nFalha ao abrir o arquivo dos alunos (Consulta).\n\t-> Possivelmente nao ha alunos cadastrados!\n"
.LC57:
	.string	"\nLista de alunos (Total)"
.LC58:
	.string	"\nRA para buscar: "
	.align 8
.LC59:
	.string	"\nRA Invalido. Tente novamente!"
	.text
	.globl	consulta_aluno
	.type	consulta_aluno, @function
consulta_aluno:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 0
	mov	eax, 0
	call	verificar_qtd_alunos
	mov	DWORD PTR -32[rbp], eax
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rsi, .LC18[rip]
	lea	rdi, .LC54[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L130
	lea	rdi, .LC56[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L138
.L130:
	cmp	DWORD PTR -60[rbp], 3
	jne	.L132
	lea	rdi, .LC57[rip]
	call	puts@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L133
.L134:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 7
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 128
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	printar_aluno
	add	DWORD PTR -36[rbp], 1
.L133:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jl	.L134
	jmp	.L135
.L132:
	cmp	DWORD PTR -60[rbp], 4
	jne	.L135
	lea	rdi, .LC58[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -15[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -15[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_ra
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -1
	jne	.L136
	lea	rdi, .LC59[rip]
	call	puts@PLT
	jmp	.L135
.L136:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	printar_aluno
.L135:
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L138:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L137
	call	__stack_chk_fail@PLT
.L137:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	consulta_aluno, .-consulta_aluno
	.section	.rodata
	.align 8
.LC60:
	.string	"\nErro ao abrir o arquivo de alunos (Busca pelo RA)\n"
	.text
	.globl	buscar_ra
	.type	buscar_ra, @function
buscar_ra:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], -1
	mov	eax, 0
	call	verificar_qtd_alunos
	mov	DWORD PTR -12[rbp], eax
	lea	rsi, .LC18[rip]
	lea	rdi, .LC54[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L140
	lea	rdi, .LC60[rip]
	call	puts@PLT
	jmp	.L139
.L140:
	mov	DWORD PTR -20[rbp], 0
	jmp	.L142
.L145:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 7
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 128
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 80[rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L143
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L144
.L143:
	add	DWORD PTR -20[rbp], 1
.L142:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L145
.L144:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -16[rbp]
.L139:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	buscar_ra, .-buscar_ra
	.globl	verificar_qtd_alunos
	.type	verificar_qtd_alunos, @function
verificar_qtd_alunos:
.LFB25:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC18[rip]
	lea	rdi, .LC54[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L148
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L149
.L148:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ftell@PLT
	shr	rax, 7
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
.L149:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	verificar_qtd_alunos, .-verificar_qtd_alunos
	.section	.rodata
.LC61:
	.string	"\n\tNome: %s "
.LC62:
	.string	"\n\tRA: %s"
.LC63:
	.string	"\n\tQTD Emprestado: %i"
.LC64:
	.string	"\n\tQTD Reservado: %i"
.LC65:
	.string	"\n\tTabela %i: %c -- %i"
	.align 8
.LC66:
	.string	"\n\n-------------------------------------------"
	.text
	.globl	printar_aluno
	.type	printar_aluno, @function
printar_aluno:
.LFB26:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC61[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 80
	mov	rsi, rax
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 88[rax]
	test	eax, eax
	jle	.L151
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 88[rax]
	mov	esi, eax
	lea	rdi, .LC63[rip]
	mov	eax, 0
	call	printf@PLT
.L151:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 92[rax]
	test	eax, eax
	jle	.L152
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 92[rax]
	mov	esi, eax
	lea	rdi, .LC64[rip]
	mov	eax, 0
	call	printf@PLT
.L152:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L153
.L155:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	je	.L154
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC65[rip]
	mov	eax, 0
	call	printf@PLT
.L154:
	add	DWORD PTR -4[rbp], 1
.L153:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L155
	lea	rdi, .LC66[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	printar_aluno, .-printar_aluno
	.section	.rodata
	.align 8
.LC67:
	.string	"\nFalha ao abrir o arquivo de alunos (Atualizar o arquivo)\n"
	.text
	.globl	atualizar_aluno
	.type	atualizar_aluno, @function
atualizar_aluno:
.LFB27:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -8[rbp], 0
	lea	rsi, .LC38[rip]
	lea	rdi, .LC54[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L157
	lea	rdi, .LC67[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L158
.L157:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	sal	rax, 7
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 128
	mov	rdi, rax
	call	fwrite@PLT
.L158:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	atualizar_aluno, .-atualizar_aluno
	.section	.rodata
	.align 8
.LC68:
	.string	"\nErro na alocacao dinamica do aluno\n"
	.text
	.globl	aloca_aluno
	.type	aloca_aluno, @function
aloca_aluno:
.LFB28:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 128
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L161
	lea	rdi, .LC68[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L161:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	aloca_aluno, .-aloca_aluno
	.section	.rodata
.LC69:
	.string	"\nRA do aluno: "
	.align 8
.LC70:
	.string	"\nO Aluno nao possui livros emprestados"
	.align 8
.LC71:
	.string	"\nTitulo do livro a ser devolvido: "
.LC72:
	.string	"\nTitulo do livro invalido!"
.LC73:
	.string	"\nData da devolucao (Atual)"
.LC74:
	.string	"\n\tDia: "
.LC75:
	.string	"\tMes: "
	.align 8
.LC76:
	.string	"\nData invalida. Tente novamente\n"
	.align 8
.LC77:
	.string	"\nNovo emprestimo para o livro\n"
	.align 8
.LC78:
	.string	"\nO aluno da reserva ja esta com o limite de emprestimos.\n"
.LC79:
	.string	"\nLivro devolvido com sucesso\n"
	.text
	.globl	devolucao_livro
	.type	devolucao_livro, @function
devolucao_livro:
.LFB29:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC69[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -103[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -103[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_ra
	mov	DWORD PTR -112[rbp], eax
	cmp	DWORD PTR -112[rbp], -1
	jne	.L163
	lea	rdi, .LC59[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L162
.L163:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 88[rax]
	test	eax, eax
	jg	.L165
	lea	rdi, .LC70[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L162
.L165:
	lea	rdi, .LC71[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_titulo
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], -1
	jne	.L166
	lea	rdi, .LC72[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L162
.L166:
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC73[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC74[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -128[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, .LC75[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -124[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	DWORD PTR -116[rbp], 31
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 2
	jne	.L167
	mov	DWORD PTR -116[rbp], 28
.L167:
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 4
	je	.L168
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 6
	je	.L168
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 8
	je	.L168
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 11
	jne	.L169
.L168:
	mov	DWORD PTR -116[rbp], 30
.L169:
	mov	eax, DWORD PTR -128[rbp]
	test	eax, eax
	jle	.L170
	mov	eax, DWORD PTR -128[rbp]
	cmp	DWORD PTR -116[rbp], eax
	jl	.L170
	mov	eax, DWORD PTR -124[rbp]
	test	eax, eax
	jle	.L170
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 12
	jle	.L171
.L170:
	lea	rdi, .LC76[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
.L171:
	mov	eax, DWORD PTR -128[rbp]
	test	eax, eax
	jle	.L166
	mov	eax, DWORD PTR -128[rbp]
	cmp	DWORD PTR -116[rbp], eax
	jl	.L166
	mov	eax, DWORD PTR -124[rbp]
	test	eax, eax
	jle	.L166
	mov	eax, DWORD PTR -124[rbp]
	cmp	eax, 12
	jg	.L166
	mov	rax, QWORD PTR -144[rbp]
	movzx	eax, BYTE PTR 164[rax]
	cmp	al, 69
	jne	.L162
	mov	rax, QWORD PTR -144[rbp]
	lea	rdx, 165[rax]
	lea	rax, -103[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcmp@PLT
	test	eax, eax
	jne	.L162
	mov	ecx, DWORD PTR -124[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	rdx, QWORD PTR -144[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	multar
	mov	rax, QWORD PTR -144[rbp]
	movzx	eax, BYTE PTR 188[rax]
	cmp	al, 82
	jne	.L173
	mov	DWORD PTR -120[rbp], 0
	jmp	.L174
.L177:
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L175
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], 76
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR 4[rax], -1
	jmp	.L176
.L175:
	add	DWORD PTR -120[rbp], 1
.L174:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L177
.L176:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 88[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	DWORD PTR 88[rax], edx
	mov	edx, DWORD PTR -112[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_aluno
	mov	rax, QWORD PTR -144[rbp]
	lea	rdx, 189[rax]
	lea	rax, -103[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rdx, -103[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_ra
	mov	DWORD PTR -112[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 88[rax]
	cmp	eax, 2
	jle	.L178
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 92[rax]
	test	eax, eax
	jg	.L179
.L178:
	mov	ecx, DWORD PTR -124[rbp]
	mov	edx, DWORD PTR -128[rbp]
	mov	rsi, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	emprestimo_pos_devolucao
	mov	edx, DWORD PTR -108[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_livro
	mov	edx, DWORD PTR -112[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_aluno
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC77[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	printar_livro
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	printar_aluno
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L162
.L179:
	lea	rdi, .LC78[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L162
.L173:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L181
.L184:
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L182
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], 76
	mov	rax, QWORD PTR -136[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR 4[rax], -1
	jmp	.L183
.L182:
	add	DWORD PTR -120[rbp], 1
.L181:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L184
.L183:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 88[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -136[rbp]
	mov	DWORD PTR 88[rax], edx
	mov	rax, QWORD PTR -144[rbp]
	mov	BYTE PTR 164[rax], 76
	mov	edx, DWORD PTR -112[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_aluno
	mov	edx, DWORD PTR -108[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_livro
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC79[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	printar_livro
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	printar_aluno
	lea	rdi, .LC21[rip]
	call	system@PLT
.L162:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L186
	call	__stack_chk_fail@PLT
.L186:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	devolucao_livro, .-devolucao_livro
	.globl	emprestimo_pos_devolucao
	.type	emprestimo_pos_devolucao, @function
emprestimo_pos_devolucao:
.LFB30:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	DWORD PTR -40[rbp], ecx
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 80[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 165
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 172[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	DWORD PTR 176[rax], edx
	mov	DWORD PTR -8[rbp], 31
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	cmp	eax, 2
	jne	.L188
	mov	DWORD PTR -8[rbp], 28
.L188:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	cmp	eax, 4
	je	.L189
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	cmp	eax, 6
	je	.L189
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	cmp	eax, 8
	je	.L189
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	cmp	eax, 11
	jne	.L190
.L189:
	mov	DWORD PTR -8[rbp], 30
.L190:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 172[rax]
	lea	edx, 7[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 180[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 180[rax]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L191
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	cmp	eax, 12
	jne	.L192
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 184[rax], 1
	jmp	.L193
.L192:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 176[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 184[rax], edx
.L193:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 180[rax]
	sub	eax, DWORD PTR -8[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 180[rax], edx
	jmp	.L194
.L191:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR 176[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 184[rax], edx
.L194:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L195
.L198:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L196
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], 69
	jmp	.L197
.L196:
	add	DWORD PTR -4[rbp], 1
.L195:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L198
.L197:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 92[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 92[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 88[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 88[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR 188[rax], 76
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	emprestimo_pos_devolucao, .-emprestimo_pos_devolucao
	.section	.rodata
	.align 8
.LC80:
	.string	"\nValor da multa por atraso = %i\n\n"
.LC81:
	.string	"\nEntrega dentro do prazo\n"
	.text
	.globl	multar
	.type	multar, @function
multar:
.LFB31:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	QWORD PTR -48[rbp], rdx
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 184[rax]
	cmp	eax, 12
	jne	.L200
	mov	DWORD PTR -12[rbp], 1
.L200:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 180[rax]
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 184[rax]
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 184[rax]
	mov	DWORD PTR -40[rbp], eax
	mov	DWORD PTR -24[rbp], 31
	cmp	DWORD PTR -40[rbp], 2
	jne	.L201
	mov	DWORD PTR -24[rbp], 28
.L201:
	cmp	DWORD PTR -40[rbp], 4
	je	.L202
	cmp	DWORD PTR -40[rbp], 6
	je	.L202
	cmp	DWORD PTR -40[rbp], 8
	je	.L202
	cmp	DWORD PTR -40[rbp], 11
	jne	.L203
.L202:
	mov	DWORD PTR -24[rbp], 30
.L203:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L204
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L205
.L204:
	cmp	DWORD PTR -4[rbp], 1
	jne	.L206
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 180[rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, ecx
	mov	DWORD PTR -20[rbp], eax
	jmp	.L205
.L206:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR 180[rax]
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, ecx
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -28[rbp], 1
	jmp	.L207
.L213:
	cmp	DWORD PTR -40[rbp], 12
	jne	.L208
	mov	DWORD PTR -40[rbp], 1
	jmp	.L209
.L208:
	add	DWORD PTR -40[rbp], 1
.L209:
	mov	DWORD PTR -24[rbp], 31
	cmp	DWORD PTR -40[rbp], 2
	jne	.L210
	mov	DWORD PTR -24[rbp], 28
.L210:
	cmp	DWORD PTR -40[rbp], 4
	je	.L211
	cmp	DWORD PTR -40[rbp], 6
	je	.L211
	cmp	DWORD PTR -40[rbp], 8
	je	.L211
	cmp	DWORD PTR -40[rbp], 11
	jne	.L212
.L211:
	mov	DWORD PTR -24[rbp], 30
.L212:
	mov	eax, DWORD PTR -24[rbp]
	add	DWORD PTR -20[rbp], eax
	add	DWORD PTR -28[rbp], 1
.L207:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jle	.L213
	cmp	DWORD PTR -12[rbp], 0
	jne	.L205
	mov	eax, DWORD PTR -24[rbp]
	sub	DWORD PTR -20[rbp], eax
.L205:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L214
.L215:
	add	DWORD PTR -16[rbp], 3
	add	DWORD PTR -28[rbp], 1
.L214:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L215
	cmp	DWORD PTR -16[rbp], 0
	jg	.L216
	cmp	DWORD PTR -12[rbp], 1
	jne	.L217
.L216:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC80[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L218
.L217:
	lea	rdi, .LC81[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	nop
.L218:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	multar, .-multar
	.section	.rodata
	.align 8
.LC82:
	.string	"\nO aluno ja esta com o limite de emprestimo e reservas.\n"
	.text
	.globl	emprestimo_reserva
	.type	emprestimo_reserva, @function
emprestimo_reserva:
.LFB32:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC69[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -15[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -15[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_ra
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L220
	lea	rdi, .LC59[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L225
.L220:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 88[rax]
	cmp	eax, 2
	jle	.L222
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 92[rax]
	test	eax, eax
	jg	.L223
.L222:
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	efetivar_emprestimo_reserva
	jmp	.L225
.L223:
	lea	rdi, .LC82[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
.L225:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L224
	call	__stack_chk_fail@PLT
.L224:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	emprestimo_reserva, .-emprestimo_reserva
	.section	.rodata
.LC83:
	.string	"\nTitulo do livro: "
	.align 8
.LC84:
	.string	"\nInfelizmente o livro ja esta reservado."
.LC85:
	.string	"\nRA de Emprestimo: %s"
.LC86:
	.string	"\nData devolucao: %i/%i\n\n"
	.text
	.globl	efetivar_emprestimo_reserva
	.type	efetivar_emprestimo_reserva, @function
efetivar_emprestimo_reserva:
.LFB33:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	DWORD PTR -132[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	lea	rdi, .LC83[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	gets@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	buscar_titulo
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], -1
	jne	.L227
	lea	rdi, .LC72[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
	jmp	.L237
.L227:
	mov	DWORD PTR -108[rbp], 0
	jmp	.L229
.L234:
	mov	rax, QWORD PTR -128[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 76
	jne	.L230
	mov	edx, DWORD PTR -108[rbp]
	mov	rsi, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	ecx, edx
	mov	edx, 69
	mov	rdi, rax
	call	alterar_status_emprestimo
	jmp	.L231
.L230:
	mov	rax, QWORD PTR -128[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 69
	jne	.L232
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	verificar_reservas
	cmp	eax, 1
	jne	.L232
	mov	rsi, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	ecx, 1
	mov	edx, 82
	mov	rdi, rax
	call	alterar_status_emprestimo
	jmp	.L231
.L232:
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	verificar_reservas
	cmp	eax, 1
	je	.L233
	lea	rdi, .LC84[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -128[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	add	rax, 1
	mov	rsi, rax
	lea	rdi, .LC85[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -128[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 20[rax]
	mov	rax, QWORD PTR -128[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -108[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	add	rax, rsi
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	lea	rdi, .LC86[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -104[rbp], 1
	jmp	.L231
.L233:
	add	DWORD PTR -108[rbp], 1
.L229:
	cmp	DWORD PTR -108[rbp], 1
	jle	.L234
.L231:
	mov	edx, DWORD PTR -100[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_livro
	mov	edx, DWORD PTR -132[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	atualizar_aluno
	cmp	DWORD PTR -104[rbp], 1
	je	.L235
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	printar_aluno
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	printar_livro
.L235:
	lea	rdi, .LC21[rip]
	call	system@PLT
.L237:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L236
	call	__stack_chk_fail@PLT
.L236:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE33:
	.size	efetivar_emprestimo_reserva, .-efetivar_emprestimo_reserva
	.section	.rodata
.LC87:
	.string	"\nData do emprestimo (Atual)"
	.text
	.globl	alterar_status_emprestimo
	.type	alterar_status_emprestimo, @function
alterar_status_emprestimo:
.LFB34:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	eax, edx
	mov	DWORD PTR -56[rbp], ecx
	mov	BYTE PTR -52[rbp], al
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	movzx	eax, BYTE PTR -52[rbp]
	mov	BYTE PTR [rdx], al
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 80[rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	add	rax, rsi
	add	rax, 1
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	cmp	BYTE PTR -52[rbp], 82
	je	.L239
.L245:
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC87[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC74[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, .LC75[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	DWORD PTR -12[rbp], 31
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 2
	jne	.L240
	mov	DWORD PTR -12[rbp], 28
.L240:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 4
	je	.L241
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 6
	je	.L241
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 8
	je	.L241
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 11
	jne	.L242
.L241:
	mov	DWORD PTR -12[rbp], 30
.L242:
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	jle	.L243
	mov	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L243
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jle	.L243
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 12
	jle	.L244
.L243:
	lea	rdi, .LC76[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	system@PLT
.L244:
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	jle	.L245
	mov	eax, DWORD PTR -24[rbp]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L245
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jle	.L245
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 12
	jg	.L245
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR 8[rdx], eax
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR 12[rdx], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 88[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 88[rax], edx
	jmp	.L246
.L239:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 92[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 92[rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	ecx, DWORD PTR 180[rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rsi
	lea	edx, 1[rcx]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rcx+rax]
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR 184[rax]
	mov	DWORD PTR 12[rdx], eax
	mov	DWORD PTR -12[rbp], 31
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 2
	jne	.L247
	mov	DWORD PTR -12[rbp], 28
.L247:
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 4
	je	.L248
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 6
	je	.L248
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 8
	je	.L248
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 11
	jne	.L246
.L248:
	mov	DWORD PTR -12[rbp], 30
.L246:
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rsi
	lea	edx, 7[rcx]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 16[rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L249
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	eax, DWORD PTR 12[rax]
	cmp	eax, 12
	jne	.L250
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	DWORD PTR 20[rax], 1
	jmp	.L251
.L250:
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	ecx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rsi
	lea	edx, 1[rcx]
	mov	DWORD PTR 20[rax], edx
.L251:
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rax, rcx
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 3
	lea	rcx, [rsi+rax]
	mov	eax, edx
	sub	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR 16[rcx], eax
	jmp	.L252
.L249:
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	add	rcx, rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, 164[rax]
	mov	eax, DWORD PTR -56[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rsi+rax]
	mov	eax, DWORD PTR 12[rcx]
	mov	DWORD PTR 20[rdx], eax
.L252:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L253
.L256:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 76
	jne	.L254
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	movzx	eax, BYTE PTR -52[rbp]
	mov	BYTE PTR [rdx], al
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 96[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 4[rdx], eax
	jmp	.L255
.L254:
	add	DWORD PTR -16[rbp], 1
.L253:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L256
.L255:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L257
	call	__stack_chk_fail@PLT
.L257:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE34:
	.size	alterar_status_emprestimo, .-alterar_status_emprestimo
	.section	.rodata
.LC88:
	.string	"\n<1> Cadastro do aluno"
.LC89:
	.string	"\n<2> Cadastro de livro"
.LC90:
	.string	"\n--------------------"
.LC91:
	.string	"\n<3> Consultar alunos (Total)"
.LC92:
	.string	"\n<4> Consultar aluno (RA)"
.LC93:
	.string	"\n<5> Consultar livros (Total)"
	.align 8
.LC94:
	.string	"\n<6> Consultar livros (Status)"
	.align 8
.LC95:
	.string	"\n<7> Consultar livros (Titulo)"
.LC96:
	.string	"\n<8> Emprestimo / Reserva"
.LC97:
	.string	"\n<9> Devolucao"
.LC98:
	.string	"\n<10> Deletar livro"
.LC99:
	.string	"\n<0> Sair"
.LC100:
	.string	"\nOpcao: "
	.text
	.globl	printar_menu
	.type	printar_menu, @function
printar_menu:
.LFB35:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC88[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC89[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC91[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC92[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC93[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC94[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC95[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC96[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC97[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC98[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC99[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC90[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC100[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE35:
	.size	printar_menu, .-printar_menu
	.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	"138371.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cls\000"
	.align	2
.LC1:
	.ascii	"%i\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	sub	r3, fp, #20
	mov	r0, r3
	bl	aloca_aluno
	sub	r3, fp, #16
	mov	r0, r3
	bl	aloca_livro
.L11:
	ldr	r0, .L14+4
	bl	system
	bl	printar_menu
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L14+8
	bl	__isoc99_scanf
	ldr	r3, .L14+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	cmp	r3, #9
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L8
	.word	.L7
	.word	.L7
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L10:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	cadastro_aluno
	b	.L2
.L9:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	cadastro_livro
	b	.L2
.L8:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	consulta_aluno
	b	.L2
.L7:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	consulta_livro
	b	.L2
.L6:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	emprestimo_reserva
	b	.L2
.L5:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	mov	r1, r2
	mov	r0, r3
	bl	devolucao_livro
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	excluir_livro
	nop
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.word	stdin
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"@\000"
	.align	2
.LC4:
	.ascii	"\012Registro: %i\000"
	.align	2
.LC5:
	.ascii	"\012\011Titulo: %s\000"
	.align	2
.LC6:
	.ascii	"\012\011Autor: %s\012\000"
	.align	2
.LC7:
	.ascii	"\012\011%i\247 Status: \000"
	.align	2
.LC8:
	.ascii	"Disponivel\000"
	.align	2
.LC9:
	.ascii	"Emprestado\000"
	.align	2
.LC10:
	.ascii	"\012\011\011RA: %s\000"
	.align	2
.LC11:
	.ascii	"\012\011\011Retirado: ---\000"
	.align	2
.LC12:
	.ascii	"\012\011\011Devolucao: ---\000"
	.align	2
.LC13:
	.ascii	"\012\011\011Retirado: %i/%i\000"
	.align	2
.LC14:
	.ascii	"\012\011\011Devolucao: %i/%i\000"
	.align	2
.LC15:
	.ascii	"Reservado\000"
	.align	2
.LC16:
	.ascii	"\012\011\011Espera-se retirar em: %i/%i\000"
	.align	2
.LC17:
	.ascii	"\012\011\011Espera-se devolver em: %i/%i\000"
	.align	2
.LC18:
	.ascii	"\012-------------------------------------------\000"
	.text
	.align	2
	.global	printar_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	printar_livro, %function
printar_livro:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r1, .L26
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+4
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #84
	mov	r1, r3
	ldr	r0, .L26+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L18
.L24:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L26+16
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #76
	bne	.L19
	ldr	r0, .L26+20
	bl	printf
	b	.L20
.L19:
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #69
	bne	.L21
	ldr	r0, .L26+24
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #8]
	cmn	r3, #1
	bne	.L22
	ldr	r0, .L26+32
	bl	printf
	ldr	r0, .L26+36
	bl	printf
	b	.L20
.L22:
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r0, [r3, #8]
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L26+40
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r0, [r3, #16]
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #20]
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L26+44
	bl	printf
	b	.L20
.L21:
	ldr	r0, .L26+48
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #8]
	cmn	r3, #1
	bne	.L23
	ldr	r0, .L26+32
	bl	printf
	ldr	r0, .L26+36
	bl	printf
	b	.L20
.L23:
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r0, [r3, #8]
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L26+52
	bl	printf
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r0, [r3, #16]
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #20]
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L26+56
	bl	printf
.L20:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L18:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L24
	ldr	r0, .L26+60
	bl	puts
.L25:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	printar_livro, .-printar_livro
	.section	.rodata
	.align	2
.LC19:
	.ascii	"rb\000"
	.align	2
.LC20:
	.ascii	"livros.bin\000"
	.align	2
.LC21:
	.ascii	"\012Falha ao abrir o arquivo dos livros (Consulta)."
	.ascii	"\012\011-> Possivelmente nao ha livros cadastrados!"
	.ascii	"\012\000"
	.align	2
.LC22:
	.ascii	"PAUSE\000"
	.align	2
.LC23:
	.ascii	"\012Lista de livros (Total)\000"
	.align	2
.LC24:
	.ascii	"-------------------------------------------\000"
	.align	2
.LC25:
	.ascii	"\012Status do livro para buscar (L/E/R): \000"
	.align	2
.LC26:
	.ascii	"%c\000"
	.align	2
.LC27:
	.ascii	"\012Titulo do livro para buscar: \000"
	.align	2
.LC28:
	.ascii	"\012Titulo Invalido. Tente novamente!\000"
	.align	2
.LC29:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	consulta_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	consulta_livro, %function
consulta_livro:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L39
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-100]
	bl	verificar_qtd_livros
	str	r0, [fp, #-96]
	ldr	r0, .L39+4
	bl	system
	ldr	r1, .L39+8
	ldr	r0, .L39+12
	bl	fopen
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	bne	.L29
	ldr	r0, .L39+16
	bl	puts
	ldr	r0, .L39+20
	bl	system
	b	.L38
.L29:
	ldr	r3, [fp, #-116]
	cmp	r3, #5
	bne	.L31
	ldr	r0, .L39+24
	bl	puts
	ldr	r0, .L39+28
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L32
.L33:
	ldr	r3, [fp, #-104]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-100]
	bl	fseek
	ldr	r3, [fp, #-100]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-112]
	bl	fread
	ldr	r0, [fp, #-112]
	bl	printar_livro
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L32:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-96]
	cmp	r2, r3
	blt	.L33
	b	.L34
.L31:
	ldr	r3, [fp, #-116]
	cmp	r3, #6
	bne	.L35
	ldr	r0, .L39+32
	bl	printf
	sub	r3, fp, #105
	mov	r1, r3
	ldr	r0, .L39+36
	bl	__isoc99_scanf
	ldr	r3, .L39+40
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldrb	r3, [fp, #-105]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	buscar_status
	b	.L34
.L35:
	ldr	r3, [fp, #-116]
	cmp	r3, #7
	bne	.L34
	ldr	r0, .L39+44
	bl	printf
	sub	r3, fp, #88
	mov	r0, r3
	bl	gets
	ldr	r3, .L39+40
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	buscar_titulo
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	bne	.L36
	ldr	r0, .L39+48
	bl	puts
	b	.L34
.L36:
	ldr	r0, [fp, #-112]
	bl	printar_livro
.L34:
	mov	r0, #10
	bl	putchar
	ldr	r0, .L39+20
	bl	system
	ldr	r0, [fp, #-100]
	bl	fclose
.L38:
	nop
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC29
	.word	.LC0
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	stdin
	.word	.LC27
	.word	.LC28
	.size	consulta_livro, .-consulta_livro
	.section	.rodata
	.align	2
.LC30:
	.ascii	"\012Erro ao abrir o arquivo de livros (Busca pelo t"
	.ascii	"itulo)\012\000"
	.text
	.align	2
	.global	buscar_titulo
	.syntax unified
	.arm
	.fpu softvfp
	.type	buscar_titulo, %function
buscar_titulo:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-16]
	bl	verificar_qtd_livros
	str	r0, [fp, #-8]
	ldr	r1, .L49
	ldr	r0, .L49+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L42
	ldr	r0, .L49+8
	bl	puts
	b	.L41
.L42:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L44
.L47:
	ldr	r3, [fp, #-20]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r3, [fp, #-12]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-24]
	bl	fread
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L46
.L45:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L44:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L47
.L46:
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-16]
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC19
	.word	.LC20
	.word	.LC30
	.size	buscar_titulo, .-buscar_titulo
	.section	.rodata
	.align	2
.LC31:
	.ascii	"\012Erro ao abrir o arquivo de livros (Busca pelo s"
	.ascii	"tatus)\012\000"
	.align	2
.LC32:
	.ascii	"\012Status Invalido. Tente novamente!\000"
	.text
	.align	2
	.global	buscar_status
	.syntax unified
	.arm
	.fpu softvfp
	.type	buscar_status, %function
buscar_status:
	@ 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
	str	r0, [fp, #-40]
	mov	r3, r1
	strb	r3, [fp, #-41]
	mov	r3, #0
	str	r3, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-24]
	bl	verificar_qtd_livros
	str	r0, [fp, #-16]
	ldr	r1, .L62
	ldr	r0, .L62+4
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L52
	ldr	r0, .L62+8
	bl	puts
	b	.L51
.L52:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L54
.L59:
	ldr	r3, [fp, #-32]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	fseek
	ldr	r3, [fp, #-20]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-40]
	bl	fread
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L55
.L58:
	ldr	r3, [fp, #-40]
	add	r1, r3, #164
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r4, r3
	ldrb	r3, [fp, #-41]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	cmp	r4, r3
	bne	.L56
	ldr	r0, [fp, #-40]
	bl	printar_livro
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	b	.L57
.L56:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L55:
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	ble	.L58
.L57:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L54:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L59
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L60
	ldr	r0, .L62+12
	bl	puts
.L60:
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r3, [fp, #-24]
.L51:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L63:
	.align	2
.L62:
	.word	.LC19
	.word	.LC20
	.word	.LC31
	.word	.LC32
	.size	buscar_status, .-buscar_status
	.section	.rodata
	.align	2
.LC33:
	.ascii	"\012Erro na alocacao dinamica do livro\012\000"
	.text
	.align	2
	.global	aloca_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	aloca_livro, %function
aloca_livro:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, #212
	mov	r0, r3
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L66
	ldr	r0, .L67
	bl	puts
	mov	r0, #1
	bl	exit
.L66:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	.LC33
	.size	aloca_livro, .-aloca_livro
	.section	.rodata
	.align	2
.LC34:
	.ascii	"\012Informe o nome do livro: \000"
	.align	2
.LC35:
	.ascii	"Informe o nome do autor: \000"
	.align	2
.LC36:
	.ascii	"\012Registro do livro: %i\000"
	.align	2
.LC37:
	.ascii	"---\000"
	.text
	.align	2
	.global	cadastro_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	cadastro_livro, %function
cadastro_livro:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mvn	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	bl	verificar_qtd_livros
	mov	r3, r0
	cmp	r3, #0
	ble	.L70
	ldr	r0, [fp, #-24]
	bl	verificar_vago_livro
	str	r0, [fp, #-16]
	b	.L71
.L70:
	mov	r3, #1
	str	r3, [fp, #-12]
.L71:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	beq	.L72
	ldr	r0, .L79
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	mov	r0, r3
	bl	gets
	ldr	r3, .L79+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L79+8
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #84
	mov	r0, r3
	bl	gets
	ldr	r3, .L79+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L73
.L72:
	bl	verificar_qtd_livros
	mov	r3, r0
	add	r3, r3, #1000
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L79+12
	bl	printf
	ldr	r0, .L79
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	mov	r0, r3
	bl	gets
	ldr	r3, .L79+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L79+8
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #84
	mov	r0, r3
	bl	gets
	ldr	r3, .L79+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r3, #1
	str	r3, [fp, #-12]
.L73:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L74
.L75:
	ldr	r3, [fp, #-24]
	add	r1, r3, #164
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, #76
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r1, r3, #164
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #1
	ldr	r2, .L79+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #4
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	add	r1, r3, #164
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mvn	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	add	r1, r3, #164
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mvn	r2, #0
	str	r2, [r3, #20]
	ldr	r3, [fp, #-24]
	add	r1, r3, #164
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mvn	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	add	r1, r3, #164
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mvn	r2, #0
	str	r2, [r3, #16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L74:
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	ble	.L75
	mov	r0, #10
	bl	putchar
	ldr	r0, .L79+20
	bl	system
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L76
	ldr	r0, [fp, #-24]
	bl	escrever_arquivo_livros
.L76:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L78
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	atualizar_livro
.L78:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC34
	.word	stdin
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC22
	.size	cadastro_livro, .-cadastro_livro
	.section	.rodata
	.align	2
.LC38:
	.ascii	"\012Erro ao abrir o arquivo de livros (Busca pelo l"
	.ascii	"ugar vago)\012\000"
	.text
	.align	2
	.global	verificar_vago_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	verificar_vago_livro, %function
verificar_vago_livro:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-16]
	bl	verificar_qtd_livros
	str	r0, [fp, #-8]
	ldr	r1, .L89
	ldr	r0, .L89+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L82
	ldr	r0, .L89+8
	bl	puts
	b	.L81
.L82:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L84
.L87:
	ldr	r3, [fp, #-20]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r3, [fp, #-12]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-24]
	bl	fread
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	ldr	r1, .L89+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L85
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L86
.L85:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L84:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L87
.L86:
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-16]
.L81:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L90:
	.align	2
.L89:
	.word	.LC19
	.word	.LC20
	.word	.LC38
	.word	.LC3
	.size	verificar_vago_livro, .-verificar_vago_livro
	.section	.rodata
	.align	2
.LC39:
	.ascii	"ab\000"
	.align	2
.LC40:
	.ascii	"\012\012Falha ao abrir o arquivo dos livros (Escrit"
	.ascii	"a).\012\000"
	.text
	.align	2
	.global	escrever_arquivo_livros
	.syntax unified
	.arm
	.fpu softvfp
	.type	escrever_arquivo_livros, %function
escrever_arquivo_livros:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L94
	ldr	r0, .L94+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L92
	ldr	r0, .L94+8
	bl	puts
	ldr	r0, .L94+12
	bl	system
	b	.L93
.L92:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-16]
	bl	fwrite
.L93:
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L95:
	.align	2
.L94:
	.word	.LC39
	.word	.LC20
	.word	.LC40
	.word	.LC22
	.size	escrever_arquivo_livros, .-escrever_arquivo_livros
	.align	2
	.global	verificar_qtd_livros
	.syntax unified
	.arm
	.fpu softvfp
	.type	verificar_qtd_livros, %function
verificar_qtd_livros:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L99
	ldr	r0, .L99+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L97
	ldr	r3, [fp, #-8]
	b	.L98
.L97:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r0, [fp, #-12]
	bl	ftell
	mov	r3, r0
	lsr	r3, r3, #2
	ldr	r2, .L99+8
	umull	r1, r3, r2, r3
	lsr	r3, r3, #4
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-8]
.L98:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L100:
	.align	2
.L99:
	.word	.LC19
	.word	.LC20
	.word	1296593901
	.size	verificar_qtd_livros, .-verificar_qtd_livros
	.section	.rodata
	.align	2
.LC41:
	.ascii	"rb+\000"
	.align	2
.LC42:
	.ascii	"\012Falha ao abrir o arquivo de livros (Atualizar o"
	.ascii	" arquivo)\012\000"
	.text
	.align	2
	.global	atualizar_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	atualizar_livro, %function
atualizar_livro:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L104
	ldr	r0, .L104+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L102
	ldr	r0, .L104+8
	bl	puts
	ldr	r0, .L104+12
	bl	system
	b	.L103
.L102:
	ldr	r3, [fp, #-20]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r3, [fp, #-8]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-16]
	bl	fwrite
.L103:
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L105:
	.align	2
.L104:
	.word	.LC41
	.word	.LC20
	.word	.LC42
	.word	.LC22
	.size	atualizar_livro, .-atualizar_livro
	.align	2
	.global	verificar_reservas
	.syntax unified
	.arm
	.fpu softvfp
	.type	verificar_reservas, %function
verificar_reservas:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L107
.L110:
	ldr	r3, [fp, #-16]
	add	r1, r3, #164
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L108
	mov	r3, #0
	b	.L109
.L108:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L107:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L110
	mov	r3, #1
.L109:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	verificar_reservas, .-verificar_reservas
	.section	.rodata
	.align	2
.LC43:
	.ascii	"\012Titulo do livro a ser deletado: \000"
	.align	2
.LC44:
	.ascii	"\012Escolha o numero do registro que deseja: \000"
	.align	2
.LC45:
	.ascii	"\012Registro invalido, retornando ao menu.\000"
	.align	2
.LC46:
	.ascii	"\012Multa para deletar o livro: RS 150.00\012\000"
	.align	2
.LC47:
	.ascii	"\012Falha ao obter o RA de emprestimo, retornando a"
	.ascii	"o menu.\000"
	.align	2
.LC48:
	.ascii	"\012Falha ao obter o RA de reserva, retornando ao m"
	.ascii	"enu.\000"
	.align	2
.LC49:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	excluir_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	excluir_livro, %function
excluir_livro:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L129
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L112:
	ldr	r0, .L129+4
	bl	system
	ldr	r0, .L129+8
	bl	printf
	sub	r3, fp, #88
	mov	r0, r3
	bl	gets
	ldr	r3, .L129+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	mostrar_titulo
	mov	r3, r0
	cmp	r3, #0
	beq	.L112
	ldr	r0, .L129+16
	bl	printf
	sub	r3, fp, #104
	mov	r1, r3
	ldr	r0, .L129+20
	bl	__isoc99_scanf
	ldr	r3, .L129+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-104]
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	buscar_reg
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmn	r3, #1
	bne	.L113
	ldr	r0, .L129+24
	bl	printf
	ldr	r0, .L129+28
	bl	system
	b	.L111
.L113:
	ldr	r3, [fp, #-112]
	ldrb	r3, [r3, #164]	@ zero_extendqisi2
	cmp	r3, #69
	bne	.L115
	ldr	r3, [fp, #-112]
	mov	r2, #76
	strb	r2, [r3, #164]
	ldr	r0, .L129+32
	bl	puts
	ldr	r0, .L129+28
	bl	system
	ldr	r3, [fp, #-112]
	add	r3, r3, #165
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	buscar_ra
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	bne	.L116
	ldr	r0, .L129+36
	bl	printf
	ldr	r0, .L129+28
	bl	system
	b	.L111
.L116:
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L117
.L120:
	ldr	r3, [fp, #-116]
	add	r2, r3, #96
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L118
	ldr	r3, [fp, #-116]
	add	r2, r3, #96
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #76
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	add	r2, r3, #96
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #4]
	b	.L119
.L118:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L117:
	ldr	r3, [fp, #-100]
	cmp	r3, #3
	ble	.L120
.L119:
	ldr	r3, [fp, #-116]
	ldr	r3, [r3, #88]
	sub	r2, r3, #1
	ldr	r3, [fp, #-116]
	str	r2, [r3, #88]
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-116]
	bl	atualizar_aluno
.L115:
	ldr	r3, [fp, #-112]
	ldrb	r3, [r3, #188]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L121
	ldr	r3, [fp, #-112]
	mov	r2, #76
	strb	r2, [r3, #188]
	ldr	r3, [fp, #-112]
	add	r3, r3, #189
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	buscar_ra
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	bne	.L122
	ldr	r0, .L129+40
	bl	printf
	ldr	r0, .L129+28
	bl	system
	b	.L111
.L122:
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L123
.L126:
	ldr	r3, [fp, #-116]
	add	r2, r3, #96
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L124
	ldr	r3, [fp, #-116]
	add	r2, r3, #96
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #76
	strb	r2, [r3]
	ldr	r3, [fp, #-116]
	add	r2, r3, #96
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #4]
	b	.L125
.L124:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L123:
	ldr	r3, [fp, #-100]
	cmp	r3, #3
	ble	.L126
.L125:
	ldr	r3, [fp, #-116]
	ldr	r3, [r3, #92]
	sub	r2, r3, #1
	ldr	r3, [fp, #-116]
	str	r2, [r3, #92]
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-116]
	bl	atualizar_aluno
.L121:
	ldr	r3, [fp, #-112]
	add	r3, r3, #4
	ldr	r2, .L129+44
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	ldr	r1, [fp, #-96]
	ldr	r0, [fp, #-112]
	bl	atualizar_livro
.L111:
	ldr	r3, .L129
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L128
	bl	__stack_chk_fail
.L128:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L130:
	.align	2
.L129:
	.word	.LC49
	.word	.LC0
	.word	.LC43
	.word	stdin
	.word	.LC44
	.word	.LC1
	.word	.LC45
	.word	.LC22
	.word	.LC46
	.word	.LC47
	.word	.LC48
	.word	.LC3
	.size	excluir_livro, .-excluir_livro
	.section	.rodata
	.align	2
.LC50:
	.ascii	"\012Erro ao abrir o arquivo de livros (Mostrar titu"
	.ascii	"los)\012\000"
	.align	2
.LC51:
	.ascii	"\012Titulo: %s\000"
	.align	2
.LC52:
	.ascii	"\012Registro: %i\012\012\000"
	.align	2
.LC53:
	.ascii	"\012Titulo invalido, verifique novamente.\012\000"
	.text
	.align	2
	.global	mostrar_titulo
	.syntax unified
	.arm
	.fpu softvfp
	.type	mostrar_titulo, %function
mostrar_titulo:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	bl	verificar_qtd_livros
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L138
	ldr	r0, .L138+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L132
	ldr	r0, .L138+8
	bl	puts
	mov	r0, #1
	bl	exit
.L132:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L133
.L135:
	ldr	r3, [fp, #-20]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r3, [fp, #-8]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-24]
	bl	fread
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L134
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L138+12
	bl	printf
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L138+16
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-16]
.L134:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L133:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L135
	ldr	r0, [fp, #-8]
	bl	fclose
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	beq	.L136
	ldr	r0, .L138+20
	bl	puts
	ldr	r0, .L138+24
	bl	system
	mov	r3, #0
	b	.L137
.L136:
	mov	r0, #10
	bl	putchar
	mov	r3, #1
.L137:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L139:
	.align	2
.L138:
	.word	.LC19
	.word	.LC20
	.word	.LC50
	.word	.LC51
	.word	.LC52
	.word	.LC53
	.word	.LC22
	.size	mostrar_titulo, .-mostrar_titulo
	.section	.rodata
	.align	2
.LC54:
	.ascii	"\012Erro ao abrir o arquivo de livros (Busca pelo r"
	.ascii	"egistro)\012\000"
	.align	2
.LC55:
	.ascii	"\012Registro Invalido. Tente novamente!\000"
	.text
	.align	2
	.global	buscar_reg
	.syntax unified
	.arm
	.fpu softvfp
	.type	buscar_reg, %function
buscar_reg:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-16]
	bl	verificar_qtd_livros
	str	r0, [fp, #-8]
	ldr	r1, .L149
	ldr	r0, .L149+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L141
	ldr	r0, .L149+8
	bl	puts
	b	.L140
.L141:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L143
.L146:
	ldr	r3, [fp, #-20]
	mov	r2, #212
	mul	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r3, [fp, #-12]
	mov	r2, #1
	mov	r1, #212
	ldr	r0, [fp, #-24]
	bl	fread
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bne	.L144
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L145
.L144:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L143:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L146
.L145:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L147
	ldr	r0, .L149+12
	bl	puts
.L147:
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-16]
.L140:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L150:
	.align	2
.L149:
	.word	.LC19
	.word	.LC20
	.word	.LC54
	.word	.LC55
	.size	buscar_reg, .-buscar_reg
	.section	.rodata
	.align	2
.LC56:
	.ascii	"\012Nome: \000"
	.align	2
.LC57:
	.ascii	"RA: \000"
	.text
	.align	2
	.global	cadastro_aluno
	.syntax unified
	.arm
	.fpu softvfp
	.type	cadastro_aluno, %function
cadastro_aluno:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, .L154
	bl	printf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	gets
	ldr	r3, .L154+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L154+8
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #80
	mov	r0, r3
	bl	gets
	ldr	r3, .L154+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #88]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #92]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L152
.L153:
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #76
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L152:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L153
	mov	r0, #10
	bl	putchar
	ldr	r0, .L154+12
	bl	system
	ldr	r0, [fp, #-16]
	bl	escrever_arquivo_aluno
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L155:
	.align	2
.L154:
	.word	.LC56
	.word	stdin
	.word	.LC57
	.word	.LC22
	.size	cadastro_aluno, .-cadastro_aluno
	.section	.rodata
	.align	2
.LC58:
	.ascii	"alunos.bin\000"
	.align	2
.LC59:
	.ascii	"\012\012Falha ao abrir o arquivo dos alunos (Escrit"
	.ascii	"a).\012\000"
	.text
	.align	2
	.global	escrever_arquivo_aluno
	.syntax unified
	.arm
	.fpu softvfp
	.type	escrever_arquivo_aluno, %function
escrever_arquivo_aluno:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L159
	ldr	r0, .L159+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L157
	ldr	r0, .L159+8
	bl	puts
	ldr	r0, .L159+12
	bl	system
	b	.L158
.L157:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	mov	r1, #128
	ldr	r0, [fp, #-16]
	bl	fwrite
.L158:
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L160:
	.align	2
.L159:
	.word	.LC39
	.word	.LC58
	.word	.LC59
	.word	.LC22
	.size	escrever_arquivo_aluno, .-escrever_arquivo_aluno
	.section	.rodata
	.align	2
.LC60:
	.ascii	"\012Falha ao abrir o arquivo dos alunos (Consulta)."
	.ascii	"\012\011-> Possivelmente nao ha alunos cadastrados!"
	.ascii	"\012\000"
	.align	2
.LC61:
	.ascii	"\012Lista de alunos (Total)\000"
	.align	2
.LC62:
	.ascii	"\012RA para buscar: \000"
	.align	2
.LC63:
	.ascii	"\012RA Invalido. Tente novamente!\000"
	.align	2
.LC64:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	consulta_aluno
	.syntax unified
	.arm
	.fpu softvfp
	.type	consulta_aluno, %function
consulta_aluno:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L171
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	bl	verificar_qtd_alunos
	str	r0, [fp, #-24]
	ldr	r0, .L171+4
	bl	system
	ldr	r1, .L171+8
	ldr	r0, .L171+12
	bl	fopen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L162
	ldr	r0, .L171+16
	bl	puts
	ldr	r0, .L171+20
	bl	system
	b	.L170
.L162:
	ldr	r3, [fp, #-44]
	cmp	r3, #3
	bne	.L164
	ldr	r0, .L171+24
	bl	puts
	ldr	r0, .L171+28
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L165
.L166:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #7
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	fseek
	ldr	r3, [fp, #-28]
	mov	r2, #1
	mov	r1, #128
	ldr	r0, [fp, #-40]
	bl	fread
	ldr	r0, [fp, #-40]
	bl	printar_aluno
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L165:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L166
	b	.L167
.L164:
	ldr	r3, [fp, #-44]
	cmp	r3, #4
	bne	.L167
	ldr	r0, .L171+32
	bl	printf
	sub	r3, fp, #16
	mov	r0, r3
	bl	gets
	ldr	r3, .L171+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	buscar_ra
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L168
	ldr	r0, .L171+40
	bl	puts
	b	.L167
.L168:
	ldr	r0, [fp, #-40]
	bl	printar_aluno
.L167:
	mov	r0, #10
	bl	putchar
	ldr	r0, .L171+20
	bl	system
	ldr	r0, [fp, #-28]
	bl	fclose
.L170:
	nop
	ldr	r3, .L171
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L169
	bl	__stack_chk_fail
.L169:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L172:
	.align	2
.L171:
	.word	.LC64
	.word	.LC0
	.word	.LC19
	.word	.LC58
	.word	.LC60
	.word	.LC22
	.word	.LC61
	.word	.LC24
	.word	.LC62
	.word	stdin
	.word	.LC63
	.size	consulta_aluno, .-consulta_aluno
	.section	.rodata
	.align	2
.LC65:
	.ascii	"\012Erro ao abrir o arquivo de alunos (Busca pelo R"
	.ascii	"A)\012\000"
	.text
	.align	2
	.global	buscar_ra
	.syntax unified
	.arm
	.fpu softvfp
	.type	buscar_ra, %function
buscar_ra:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mvn	r3, #0
	str	r3, [fp, #-16]
	bl	verificar_qtd_alunos
	str	r0, [fp, #-8]
	ldr	r1, .L181
	ldr	r0, .L181+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L174
	ldr	r0, .L181+8
	bl	puts
	b	.L173
.L174:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L176
.L179:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #7
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r3, [fp, #-12]
	mov	r2, #1
	mov	r1, #128
	ldr	r0, [fp, #-24]
	bl	fread
	ldr	r3, [fp, #-24]
	add	r3, r3, #80
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L177
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L178
.L177:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L176:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L179
.L178:
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-16]
.L173:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L182:
	.align	2
.L181:
	.word	.LC19
	.word	.LC58
	.word	.LC65
	.size	buscar_ra, .-buscar_ra
	.align	2
	.global	verificar_qtd_alunos
	.syntax unified
	.arm
	.fpu softvfp
	.type	verificar_qtd_alunos, %function
verificar_qtd_alunos:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L186
	ldr	r0, .L186+4
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L184
	ldr	r3, [fp, #-8]
	b	.L185
.L184:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r0, [fp, #-12]
	bl	ftell
	mov	r3, r0
	lsr	r3, r3, #7
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-8]
.L185:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L187:
	.align	2
.L186:
	.word	.LC19
	.word	.LC58
	.size	verificar_qtd_alunos, .-verificar_qtd_alunos
	.section	.rodata
	.align	2
.LC66:
	.ascii	"\012\011Nome: %s \000"
	.align	2
.LC67:
	.ascii	"\012\011RA: %s\000"
	.align	2
.LC68:
	.ascii	"\012\011QTD Emprestado: %i\000"
	.align	2
.LC69:
	.ascii	"\012\011QTD Reservado: %i\000"
	.align	2
.LC70:
	.ascii	"\012\011Tabela %i: %c -- %i\000"
	.align	2
.LC71:
	.ascii	"\012\012-------------------------------------------"
	.ascii	"\000"
	.text
	.align	2
	.global	printar_aluno
	.syntax unified
	.arm
	.fpu softvfp
	.type	printar_aluno, %function
printar_aluno:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L194
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #80
	mov	r1, r3
	ldr	r0, .L194+4
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #88]
	cmp	r3, #0
	ble	.L189
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #88]
	mov	r1, r3
	ldr	r0, .L194+8
	bl	printf
.L189:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #92]
	cmp	r3, #0
	ble	.L190
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #92]
	mov	r1, r3
	ldr	r0, .L194+12
	bl	printf
.L190:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L191
.L193:
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L192
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, r1
	ldr	r1, [fp, #-8]
	ldr	r0, .L194+16
	bl	printf
.L192:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L191:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L193
	ldr	r0, .L194+20
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L195:
	.align	2
.L194:
	.word	.LC66
	.word	.LC67
	.word	.LC68
	.word	.LC69
	.word	.LC70
	.word	.LC71
	.size	printar_aluno, .-printar_aluno
	.section	.rodata
	.align	2
.LC72:
	.ascii	"\012Falha ao abrir o arquivo de alunos (Atualizar o"
	.ascii	" arquivo)\012\000"
	.text
	.align	2
	.global	atualizar_aluno
	.syntax unified
	.arm
	.fpu softvfp
	.type	atualizar_aluno, %function
atualizar_aluno:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r1, .L199
	ldr	r0, .L199+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L197
	ldr	r0, .L199+8
	bl	puts
	ldr	r0, .L199+12
	bl	system
	b	.L198
.L197:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #7
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fseek
	ldr	r3, [fp, #-8]
	mov	r2, #1
	mov	r1, #128
	ldr	r0, [fp, #-16]
	bl	fwrite
.L198:
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L200:
	.align	2
.L199:
	.word	.LC41
	.word	.LC58
	.word	.LC72
	.word	.LC22
	.size	atualizar_aluno, .-atualizar_aluno
	.section	.rodata
	.align	2
.LC73:
	.ascii	"\012Erro na alocacao dinamica do aluno\012\000"
	.text
	.align	2
	.global	aloca_aluno
	.syntax unified
	.arm
	.fpu softvfp
	.type	aloca_aluno, %function
aloca_aluno:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, #128
	mov	r0, r3
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L203
	ldr	r0, .L204
	bl	puts
	mov	r0, #1
	bl	exit
.L203:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L205:
	.align	2
.L204:
	.word	.LC73
	.size	aloca_aluno, .-aloca_aluno
	.section	.rodata
	.align	2
.LC74:
	.ascii	"\012RA do aluno: \000"
	.align	2
.LC75:
	.ascii	"\012O Aluno nao possui livros emprestados\000"
	.align	2
.LC76:
	.ascii	"\012Titulo do livro a ser devolvido: \000"
	.align	2
.LC77:
	.ascii	"\012Titulo do livro invalido!\000"
	.align	2
.LC78:
	.ascii	"\012Data da devolucao (Atual)\000"
	.align	2
.LC79:
	.ascii	"\012\011Dia: \000"
	.align	2
.LC80:
	.ascii	"\011Mes: \000"
	.align	2
.LC81:
	.ascii	"\012Data invalida. Tente novamente\012\000"
	.align	2
.LC82:
	.ascii	"\012Novo emprestimo para o livro\012\000"
	.align	2
.LC83:
	.ascii	"\012O aluno da reserva ja esta com o limite de empr"
	.ascii	"estimos.\012\000"
	.align	2
.LC84:
	.ascii	"\012Livro devolvido com sucesso\012\000"
	.align	2
.LC85:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	devolucao_livro
	.syntax unified
	.arm
	.fpu softvfp
	.type	devolucao_livro, %function
devolucao_livro:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L231
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L231+4
	bl	system
	ldr	r0, .L231+8
	bl	printf
	sub	r3, fp, #96
	mov	r0, r3
	bl	gets
	ldr	r3, .L231+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #96
	mov	r1, r3
	ldr	r0, [fp, #-128]
	bl	buscar_ra
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmn	r3, #1
	bne	.L207
	ldr	r0, .L231+16
	bl	puts
	ldr	r0, .L231+20
	bl	system
	b	.L206
.L207:
	ldr	r3, [fp, #-128]
	ldr	r3, [r3, #88]
	cmp	r3, #0
	bgt	.L209
	ldr	r0, .L231+24
	bl	puts
	ldr	r0, .L231+20
	bl	system
	b	.L206
.L209:
	ldr	r0, .L231+28
	bl	printf
	sub	r3, fp, #88
	mov	r0, r3
	bl	gets
	ldr	r3, .L231+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, [fp, #-132]
	bl	buscar_titulo
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmn	r3, #1
	bne	.L210
	ldr	r0, .L231+32
	bl	puts
	ldr	r0, .L231+20
	bl	system
	b	.L206
.L210:
	ldr	r0, .L231+4
	bl	system
	ldr	r0, .L231+36
	bl	printf
	ldr	r0, .L231+40
	bl	printf
	sub	r3, fp, #120
	mov	r1, r3
	ldr	r0, .L231+44
	bl	__isoc99_scanf
	ldr	r3, .L231+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L231+48
	bl	printf
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L231+44
	bl	__isoc99_scanf
	ldr	r3, .L231+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r3, #31
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-116]
	cmp	r3, #2
	bne	.L211
	mov	r3, #28
	str	r3, [fp, #-108]
.L211:
	ldr	r3, [fp, #-116]
	cmp	r3, #4
	beq	.L212
	ldr	r3, [fp, #-116]
	cmp	r3, #6
	beq	.L212
	ldr	r3, [fp, #-116]
	cmp	r3, #8
	beq	.L212
	ldr	r3, [fp, #-116]
	cmp	r3, #11
	bne	.L213
.L212:
	mov	r3, #30
	str	r3, [fp, #-108]
.L213:
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	ble	.L214
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-108]
	cmp	r2, r3
	blt	.L214
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	ble	.L214
	ldr	r3, [fp, #-116]
	cmp	r3, #12
	ble	.L215
.L214:
	ldr	r0, .L231+52
	bl	puts
	ldr	r0, .L231+20
	bl	system
.L215:
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	ble	.L210
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-108]
	cmp	r2, r3
	blt	.L210
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	ble	.L210
	ldr	r3, [fp, #-116]
	cmp	r3, #12
	bgt	.L210
	ldr	r3, [fp, #-132]
	ldrb	r3, [r3, #164]	@ zero_extendqisi2
	cmp	r3, #69
	bne	.L206
	ldr	r3, [fp, #-132]
	add	r3, r3, #165
	sub	r2, fp, #96
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L206
	ldr	r3, [fp, #-120]
	ldr	r1, [fp, #-116]
	ldr	r2, [fp, #-132]
	mov	r0, r3
	bl	multar
	ldr	r3, [fp, #-132]
	ldrb	r3, [r3, #188]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L217
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L218
.L221:
	ldr	r3, [fp, #-128]
	add	r2, r3, #96
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-132]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L219
	ldr	r3, [fp, #-128]
	add	r2, r3, #96
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #76
	strb	r2, [r3]
	ldr	r3, [fp, #-128]
	add	r2, r3, #96
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #4]
	b	.L220
.L219:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L218:
	ldr	r3, [fp, #-112]
	cmp	r3, #3
	ble	.L221
.L220:
	ldr	r3, [fp, #-128]
	ldr	r3, [r3, #88]
	sub	r2, r3, #1
	ldr	r3, [fp, #-128]
	str	r2, [r3, #88]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-128]
	bl	atualizar_aluno
	ldr	r3, [fp, #-132]
	add	r2, r3, #189
	sub	r3, fp, #96
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #96
	mov	r1, r3
	ldr	r0, [fp, #-128]
	bl	buscar_ra
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-128]
	ldr	r3, [r3, #88]
	cmp	r3, #2
	ble	.L222
	ldr	r3, [fp, #-128]
	ldr	r3, [r3, #92]
	cmp	r3, #0
	bgt	.L223
.L222:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-116]
	ldr	r1, [fp, #-132]
	ldr	r0, [fp, #-128]
	bl	emprestimo_pos_devolucao
	ldr	r1, [fp, #-100]
	ldr	r0, [fp, #-132]
	bl	atualizar_livro
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-128]
	bl	atualizar_aluno
	ldr	r0, .L231+4
	bl	system
	ldr	r0, .L231+56
	bl	puts
	ldr	r0, [fp, #-132]
	bl	printar_livro
	ldr	r0, [fp, #-128]
	bl	printar_aluno
	ldr	r0, .L231+20
	bl	system
	b	.L206
.L223:
	ldr	r0, .L231+60
	bl	puts
	ldr	r0, .L231+20
	bl	system
	b	.L206
.L217:
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L225
.L228:
	ldr	r3, [fp, #-128]
	add	r2, r3, #96
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-132]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L226
	ldr	r3, [fp, #-128]
	add	r2, r3, #96
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #76
	strb	r2, [r3]
	ldr	r3, [fp, #-128]
	add	r2, r3, #96
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #4]
	b	.L227
.L226:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L225:
	ldr	r3, [fp, #-112]
	cmp	r3, #3
	ble	.L228
.L227:
	ldr	r3, [fp, #-128]
	ldr	r3, [r3, #88]
	sub	r2, r3, #1
	ldr	r3, [fp, #-128]
	str	r2, [r3, #88]
	ldr	r3, [fp, #-132]
	mov	r2, #76
	strb	r2, [r3, #164]
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-128]
	bl	atualizar_aluno
	ldr	r1, [fp, #-100]
	ldr	r0, [fp, #-132]
	bl	atualizar_livro
	ldr	r0, .L231+4
	bl	system
	ldr	r0, .L231+64
	bl	puts
	ldr	r0, [fp, #-132]
	bl	printar_livro
	ldr	r0, [fp, #-128]
	bl	printar_aluno
	ldr	r0, .L231+20
	bl	system
.L206:
	ldr	r3, .L231
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L230
	bl	__stack_chk_fail
.L230:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L232:
	.align	2
.L231:
	.word	.LC85
	.word	.LC0
	.word	.LC74
	.word	stdin
	.word	.LC63
	.word	.LC22
	.word	.LC75
	.word	.LC76
	.word	.LC77
	.word	.LC78
	.word	.LC79
	.word	.LC1
	.word	.LC80
	.word	.LC81
	.word	.LC82
	.word	.LC83
	.word	.LC84
	.size	devolucao_livro, .-devolucao_livro
	.align	2
	.global	emprestimo_pos_devolucao
	.syntax unified
	.arm
	.fpu softvfp
	.type	emprestimo_pos_devolucao, %function
emprestimo_pos_devolucao:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-20]
	add	r2, r3, #165
	ldr	r3, [fp, #-16]
	add	r3, r3, #80
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #172]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #176]
	mov	r3, #31
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	cmp	r3, #2
	bne	.L234
	mov	r3, #28
	str	r3, [fp, #-12]
.L234:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	cmp	r3, #4
	beq	.L235
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	cmp	r3, #6
	beq	.L235
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	cmp	r3, #8
	beq	.L235
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	cmp	r3, #11
	bne	.L236
.L235:
	mov	r3, #30
	str	r3, [fp, #-12]
.L236:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #172]
	add	r2, r3, #7
	ldr	r3, [fp, #-20]
	str	r2, [r3, #180]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #180]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L237
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	cmp	r3, #12
	bne	.L238
	ldr	r3, [fp, #-20]
	mov	r2, #1
	str	r2, [r3, #184]
	b	.L239
.L238:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #176]
	add	r2, r3, #1
	ldr	r3, [fp, #-20]
	str	r2, [r3, #184]
.L239:
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #180]
	ldr	r3, [fp, #-12]
	sub	r2, r2, r3
	ldr	r3, [fp, #-20]
	str	r2, [r3, #180]
	b	.L240
.L237:
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #176]
	ldr	r3, [fp, #-20]
	str	r2, [r3, #184]
.L240:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L241
.L244:
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L242
	ldr	r3, [fp, #-16]
	add	r2, r3, #96
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #69
	strb	r2, [r3]
	b	.L243
.L242:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L241:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L244
.L243:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #92]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #92]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #88]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #88]
	ldr	r3, [fp, #-20]
	mov	r2, #76
	strb	r2, [r3, #188]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	emprestimo_pos_devolucao, .-emprestimo_pos_devolucao
	.section	.rodata
	.align	2
.LC86:
	.ascii	"\012Valor da multa por atraso = %i\012\012\000"
	.align	2
.LC87:
	.ascii	"\012Entrega dentro do prazo\012\000"
	.text
	.align	2
	.global	multar
	.syntax unified
	.arm
	.fpu softvfp
	.type	multar, %function
multar:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #184]
	cmp	r3, #12
	bne	.L246
	mov	r3, #1
	str	r3, [fp, #-16]
.L246:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #180]
	ldr	r2, [fp, #-40]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #184]
	ldr	r2, [fp, #-44]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #184]
	str	r3, [fp, #-44]
	mov	r3, #31
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-44]
	cmp	r3, #2
	bne	.L247
	mov	r3, #28
	str	r3, [fp, #-28]
.L247:
	ldr	r3, [fp, #-44]
	cmp	r3, #4
	beq	.L248
	ldr	r3, [fp, #-44]
	cmp	r3, #6
	beq	.L248
	ldr	r3, [fp, #-44]
	cmp	r3, #8
	beq	.L248
	ldr	r3, [fp, #-44]
	cmp	r3, #11
	bne	.L249
.L248:
	mov	r3, #30
	str	r3, [fp, #-28]
.L249:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L250
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-24]
	b	.L251
.L250:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L252
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #180]
	ldr	r2, [fp, #-28]
	sub	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	b	.L251
.L252:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #180]
	ldr	r2, [fp, #-28]
	sub	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L253
.L259:
	ldr	r3, [fp, #-44]
	cmp	r3, #12
	bne	.L254
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L255
.L254:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L255:
	mov	r3, #31
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-44]
	cmp	r3, #2
	bne	.L256
	mov	r3, #28
	str	r3, [fp, #-28]
.L256:
	ldr	r3, [fp, #-44]
	cmp	r3, #4
	beq	.L257
	ldr	r3, [fp, #-44]
	cmp	r3, #6
	beq	.L257
	ldr	r3, [fp, #-44]
	cmp	r3, #8
	beq	.L257
	ldr	r3, [fp, #-44]
	cmp	r3, #11
	bne	.L258
.L257:
	mov	r3, #30
	str	r3, [fp, #-28]
.L258:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L253:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	ble	.L259
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L251
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
.L251:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L260
.L261:
	ldr	r3, [fp, #-20]
	add	r3, r3, #3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L260:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L261
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bgt	.L262
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L263
.L262:
	ldr	r1, [fp, #-20]
	ldr	r0, .L265
	bl	printf
	ldr	r0, .L265+4
	bl	system
	b	.L264
.L263:
	ldr	r0, .L265+8
	bl	puts
	ldr	r0, .L265+4
	bl	system
	nop
.L264:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L266:
	.align	2
.L265:
	.word	.LC86
	.word	.LC22
	.word	.LC87
	.size	multar, .-multar
	.section	.rodata
	.align	2
.LC88:
	.ascii	"\012O aluno ja esta com o limite de emprestimo e re"
	.ascii	"servas.\012\000"
	.align	2
.LC89:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	emprestimo_reserva
	.syntax unified
	.arm
	.fpu softvfp
	.type	emprestimo_reserva, %function
emprestimo_reserva:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L274
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L274+4
	bl	system
	ldr	r0, .L274+8
	bl	printf
	sub	r3, fp, #16
	mov	r0, r3
	bl	gets
	ldr	r3, .L274+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	buscar_ra
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L268
	ldr	r0, .L274+16
	bl	puts
	ldr	r0, .L274+20
	bl	system
	b	.L273
.L268:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #88]
	cmp	r3, #2
	ble	.L270
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #92]
	cmp	r3, #0
	bgt	.L271
.L270:
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	efetivar_emprestimo_reserva
	b	.L273
.L271:
	ldr	r0, .L274+24
	bl	puts
	ldr	r0, .L274+20
	bl	system
.L273:
	nop
	ldr	r3, .L274
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L272
	bl	__stack_chk_fail
.L272:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L275:
	.align	2
.L274:
	.word	.LC89
	.word	.LC0
	.word	.LC74
	.word	stdin
	.word	.LC63
	.word	.LC22
	.word	.LC88
	.size	emprestimo_reserva, .-emprestimo_reserva
	.section	.rodata
	.align	2
.LC90:
	.ascii	"\012Titulo do livro: \000"
	.align	2
.LC91:
	.ascii	"\012Infelizmente o livro ja esta reservado.\000"
	.align	2
.LC92:
	.ascii	"\012RA de Emprestimo: %s\000"
	.align	2
.LC93:
	.ascii	"\012Data devolucao: %i/%i\012\012\000"
	.align	2
.LC94:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	efetivar_emprestimo_reserva
	.syntax unified
	.arm
	.fpu softvfp
	.type	efetivar_emprestimo_reserva, %function
efetivar_emprestimo_reserva:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	str	r2, [fp, #-112]
	ldr	r3, .L288
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-96]
	ldr	r0, .L288+4
	bl	printf
	sub	r3, fp, #88
	mov	r0, r3
	bl	gets
	ldr	r3, .L288+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, [fp, #-108]
	bl	buscar_titulo
	str	r0, [fp, #-92]
	ldr	r3, [fp, #-92]
	cmn	r3, #1
	bne	.L277
	ldr	r0, .L288+12
	bl	puts
	ldr	r0, .L288+16
	bl	system
	b	.L287
.L277:
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L279
.L284:
	ldr	r3, [fp, #-108]
	add	r1, r3, #164
	ldr	r2, [fp, #-100]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #76
	bne	.L280
	ldr	r3, [fp, #-100]
	mov	r2, #69
	ldr	r1, [fp, #-108]
	ldr	r0, [fp, #-104]
	bl	alterar_status_emprestimo
	b	.L281
.L280:
	ldr	r3, [fp, #-108]
	add	r1, r3, #164
	ldr	r2, [fp, #-100]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #69
	bne	.L282
	ldr	r0, [fp, #-108]
	bl	verificar_reservas
	mov	r3, r0
	cmp	r3, #1
	bne	.L282
	mov	r3, #1
	mov	r2, #82
	ldr	r1, [fp, #-108]
	ldr	r0, [fp, #-104]
	bl	alterar_status_emprestimo
	b	.L281
.L282:
	ldr	r0, [fp, #-108]
	bl	verificar_reservas
	mov	r3, r0
	cmp	r3, #1
	beq	.L283
	ldr	r0, .L288+20
	bl	puts
	ldr	r3, [fp, #-108]
	add	r1, r3, #164
	ldr	r2, [fp, #-100]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L288+24
	bl	printf
	ldr	r3, [fp, #-108]
	add	r1, r3, #164
	ldr	r2, [fp, #-100]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r0, [r3, #16]
	ldr	r3, [fp, #-108]
	add	r1, r3, #164
	ldr	r2, [fp, #-100]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #20]
	mov	r2, r3
	mov	r1, r0
	ldr	r0, .L288+28
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-96]
	b	.L281
.L283:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L279:
	ldr	r3, [fp, #-100]
	cmp	r3, #1
	ble	.L284
.L281:
	ldr	r1, [fp, #-92]
	ldr	r0, [fp, #-108]
	bl	atualizar_livro
	ldr	r1, [fp, #-112]
	ldr	r0, [fp, #-104]
	bl	atualizar_aluno
	ldr	r3, [fp, #-96]
	cmp	r3, #1
	beq	.L285
	ldr	r0, [fp, #-104]
	bl	printar_aluno
	ldr	r0, [fp, #-108]
	bl	printar_livro
.L285:
	ldr	r0, .L288+16
	bl	system
.L287:
	nop
	ldr	r3, .L288
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L286
	bl	__stack_chk_fail
.L286:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L289:
	.align	2
.L288:
	.word	.LC94
	.word	.LC90
	.word	stdin
	.word	.LC77
	.word	.LC22
	.word	.LC91
	.word	.LC92
	.word	.LC93
	.size	efetivar_emprestimo_reserva, .-efetivar_emprestimo_reserva
	.section	.rodata
	.align	2
.LC95:
	.ascii	"\012Data do emprestimo (Atual)\000"
	.align	2
.LC96:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	alterar_status_emprestimo
	.syntax unified
	.arm
	.fpu softvfp
	.type	alterar_status_emprestimo, %function
alterar_status_emprestimo:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r3, [fp, #-44]
	mov	r3, r2
	strb	r3, [fp, #-37]
	ldr	r3, .L310
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldrb	r2, [fp, #-37]
	strb	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r2, r3, #1
	ldr	r3, [fp, #-32]
	add	r3, r3, #80
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	cmp	r3, #82
	beq	.L291
.L297:
	ldr	r0, .L310+4
	bl	system
	ldr	r0, .L310+8
	bl	printf
	ldr	r0, .L310+12
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L310+16
	bl	__isoc99_scanf
	ldr	r3, .L310+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L310+24
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L310+16
	bl	__isoc99_scanf
	ldr	r3, .L310+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	mov	r3, #31
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L292
	mov	r3, #28
	str	r3, [fp, #-12]
.L292:
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	beq	.L293
	ldr	r3, [fp, #-20]
	cmp	r3, #6
	beq	.L293
	ldr	r3, [fp, #-20]
	cmp	r3, #8
	beq	.L293
	ldr	r3, [fp, #-20]
	cmp	r3, #11
	bne	.L294
.L293:
	mov	r3, #30
	str	r3, [fp, #-12]
.L294:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L295
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L295
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L295
	ldr	r3, [fp, #-20]
	cmp	r3, #12
	ble	.L296
.L295:
	ldr	r0, .L310+28
	bl	puts
	ldr	r0, .L310+32
	bl	system
.L296:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	ble	.L297
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L297
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L297
	ldr	r3, [fp, #-20]
	cmp	r3, #12
	bgt	.L297
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #88]
	add	r2, r3, #1
	ldr	r3, [fp, #-32]
	str	r2, [r3, #88]
	b	.L298
.L291:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #92]
	add	r2, r3, #1
	ldr	r3, [fp, #-32]
	str	r2, [r3, #92]
	ldr	r3, [fp, #-36]
	ldr	r1, [r3, #180]
	ldr	r3, [fp, #-36]
	add	r0, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r0, r3
	add	r2, r1, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r2, [fp, #-36]
	ldr	r2, [r2, #184]
	str	r2, [r3, #12]
	mov	r3, #31
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	cmp	r3, #2
	bne	.L299
	mov	r3, #28
	str	r3, [fp, #-12]
.L299:
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	cmp	r3, #4
	beq	.L300
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	cmp	r3, #6
	beq	.L300
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	cmp	r3, #8
	beq	.L300
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	cmp	r3, #11
	bne	.L298
.L300:
	mov	r3, #30
	str	r3, [fp, #-12]
.L298:
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-36]
	add	r0, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r0, r3
	add	r2, r1, #7
	str	r2, [r3, #16]
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #16]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L301
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #12]
	cmp	r3, #12
	bne	.L302
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	mov	r2, #1
	str	r2, [r3, #20]
	b	.L303
.L302:
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r1, [r3, #12]
	ldr	r3, [fp, #-36]
	add	r0, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r0, r3
	add	r2, r1, #1
	str	r2, [r3, #20]
.L303:
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r1, [r3, #16]
	ldr	r3, [fp, #-36]
	add	r0, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r0, r3
	ldr	r2, [fp, #-12]
	sub	r2, r1, r2
	str	r2, [r3, #16]
	b	.L304
.L301:
	ldr	r3, [fp, #-36]
	add	r1, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r1, r1, r3
	ldr	r3, [fp, #-36]
	add	r0, r3, #164
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r0, r3
	ldr	r2, [r1, #12]
	str	r2, [r3, #20]
.L304:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L305
.L308:
	ldr	r3, [fp, #-32]
	add	r2, r3, #96
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #76
	bne	.L306
	ldr	r3, [fp, #-32]
	add	r2, r3, #96
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r2, [fp, #-37]
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r2, r3, #96
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	ldr	r2, [r2]
	str	r2, [r3, #4]
	b	.L307
.L306:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L305:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L308
.L307:
	nop
	ldr	r3, .L310
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L309
	bl	__stack_chk_fail
.L309:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L311:
	.align	2
.L310:
	.word	.LC96
	.word	.LC0
	.word	.LC95
	.word	.LC79
	.word	.LC1
	.word	stdin
	.word	.LC80
	.word	.LC81
	.word	.LC22
	.size	alterar_status_emprestimo, .-alterar_status_emprestimo
	.section	.rodata
	.align	2
.LC97:
	.ascii	"\012<1> Cadastro do aluno\000"
	.align	2
.LC98:
	.ascii	"\012<2> Cadastro de livro\000"
	.align	2
.LC99:
	.ascii	"\012--------------------\000"
	.align	2
.LC100:
	.ascii	"\012<3> Consultar alunos (Total)\000"
	.align	2
.LC101:
	.ascii	"\012<4> Consultar aluno (RA)\000"
	.align	2
.LC102:
	.ascii	"\012<5> Consultar livros (Total)\000"
	.align	2
.LC103:
	.ascii	"\012<6> Consultar livros (Status)\000"
	.align	2
.LC104:
	.ascii	"\012<7> Consultar livros (Titulo)\000"
	.align	2
.LC105:
	.ascii	"\012<8> Emprestimo / Reserva\000"
	.align	2
.LC106:
	.ascii	"\012<9> Devolucao\000"
	.align	2
.LC107:
	.ascii	"\012<10> Deletar livro\000"
	.align	2
.LC108:
	.ascii	"\012<0> Sair\000"
	.align	2
.LC109:
	.ascii	"\012Opcao: \000"
	.text
	.align	2
	.global	printar_menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	printar_menu, %function
printar_menu:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L313
	bl	printf
	ldr	r0, .L313+4
	bl	printf
	ldr	r0, .L313+8
	bl	printf
	ldr	r0, .L313+12
	bl	printf
	ldr	r0, .L313+16
	bl	printf
	ldr	r0, .L313+8
	bl	printf
	ldr	r0, .L313+20
	bl	printf
	ldr	r0, .L313+24
	bl	printf
	ldr	r0, .L313+28
	bl	printf
	ldr	r0, .L313+8
	bl	printf
	ldr	r0, .L313+32
	bl	printf
	ldr	r0, .L313+36
	bl	printf
	ldr	r0, .L313+8
	bl	printf
	ldr	r0, .L313+40
	bl	printf
	ldr	r0, .L313+8
	bl	printf
	ldr	r0, .L313+44
	bl	printf
	ldr	r0, .L313+8
	bl	printf
	ldr	r0, .L313+48
	bl	printf
	nop
	pop	{fp, pc}
.L314:
	.align	2
.L313:
	.word	.LC97
	.word	.LC98
	.word	.LC99
	.word	.LC100
	.word	.LC101
	.word	.LC102
	.word	.LC103
	.word	.LC104
	.word	.LC105
	.word	.LC106
	.word	.LC107
	.word	.LC108
	.word	.LC109
	.size	printar_menu, .-printar_menu
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
