	.file	"988116.c"
	.intel_syntax noprefix
	.text
	.globl	System_header
	.bss
	.align 32
	.type	System_header, @object
	.size	System_header, 72
System_header:
	.zero	72
	.globl	User_header
	.align 32
	.type	User_header, @object
	.size	User_header, 72
User_header:
	.zero	72
	.globl	Init_header
	.align 32
	.type	Init_header, @object
	.size	Init_header, 72
Init_header:
	.zero	72
	.globl	System
	.section	.data.rel.local,"aw"
	.align 8
	.type	System, @object
	.size	System, 8
System:
	.quad	System_header
	.globl	User
	.align 8
	.type	User, @object
	.size	User, 8
User:
	.quad	User_header
	.globl	Init
	.align 8
	.type	Init, @object
	.size	Init, 8
Init:
	.quad	Init_header
	.globl	R1
	.bss
	.align 8
	.type	R1, @object
	.size	R1, 8
R1:
	.zero	8
	.globl	R2
	.align 8
	.type	R2, @object
	.size	R2, 8
R2:
	.zero	8
	.globl	R3
	.align 8
	.type	R3, @object
	.size	R3, 8
R3:
	.zero	8
	.globl	R4
	.align 8
	.type	R4, @object
	.size	R4, 8
R4:
	.zero	8
	.globl	CURRENT_RUNNING_PCB
	.align 8
	.type	CURRENT_RUNNING_PCB, @object
	.size	CURRENT_RUNNING_PCB, 8
CURRENT_RUNNING_PCB:
	.zero	8
	.text
	.globl	parser
	.type	parser, @function
parser:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -12[rbp], 0
	nop
.L3:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L4
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	jne	.L3
	jmp	.L4
.L6:
	add	DWORD PTR -12[rbp], 1
.L4:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L5
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	jne	.L6
.L5:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parser, .-parser
	.section	.rodata
.LC0:
	.string	"cr"
.LC1:
	.string	"de"
.LC2:
	.string	"req"
.LC3:
	.string	"rel"
.LC4:
	.string	"to"
.LC5:
	.string	"ls"
	.text
	.globl	cmd_type
	.type	cmd_type, @function
cmd_type:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	mov	eax, 0
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	mov	eax, 1
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	mov	eax, 2
	jmp	.L10
.L12:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	eax, 3
	jmp	.L10
.L13:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L14
	mov	eax, 4
	jmp	.L10
.L14:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	eax, 5
	jmp	.L10
