	.file	"247017962.c"
	.intel_syntax noprefix
	.text
	.globl	head
	.bss
	.align 8
	.type	head, @object
	.size	head, 8
head:
	.zero	8
	.globl	last
	.align 8
	.type	last, @object
	.size	last, 8
last:
	.zero	8
	.globl	current
	.align 8
	.type	current, @object
	.size	current, 8
current:
	.zero	8
	.text
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	isEmpty, .-isEmpty
	.globl	length
	.type	length, @function
length:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR current[rip], rax
	jmp	.L4
.L5:
	add	DWORD PTR -4[rbp], 1
	mov	rax, QWORD PTR current[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR current[rip], rax
.L4:
	mov	rax, QWORD PTR current[rip]
	test	rax, rax
	jne	.L5
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	length, .-length
	.section	.rodata
.LC0:
	.string	"\n "
.LC1:
	.string	"%d"
	.text
	.globl	displayForward
	.type	displayForward, @function
displayForward:
.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, 16
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L8:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	displayForward, .-displayForward
	.globl	insertLast
	.type	insertLast, @function
insertLast:
.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	DWORD PTR -20[rbp], edi
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, 0
	call	isEmpty
	test	al, al
	je	.L11
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR head[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR last[rip], rax
	jmp	.L12
.L11:
	mov	rax, QWORD PTR last[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rdx, QWORD PTR last[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR last[rip], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	insertLast, .-insertLast
	.section	.rodata
.LC2:
	.string	"you are already at floor %d"
.LC3:
	.string	"\n\tYou reached at Floor %d"
.LC4:
	.string	"\n\tGoing up to floor %d"
.LC5:
	.string	"\n\t You reached at Floor %d"
.LC6:
	.string	"\n\tGoing down to floor %d"
	.text
	.globl	elevator
	.type	elevator, @function
elevator:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L14
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L14:
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L16
	mov	rax, QWORD PTR current[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR current[rip], rax
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L17
.L20:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L18
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L13
.L18:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR current[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR current[rip], rax
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jle	.L20
	jmp	.L15
.L16:
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L15
	mov	rax, QWORD PTR current[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR current[rip], rax
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L21
.L24:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jne	.L22
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L13
.L22:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR current[rip]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR head[rip]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L23
	mov	rax, QWORD PTR current[rip]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR current[rip], rax
.L23:
	sub	DWORD PTR -4[rbp], 1
.L21:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jge	.L24
.L15:
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	elevator, .-elevator
	.globl	ascsort
	.type	ascsort, @function
ascsort:
.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 -28[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L26
.L30:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L27
.L29:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L28
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
.L28:
	add	DWORD PTR -8[rbp], 1
.L27:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	cmp	DWORD PTR -8[rbp], eax
	jl	.L29
	add	DWORD PTR -12[rbp], 1
.L26:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cmp	DWORD PTR -12[rbp], eax
	jl	.L30
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	ascsort, .-ascsort
	.globl	descsort
	.type	descsort, @function
descsort:
.LFB12:
	.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 -28[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L32
.L36:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L33
.L35:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L34
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR [rdx], eax
.L34:
	add	DWORD PTR -8[rbp], 1
.L33:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -12[rbp]
	sub	eax, 1
	cmp	DWORD PTR -8[rbp], eax
	jl	.L35
	add	DWORD PTR -12[rbp], 1
.L32:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cmp	DWORD PTR -12[rbp], eax
	jl	.L36
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	descsort, .-descsort
	.section	.rodata
.LC7:
	.string	"\n\t Enter how many floors"
	.align 8
.LC8:
	.string	"\n\tAt start elevator is at ground Floor"
	.align 8
.LC9:
	.string	"\n\tEnter how many inputs(max capacity is 8)"
.LC10:
	.string	"Enter input %d"
	.align 8
.LC11:
	.string	"\n\t Do you want to continue..press(y/n)"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -124[rbp], 0
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -140[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -128[rbp], 0
	jmp	.L38
.L39:
	mov	eax, DWORD PTR -128[rbp]
	mov	edi, eax
	call	insertLast
	add	DWORD PTR -128[rbp], 1
.L38:
	mov	eax, DWORD PTR -140[rbp]
	cmp	DWORD PTR -128[rbp], eax
	jle	.L39
	mov	eax, 0
	call	displayForward
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L42:
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -136[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -136[rbp]
	cmp	eax, 8
	jg	.L42
	mov	eax, DWORD PTR -136[rbp]
	test	eax, eax
	jg	.L71
	jmp	.L42
.L71:
	nop
	mov	DWORD PTR -128[rbp], 0
	jmp	.L43
.L46:
	mov	eax, DWORD PTR -128[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -140[rbp]
	cmp	edx, eax
	jg	.L46
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*4]
	test	eax, eax
	jns	.L72
	jmp	.L46
.L72:
	nop
	add	DWORD PTR -128[rbp], 1
.L43:
	mov	eax, DWORD PTR -136[rbp]
	cmp	DWORD PTR -128[rbp], eax
	jl	.L46
	cmp	DWORD PTR -124[rbp], 0
	jne	.L47
	mov	edx, DWORD PTR -136[rbp]
	lea	rax, -112[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ascsort
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR current[rip], rax
	mov	DWORD PTR -128[rbp], 0
	jmp	.L48
.L49:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	eax, DWORD PTR -112[rbp+rax*4]
	mov	edi, eax
	call	elevator
	mov	DWORD PTR -132[rbp], eax
	add	DWORD PTR -128[rbp], 1
.L48:
	mov	eax, DWORD PTR -136[rbp]
	cmp	DWORD PTR -128[rbp], eax
	jl	.L49
	mov	DWORD PTR -124[rbp], 1
	jmp	.L50
.L47:
	cmp	DWORD PTR -124[rbp], 1
	jne	.L50
	mov	DWORD PTR -120[rbp], 0
	mov	DWORD PTR -116[rbp], 0
	cmp	DWORD PTR -132[rbp], 1
	jne	.L51
	mov	DWORD PTR -128[rbp], 0
	jmp	.L52
.L55:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jle	.L53
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
	jmp	.L54
.L53:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	DWORD PTR -48[rbp+rax*4], edx
	add	DWORD PTR -116[rbp], 1
.L54:
	add	DWORD PTR -128[rbp], 1
.L52:
	mov	eax, DWORD PTR -136[rbp]
	cmp	DWORD PTR -128[rbp], eax
	jl	.L55
	mov	edx, DWORD PTR -120[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ascsort
	mov	edx, DWORD PTR -116[rbp]
	lea	rax, -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	descsort
	mov	DWORD PTR -128[rbp], 0
	jmp	.L56
.L57:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	mov	edi, eax
	call	elevator
	mov	DWORD PTR -132[rbp], eax
	add	DWORD PTR -128[rbp], 1
.L56:
	mov	eax, DWORD PTR -128[rbp]
	cmp	eax, DWORD PTR -120[rbp]
	jl	.L57
	mov	DWORD PTR -128[rbp], 0
	jmp	.L58
.L59:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	edi, eax
	call	elevator
	mov	DWORD PTR -132[rbp], eax
	add	DWORD PTR -128[rbp], 1
.L58:
	mov	eax, DWORD PTR -128[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L59
	jmp	.L50
.L51:
	cmp	DWORD PTR -132[rbp], 0
	jne	.L50
	mov	DWORD PTR -120[rbp], 0
	mov	DWORD PTR -116[rbp], 0
	mov	DWORD PTR -128[rbp], 0
	jmp	.L60
.L63:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	rax, QWORD PTR current[rip]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L61
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
	jmp	.L62
.L61:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	edx, DWORD PTR -112[rbp+rax*4]
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	DWORD PTR -48[rbp+rax*4], edx
	add	DWORD PTR -116[rbp], 1
.L62:
	add	DWORD PTR -128[rbp], 1
.L60:
	mov	eax, DWORD PTR -136[rbp]
	cmp	DWORD PTR -128[rbp], eax
	jl	.L63
	mov	edx, DWORD PTR -120[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	descsort
	mov	edx, DWORD PTR -116[rbp]
	lea	rax, -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ascsort
	mov	DWORD PTR -128[rbp], 0
	jmp	.L64
.L65:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	mov	edi, eax
	call	elevator
	mov	DWORD PTR -132[rbp], eax
	add	DWORD PTR -128[rbp], 1
.L64:
	mov	eax, DWORD PTR -128[rbp]
	cmp	eax, DWORD PTR -120[rbp]
	jl	.L65
	mov	DWORD PTR -128[rbp], 0
	jmp	.L66
.L67:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	edi, eax
	call	elevator
	mov	DWORD PTR -132[rbp], eax
	add	DWORD PTR -128[rbp], 1
.L66:
	mov	eax, DWORD PTR -128[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L67
.L50:
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	call	getchar@PLT
	mov	BYTE PTR -141[rbp], al
	call	getchar@PLT
	mov	BYTE PTR -141[rbp], al
	cmp	BYTE PTR -141[rbp], 121
	je	.L42
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"247017962.c"
	.text
	.global	head
	.bss
	.align	2
	.type	head, %object
	.size	head, 4
head:
	.space	4
	.global	last
	.align	2
	.type	last, %object
	.size	last, 4
last:
	.space	4
	.global	current
	.align	2
	.type	current, %object
	.size	current, 4
current:
	.space	4
	.text
	.align	2
	.global	isEmpty
	.syntax unified
	.arm
	.fpu softvfp
	.type	isEmpty, %function
isEmpty:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L3
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L4:
	.align	2
.L3:
	.word	head
	.size	isEmpty, .-isEmpty
	.align	2
	.global	length
	.syntax unified
	.arm
	.fpu softvfp
	.type	length, %function
length:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, .L9
	ldr	r3, [r3]
	ldr	r2, .L9+4
	str	r3, [r2]
	b	.L6
.L7:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, .L9+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L9+4
	str	r3, [r2]
.L6:
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L10:
	.align	2
.L9:
	.word	head
	.word	current
	.size	length, .-length
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012 \000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.text
	.align	2
	.global	displayForward
	.syntax unified
	.arm
	.fpu softvfp
	.type	displayForward, %function
displayForward:
	@ 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, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r0, .L14+4
	bl	printf
	b	.L12
.L13:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L12:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L13
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	head
	.word	.LC0
	.word	.LC1
	.size	displayForward, .-displayForward
	.align	2
	.global	insertLast
	.syntax unified
	.arm
	.fpu softvfp
	.type	insertLast, %function
insertLast:
	@ 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	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	ldr	r2, .L19
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r2, .L19+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	b	.L18
.L17:
	ldr	r3, .L19+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
.L18:
	ldr	r2, .L19+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	head
	.word	last
	.size	insertLast, .-insertLast
	.section	.rodata
	.align	2
.LC2:
	.ascii	"you are already at floor %d\000"
	.align	2
.LC3:
	.ascii	"\012\011You reached at Floor %d\000"
	.align	2
.LC4:
	.ascii	"\012\011Going up to floor %d\000"
	.align	2
.LC5:
	.ascii	"\012\011 You reached at Floor %d\000"
	.align	2
.LC6:
	.ascii	"\012\011Going down to floor %d\000"
	.text
	.align	2
	.global	elevator
	.syntax unified
	.arm
	.fpu softvfp
	.type	elevator, %function
elevator:
	@ 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, .L33
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L22
	ldr	r1, [fp, #-16]
	ldr	r0, .L33+4
	bl	printf
	b	.L23
.L22:
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L24
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L33
	str	r3, [r2]
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L25
.L28:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bne	.L26
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+8
	bl	printf
	mov	r3, #1
	b	.L21
.L26:
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+12
	bl	printf
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L33
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L25:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	ble	.L28
	b	.L23
.L24:
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L23
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L33
	str	r3, [r2]
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L29
.L32:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bne	.L30
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+16
	bl	printf
	mov	r3, #0
	b	.L21
.L30:
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+20
	bl	printf
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L33+24
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L31
	ldr	r3, .L33
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L33
	str	r3, [r2]
.L31:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L29:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bge	.L32
.L23:
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	current
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	head
	.size	elevator, .-elevator
	.align	2
	.global	ascsort
	.syntax unified
	.arm
	.fpu softvfp
	.type	ascsort, %function
ascsort:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L36
.L40:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L37
.L39:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L38
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L38:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L37:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L39
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L36:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L40
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ascsort, .-ascsort
	.align	2
	.global	descsort
	.syntax unified
	.arm
	.fpu softvfp
	.type	descsort, %function
descsort:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L42
.L46:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L43
.L45:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L44
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L44:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L43:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L45
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L42:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L46
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	descsort, .-descsort
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\012\011 Enter how many floors\000"
	.align	2
.LC8:
	.ascii	"\012\011At start elevator is at ground Floor\000"
	.align	2
.LC9:
	.ascii	"\012\011Enter how many inputs(max capacity is 8)\000"
	.align	2
.LC10:
	.ascii	"Enter input %d\000"
	.align	2
.LC11:
	.ascii	"\012\011 Do you want to continue..press(y/n)\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	ldr	r3, .L83
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-116]
	ldr	r0, .L83+4
	bl	printf
	sub	r3, fp, #132
	mov	r1, r3
	ldr	r0, .L83+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L48
.L49:
	ldr	r0, [fp, #-120]
	bl	insertLast
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L48:
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	ble	.L49
	bl	displayForward
	ldr	r0, .L83+12
	bl	printf
.L52:
	ldr	r0, .L83+16
	bl	printf
	sub	r3, fp, #128
	mov	r1, r3
	ldr	r0, .L83+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-128]
	cmp	r3, #8
	bgt	.L52
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bgt	.L81
	b	.L52
.L81:
	nop
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L53
.L56:
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L83+20
	bl	printf
	sub	r2, fp, #104
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L83+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	bgt	.L56
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-100]
	cmp	r3, #0
	bge	.L82
	b	.L56
.L82:
	nop
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L53:
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	blt	.L56
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L57
	ldr	r2, [fp, #-128]
	sub	r3, fp, #104
	mov	r1, r2
	mov	r0, r3
	bl	ascsort
	ldr	r3, .L83+24
	ldr	r3, [r3]
	ldr	r2, .L83+28
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L58
.L59:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-100]
	mov	r0, r3
	bl	elevator
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L58:
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	blt	.L59
	mov	r3, #1
	str	r3, [fp, #-116]
	b	.L60
.L57:
	ldr	r3, [fp, #-116]
	cmp	r3, #1
	bne	.L60
	mov	r3, #0
	str	r3, [fp, #-112]
	mov	r3, #0
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-124]
	cmp	r3, #1
	bne	.L61
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L62
.L65:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, .L83+28
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L63
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-68]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
	b	.L64
.L63:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-36]
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L64:
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L62:
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	blt	.L65
	sub	r3, fp, #72
	ldr	r1, [fp, #-112]
	mov	r0, r3
	bl	ascsort
	sub	r3, fp, #40
	ldr	r1, [fp, #-108]
	mov	r0, r3
	bl	descsort
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L66
.L67:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-68]
	mov	r0, r3
	bl	elevator
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L66:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	blt	.L67
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L68
.L69:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	mov	r0, r3
	bl	elevator
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L68:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	blt	.L69
	b	.L60
.L61:
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	bne	.L60
	mov	r3, #0
	str	r3, [fp, #-112]
	mov	r3, #0
	str	r3, [fp, #-108]
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L70
.L73:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, .L83+28
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L71
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, [fp, #-112]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-68]
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
	b	.L72
.L71:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-100]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-36]
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L72:
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L70:
	ldr	r3, [fp, #-128]
	ldr	r2, [fp, #-120]
	cmp	r2, r3
	blt	.L73
	sub	r3, fp, #72
	ldr	r1, [fp, #-112]
	mov	r0, r3
	bl	descsort
	sub	r3, fp, #40
	ldr	r1, [fp, #-108]
	mov	r0, r3
	bl	ascsort
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L74
.L75:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-68]
	mov	r0, r3
	bl	elevator
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L74:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-112]
	cmp	r2, r3
	blt	.L75
	mov	r3, #0
	str	r3, [fp, #-120]
	b	.L76
.L77:
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	mov	r0, r3
	bl	elevator
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-120]
	add	r3, r3, #1
	str	r3, [fp, #-120]
.L76:
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	blt	.L77
.L60:
	ldr	r0, .L83+32
	bl	printf
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-133]
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-133]
	ldrb	r3, [fp, #-133]	@ zero_extendqisi2
	cmp	r3, #121
	beq	.L52
	nop
	ldr	r3, .L83
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L84:
	.align	2
.L83:
	.word	.LC12
	.word	.LC7
	.word	.LC1
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	head
	.word	current
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
