	.file	"395186.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"cls"
.LC1:
	.string	"Menu Principal"
.LC2:
	.string	"1 - Incluir    Pacientes"
.LC3:
	.string	"2 - Listar     Pacientes"
.LC4:
	.string	"3 - Excluir    Pacientes"
	.align 8
.LC5:
	.string	"4 - Pesquisar  Paciente por codigo"
.LC6:
	.string	"5 - Encerrar aplicativo"
.LC7:
	.string	"Opcao:"
.LC8:
	.string	"%d"
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	system@PLT
.L6:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	system@PLT
	mov	eax, 0
	call	cadastrarPacientes
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 2
	jne	.L3
	lea	rdi, .LC0[rip]
	call	system@PLT
	mov	eax, 0
	call	listarPacientes
.L3:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 3
	jne	.L4
	mov	eax, 0
	call	excluirPacientes
.L4:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 4
	jne	.L5
	mov	eax, 0
	call	pesquisarPacientesPorCodigo
.L5:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 5
	jne	.L6
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC9:
	.string	"\nCadatrar Dados de Pacientes\n"
.LC10:
	.string	"\nCodigo:"
.LC11:
	.string	"\nNome:"
.LC12:
	.string	"\nTelefone:"
.LC13:
	.string	"\nSexo (Masculino - Feminino):"
.LC14:
	.string	"\n\nData de Nascimento"
.LC15:
	.string	"\nDia:"
.LC16:
	.string	"\nMes:"
.LC17:
	.string	"\nAno:"
.LC18:
	.string	"a+b"
.LC19:
	.string	"pacientes.txt"
	.align 8
.LC20:
	.string	"\nERRO: Nao foi possivel abrir o arquivo."
	.align 8
.LC21:
	.string	"\nERRO: Nao foi possivel cadastrar o paciente."
	.align 8
.LC22:
	.string	"\nPressione qualquer tecla para continuar"
	.text
	.globl	cadastrarPacientes
	.type	cadastrarPacientes, @function