.L15:
	mov	eax, 1000
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmd_type, .-cmd_type
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB8:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -32[rbp], rax
.L17:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 64[rax]
	test	rax, rax
	jne	.L18
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR [rdx]
	mov	rbx, QWORD PTR 8[rdx]
	mov	QWORD PTR [rax], rcx
	mov	QWORD PTR 8[rax], rbx
	mov	rcx, QWORD PTR 16[rdx]
	mov	rbx, QWORD PTR 24[rdx]
	mov	QWORD PTR 16[rax], rcx
	mov	QWORD PTR 24[rax], rbx
	mov	rcx, QWORD PTR 32[rdx]
	mov	rbx, QWORD PTR 40[rdx]
	mov	QWORD PTR 32[rax], rcx
	mov	QWORD PTR 40[rax], rbx
	mov	rcx, QWORD PTR 48[rdx]
	mov	rbx, QWORD PTR 56[rdx]
	mov	QWORD PTR 48[rax], rcx
	mov	QWORD PTR 56[rax], rbx
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 64[rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 64[rax], rdx
	mov	eax, 1
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Insert, .-Insert
	.globl	Insert_Priority
	.type	Insert_Priority, @function
Insert_Priority:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	eax, 2
	jne	.L21
	mov	rax, QWORD PTR System[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Insert
	jmp	.L24
.L21:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	eax, 1
	jne	.L23
	mov	rax, QWORD PTR User[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Insert
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	jne	.L24
	mov	rax, QWORD PTR Init[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Insert
.L24:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Insert_Priority, .-Insert_Priority
	.globl	Resource_Alloc
	.type	Resource_Alloc, @function
Resource_Alloc:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 56[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L26
.L27:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
.L26:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L27
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Resource_Alloc, .-Resource_Alloc
	.globl	Resource_Free
	.type	Resource_Free, @function
Resource_Free:
.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Resource_Free, .-Resource_Free
	.globl	Remove_Ready_Single
	.type	Remove_Ready_Single, @function
Remove_Ready_Single:
.LFB12:
	.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 -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rbx, QWORD PTR 8[rax]
	mov	QWORD PTR -96[rbp], rcx
	mov	QWORD PTR -88[rbp], rbx
	mov	rcx, QWORD PTR 16[rax]
	mov	rbx, QWORD PTR 24[rax]
	mov	QWORD PTR -80[rbp], rcx
	mov	QWORD PTR -72[rbp], rbx
	mov	rcx, QWORD PTR 32[rax]
	mov	rbx, QWORD PTR 40[rax]
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -56[rbp], rbx
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR 48[rax]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	jmp	.L30
.L32:
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -104[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rbx, QWORD PTR 8[rax]
	mov	QWORD PTR -96[rbp], rcx
	mov	QWORD PTR -88[rbp], rbx
	mov	rcx, QWORD PTR 16[rax]
	mov	rbx, QWORD PTR 24[rax]
	mov	QWORD PTR -80[rbp], rcx
	mov	QWORD PTR -72[rbp], rbx
	mov	rcx, QWORD PTR 32[rax]
	mov	rbx, QWORD PTR 40[rax]
	mov	QWORD PTR -64[rbp], rcx
	mov	QWORD PTR -56[rbp], rbx
	mov	rdx, QWORD PTR 56[rax]
	mov	rax, QWORD PTR 48[rax]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
.L30:
	cmp	QWORD PTR -104[rbp], 0
	je	.L31
	mov	rdx, QWORD PTR -128[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L32
.L31:
	mov	rax, QWORD PTR -104[rbp]
	mov	rdx, QWORD PTR 64[rax]
	mov	rax, QWORD PTR -112[rbp]
	mov	QWORD PTR 64[rax], rdx
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR 64[rax], 0
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	Remove_Ready_Single, .-Remove_Ready_Single
	.globl	Remove_Ready
	.type	Remove_Ready, @function
Remove_Ready:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	eax, 2
	jne	.L35
	mov	rax, QWORD PTR System[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Remove_Ready_Single
	jmp	.L38
.L35:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	eax, 1
	jne	.L37
	mov	rax, QWORD PTR User[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Remove_Ready_Single
	jmp	.L38
.L37:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	jne	.L38
	mov	rax, QWORD PTR Init[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Remove_Ready_Single
.L38:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	Remove_Ready, .-Remove_Ready
	.globl	Remove_Waiting
	.type	Remove_Waiting, @function
Remove_Waiting:
.LFB14:
	.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	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 64[rax]
	test	rax, rax
	jne	.L40
	mov	eax, 0
	jmp	.L41
.L40:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
.L41:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	Remove_Waiting, .-Remove_Waiting
	.globl	Find_PCB
	.type	Find_PCB, @function
Find_PCB:
.LFB15:
	.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 System[rip]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L43
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L44
.L43:
	mov	rax, QWORD PTR User[rip]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L45
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L44
.L45:
	mov	rax, QWORD PTR Init[rip]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L46
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L44
.L46:
	mov	eax, 0
.L44:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	Find_PCB, .-Find_PCB
	.globl	Create
	.type	Create, @function
Create:
.LFB16:
	.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 -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	edi, 64
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -48[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edx, -48[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 20[rax], 1
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 32[rax], 0
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 56[rax], rdx
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 48[rax], rdx
	mov	rdx, QWORD PTR CURRENT_RUNNING_PCB[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	Insert_Priority
	mov	eax, 0
	call	Scheduler
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	Create, .-Create
	.section	.rodata
	.align 8
.LC6:
	.string	"pid %s request %s for %d but ony have %d\n"
	.text
	.globl	Request
	.type	Request, @function
Request:
.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	sub	eax, DWORD PTR -36[rbp]
	test	eax, eax
	js	.L49
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	sub	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L50
.L51:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Resource_Alloc
.L50:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -4[rbp], edx
	test	eax, eax
	jg	.L51
	jmp	.L54
.L49:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jle	.L53
	mov	rax, QWORD PTR -24[rbp]
	mov	edi, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	esi, DWORD PTR -36[rbp]
	mov	r9d, edi
	mov	r8d, esi
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L53:
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 20[rax], 2
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	Remove_Ready
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Insert
	mov	eax, 0
	call	Scheduler
.L54:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	Request, .-Request
	.globl	Release
	.type	Release, @function
Release:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	mov	edx, DWORD PTR -52[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	Resource_Free
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -52[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L56
.L60:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 32[rax]
	sub	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	Remove_Waiting
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 20[rax], 1
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	DWORD PTR -20[rbp], eax
	jmp	.L57
.L58:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Resource_Alloc
.L57:
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -20[rbp], edx
	test	eax, eax
	jg	.L58
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	Insert_Priority
	mov	eax, 0
	call	Scheduler
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 64[rax]
	mov	QWORD PTR -16[rbp], rax
.L56:
	cmp	QWORD PTR -16[rbp], 0
	je	.L61
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 32[rax]
	cmp	edx, eax
	jge	.L60
.L61:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	Release, .-Release
	.globl	Scheduler
	.type	Scheduler, @function
Scheduler:
.LFB19:
	.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	eax, 0
	call	Find_PCB
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR CURRENT_RUNNING_PCB[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	cmp	edx, eax
	jl	.L63
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 20[rax]
	cmp	eax, 3
	jne	.L63
	cmp	QWORD PTR -8[rbp], 0
	jne	.L64
.L63:
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 20[rax], 1
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	preempt
	nop
	jmp	.L67
.L64:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 20[rax]
	cmp	eax, 3
	jne	.L66
	cmp	QWORD PTR -8[rbp], 0
	jne	.L67
.L66:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	preempt
.L67:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	Scheduler, .-Scheduler
	.section	.rodata
	.align 8
.LC7:
	.string	"PID %s Running at Priority %d \n"
.LC8:
	.string	"Occupied Resource :"
.LC9:
	.string	"None"
.LC10:
	.string	"%d  Left: %d"
	.text
	.globl	preempt
	.type	preempt, @function
preempt:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR CURRENT_RUNNING_PCB[rip], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 56[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L71
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L73
.L72:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L71:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L72
	mov	edi, 10
	call	putchar@PLT
.L73:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	preempt, .-preempt
	.globl	init_resource
	.type	init_resource, @function
init_resource:
.LFB21:
	.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	edi, 16
	call	malloc@PLT
	mov	QWORD PTR R1[rip], rax
	mov	rax, QWORD PTR R1[rip]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR R1[rip]
	mov	DWORD PTR 4[rax], 1
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR R1[rip]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR R2[rip], rax
	mov	rax, QWORD PTR R2[rip]
	mov	DWORD PTR [rax], 2
	mov	rax, QWORD PTR R2[rip]
	mov	DWORD PTR 4[rax], 2
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR R2[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR R3[rip], rax
	mov	rax, QWORD PTR R3[rip]
	mov	DWORD PTR [rax], 3
	mov	rax, QWORD PTR R3[rip]
	mov	DWORD PTR 4[rax], 3
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR R3[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR R4[rip], rax
	mov	rax, QWORD PTR R4[rip]
	mov	DWORD PTR [rax], 4
	mov	rax, QWORD PTR R4[rip]
	mov	DWORD PTR 4[rax], 4
	mov	edi, 72
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR R4[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	init_resource, .-init_resource
	.section	.rodata
.LC11:
	.string	"init"
	.text
	.globl	init_process
	.type	init_process, @function
init_process:
.LFB22:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC11[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	BYTE PTR -17[rbp], 48
	lea	rdx, -17[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Create
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L76
	call	__stack_chk_fail@PLT
.L76:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	init_process, .-init_process
	.globl	Time_Out
	.type	Time_Out, @function
Time_Out:
.LFB23:
	.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 CURRENT_RUNNING_PCB[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Remove_Ready
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 20[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Insert_Priority
	mov	eax, 0
	call	Scheduler
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	Time_Out, .-Time_Out
	.section	.rodata
.LC12:
	.string	"Command is %s\ntype: %d\n"
	.align 8
.LC13:
	.string	"commd is %s  Name is %s, Pri : %s\n"
.LC14:
	.string	"res is %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	eax, 0
	call	init_resource
	mov	eax, 0
	call	init_process
	mov	edi, 64
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	jmp	.L79
.L81:
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parser
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	cmd_type
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	cmd_type
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jne	.L80
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parser
	mov	QWORD PTR -32[rbp], rax
	mov	edi, 1
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parser
	mov	rcx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Create
	jmp	.L79
.L80:
	cmp	DWORD PTR -52[rbp], 2
	jne	.L79
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parser
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L79:
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 64
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L81
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.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	"988116.c"
	.text
	.comm	System_header,48,4
	.comm	User_header,48,4
	.comm	Init_header,48,4
	.global	System
	.data
	.align	2
	.type	System, %object
	.size	System, 4
System:
	.word	System_header
	.global	User
	.align	2
	.type	User, %object
	.size	User, 4
User:
	.word	User_header
	.global	Init
	.align	2
	.type	Init, %object
	.size	Init, 4
Init:
	.word	Init_header
	.comm	R1,4,4
	.comm	R2,4,4
	.comm	R3,4,4
	.comm	R4,4,4
	.global	CURRENT_RUNNING_PCB
	.bss
	.align	2
	.type	CURRENT_RUNNING_PCB, %object
	.size	CURRENT_RUNNING_PCB, 4
CURRENT_RUNNING_PCB:
	.space	4
	.text
	.align	2
	.global	parser
	.syntax unified
	.arm
	.fpu softvfp
	.type	parser, %function
parser:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	nop
.L3:
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L4
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L3
	b	.L4
.L6:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L5
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L6
.L5:
	ldr	r3, [fp, #-8]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	strncpy
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	parser, .-parser
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cr\000"
	.align	2
.LC1:
	.ascii	"de\000"
	.align	2
.LC2:
	.ascii	"req\000"
	.align	2
.LC3:
	.ascii	"rel\000"
	.align	2
.LC4:
	.ascii	"to\000"
	.align	2
.LC5:
	.ascii	"ls\000"
	.text
	.align	2
	.global	cmd_type
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_type, %function
cmd_type:
	@ 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	r1, .L16
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	mov	r3, #0
	b	.L10
.L9:
	ldr	r1, .L16+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	mov	r3, #1
	b	.L10
.L11:
	ldr	r1, .L16+8
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	mov	r3, #2
	b	.L10
.L12:
	ldr	r1, .L16+12
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	mov	r3, #3
	b	.L10
.L13:
	ldr	r1, .L16+16
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	mov	r3, #4
	b	.L10
.L14:
	ldr	r1, .L16+20
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	mov	r3, #5
	b	.L10
.L15:
	mov	r3, #1000
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	cmd_type, .-cmd_type
	.align	2
	.global	Insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	Insert, %function
Insert:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #44]
	cmp	r3, #0
	bne	.L20
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	mov	ip, r2
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #44]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #44]
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Insert, .-Insert
	.align	2
	.global	Insert_Priority
	.syntax unified
	.arm
	.fpu softvfp
	.type	Insert_Priority, %function
Insert_Priority:
	@ 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	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #2
	bne	.L23
	ldr	r3, .L27
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	Insert
	b	.L26
.L23:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #1
	bne	.L25
	ldr	r3, .L27+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	Insert
	b	.L26
.L25:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L26
	ldr	r3, .L27+8
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	Insert
.L26:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	System
	.word	User
	.word	Init
	.size	Insert_Priority, .-Insert_Priority
	.align	2
	.global	Resource_Alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	Resource_Alloc, %function
Resource_Alloc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-12]
	b	.L30
.L31:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-12]
.L30:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	bne	.L31
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Resource_Alloc, .-Resource_Alloc
	.align	2
	.global	Resource_Free
	.syntax unified
	.arm
	.fpu softvfp
	.type	Resource_Free, %function
Resource_Free:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Resource_Free, .-Resource_Free
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Remove_Ready_Single
	.syntax unified
	.arm
	.fpu softvfp
	.type	Remove_Ready_Single, %function
Remove_Ready_Single:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	sub	ip, fp, #52
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	b	.L34
.L36:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	sub	ip, fp, #52
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
.L34:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L35
	ldr	r2, [fp, #-68]
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L36
.L35:
	ldr	r3, [fp, #-56]
	ldr	r2, [r3, #44]
	ldr	r3, [fp, #-60]
	str	r2, [r3, #44]
	ldr	r3, [fp, #-56]
	mov	r2, #0
	str	r2, [r3, #44]
	nop
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC6
	.size	Remove_Ready_Single, .-Remove_Ready_Single
	.align	2
	.global	Remove_Ready
	.syntax unified
	.arm
	.fpu softvfp
	.type	Remove_Ready, %function
Remove_Ready:
	@ 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	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #2
	bne	.L41
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	Remove_Ready_Single
	b	.L44
.L41:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #1
	bne	.L43
	ldr	r3, .L45+4
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	Remove_Ready_Single
	b	.L44
.L43:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	bne	.L44
	ldr	r3, .L45+8
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	Remove_Ready_Single
.L44:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	System
	.word	User
	.word	Init
	.size	Remove_Ready, .-Remove_Ready
	.align	2
	.global	Remove_Waiting
	.syntax unified
	.arm
	.fpu softvfp
	.type	Remove_Waiting, %function
Remove_Waiting:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #44]
	cmp	r3, #0
	bne	.L48
	mov	r3, #0
	b	.L49
.L48:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
.L49:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Remove_Waiting, .-Remove_Waiting
	.align	2
	.global	Find_PCB
	.syntax unified
	.arm
	.fpu softvfp
	.type	Find_PCB, %function
Find_PCB:
	@ 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
	ldr	r3, .L55
	ldr	r3, [r3]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L51
	ldr	r3, [fp, #-8]
	b	.L52
.L51:
	ldr	r3, .L55+4
	ldr	r3, [r3]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L53
	ldr	r3, [fp, #-8]
	b	.L52
.L53:
	ldr	r3, .L55+8
	ldr	r3, [r3]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L54
	ldr	r3, [fp, #-8]
	b	.L52
.L54:
	mov	r3, #0
.L52:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L56:
	.align	2
.L55:
	.word	System
	.word	User
	.word	Init
	.size	Find_PCB, .-Find_PCB
	.align	2
	.global	Create
	.syntax unified
	.arm
	.fpu softvfp
	.type	Create, %function
Create:
	@ 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]
	mov	r0, #44
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, r3, #48
	ldr	r3, [fp, #-16]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3, #20]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #24]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #28]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #40]
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #36]
	ldr	r3, .L58
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #32]
	ldr	r0, [fp, #-16]
	bl	Insert_Priority
	bl	Scheduler
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	CURRENT_RUNNING_PCB
	.size	Create, .-Create
	.section	.rodata
	.align	2
.LC7:
	.ascii	"pid %s request %s for %d but ony have %d\012\000"
	.text
	.align	2
	.global	Request
	.syntax unified
	.arm
	.fpu softvfp
	.type	Request, %function
Request:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	cmp	r3, #0
	blt	.L61
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	sub	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-8]
	b	.L62
.L63:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	Resource_Alloc
.L62:
	ldr	r3, [fp, #-8]
	sub	r2, r3, #1
	str	r2, [fp, #-8]
	cmp	r3, #0
	bgt	.L63
	b	.L66
.L61:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L65
	ldr	r3, .L67
	ldr	r0, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L67+4
	bl	fprintf
	mov	r0, #0
	bl	exit
.L65:
	ldr	r3, [fp, #-20]
	mov	r2, #2
	str	r2, [r3, #20]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #28]
	ldr	r0, [fp, #-20]
	bl	Remove_Ready
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	Insert
	bl	Scheduler
.L66:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	stderr
	.word	.LC7
	.size	Request, .-Request
	.align	2
	.global	Release
	.syntax unified
	.arm
	.fpu softvfp
	.type	Release, %function
Release:
	@ 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]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	Resource_Free
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-16]
	b	.L70
.L74:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	Remove_Waiting
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-12]
	b	.L71
.L72:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	Resource_Alloc
.L71:
	ldr	r3, [fp, #-12]
	sub	r2, r3, #1
	str	r2, [fp, #-12]
	cmp	r3, #0
	bgt	.L72
	ldr	r0, [fp, #-28]
	bl	Insert_Priority
	bl	Scheduler
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #44]
	str	r3, [fp, #-16]
.L70:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L75
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #28]
	cmp	r2, r3
	bge	.L74
.L75:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Release, .-Release
	.align	2
	.global	Scheduler
	.syntax unified
	.arm
	.fpu softvfp
	.type	Scheduler, %function
Scheduler:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	Find_PCB
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, .L82
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #16]
	cmp	r2, r3
	blt	.L77
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #3
	bne	.L77
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L78
.L77:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #20]
	ldr	r0, [fp, #-12]
	bl	preempt
	nop
	b	.L81
.L78:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #3
	bne	.L80
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L81
.L80:
	ldr	r0, [fp, #-12]
	bl	preempt
.L81:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	CURRENT_RUNNING_PCB
	.size	Scheduler, .-Scheduler
	.section	.rodata
	.align	2
.LC8:
	.ascii	"PID %s Running at Priority %d \012\000"
	.align	2
.LC9:
	.ascii	"Occupied Resource :\000"
	.align	2
.LC10:
	.ascii	"None\000"
	.align	2
.LC11:
	.ascii	"%d  Left: %d\000"
	.text
	.align	2
	.global	preempt
	.syntax unified
	.arm
	.fpu softvfp
	.type	preempt, %function
preempt:
	@ 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	r2, .L90
	ldr	r3, [fp, #-16]
	str	r3, [r2]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, .L90+4
	bl	printf
	ldr	r0, .L90+8
	bl	printf
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #40]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L87
	ldr	r0, .L90+12
	bl	puts
	b	.L89
.L88:
	ldr	r3, [fp, #-8]
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r0, .L90+16
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
.L87:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L88
	mov	r0, #10
	bl	putchar
.L89:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L91:
	.align	2
.L90:
	.word	CURRENT_RUNNING_PCB
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	preempt, .-preempt
	.align	2
	.global	init_resource
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_resource, %function
init_resource:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L93
	str	r2, [r3]
	ldr	r3, .L93
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L93
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [r3, #4]
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, .L93
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #8]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L93+4
	str	r2, [r3]
	ldr	r3, .L93+4
	ldr	r3, [r3]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, .L93+4
	ldr	r3, [r3]
	mov	r2, #2
	str	r2, [r3, #4]
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, .L93+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L93+8
	str	r2, [r3]
	ldr	r3, .L93+8
	ldr	r3, [r3]
	mov	r2, #3
	str	r2, [r3]
	ldr	r3, .L93+8
	ldr	r3, [r3]
	mov	r2, #3
	str	r2, [r3, #4]
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, .L93+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #8]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L93+12
	str	r2, [r3]
	ldr	r3, .L93+12
	ldr	r3, [r3]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, .L93+12
	ldr	r3, [r3]
	mov	r2, #4
	str	r2, [r3, #4]
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L93+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #8]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L94:
	.align	2
.L93:
	.word	R1
	.word	R2
	.word	R3
	.word	R4
	.size	init_resource, .-init_resource
	.section	.rodata
	.align	2
.LC12:
	.ascii	"init\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_process
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_process, %function
init_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
	ldr	r3, .L97
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L97+4
	str	r3, [fp, #-12]
	mov	r3, #48
	strb	r3, [fp, #-13]
	sub	r3, fp, #13
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	Create
	nop
	ldr	r3, .L97
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L96
	bl	__stack_chk_fail
.L96:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L98:
	.align	2
.L97:
	.word	.LC13
	.word	.LC12
	.size	init_process, .-init_process
	.align	2
	.global	Time_Out
	.syntax unified
	.arm
	.fpu softvfp
	.type	Time_Out, %function
Time_Out:
	@ 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, .L100
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	Remove_Ready
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #20]
	ldr	r0, [fp, #-8]
	bl	Insert_Priority
	bl	Scheduler
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L101:
	.align	2
.L100:
	.word	CURRENT_RUNNING_PCB
	.size	Time_Out, .-Time_Out
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Command is %s\012type: %d\012\000"
	.align	2
.LC15:
	.ascii	"commd is %s  Name is %s, Pri : %s\012\000"
	.align	2
.LC16:
	.ascii	"res is %s\012\000"
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	bl	init_resource
	bl	init_process
	mov	r0, #64
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	b	.L103
.L105:
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-28]
	bl	parser
	str	r0, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	cmd_type
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, .L107
	bl	printf
	ldr	r0, [fp, #-28]
	bl	cmd_type
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L104
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	parser
	str	r0, [fp, #-24]
	mov	r0, #1
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-8]
	bl	parser
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-28]
	ldr	r0, .L107+4
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	Create
	b	.L103
.L104:
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	bne	.L103
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	parser
	str	r0, [fp, #-24]
	ldr	r1, [fp, #-16]
	ldr	r0, .L107+8
	bl	printf
.L103:
	ldr	r3, .L107+12
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #64
	ldr	r0, [fp, #-32]
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L105
	ldr	r0, [fp, #-32]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L108:
	.align	2
.L107:
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	stdin
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
