	.file	"183895.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"The total head movement is of %d cylinders\n"
.LC1:
	.string	"The seek sequence is"
.LC2:
	.string	"%d\t"
	.text
	.globl	fcfs
	.type	fcfs, @function
fcfs:
.LFB0:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, edx
	cdq
	xor	eax, edx
	mov	DWORD PTR -12[rbp], eax
	sub	DWORD PTR -12[rbp], edx
	mov	DWORD PTR -8[rbp], 1
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	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	edx, DWORD PTR [rdx]
	sub	eax, edx
	cdq
	xor	eax, edx
	sub	eax, edx
	add	DWORD PTR -12[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L3
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L4:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L5
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	fcfs, .-fcfs
	.globl	scan
	.type	scan, @function
scan:
.LFB1:
	.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, 120
	.cfi_offset 3, -24
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	DWORD PTR -112[rbp], edx
	mov	DWORD PTR -116[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR -108[rbp]
	mov	DWORD PTR -48[rbp], eax
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 1
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r10, rdx
	mov	r11d, 0
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L7:
	cmp	rsp, rdx
	je	.L8
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L7
.L8:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L9
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L9:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -88[rbp], 0
	mov	DWORD PTR -80[rbp], 1
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -84[rbp], eax
	jge	.L11
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -84[rbp], eax
.L11:
	add	DWORD PTR -80[rbp], 1
.L10:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L12
	mov	DWORD PTR -76[rbp], 0
	jmp	.L13
.L15:
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jle	.L14
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -88[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -88[rbp], edx
	mov	ecx, DWORD PTR [rcx]
	mov	rdx, QWORD PTR -32[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], ecx
	mov	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR -92[rbp], eax
.L14:
	add	DWORD PTR -76[rbp], 1
.L13:
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L15
	mov	DWORD PTR -72[rbp], 0
	jmp	.L16
.L20:
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -68[rbp], eax
	jmp	.L17
.L19:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	ecx, eax
	jge	.L18
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
.L18:
	add	DWORD PTR -68[rbp], 1
.L17:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jl	.L19
	add	DWORD PTR -72[rbp], 1
.L16:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jl	.L20
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -92[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], 0
	add	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -64[rbp], 0
	jmp	.L21
.L23:
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jge	.L22
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -92[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -92[rbp], edx
	mov	ecx, DWORD PTR [rcx]
	mov	rdx, QWORD PTR -32[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], ecx
.L22:
	add	DWORD PTR -64[rbp], 1
.L21:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L23
	mov	eax, DWORD PTR -88[rbp]
	add	eax, 1
	mov	DWORD PTR -60[rbp], eax
	jmp	.L24
.L28:
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -56[rbp], eax
	jmp	.L25
.L27:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	ecx, eax
	jle	.L26
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
.L26:
	add	DWORD PTR -56[rbp], 1
.L25:
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jge	.L27
	add	DWORD PTR -60[rbp], 1
.L24:
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jge	.L28
	mov	eax, DWORD PTR -84[rbp]
	add	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L29
.L30:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -52[rbp], 1
.L29:
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jge	.L30
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	scan, .-scan
	.section	.rodata
	.align 8
.LC3:
	.string	"\nThe total head movement is of %d cylinders\n"
	.text
	.globl	cscan
	.type	cscan, @function
cscan:
.LFB2:
	.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, 120
	.cfi_offset 3, -24
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	DWORD PTR -112[rbp], edx
	mov	DWORD PTR -116[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 2
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -40[rbp], rdx
	movsx	rdx, eax
	mov	r10, rdx
	mov	r11d, 0
	movsx	rdx, eax
	mov	r8, rdx
	mov	r9d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L33:
	cmp	rsp, rdx
	je	.L34
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L33
.L34:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L35
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L35:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -96[rbp], 0
	mov	DWORD PTR -84[rbp], 1
	jmp	.L36
.L38:
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -92[rbp], eax
	jle	.L37
	mov	eax, DWORD PTR -84[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -92[rbp], eax
.L37:
	add	DWORD PTR -84[rbp], 1
.L36:
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L38
	mov	DWORD PTR -80[rbp], 0
	jmp	.L39
.L41:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jle	.L40
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -92[rbp], eax
	jg	.L40
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -92[rbp], eax
.L40:
	add	DWORD PTR -80[rbp], 1
.L39:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L41
	mov	DWORD PTR -76[rbp], 0
	jmp	.L42
.L44:
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jge	.L43
	mov	eax, DWORD PTR -76[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -96[rbp], edx
	mov	ecx, DWORD PTR [rcx]
	mov	rdx, QWORD PTR -32[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], ecx
	mov	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR -88[rbp], eax
.L43:
	add	DWORD PTR -76[rbp], 1
.L42:
	mov	eax, DWORD PTR -76[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L44
	mov	DWORD PTR -72[rbp], 0
	jmp	.L45
.L49:
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -68[rbp], eax
	jmp	.L46
.L48:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	ecx, eax
	jle	.L47
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -68[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
.L47:
	add	DWORD PTR -68[rbp], 1
.L46:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	jl	.L48
	add	DWORD PTR -72[rbp], 1
.L45:
	mov	eax, DWORD PTR -72[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	jl	.L49
	mov	eax, DWORD PTR -88[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -88[rbp], edx
	mov	rdx, QWORD PTR -32[rbp]
	cdqe
	mov	ecx, DWORD PTR -112[rbp]
	mov	DWORD PTR [rdx+rax*4], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -88[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], 0
	add	DWORD PTR -88[rbp], 1
	mov	DWORD PTR -64[rbp], 0
	jmp	.L50
.L52:
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -108[rbp], eax
	jle	.L51
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -88[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -88[rbp], edx
	mov	ecx, DWORD PTR [rcx]
	mov	rdx, QWORD PTR -32[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], ecx
.L51:
	add	DWORD PTR -64[rbp], 1
.L50:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jl	.L52
	mov	eax, DWORD PTR -96[rbp]
	add	eax, 1
	mov	DWORD PTR -60[rbp], eax
	jmp	.L53
.L57:
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -56[rbp], eax
	jmp	.L54
.L56:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	cmp	ecx, eax
	jle	.L55
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -60[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -44[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
.L55:
	add	DWORD PTR -56[rbp], 1
.L54:
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 1
	cmp	DWORD PTR -56[rbp], eax
	jle	.L56
	add	DWORD PTR -60[rbp], 1
.L53:
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 1
	cmp	DWORD PTR -60[rbp], eax
	jle	.L57
	mov	eax, DWORD PTR -112[rbp]
	sub	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -92[rbp]
	add	eax, edx
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	DWORD PTR -52[rbp], 0
	jmp	.L58
.L59:
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -52[rbp], 1
.L58:
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 1
	cmp	DWORD PTR -52[rbp], eax
	jle	.L59
	mov	rsp, rbx
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	cscan, .-cscan
	.section	.rodata
.LC4:
	.string	"Enter the number of requests"
.LC5:
	.string	"%d"
.LC6:
	.string	"Enter the end value"
.LC7:
	.string	"Enter the head start"
	.align 8
.LC8:
	.string	"Head start should be small than end value"
.LC9:
	.string	"Enter the process request"
	.align 8
.LC10:
	.string	"The resource request should be less than end value"
.LC11:
	.string	"The enter disk queue is "
	.align 8
.LC12:
	.string	"\nTo confirm press 1.\nTo re-enter press 0"
	.align 8
.LC13:
	.string	"To do FCFS algorithm press 1\nTo do SCAN algorithm press 2\nTo do C-SCAN algorithm press 3"
.LC14:
	.string	"\nInvalid option"
	.align 8
.LC15:
	.string	"\nTo continue with the same resources press 1, else press any other number"
	.align 8
.LC16:
	.string	"\nTo continue the program press 1,else press any other number"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
.L81:
	mov	DWORD PTR -112[rbp], 0
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -108[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rax, -100[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
.L64:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rax, -104[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -100[rbp]
	cmp	edx, eax
	jge	.L62
	mov	DWORD PTR -76[rbp], 0
	jmp	.L63
.L62:
	mov	DWORD PTR -76[rbp], 1
	lea	rdi, .LC8[rip]
	call	puts@PLT
.L63:
	cmp	DWORD PTR -76[rbp], 1
	je	.L64
	mov	eax, DWORD PTR -108[rbp]
	mov	rdx, rsp
	mov	rbx, rdx
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L65:
	cmp	rsp, rdx
	je	.L66
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L65
.L66:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L67
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L67:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
.L74:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	DWORD PTR -80[rbp], 0
	jmp	.L68
.L71:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L69
.L70:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rax, -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	ecx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
.L69:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -100[rbp]
	cmp	edx, eax
	jge	.L70
	add	DWORD PTR -80[rbp], 1
.L68:
	mov	eax, DWORD PTR -108[rbp]
	cmp	DWORD PTR -80[rbp], eax
	jl	.L71
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	DWORD PTR -84[rbp], 0
	jmp	.L72
.L73:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -84[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*4]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -84[rbp], 1
.L72:
	mov	eax, DWORD PTR -108[rbp]
	cmp	DWORD PTR -84[rbp], eax
	jl	.L73
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -112[rbp]
	test	eax, eax
	je	.L74
	mov	DWORD PTR -92[rbp], 0
.L80:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rax, -88[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, 3
	je	.L75
	cmp	eax, 3
	jg	.L76
	cmp	eax, 1
	je	.L77
	cmp	eax, 2
	je	.L78
	jmp	.L76
.L77:
	mov	ecx, DWORD PTR -108[rbp]
	mov	edx, DWORD PTR -100[rbp]
	mov	esi, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	fcfs
	jmp	.L79
.L78:
	mov	ecx, DWORD PTR -108[rbp]
	mov	edx, DWORD PTR -100[rbp]
	mov	esi, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	scan
	jmp	.L79
.L75:
	mov	ecx, DWORD PTR -108[rbp]
	mov	edx, DWORD PTR -100[rbp]
	mov	esi, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	cscan
	jmp	.L79
.L76:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	nop
.L79:
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rax, -92[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -92[rbp]
	cmp	eax, 1
	je	.L80
	lea	rdi, .LC16[rip]
	call	puts@PLT
	lea	rax, -116[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rsp, rbx
	mov	eax, DWORD PTR -116[rbp]
	cmp	eax, 1
	je	.L81
	nop
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L82
	call	__stack_chk_fail@PLT
.L82:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	"183895.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"The total head movement is of %d cylinders\012\000"
	.align	2
.LC1:
	.ascii	"The seek sequence is\000"
	.align	2
.LC2:
	.ascii	"%d\011\000"
	.text
	.align	2
	.global	fcfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	fcfs, %function
fcfs:
	@ 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, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L3
	ldr	r1, [fp, #-16]
	ldr	r0, .L6
	bl	printf
	ldr	r0, .L6+4
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L4
.L5:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L6+8
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L5
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	fcfs, .-fcfs
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	scan
	.syntax unified
	.arm
	.fpu softvfp
	.type	scan, %function
scan:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #84
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	str	r2, [fp, #-88]
	str	r3, [fp, #-92]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-84]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3]
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-92]
	add	ip, r3, #1
	sub	r3, ip, #1
	str	r3, [fp, #-28]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #1
	str	r3, [fp, #-64]
	b	.L9
.L11:
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-68]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-68]
.L10:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L9:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L11
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L12
.L14:
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-84]
	cmp	r2, r3
	ble	.L13
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r2, r2, r3
	ldr	r3, [fp, #-72]
	add	r1, r3, #1
	str	r1, [fp, #-72]
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-76]
.L13:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L12:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L14
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L15
.L19:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	b	.L16
.L18:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-56]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-52]
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	bge	.L17
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-56]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-52]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-56]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
.L17:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L16:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-76]
	cmp	r2, r3
	blt	.L18
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L15:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-76]
	cmp	r2, r3
	blt	.L19
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-76]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L20
.L22:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-84]
	cmp	r2, r3
	bge	.L21
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-80]
	add	r2, r2, r3
	ldr	r3, [fp, #-76]
	add	r1, r3, #1
	str	r1, [fp, #-76]
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	str	r1, [r2, r3, lsl #2]
.L21:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L20:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L22
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L23
.L27:
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-40]
	b	.L24
.L26:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-40]
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	ble	.L25
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-40]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-40]
	ldr	r1, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
.L25:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L24:
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bge	.L26
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L23:
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bge	.L27
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r1, [fp, #-32]
	ldr	r0, .L31+4
	bl	printf
	ldr	r0, .L31+8
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L28
.L29:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L31+12
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L28:
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bge	.L29
	mov	sp, r4
	nop
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	scan, .-scan
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\012The total head movement is of %d cylinders\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cscan
	.syntax unified
	.arm
	.fpu softvfp
	.type	cscan, %function
cscan:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #92
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	str	r3, [fp, #-100]
	ldr	r3, .L59
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-88]
	ldr	r3, [r3]
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-100]
	add	ip, r3, #2
	sub	r3, ip, #1
	str	r3, [fp, #-32]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-80]
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L34
.L36:
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	ble	.L35
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-76]
.L35:
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L34:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L36
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L37
.L39:
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-92]
	cmp	r2, r3
	ble	.L38
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	bgt	.L38
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-76]
.L38:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L37:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L39
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L40
.L42:
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-92]
	cmp	r2, r3
	bge	.L41
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	add	r1, r3, #1
	str	r1, [fp, #-80]
	ldr	r1, [r2]
	ldr	r2, [fp, #-28]
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-72]
.L41:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L40:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L42
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L43
.L47:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	b	.L44
.L46:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-56]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-52]
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	ble	.L45
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-56]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-52]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-56]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
.L45:
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	str	r3, [fp, #-52]
.L44:
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	blt	.L46
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L43:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	blt	.L47
	ldr	r3, [fp, #-72]
	add	r2, r3, #1
	str	r2, [fp, #-72]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-96]
	str	r1, [r2, r3, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-72]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L48
.L50:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-92]
	cmp	r2, r3
	ble	.L49
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-88]
	add	r2, r2, r3
	ldr	r3, [fp, #-72]
	add	r1, r3, #1
	str	r1, [fp, #-72]
	ldr	r1, [r2]
	ldr	r2, [fp, #-28]
	str	r1, [r2, r3, lsl #2]
.L49:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L48:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	blt	.L50
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L51
.L55:
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-40]
	b	.L52
.L54:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-40]
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	ble	.L53
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-44]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-40]
	ldr	r1, [fp, #-20]
	str	r1, [r3, r2, lsl #2]
.L53:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L52:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	ble	.L54
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L51:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	ble	.L55
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-92]
	sub	r3, r2, r3
	ldr	r2, [fp, #-76]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-24]
	ldr	r0, .L59+4
	bl	printf
	ldr	r0, .L59+8
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L56
.L57:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L59+12
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L56:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L57
	mov	sp, r4
	nop
	ldr	r3, .L59
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L58
	bl	__stack_chk_fail
.L58:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L60:
	.align	2
.L59:
	.word	.LC5
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.size	cscan, .-cscan
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Enter the number of requests\000"
	.align	2
.LC7:
	.ascii	"%d\000"
	.align	2
.LC8:
	.ascii	"Enter the end value\000"
	.align	2
.LC9:
	.ascii	"Enter the head start\000"
	.align	2
.LC10:
	.ascii	"Head start should be small than end value\000"
	.align	2
.LC11:
	.ascii	"Enter the process request\000"
	.align	2
.LC12:
	.ascii	"The resource request should be less than end value\000"
	.align	2
.LC13:
	.ascii	"The enter disk queue is \000"
	.align	2
.LC14:
	.ascii	"\012To confirm press 1.\012To re-enter press 0\000"
	.align	2
.LC15:
	.ascii	"To do FCFS algorithm press 1\012To do SCAN algorith"
	.ascii	"m press 2\012To do C-SCAN algorithm press 3\000"
	.align	2
.LC16:
	.ascii	"\012Invalid option\000"
	.align	2
.LC17:
	.ascii	"\012To continue with the same resources press 1, el"
	.ascii	"se press any other number\000"
	.align	2
.LC18:
	.ascii	"\012To continue the program press 1,else press any "
	.ascii	"other number\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #60
	ldr	r3, .L80
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
.L78:
	mov	r3, #0
	str	r3, [fp, #-64]
	ldr	r0, .L80+4
	bl	puts
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	ldr	r0, .L80+12
	bl	puts
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
.L64:
	ldr	r0, .L80+16
	bl	puts
	sub	r3, fp, #56
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	bge	.L62
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L63
.L62:
	mov	r3, #1
	str	r3, [fp, #-28]
	ldr	r0, .L80+20
	bl	puts
.L63:
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	beq	.L64
	ldr	ip, [fp, #-60]
	mov	r3, sp
	mov	r4, r3
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
.L71:
	ldr	r0, .L80+24
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L65
.L68:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	b	.L66
.L67:
	ldr	r0, .L80+28
	bl	puts
	sub	r3, fp, #48
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	ldr	r1, [fp, #-48]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	str	r1, [r3, r2, lsl #2]
.L66:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	bge	.L67
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L65:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L68
	ldr	r0, .L80+32
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L69
.L70:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-36]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L80+36
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L69:
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L70
	ldr	r0, .L80+40
	bl	puts
	sub	r3, fp, #64
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	beq	.L71
	mov	r3, #0
	str	r3, [fp, #-44]
.L77:
	ldr	r0, .L80+44
	bl	puts
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	beq	.L72
	cmp	r3, #3
	bgt	.L73
	cmp	r3, #1
	beq	.L74
	cmp	r3, #2
	beq	.L75
	b	.L73
.L74:
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-60]
	ldr	r0, [fp, #-20]
	bl	fcfs
	b	.L76
.L75:
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-60]
	ldr	r0, [fp, #-20]
	bl	scan
	b	.L76
.L72:
	ldr	r1, [fp, #-56]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-60]
	ldr	r0, [fp, #-20]
	bl	cscan
	b	.L76
.L73:
	ldr	r0, .L80+48
	bl	puts
	nop
.L76:
	ldr	r0, .L80+52
	bl	puts
	sub	r3, fp, #44
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-44]
	cmp	r3, #1
	beq	.L77
	ldr	r0, .L80+56
	bl	puts
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L80+8
	bl	__isoc99_scanf
	mov	sp, r4
	ldr	r3, [fp, #-68]
	cmp	r3, #1
	beq	.L78
	nop
	ldr	r3, .L80
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L79
	bl	__stack_chk_fail
.L79:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L81:
	.align	2
.L80:
	.word	.LC19
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC2
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
