	.file	"900556.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\n\n\t\t Thank you!\n"
.LC1:
	.string	"\nEnter name of patient"
.LC2:
	.string	"%19s"
	.align 8
.LC3:
	.string	"\nNOTE : top priority is 1, medium is 2, least is 3"
.LC4:
	.string	"\nEnter priority : "
.LC5:
	.string	"%d"
	.align 8
.LC6:
	.string	"\nQueue is full. No insertion done"
	.align 8
.LC7:
	.string	"\nInserted successfully in top priority queue"
	.align 8
.LC8:
	.string	"\nInserted successfully in medium priority queue"
	.align 8
.LC9:
	.string	"\nInserted successfully in general priority queue"
	.align 8
.LC10:
	.string	"\nInvalid Priority entered - unsuccessful insertion"
	.align 8
.LC11:
	.string	"\nNo patients- no treatment done - all queues are empty"
	.align 8
.LC12:
	.string	"\nTreated patient from general priority queue"
	.align 8
.LC13:
	.string	"\npatient id : %d patient name : %s\n"
	.align 8
.LC14:
	.string	"\nTreated patient from medium priority queue"
	.align 8
.LC15:
	.string	"\nTreated patient from top priority queue"
.LC16:
	.string	"\nTop Queue is empty"
.LC17:
	.string	"\nMedium Queue is empty"
.LC18:
	.string	"\nGeneral Queue is empty"
	.align 8
