	.file	"183327.c"
	.intel_syntax noprefix
	.text
	.globl	new_ele
	.type	new_ele, @function
new_ele:
.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, 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	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	new_ele, .-new_ele
	.globl	new_list
	.type	new_list, @function
new_list:
.LFB1:
	.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	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	new_list, .-new_list
	.globl	append_ele
	.type	append_ele, @function
append_ele:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	mov	eax, 0
	call	new_list
	mov	QWORD PTR -8[rbp], rax
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	append_ele, .-append_ele
	.globl	find_nth
	.type	find_nth, @function
find_nth:
.LFB3:
	.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
	cmp	QWORD PTR -24[rbp], 0
	jne	.L11
	mov	eax, 0
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 1
	jmp	.L13
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	add	DWORD PTR -12[rbp], 1
.L13:
	cmp	QWORD PTR -24[rbp], 0
	je	.L14
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L15
.L14:
	mov	rax, QWORD PTR -8[rbp]
.L12:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	find_nth, .-find_nth
	.globl	del_ele
	.type	del_ele, @function
del_ele:
.LFB4:
	.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -8[rbp], 0
	je	.L17
	cmp	QWORD PTR -16[rbp], 0
	jne	.L18
.L17:
	mov	eax, 0
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L20
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 8[rax], rdx
	jmp	.L21
.L20:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
.L21:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L22
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rdx]
	mov	QWORD PTR [rax], rdx
	jmp	.L23
.L22:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
.L19:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	del_ele, .-del_ele
	.globl	free_ele
	.type	free_ele, @function
free_ele:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	free_ele, .-free_ele
	.globl	alloc_proc_num
	.bss
	.align 4
	.type	alloc_proc_num, @object
	.size	alloc_proc_num, 4
alloc_proc_num:
	.zero	4
	.globl	num_processes
	.align 4
	.type	num_processes, @object
	.size	num_processes, 4
num_processes:
	.zero	4
	.globl	cur_proc
	.align 8
	.type	cur_proc, @object
	.size	cur_proc, 8
cur_proc:
	.zero	8
	.globl	prio_queue
	.align 32
	.type	prio_queue, @object
	.size	prio_queue, 32
prio_queue:
	.zero	32
	.globl	block_queue
	.align 8
	.type	block_queue, @object
	.size	block_queue, 8
block_queue:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	finish_process
	.type	finish_process, @function
finish_process:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	schedule
	mov	rax, QWORD PTR cur_proc[rip]
	test	rax, rax
	je	.L27
	mov	rax, QWORD PTR cur_proc[rip]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR cur_proc[rip]
	mov	rdi, rax
	mov	eax, 0
	call	free_ele
	mov	eax, DWORD PTR num_processes[rip]
	sub	eax, 1
	mov	DWORD PTR num_processes[rip], eax
.L27:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	finish_process, .-finish_process
	.globl	finish_all_processes
	.type	finish_all_processes, @function
finish_all_processes:
.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	eax, DWORD PTR num_processes[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L29
.L30:
	mov	eax, 0
	call	finish_process
	add	DWORD PTR -8[rbp], 1
.L29:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L30
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	finish_all_processes, .-finish_all_processes
	.globl	schedule
	.type	schedule, @function
schedule:
.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	QWORD PTR cur_proc[rip], 0
	mov	DWORD PTR -4[rbp], 3
	jmp	.L32
.L35:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	jle	.L33
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR cur_proc[rip], rax
	mov	rdx, QWORD PTR cur_proc[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rcx+rax]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	del_ele
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, prio_queue[rip]
	mov	QWORD PTR [rcx+rdx], rax
	jmp	.L34
.L33:
	sub	DWORD PTR -4[rbp], 1
.L32:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L35
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	schedule, .-schedule
	.globl	upgrade_process_prio
	.type	upgrade_process_prio, @function
upgrade_process_prio:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -40[rbp], xmm0
	cmp	DWORD PTR -36[rbp], 2
	jg	.L39
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], 0
	jle	.L36
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, DWORD PTR -32[rbp]
	movaps	xmm1, xmm0
	mulss	xmm1, DWORD PTR -40[rbp]
	movss	xmm0, DWORD PTR .LC1[rip]
	addss	xmm0, xmm1
	cvttss2si	eax, xmm0
	mov	DWORD PTR -28[rbp], eax
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	find_nth
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L36
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	del_ele
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	WORD PTR 20[rax], dx
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	append_ele
	mov	QWORD PTR -16[rbp], rax
	jmp	.L36