cadastrarPacientes:
.LFB7:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -112[rbp]
	lea	rcx, 4[rdx]
	mov	rdx, rax
	mov	esi, 26
	mov	rdi, rcx
	call	fgets@PLT
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -112[rbp]
	lea	rcx, 30[rdx]
	mov	rdx, rax
	mov	esi, 31
	mov	rdi, rcx
	call	fgets@PLT
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -112[rbp]
	lea	rcx, 61[rdx]
	mov	rdx, rax
	mov	esi, 15
	mov	rdi, rcx
	call	fgets@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	add	rax, 76
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	add	rax, 80
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	add	rax, 84
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -24[rbp], 1
	lea	rsi, .LC18[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L10
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 92
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -124[rbp], eax
	cmp	DWORD PTR -124[rbp], 1
	je	.L11
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	lea	rdi, .LC0[rip]
	call	system@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cadastrarPacientes, .-cadastrarPacientes
	.section	.rodata
.LC23:
	.string	"r+b"
.LC24:
	.string	"\n"
	.align 8
.LC25:
	.string	"\nCodigo:%d\nNome:%sTelefone:%sSexo:%sData de Nascimento:%d/%d/%d\nFlag:%d\n"
	.text
	.globl	listarPacientes
	.type	listarPacientes, @function
listarPacientes:
.LFB8:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC23[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L15
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 92
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L20
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 1
	jne	.L15
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	r8d, DWORD PTR -24[rbp]
	mov	edi, DWORD PTR -28[rbp]
	mov	esi, DWORD PTR -32[rbp]
	mov	r9d, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -112[rbp]
	lea	rdx, -112[rbp]
	lea	r10, 61[rdx]
	lea	rdx, -112[rbp]
	lea	rcx, 30[rdx]
	lea	rdx, -112[rbp]
	add	rdx, 4
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8, r10
	mov	esi, eax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
.L15:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L18
	jmp	.L17
.L20:
	nop
.L17:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	call	getchar@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	listarPacientes, .-listarPacientes
	.section	.rodata
.LC26:
	.string	"wb"
.LC27:
	.string	"pacientesnovo.txt"
	.align 8
.LC28:
	.string	"\nDigite o codigo de quem deseja excluir: "
	.align 8
.LC29:
	.string	"\nNao foi possivel excluir o paciente."
.LC30:
	.string	"\nPaciente nao encontrado"
.LC31:
	.string	"\nPaciente:%s Excluido\n"
	.text
	.globl	excluirPacientes
	.type	excluirPacientes, @function
excluirPacientes:
.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, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC23[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	lea	rsi, .LC26[rip]
	lea	rdi, .LC27[rip]
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	movabs	rax, 7310589476968030576
	mov	QWORD PTR -46[rbp], rax
	mov	DWORD PTR -38[rbp], 2020879987
	mov	WORD PTR -34[rbp], 116
	movabs	rax, 7310589476968030576
	movabs	rdx, 8679613438113050227
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	WORD PTR -16[rbp], 116
	mov	DWORD PTR -168[rbp], 0
	cmp	QWORD PTR -160[rbp], 0
	jne	.L22
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -172[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L23
.L27:
	mov	rdx, QWORD PTR -160[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 92
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L31
	mov	edx, DWORD PTR -144[rbp]
	mov	eax, DWORD PTR -172[rbp]
	cmp	edx, eax
	jne	.L26
	mov	DWORD PTR -168[rbp], 1
	mov	DWORD PTR -56[rbp], 0
.L26:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, 1
	jne	.L23
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 92
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 1
	je	.L23
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L27
	jmp	.L25
.L31:
	nop
.L25:
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -46[rbp]
	mov	rdi, rax
	call	remove@PLT
	lea	rdx, -46[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rename@PLT
	cmp	DWORD PTR -168[rbp], 0
	jne	.L28
	lea	rdi, .LC30[rip]
	call	puts@PLT
	jmp	.L29
.L28:
	lea	rax, -144[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
.L29:
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	call	getchar@PLT
	lea	rdi, .LC0[rip]
	call	system@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	excluirPacientes, .-excluirPacientes
	.section	.rodata
	.align 8
.LC32:
	.string	"\nDigite o codigo para pesquisa:"
	.align 8
.LC33:
	.string	"\nCodigo:%d\nNome:%sTelefone:%sSexo:%sData de Nascimento:%d/%d/%d\n"
.LC34:
	.string	"\nCodigo nao encontrado."
	.text
	.globl	pesquisarPacientesPorCodigo
	.type	pesquisarPacientesPorCodigo, @function
pesquisarPacientesPorCodigo:
.LFB10:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -124[rbp], 0
	lea	rsi, .LC23[rip]
	lea	rdi, .LC19[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L33
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	lea	rdi, .LC32[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -128[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L34
.L37:
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 92
	mov	rdi, rax
	call	fread@PLT
	mov	edx, DWORD PTR -112[rbp]
	mov	eax, DWORD PTR -128[rbp]
	cmp	edx, eax
	jne	.L35
	mov	edi, DWORD PTR -28[rbp]
	mov	esi, DWORD PTR -32[rbp]
	mov	r8d, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -112[rbp]
	lea	rdx, -112[rbp]
	lea	r10, 61[rdx]
	lea	rdx, -112[rbp]
	lea	rcx, 30[rdx]
	lea	rdx, -112[rbp]
	add	rdx, 4
	push	rdi
	push	rsi
	mov	r9d, r8d
	mov	r8, r10
	mov	esi, eax
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	jmp	.L36
.L35:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L34
	lea	rdi, .LC34[rip]
	call	puts@PLT
	jmp	.L36
.L34:
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L37
.L36:
	call	getchar@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	call	getchar@PLT
	lea	rdi, .LC0[rip]
	call	system@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pesquisarPacientesPorCodigo, .-pesquisarPacientesPorCodigo
	.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	"395186.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cls\000"
	.align	2
.LC1:
	.ascii	"Menu Principal\000"
	.align	2
.LC2:
	.ascii	"1 - Incluir    Pacientes\000"
	.align	2
.LC3:
	.ascii	"2 - Listar     Pacientes\000"
	.align	2
.LC4:
	.ascii	"3 - Excluir    Pacientes\000"
	.align	2
.LC5:
	.ascii	"4 - Pesquisar  Paciente por codigo\000"
	.align	2
.LC6:
	.ascii	"5 - Encerrar aplicativo\000"
	.align	2
.LC7:
	.ascii	"Opcao:\000"
	.align	2
.LC8:
	.ascii	"%d\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L9+4
	bl	system
.L6:
	ldr	r0, .L9+8
	bl	puts
	ldr	r0, .L9+12
	bl	puts
	ldr	r0, .L9+16
	bl	puts
	ldr	r0, .L9+20
	bl	puts
	ldr	r0, .L9+24
	bl	puts
	ldr	r0, .L9+28
	bl	puts
	ldr	r0, .L9+32
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L9+36
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	bne	.L2
	ldr	r0, .L9+4
	bl	system
	bl	cadastrarPacientes
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	bne	.L3
	ldr	r0, .L9+4
	bl	system
	bl	listarPacientes
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bne	.L4
	bl	excluirPacientes
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	bne	.L5
	bl	pesquisarPacientesPorCodigo
.L5:
	ldr	r3, [fp, #-12]
	cmp	r3, #5
	bne	.L6
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
.LC10:
	.ascii	"\012Cadatrar Dados de Pacientes\012\000"
	.align	2
.LC11:
	.ascii	"\012Codigo:\000"
	.align	2
.LC12:
	.ascii	"\012Nome:\000"
	.align	2
.LC13:
	.ascii	"\012Telefone:\000"
	.align	2
.LC14:
	.ascii	"\012Sexo (Masculino - Feminino):\000"
	.align	2
.LC15:
	.ascii	"\012\012Data de Nascimento\000"
	.align	2
.LC16:
	.ascii	"\012Dia:\000"
	.align	2
.LC17:
	.ascii	"\012Mes:\000"
	.align	2
.LC18:
	.ascii	"\012Ano:\000"
	.align	2
.LC19:
	.ascii	"a+b\000"
	.align	2
.LC20:
	.ascii	"pacientes.txt\000"
	.align	2
.LC21:
	.ascii	"\012ERRO: Nao foi possivel abrir o arquivo.\000"
	.align	2
.LC22:
	.ascii	"\012ERRO: Nao foi possivel cadastrar o paciente.\000"
	.align	2
.LC23:
	.ascii	"\012Pressione qualquer tecla para continuar\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cadastrarPacientes
	.syntax unified
	.arm
	.fpu softvfp
	.type	cadastrarPacientes, %function
cadastrarPacientes:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L15+4
	bl	puts
	ldr	r0, .L15+8
	bl	printf
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L15+12
	bl	__isoc99_scanf
	bl	getchar
	ldr	r0, .L15+16
	bl	printf
	ldr	r3, .L15+20
	ldr	r2, [r3]
	sub	r3, fp, #100
	add	r3, r3, #4
	mov	r1, #26
	mov	r0, r3
	bl	fgets
	ldr	r0, .L15+24
	bl	printf
	ldr	r3, .L15+20
	ldr	r2, [r3]
	sub	r3, fp, #100
	add	r3, r3, #30
	mov	r1, #31
	mov	r0, r3
	bl	fgets
	ldr	r0, .L15+28
	bl	printf
	ldr	r3, .L15+20
	ldr	r2, [r3]
	sub	r3, fp, #100
	add	r3, r3, #61
	mov	r1, #15
	mov	r0, r3
	bl	fgets
	ldr	r0, .L15+32
	bl	puts
	ldr	r0, .L15+36
	bl	printf
	sub	r3, fp, #100
	add	r3, r3, #76
	mov	r1, r3
	ldr	r0, .L15+12
	bl	__isoc99_scanf
	ldr	r0, .L15+40
	bl	printf
	sub	r3, fp, #100
	add	r3, r3, #80
	mov	r1, r3
	ldr	r0, .L15+12
	bl	__isoc99_scanf
	ldr	r0, .L15+44
	bl	printf
	sub	r3, fp, #100
	add	r3, r3, #84
	mov	r1, r3
	ldr	r0, .L15+12
	bl	__isoc99_scanf
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r1, .L15+48
	ldr	r0, .L15+52
	bl	fopen
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L15+56
	bl	printf
	mov	r0, #1
	bl	exit
.L12:
	sub	r0, fp, #100
	ldr	r3, [fp, #-108]
	mov	r2, #1
	mov	r1, #92
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #1
	beq	.L13
	ldr	r0, .L15+60
	bl	printf
.L13:
	ldr	r0, [fp, #-108]
	bl	fclose
	ldr	r0, .L15+64
	bl	system
	ldr	r0, .L15+68
	bl	printf
	bl	getchar
	ldr	r0, .L15+64
	bl	system
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC24
	.word	.LC10
	.word	.LC11
	.word	.LC8
	.word	.LC12
	.word	stdin
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC0
	.word	.LC23
	.size	cadastrarPacientes, .-cadastrarPacientes
	.section	.rodata
	.align	2
.LC25:
	.ascii	"r+b\000"
	.align	2
.LC26:
	.ascii	"\012\000"
	.align	2
.LC27:
	.ascii	"\012Codigo:%d\012Nome:%sTelefone:%sSexo:%sData de N"
	.ascii	"ascimento:%d/%d/%d\012Flag:%d\012\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	listarPacientes
	.syntax unified
	.arm
	.fpu softvfp
	.type	listarPacientes, %function
listarPacientes:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #132
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L25+4
	ldr	r0, .L25+8
	bl	fopen
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L25+12
	bl	printf
	mov	r0, #1
	bl	exit
.L22:
	sub	r0, fp, #108
	ldr	r3, [fp, #-112]
	mov	r2, #1
	mov	r1, #92
	bl	fread
	ldr	r0, [fp, #-112]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L24
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L19
	ldr	r0, .L25+16
	bl	puts
	ldr	lr, [fp, #-108]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-20]
	sub	ip, fp, #108
	add	r4, ip, #30
	sub	ip, fp, #108
	add	ip, ip, #4
	str	r0, [sp, #16]
	str	r1, [sp, #12]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	sub	r3, fp, #108
	add	r3, r3, #61
	str	r3, [sp]
	mov	r3, r4
	mov	r2, ip
	mov	r1, lr
	ldr	r0, .L25+20
	bl	printf
.L19:
	ldr	r0, [fp, #-112]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	b	.L21
.L24:
	nop
.L21:
	ldr	r0, [fp, #-112]
	bl	fclose
	ldr	r0, .L25+24
	bl	printf
	bl	getchar
	bl	getchar
	nop
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC28
	.word	.LC25
	.word	.LC20
	.word	.LC21
	.word	.LC26
	.word	.LC27
	.word	.LC23
	.size	listarPacientes, .-listarPacientes
	.section	.rodata
	.align	2
.LC29:
	.ascii	"wb\000"
	.align	2
.LC30:
	.ascii	"pacientesnovo.txt\000"
	.align	2
.LC31:
	.ascii	"\012Digite o codigo de quem deseja excluir: \000"
	.align	2
.LC32:
	.ascii	"\012Nao foi possivel excluir o paciente.\000"
	.align	2
.LC33:
	.ascii	"\012Paciente nao encontrado\000"
	.align	2
.LC34:
	.ascii	"\012Paciente:%s Excluido\012\000"
	.align	2
.LC35:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	excluirPacientes
	.syntax unified
	.arm
	.fpu softvfp
	.type	excluirPacientes, %function
excluirPacientes:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L38+4
	ldr	r0, .L38+8
	bl	fopen
	str	r0, [fp, #-148]
	ldr	r1, .L38+12
	ldr	r0, .L38+16
	bl	fopen
	str	r0, [fp, #-144]
	ldr	r3, .L38+8
	sub	ip, fp, #44
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	ldr	r3, .L38+16
	sub	ip, fp, #28
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	strh	r3, [ip]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L28
	ldr	r0, .L38+20
	bl	printf
	mov	r0, #1
	bl	exit
.L28:
	ldr	r0, .L38+24
	bl	printf
	sub	r3, fp, #156
	mov	r1, r3
	ldr	r0, .L38+28
	bl	__isoc99_scanf
	b	.L29
.L33:
	sub	r0, fp, #136
	ldr	r3, [fp, #-148]
	mov	r2, #1
	mov	r1, #92
	bl	fread
	ldr	r0, [fp, #-148]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L37
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-156]
	cmp	r2, r3
	bne	.L32
	mov	r3, #1
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-48]
.L32:
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bne	.L29
	sub	r0, fp, #136
	ldr	r3, [fp, #-144]
	mov	r2, #1
	mov	r1, #92
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #1
	beq	.L29
	ldr	r0, .L38+32
	bl	printf
.L29:
	ldr	r0, [fp, #-148]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	b	.L31
.L37:
	nop
.L31:
	ldr	r0, [fp, #-148]
	bl	fclose
	ldr	r0, [fp, #-144]
	bl	fclose
	sub	r3, fp, #44
	mov	r0, r3
	bl	remove
	sub	r2, fp, #44
	sub	r3, fp, #28
	mov	r1, r2
	mov	r0, r3
	bl	rename
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bne	.L34
	ldr	r0, .L38+36
	bl	puts
	b	.L35
.L34:
	sub	r3, fp, #136
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L38+40
	bl	printf
.L35:
	ldr	r0, .L38+44
	bl	printf
	bl	getchar
	bl	getchar
	ldr	r0, .L38+48
	bl	system
	nop
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC35
	.word	.LC25
	.word	.LC20
	.word	.LC29
	.word	.LC30
	.word	.LC21
	.word	.LC31
	.word	.LC8
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC23
	.word	.LC0
	.size	excluirPacientes, .-excluirPacientes
	.section	.rodata
	.align	2
.LC36:
	.ascii	"\012Digite o codigo para pesquisa:\000"
	.align	2
.LC37:
	.ascii	"\012Codigo:%d\012Nome:%sTelefone:%sSexo:%sData de N"
	.ascii	"ascimento:%d/%d/%d\012\000"
	.align	2
.LC38:
	.ascii	"\012Codigo nao encontrado.\000"
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pesquisarPacientesPorCodigo
	.syntax unified
	.arm
	.fpu softvfp
	.type	pesquisarPacientesPorCodigo, %function
pesquisarPacientesPorCodigo:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-108]
	ldr	r1, .L47+4
	ldr	r0, .L47+8
	bl	fopen
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L41
	ldr	r0, .L47+12
	bl	printf
	mov	r0, #1
	bl	exit
.L41:
	ldr	r0, .L47+16
	bl	printf
	sub	r3, fp, #112
	mov	r1, r3
	ldr	r0, .L47+20
	bl	__isoc99_scanf
	b	.L42
.L45:
	sub	r0, fp, #100
	ldr	r3, [fp, #-104]
	mov	r2, #1
	mov	r1, #92
	bl	fread
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	bne	.L43
	ldr	ip, [fp, #-100]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	sub	r0, fp, #100
	add	lr, r0, #30
	sub	r0, fp, #100
	add	r0, r0, #4
	str	r1, [sp, #12]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	sub	r3, fp, #100
	add	r3, r3, #61
	str	r3, [sp]
	mov	r3, lr
	mov	r2, r0
	mov	r1, ip
	ldr	r0, .L47+24
	bl	printf
	b	.L44
.L43:
	ldr	r0, [fp, #-104]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L42
	ldr	r0, .L47+28
	bl	puts
	b	.L44
.L42:
	ldr	r0, [fp, #-104]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L45
.L44:
	bl	getchar
	ldr	r0, [fp, #-104]
	bl	fclose
	ldr	r0, .L47+32
	bl	printf
	bl	getchar
	bl	getchar
	ldr	r0, .L47+36
	bl	system
	nop
	ldr	r3, .L47
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L46
	bl	__stack_chk_fail
.L46:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC39
	.word	.LC25
	.word	.LC20
	.word	.LC21
	.word	.LC36
	.word	.LC8
	.word	.LC37
	.word	.LC38
	.word	.LC23
	.word	.LC0
	.size	pesquisarPacientesPorCodigo, .-pesquisarPacientesPorCodigo
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