.LC19:
	.string	"\nNo patients - All queues are empty"
	.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -92[rbp], 0
	mov	DWORD PTR -96[rbp], 0
	mov	DWORD PTR -104[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -88[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	mov	DWORD PTR -84[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
.L24:
	call	menu
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 4
	ja	.L2
	mov	eax, DWORD PTR -92[rbp]
	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	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
.L8:
	lea	rdx, -72[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	removeQueue
	lea	rdx, -56[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	removeQueue
	lea	rdx, -40[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	removeQueue
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L2
.L7:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -96[rbp], 1
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR -104[rbp], eax
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -100[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 1
	jne	.L9
	mov	edx, DWORD PTR -104[rbp]
	lea	rcx, -32[rbp]
	lea	rsi, -72[rbp]
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	enqueue
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L10
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L2
.L10:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L2
.L9:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 2
	jne	.L12
	mov	edx, DWORD PTR -104[rbp]
	lea	rcx, -32[rbp]
	lea	rsi, -56[rbp]
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	enqueue
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L13
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L2
.L13:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L2
.L12:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, 3
	jne	.L14
	mov	edx, DWORD PTR -104[rbp]
	lea	rcx, -32[rbp]
	lea	rsi, -40[rbp]
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	enqueue
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L15
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L2
.L15:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L2
.L14:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L2
.L6:
	lea	rdx, -32[rbp]
	lea	rcx, -104[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dequeue
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L16
	lea	rdx, -32[rbp]
	lea	rcx, -104[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dequeue
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L17
	lea	rdx, -32[rbp]
	lea	rcx, -104[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dequeue
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L18
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L2
.L18:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -104[rbp]
	lea	rdx, -32[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L17:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -104[rbp]
	lea	rdx, -32[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L16:
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -104[rbp]
	lea	rdx, -32[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L2
.L5:
	mov	DWORD PTR -84[rbp], 1
	mov	edx, DWORD PTR -84[rbp]
	lea	rcx, -72[rbp]
	lea	rax, -80[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	display
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L20
	lea	rdi, .LC16[rip]
	call	puts@PLT
.L20:
	mov	DWORD PTR -84[rbp], 2
	mov	edx, DWORD PTR -84[rbp]
	lea	rcx, -56[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	display
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L21
	lea	rdi, .LC17[rip]
	call	puts@PLT
.L21:
	mov	DWORD PTR -84[rbp], 3
	mov	edx, DWORD PTR -84[rbp]
	lea	rcx, -40[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	display
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L27
	lea	rdi, .LC18[rip]
	call	puts@PLT
	jmp	.L27
.L3:
	mov	DWORD PTR -84[rbp], 1
	mov	rax, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR -84[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	display_front
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L28
	mov	DWORD PTR -84[rbp], 2
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -84[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	display_front
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L28
	mov	DWORD PTR -84[rbp], 3
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -84[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	display_front
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 1
	jne	.L28
	lea	rdi, .LC19[rip]
	call	puts@PLT
	jmp	.L28
.L27:
	nop
	jmp	.L2
.L28:
	nop
.L2:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L24
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC20:
	.string	"\n\t1. Add patient"
.LC21:
	.string	"\n\t2. Treat patient"
.LC22:
	.string	"\n\t3. Display all patient"
	.align 8
.LC23:
	.string	"\n\t4. Display the first patient to be treated "
.LC24:
	.string	"\n\t0: Exit"
.LC25:
	.string	"\nEnter your choice : "
	.text
	.globl	menu
	.type	menu, @function
menu:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
.L30:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	lea	rdi, .LC22[rip]
	call	puts@PLT
	lea	rdi, .LC23[rip]
	call	puts@PLT
	lea	rdi, .LC24[rip]
	call	puts@PLT
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	js	.L30
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 4
	jg	.L30
	mov	eax, DWORD PTR -12[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	menu, .-menu
	.globl	enqueue
	.type	enqueue, @function
enqueue:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	mov	QWORD PTR -64[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	isFull
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 1
	je	.L34
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L35
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L34
.L35:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR [rax], rdx
.L34:
	mov	eax, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	enqueue, .-enqueue
	.globl	isFull
	.type	isFull, @function
isFull:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	mov	esi, 32
	mov	edi, 1
	call	calloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L39
	mov	DWORD PTR -4[rbp], 1
	jmp	.L40
.L39:
	mov	DWORD PTR -4[rbp], 0
.L40:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	isFull, .-isFull
	.globl	dequeue
	.type	dequeue, @function
dequeue:
.LFB10:
	.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	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -12[rbp], 0
	mov	QWORD PTR -8[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	isEmpty
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 1
	je	.L43
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
.L43:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	dequeue, .-dequeue
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB11:
	.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
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L46
	mov	DWORD PTR -4[rbp], 1
	jmp	.L47
.L46:
	mov	DWORD PTR -4[rbp], 0
.L47:
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	isEmpty, .-isEmpty
	.section	.rodata
.LC26:
	.string	"\nTop Queue :"
.LC27:
	.string	"\nMedium Queue :"
.LC28:
	.string	"\nGeneral Queue :"
	.text
	.globl	display
	.type	display, @function
display:
.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, 96
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -84[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L50
	mov	DWORD PTR -52[rbp], 1
	jmp	.L51
.L50:
	cmp	DWORD PTR -84[rbp], 1
	jne	.L52
	lea	rdi, .LC26[rip]
	call	puts@PLT
	jmp	.L55
.L52:
	cmp	DWORD PTR -84[rbp], 2
	jne	.L54
	lea	rdi, .LC27[rip]
	call	puts@PLT
	jmp	.L55
.L54:
	lea	rdi, .LC28[rip]
	call	puts@PLT
	jmp	.L55
.L56:
	lea	rdx, -32[rbp]
	lea	rcx, -56[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dequeue
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, -32[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -56[rbp]
	lea	rcx, -32[rbp]
	lea	rsi, -40[rbp]
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	enqueue
	mov	DWORD PTR -52[rbp], eax
.L55:
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L56
	jmp	.L57
.L58:
	lea	rdx, -32[rbp]
	lea	rcx, -56[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	dequeue
	mov	DWORD PTR -52[rbp], eax
	mov	edx, DWORD PTR -56[rbp]
	lea	rcx, -32[rbp]
	mov	rsi, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	enqueue
	mov	DWORD PTR -52[rbp], eax
.L57:
	mov	rax, QWORD PTR -48[rbp]
	test	rax, rax
	jne	.L58
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -52[rbp], 0
.L51:
	mov	eax, DWORD PTR -52[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	display, .-display
	.section	.rodata
.LC29:
	.string	"\nPatient from Top Queue\n "
.LC30:
	.string	"\nPatient from Medium Queue"
.LC31:
	.string	"\nPatient from General Queue"
	.text
	.globl	display_front
	.type	display_front, @function
display_front:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	cmp	QWORD PTR -24[rbp], 0
	jne	.L62
	mov	DWORD PTR -4[rbp], 1
	jmp	.L63
.L62:
	mov	DWORD PTR -4[rbp], 0
	cmp	DWORD PTR -28[rbp], 1
	jne	.L64
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L65
.L64:
	cmp	DWORD PTR -28[rbp], 2
	jne	.L66
	lea	rdi, .LC30[rip]
	call	puts@PLT
	jmp	.L65
.L66:
	lea	rdi, .LC31[rip]
	call	puts@PLT
.L65:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L63:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	display_front, .-display_front
	.globl	removeQueue
	.type	removeQueue, @function
removeQueue:
.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 -32[rbp], rsi
	mov	QWORD PTR -8[rbp], 0
	jmp	.L69
.L70:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -8[rbp], 0
.L69:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L70
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	removeQueue, .-removeQueue
	.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	"900556.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012\012\011\011 Thank you!\012\000"
	.align	2
.LC1:
	.ascii	"\012Enter name of patient\000"
	.align	2
.LC2:
	.ascii	"%19s\000"
	.align	2
.LC3:
	.ascii	"\012NOTE : top priority is 1, medium is 2, least is"
	.ascii	" 3\000"
	.align	2
.LC4:
	.ascii	"\012Enter priority : \000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.ascii	"\012Queue is full. No insertion done\000"
	.align	2
.LC7:
	.ascii	"\012Inserted successfully in top priority queue\000"
	.align	2
.LC8:
	.ascii	"\012Inserted successfully in medium priority queue\000"
	.align	2
.LC9:
	.ascii	"\012Inserted successfully in general priority queue"
	.ascii	"\000"
	.align	2
.LC10:
	.ascii	"\012Invalid Priority entered - unsuccessful inserti"
	.ascii	"on\000"
	.align	2
.LC11:
	.ascii	"\012No patients- no treatment done - all queues are"
	.ascii	" empty\000"
	.align	2
.LC12:
	.ascii	"\012Treated patient from general priority queue\000"
	.align	2
.LC13:
	.ascii	"\012patient id : %d patient name : %s\012\000"
	.align	2
.LC14:
	.ascii	"\012Treated patient from medium priority queue\000"
	.align	2
.LC15:
	.ascii	"\012Treated patient from top priority queue\000"
	.align	2
.LC16:
	.ascii	"\012Top Queue is empty\000"
	.align	2
.LC17:
	.ascii	"\012Medium Queue is empty\000"
	.align	2
.LC18:
	.ascii	"\012General Queue is empty\000"
	.align	2
.LC19:
	.ascii	"\012No patients - All queues are empty\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-76]
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-48]
.L24:
	bl	menu
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L8:
	sub	r2, fp, #64
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	removeQueue
	sub	r2, fp, #56
	sub	r3, fp, #60
	mov	r1, r2
	mov	r0, r3
	bl	removeQueue
	sub	r2, fp, #48
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	removeQueue
	ldr	r0, .L29+4
	bl	puts
	b	.L2
.L7:
	ldr	r0, .L29+8
	bl	puts
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L29+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-76]
	ldr	r0, .L29+16
	bl	puts
	ldr	r0, .L29+20
	bl	printf
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, .L29+24
	bl	__isoc99_scanf
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bne	.L9
	ldr	r2, [fp, #-76]
	sub	r3, fp, #28
	sub	r1, fp, #64
	sub	r0, fp, #68
	bl	enqueue
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L10
	ldr	r0, .L29+28
	bl	puts
	b	.L2
.L10:
	ldr	r0, .L29+32
	bl	puts
	b	.L2
.L9:
	ldr	r3, [fp, #-72]
	cmp	r3, #2
	bne	.L12
	ldr	r2, [fp, #-76]
	sub	r3, fp, #28
	sub	r1, fp, #56
	sub	r0, fp, #60
	bl	enqueue
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L13
	ldr	r0, .L29+28
	bl	puts
	b	.L2
.L13:
	ldr	r0, .L29+36
	bl	puts
	b	.L2
.L12:
	ldr	r3, [fp, #-72]
	cmp	r3, #3
	bne	.L14
	ldr	r2, [fp, #-76]
	sub	r3, fp, #28
	sub	r1, fp, #48
	sub	r0, fp, #52
	bl	enqueue
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L15
	ldr	r0, .L29+28
	bl	puts
	b	.L2
.L15:
	ldr	r0, .L29+40
	bl	puts
	b	.L2
.L14:
	ldr	r0, .L29+44
	bl	puts
	b	.L2
.L6:
	sub	r2, fp, #28
	sub	r1, fp, #76
	sub	r3, fp, #68
	mov	r0, r3
	bl	dequeue
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L16
	sub	r2, fp, #28
	sub	r1, fp, #76
	sub	r3, fp, #60
	mov	r0, r3
	bl	dequeue
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L17
	sub	r2, fp, #28
	sub	r1, fp, #76
	sub	r3, fp, #52
	mov	r0, r3
	bl	dequeue
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L18
	ldr	r0, .L29+48
	bl	puts
	b	.L2
.L18:
	ldr	r0, .L29+52
	bl	puts
	ldr	r3, [fp, #-76]
	sub	r2, fp, #28
	mov	r1, r3
	ldr	r0, .L29+56
	bl	printf
	b	.L2
.L17:
	ldr	r0, .L29+60
	bl	puts
	ldr	r3, [fp, #-76]
	sub	r2, fp, #28
	mov	r1, r3
	ldr	r0, .L29+56
	bl	printf
	b	.L2
.L16:
	ldr	r0, .L29+64
	bl	puts
	ldr	r3, [fp, #-76]
	sub	r2, fp, #28
	mov	r1, r3
	ldr	r0, .L29+56
	bl	printf
	b	.L2
.L5:
	mov	r3, #1
	str	r3, [fp, #-32]
	sub	r1, fp, #64
	sub	r3, fp, #68
	ldr	r2, [fp, #-32]
	mov	r0, r3
	bl	display
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L20
	ldr	r0, .L29+68
	bl	puts
.L20:
	mov	r3, #2
	str	r3, [fp, #-32]
	sub	r1, fp, #56
	sub	r3, fp, #60
	ldr	r2, [fp, #-32]
	mov	r0, r3
	bl	display
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L21
	ldr	r0, .L29+72
	bl	puts
.L21:
	mov	r3, #3
	str	r3, [fp, #-32]
	sub	r1, fp, #48
	sub	r3, fp, #52
	ldr	r2, [fp, #-32]
	mov	r0, r3
	bl	display
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L27
	ldr	r0, .L29+76
	bl	puts
	b	.L27
.L3:
	mov	r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-68]
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	display_front
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L28
	mov	r3, #2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-60]
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	display_front
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L28
	mov	r3, #3
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-52]
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	display_front
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L28
	ldr	r0, .L29+80
	bl	puts
	b	.L28
.L27:
	nop
	b	.L2
.L28:
	nop
.L2:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L24
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC20
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.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
	.word	.LC19
	.size	main, .-main
	.section	.rodata
	.align	2
.LC21:
	.ascii	"\012\0111. Add patient\000"
	.align	2
.LC22:
	.ascii	"\012\0112. Treat patient\000"
	.align	2
.LC23:
	.ascii	"\012\0113. Display all patient\000"
	.align	2
.LC24:
	.ascii	"\012\0114. Display the first patient to be treated "
	.ascii	"\000"
	.align	2
.LC25:
	.ascii	"\012\0110: Exit\000"
	.align	2
.LC26:
	.ascii	"\012Enter your choice : \000"
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	menu, %function
menu:
	@ 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, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
.L32:
	ldr	r0, .L35+4
	bl	puts
	ldr	r0, .L35+8
	bl	puts
	ldr	r0, .L35+12
	bl	puts
	ldr	r0, .L35+16
	bl	puts
	ldr	r0, .L35+20
	bl	puts
	ldr	r0, .L35+24
	bl	printf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L35+28
	bl	__isoc99_scanf
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L32
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	bgt	.L32
	ldr	r3, [fp, #-12]
	ldr	r2, .L35
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC27
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC5
	.size	menu, .-menu
	.section	.rodata
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	enqueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	enqueue, %function
enqueue:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	sub	r3, fp, #16
	mov	r0, r3
	bl	isFull
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L38
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L39
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	strcpy
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	b	.L38
.L39:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #24]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	str	r2, [r3]
.L38:
	ldr	r3, [fp, #-12]
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC28
	.size	enqueue, .-enqueue
	.align	2
	.global	isFull
	.syntax unified
	.arm
	.fpu softvfp
	.type	isFull, %function
isFull:
	@ 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]
	mov	r1, #28
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L45
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L46
.L45:
	mov	r3, #0
	str	r3, [fp, #-8]
.L46:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	isFull, .-isFull
	.align	2
	.global	dequeue
	.syntax unified
	.arm
	.fpu softvfp
	.type	dequeue, %function
dequeue:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	isEmpty
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L49
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #24]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #24]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	strcpy
	ldr	r0, [fp, #-8]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
.L49:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	dequeue, .-dequeue
	.align	2
	.global	isEmpty
	.syntax unified
	.arm
	.fpu softvfp
	.type	isEmpty, %function
isEmpty:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L52
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L53
.L52:
	mov	r3, #0
	str	r3, [fp, #-8]
.L53:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isEmpty, .-isEmpty
	.section	.rodata
	.align	2
.LC29:
	.ascii	"\012Top Queue :\000"
	.align	2
.LC30:
	.ascii	"\012Medium Queue :\000"
	.align	2
.LC31:
	.ascii	"\012General Queue :\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	display
	.syntax unified
	.arm
	.fpu softvfp
	.type	display, %function
display:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	ldr	r3, .L67
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L56
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L57
.L56:
	ldr	r3, [fp, #-56]
	cmp	r3, #1
	bne	.L58
	ldr	r0, .L67+4
	bl	puts
	b	.L61
.L58:
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	bne	.L60
	ldr	r0, .L67+8
	bl	puts
	b	.L61
.L60:
	ldr	r0, .L67+12
	bl	puts
	b	.L61
.L62:
	sub	r2, fp, #28
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	dequeue
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-36]
	sub	r2, fp, #28
	mov	r1, r3
	ldr	r0, .L67+16
	bl	printf
	ldr	r2, [fp, #-36]
	sub	r3, fp, #28
	sub	r1, fp, #40
	sub	r0, fp, #44
	bl	enqueue
	str	r0, [fp, #-32]
.L61:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L62
	b	.L63
.L64:
	sub	r2, fp, #28
	sub	r1, fp, #36
	sub	r3, fp, #44
	mov	r0, r3
	bl	dequeue
	str	r0, [fp, #-32]
	ldr	r2, [fp, #-36]
	sub	r3, fp, #28
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-48]
	bl	enqueue
	str	r0, [fp, #-32]
.L63:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L64
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	str	r3, [fp, #-32]
.L57:
	ldr	r3, [fp, #-32]
	ldr	r2, .L67
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L66
	bl	__stack_chk_fail
.L66:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	.LC32
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC13
	.size	display, .-display
	.section	.rodata
	.align	2
.LC33:
	.ascii	"\012Patient from Top Queue\012 \000"
	.align	2
.LC34:
	.ascii	"\012Patient from Medium Queue\000"
	.align	2
.LC35:
	.ascii	"\012Patient from General Queue\000"
	.text
	.align	2
	.global	display_front
	.syntax unified
	.arm
	.fpu softvfp
	.type	display_front, %function
display_front:
	@ 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	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L70
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L71
.L70:
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L72
	ldr	r0, .L76
	bl	printf
	b	.L73
.L72:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L74
	ldr	r0, .L76+4
	bl	puts
	b	.L73
.L74:
	ldr	r0, .L76+8
	bl	puts
.L73:
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	mov	r2, r3
	ldr	r0, .L76+12
	bl	printf
.L71:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC13
	.size	display_front, .-display_front
	.align	2
	.global	removeQueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	removeQueue, %function
removeQueue:
	@ 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]
	b	.L79
.L80:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #24]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #24]
	ldr	r0, [fp, #-8]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-8]
.L79:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L80
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	removeQueue, .-removeQueue
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