.L39:
	nop
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	upgrade_process_prio, .-upgrade_process_prio
	.globl	unblock_process
	.type	unblock_process, @function
unblock_process:
.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
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR -40[rbp], xmm0
	mov	rax, QWORD PTR block_queue[rip]
	test	rax, rax
	je	.L42
	mov	rax, QWORD PTR block_queue[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR -20[rbp], eax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, DWORD PTR -20[rbp]
	movaps	xmm1, xmm0
	mulss	xmm1, DWORD PTR -40[rbp]
	movss	xmm0, DWORD PTR .LC1[rip]
	addss	xmm0, xmm1
	cvttss2si	eax, xmm0
	mov	DWORD PTR -16[rbp], eax
	mov	rax, QWORD PTR block_queue[rip]
	mov	edx, DWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	find_nth
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L42
	mov	rax, QWORD PTR block_queue[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	del_ele
	mov	QWORD PTR block_queue[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 20[rax]
	cwde
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	append_ele
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, prio_queue[rip]
	mov	QWORD PTR [rcx+rdx], rax
.L42:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	unblock_process, .-unblock_process
	.globl	quantum_expire
	.type	quantum_expire, @function
quantum_expire:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, 0
	call	schedule
	mov	rax, QWORD PTR cur_proc[rip]
	test	rax, rax
	je	.L45
	mov	rax, QWORD PTR cur_proc[rip]
	movzx	eax, WORD PTR 20[rax]
	cwde
	mov	DWORD PTR -4[rbp], eax
	mov	rdx, QWORD PTR cur_proc[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rcx+rax]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	append_ele
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, prio_queue[rip]
	mov	QWORD PTR [rcx+rdx], rax
.L45:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	quantum_expire, .-quantum_expire
	.globl	block_process
	.type	block_process, @function
block_process:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	schedule
	mov	rax, QWORD PTR cur_proc[rip]
	test	rax, rax
	je	.L48
	mov	rdx, QWORD PTR cur_proc[rip]
	mov	rax, QWORD PTR block_queue[rip]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	append_ele
	mov	QWORD PTR block_queue[rip], rax
.L48:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	block_process, .-block_process
	.globl	new_process
	.type	new_process, @function
new_process:
.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	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR alloc_proc_num[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR alloc_proc_num[rip], edx
	mov	edi, eax
	mov	eax, 0
	call	new_ele
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	WORD PTR 20[rax], dx
	mov	eax, DWORD PTR num_processes[rip]
	add	eax, 1
	mov	DWORD PTR num_processes[rip], eax
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	new_process, .-new_process
	.globl	add_process
	.type	add_process, @function
add_process:
.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	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	new_process
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, prio_queue[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	append_ele
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, prio_queue[rip]
	mov	QWORD PTR [rcx+rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	add_process, .-add_process
	.globl	init_prio_queue
	.type	init_prio_queue, @function
init_prio_queue:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	eax, 0
	call	new_list
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L53
.L54:
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	mov	eax, 0
	call	new_process
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	mov	eax, 0
	call	append_ele
	mov	QWORD PTR -16[rbp], rax
	add	DWORD PTR -20[rbp], 1
.L53:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -40[rbp]
	jl	.L54
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, prio_queue[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	init_prio_queue, .-init_prio_queue
	.globl	initialize
	.type	initialize, @function
initialize:
.LFB16:
	.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 alloc_proc_num[rip], 0
	mov	DWORD PTR num_processes[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	initialize, .-initialize
	.section	.rodata
.LC2:
	.string	"incorrect usage\n"
.LC3:
	.string	"%d"
.LC4:
	.string	"%f"
.LC5:
	.string	"** invalid priority\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 3
	jg	.L57
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	jmp	.L78
.L57:
	mov	eax, 0
	call	initialize
	mov	DWORD PTR -20[rbp], 3
	jmp	.L59
.L60:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	mov	eax, 0
	call	init_prio_queue
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	DWORD PTR -20[rbp], eax
.L59:
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jg	.L60
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -24[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -12[rbp], eax
	jmp	.L61
.L76:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, 7
	ja	.L62
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L64[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L64[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L64:
	.long	.L62-.L64
	.long	.L70-.L64
	.long	.L69-.L64
	.long	.L68-.L64
	.long	.L67-.L64
	.long	.L66-.L64
	.long	.L65-.L64
	.long	.L63-.L64
	.text
.L65:
	mov	eax, 0
	call	finish_process
	jmp	.L62
.L68:
	mov	eax, 0
	call	block_process
	jmp	.L62
.L66:
	mov	eax, 0
	call	quantum_expire
	jmp	.L62
.L67:
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	movss	xmm0, DWORD PTR -16[rbp]
	pxor	xmm1, xmm1
	cvtss2sd	xmm1, xmm0
	movq	rax, xmm1
	movq	xmm0, rax
	mov	eax, 1
	call	unblock_process
	jmp	.L62
.L69:
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -20[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 3
	jg	.L71
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jg	.L72
.L71:
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	jmp	.L78
.L72:
	movss	xmm0, DWORD PTR -16[rbp]
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	movq	rdx, xmm2
	mov	eax, DWORD PTR -20[rbp]
	movq	xmm0, rdx
	mov	edi, eax
	mov	eax, 1
	call	upgrade_process_prio
	jmp	.L62
.L70:
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -20[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 3
	jg	.L73
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jg	.L74
.L73:
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	jmp	.L78
.L74:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	add_process
	jmp	.L62
.L63:
	mov	eax, 0
	call	finish_all_processes
	nop
.L62:
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -24[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	DWORD PTR -12[rbp], eax
.L61:
	cmp	DWORD PTR -12[rbp], -1
	je	.L75
	cmp	DWORD PTR -12[rbp], 0
	jne	.L76
.L75:
	mov	eax, 0
	jmp	.L56
.L78:
.L56:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L79
	call	__stack_chk_fail@PLT
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	main, .-main
	.section	.rodata
	.align 4
.LC1:
	.long	1065353216
	.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	"183327.c"
	.text
	.align	2
	.global	new_ele
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_ele, %function
new_ele:
	@ 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, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	new_ele, .-new_ele
	.align	2
	.global	new_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_list, %function
new_list:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	new_list, .-new_list
	.align	2
	.global	append_ele
	.syntax unified
	.arm
	.fpu softvfp
	.type	append_ele, %function
append_ele:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L6
	bl	new_list
	str	r0, [fp, #-8]
.L6:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	b	.L8
.L7:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
.L8:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	append_ele, .-append_ele
	.align	2
	.global	find_nth
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_nth, %function
find_nth:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	b	.L12
.L11:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L13
.L15:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L13:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L14
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L15
.L14:
	ldr	r3, [fp, #-12]
.L12:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	find_nth, .-find_nth
	.align	2
	.global	del_ele
	.syntax unified
	.arm
	.fpu softvfp
	.type	del_ele, %function
del_ele:
	@ 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
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L18
.L17:
	mov	r3, #0
	b	.L19
.L18:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	b	.L21
.L20:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
.L21:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2]
	str	r2, [r3]
	b	.L23
.L22:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
.L23:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
.L19:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	del_ele, .-del_ele
	.align	2
	.global	free_ele
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_ele, %function
free_ele:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_ele, .-free_ele
	.comm	alloc_proc_num,4,4
	.comm	num_processes,4,4
	.comm	cur_proc,4,4
	.comm	prio_queue,16,4
	.comm	block_queue,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d \000"
	.text
	.align	2
	.global	finish_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	finish_process, %function
finish_process:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	schedule
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	ldr	r3, .L28+4
	ldr	r0, [r3]
	ldr	r3, .L28
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r1, .L28+8
	bl	fprintf
	ldr	r3, .L28
	ldr	r3, [r3]
	mov	r0, r3
	bl	free_ele
	ldr	r3, .L28+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L28+12
	str	r3, [r2]
.L27:
	nop
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	cur_proc
	.word	stdout
	.word	.LC0
	.word	num_processes
	.size	finish_process, .-finish_process
	.align	2
	.global	finish_all_processes
	.syntax unified
	.arm
	.fpu softvfp
	.type	finish_all_processes, %function
finish_all_processes:
	@ 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, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L31
.L32:
	bl	finish_process
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L31:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L32
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	num_processes
	.size	finish_all_processes, .-finish_all_processes
	.align	2
	.global	schedule
	.syntax unified
	.arm
	.fpu softvfp
	.type	schedule, %function
schedule:
	@ 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, .L40
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #3
	str	r3, [fp, #-8]
	b	.L36
.L39:
	ldr	r2, .L40+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	ble	.L37
	ldr	r2, .L40+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r3, [r3]
	ldr	r2, .L40
	str	r3, [r2]
	ldr	r2, .L40+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L40
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	del_ele
	mov	r2, r0
	ldr	r1, .L40+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L38
.L37:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L36:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L39
.L38:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	cur_proc
	.word	prio_queue
	.size	schedule, .-schedule
	.global	__aeabi_d2f
	.global	__aeabi_i2f
	.global	__aeabi_fmul
	.global	__aeabi_fadd
	.global	__aeabi_f2iz
	.align	2
	.global	upgrade_process_prio
	.syntax unified
	.arm
	.fpu softvfp
	.type	upgrade_process_prio, %function
upgrade_process_prio:
	@ 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, #-32]
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-36]	@ float
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	bgt	.L45
	ldr	r2, .L46
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	ldr	r2, .L46
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L42
	ldr	r0, [fp, #-16]
	bl	__aeabi_i2f
	mov	r3, r0
	ldr	r1, [fp, #-36]	@ float
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r1, #1065353216
	mov	r0, r3
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2iz
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	find_nth
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L42
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-24]
	bl	del_ele
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-8]
	strh	r2, [r3, #12]	@ movhi
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-20]
	bl	append_ele
	str	r0, [fp, #-20]
	b	.L42
.L45:
	nop
.L42:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L47:
	.align	2
.L46:
	.word	prio_queue
	.size	upgrade_process_prio, .-upgrade_process_prio
	.align	2
	.global	unblock_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	unblock_process, %function
unblock_process:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2f
	mov	r3, r0
	str	r3, [fp, #-28]	@ float
	ldr	r3, .L51
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L50
	ldr	r3, .L51
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	__aeabi_i2f
	mov	r3, r0
	ldr	r1, [fp, #-28]	@ float
	mov	r0, r3
	bl	__aeabi_fmul
	mov	r3, r0
	mov	r1, #1065353216
	mov	r0, r3
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2iz
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, .L51
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	find_nth
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L50
	ldr	r3, .L51
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	del_ele
	mov	r3, r0
	ldr	r2, .L51
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	ldrsh	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r2, .L51+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	append_ele
	mov	r2, r0
	ldr	r1, .L51+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
.L50:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	block_queue
	.word	prio_queue
	.size	unblock_process, .-unblock_process
	.align	2
	.global	quantum_expire
	.syntax unified
	.arm
	.fpu softvfp
	.type	quantum_expire, %function
quantum_expire:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	schedule
	ldr	r3, .L56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L55
	ldr	r3, .L56
	ldr	r3, [r3]
	ldrsh	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r2, .L56+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L56
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	append_ele
	mov	r2, r0
	ldr	r1, .L56+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
.L55:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	cur_proc
	.word	prio_queue
	.size	quantum_expire, .-quantum_expire
	.align	2
	.global	block_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	block_process, %function
block_process:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	schedule
	ldr	r3, .L61
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L60
	ldr	r3, .L61+4
	ldr	r3, [r3]
	ldr	r2, .L61
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	append_ele
	mov	r3, r0
	ldr	r2, .L61+4
	str	r3, [r2]
.L60:
	nop
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	cur_proc
	.word	block_queue
	.size	block_process, .-block_process
	.align	2
	.global	new_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_process, %function
new_process:
	@ 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, .L65
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L65
	str	r2, [r1]
	mov	r0, r3
	bl	new_ele
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-8]
	strh	r2, [r3, #12]	@ movhi
	ldr	r3, .L65+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L65+4
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	alloc_proc_num
	.word	num_processes
	.size	new_process, .-new_process
	.align	2
	.global	add_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_process, %function
add_process:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	new_process
	str	r0, [fp, #-8]
	ldr	r2, .L68
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	append_ele
	mov	r2, r0
	ldr	r1, .L68
	ldr	r3, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	prio_queue
	.size	add_process, .-add_process
	.align	2
	.global	init_prio_queue
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_prio_queue, %function
init_prio_queue:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	bl	new_list
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L71
.L72:
	ldr	r0, [fp, #-24]
	bl	new_process
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	append_ele
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L71:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L72
	ldr	r1, .L73
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	prio_queue
	.size	init_prio_queue, .-init_prio_queue
	.align	2
	.global	initialize
	.syntax unified
	.arm
	.fpu softvfp
	.type	initialize, %function
initialize:
	@ 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, .L76
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L76+4
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L77:
	.align	2
.L76:
	.word	alloc_proc_num
	.word	num_processes
	.size	initialize, .-initialize
	.section	.rodata
	.align	2
.LC1:
	.ascii	"incorrect usage\012\000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"%f\000"
	.global	__aeabi_f2d
	.align	2
.LC4:
	.ascii	"** invalid priority\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L102
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	bgt	.L79
	ldr	r3, .L102+4
	ldr	r3, [r3]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L102+8
	bl	fwrite
	b	.L100
.L79:
	bl	initialize
	mov	r3, #3
	str	r3, [fp, #-28]
	b	.L81
.L82:
	ldr	r4, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	init_prio_queue
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L81:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L82
	ldr	r3, .L102+12
	ldr	r3, [r3]
	sub	r2, fp, #32
	ldr	r1, .L102+16
	mov	r0, r3
	bl	__isoc99_fscanf
	str	r0, [fp, #-20]
	b	.L83
.L98:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	cmp	r3, #6
	ldrls	pc, [pc, r3, asl #2]
	b	.L84
.L86:
	.word	.L92
	.word	.L91
	.word	.L90
	.word	.L89
	.word	.L88
	.word	.L87
	.word	.L85
.L87:
	bl	finish_process
	b	.L84
.L90:
	bl	block_process
	b	.L84
.L88:
	bl	quantum_expire
	b	.L84
.L89:
	ldr	r3, .L102+12
	ldr	r3, [r3]
	sub	r2, fp, #24
	ldr	r1, .L102+20
	mov	r0, r3
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-24]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	unblock_process
	b	.L84
.L91:
	ldr	r3, .L102+12
	ldr	r3, [r3]
	sub	r2, fp, #28
	ldr	r1, .L102+16
	mov	r0, r3
	bl	__isoc99_fscanf
	ldr	r3, .L102+12
	ldr	r3, [r3]
	sub	r2, fp, #24
	ldr	r1, .L102+20
	mov	r0, r3
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	bgt	.L93
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L94
.L93:
	ldr	r3, .L102+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L102+24
	bl	fwrite
	b	.L100
.L94:
	ldr	r4, [fp, #-28]
	ldr	r3, [fp, #-24]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	bl	upgrade_process_prio
	b	.L84
.L92:
	ldr	r3, .L102+12
	ldr	r3, [r3]
	sub	r2, fp, #28
	ldr	r1, .L102+16
	mov	r0, r3
	bl	__isoc99_fscanf
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	bgt	.L95
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L96
.L95:
	ldr	r3, .L102+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L102+24
	bl	fwrite
	b	.L100
.L96:
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	add_process
	b	.L84
.L85:
	bl	finish_all_processes
	nop
.L84:
	ldr	r3, .L102+12
	ldr	r3, [r3]
	sub	r2, fp, #32
	ldr	r1, .L102+16
	mov	r0, r3
	bl	__isoc99_fscanf
	str	r0, [fp, #-20]
.L83:
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	beq	.L97
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L98
.L97:
	mov	r3, #0
	b	.L78
.L100:
.L78:
	ldr	r2, .L102
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L101
	bl	__stack_chk_fail
.L101:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L103:
	.align	2
.L102:
	.word	.LC5
	.word	stdout
	.word	.LC1
	.word	stdin
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
