	.file	"709244.c"
	.intel_syntax noprefix
	.text
	.globl	requestCanBeGranted
	.type	requestCanBeGranted, @function
requestCanBeGranted:
.LFB6:
	.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 -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jl	.L3
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L4
.L3:
	mov	eax, 0
	jmp	.L5
.L4:
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L6
	mov	eax, 1
.L5:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	requestCanBeGranted, .-requestCanBeGranted
	.globl	isEnoughResourcesAvailable
	.type	isEnoughResourcesAvailable, @function
isEnoughResourcesAvailable:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L8
.L11:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L9
	mov	eax, 0
	jmp	.L10
.L9:
	add	DWORD PTR -4[rbp], 1
.L8:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L11
	mov	eax, 1
.L10:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	isEnoughResourcesAvailable, .-isEnoughResourcesAvailable
	.globl	tryBanker
	.type	tryBanker, @function
tryBanker:
.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, 56
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
	mov	QWORD PTR -40[rbp], rcx
	mov	QWORD PTR -48[rbp], r8
	mov	QWORD PTR -56[rbp], r9
	mov	DWORD PTR -8[rbp], 0
	jmp	.L13
.L20:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L21
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	esi, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	isEnoughResourcesAvailable
	test	eax, eax
	je	.L22
	mov	DWORD PTR -4[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jl	.L18
	mov	eax, DWORD PTR -8[rbp]
	jmp	.L19
.L21:
	nop
	jmp	.L15
.L22:
	nop
.L15:
	add	DWORD PTR -8[rbp], 1
.L13:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L20
	mov	eax, -1
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	tryBanker, .-tryBanker
	.globl	isSafeState
	.type	isSafeState, @function
isSafeState:
.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, 80
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	QWORD PTR -48[rbp], rdx
	mov	QWORD PTR -56[rbp], rcx
	mov	QWORD PTR -64[rbp], r8
	mov	QWORD PTR -72[rbp], r9
	mov	DWORD PTR -24[rbp], 0
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L24
.L27:
	mov	r8, QWORD PTR -16[rbp]
	mov	rdi, QWORD PTR -64[rbp]
	mov	rcx, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	edi, eax
	call	tryBanker
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	je	.L29
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 1
	mov	eax, DWORD PTR -24[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -24[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
.L24:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L27
	jmp	.L26
.L29:
	nop
.L26:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	sete	al
	movzx	eax, al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	isSafeState, .-isSafeState
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"Request #%d: "
	.align 8
.LC3:
	.string	"Overneeded or not enough resources"
.LC4:
	.string	"%d "
.LC5:
	.string	"Unsafe"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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, 168
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	lea	rax, -164[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -96[rbp], rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -88[rbp], rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -148[rbp], 0
	jmp	.L31
.L32:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -148[rbp], 1
.L31:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -148[rbp], eax
	jl	.L32
	mov	DWORD PTR -144[rbp], 0
	jmp	.L33
.L36:
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -144[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -64[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	DWORD PTR -140[rbp], 0
	jmp	.L34
.L35:
	mov	eax, DWORD PTR -144[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -140[rbp], 1
.L34:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -140[rbp], eax
	jl	.L35
	add	DWORD PTR -144[rbp], 1
.L33:
	mov	eax, DWORD PTR -164[rbp]
	cmp	DWORD PTR -144[rbp], eax
	jl	.L36
	mov	DWORD PTR -136[rbp], 0
	jmp	.L37
.L40:
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -72[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -56[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -40[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	sal	rax, 2
	mov	edx, DWORD PTR -136[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	DWORD PTR -132[rbp], 0
	jmp	.L38
.L39:
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rcx
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rsi
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -132[rbp]
	cdqe
	sal	rax, 2
	add	rax, rsi
	sub	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -132[rbp], 1
.L38:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -132[rbp], eax
	jl	.L39
	add	DWORD PTR -136[rbp], 1
.L37:
	mov	eax, DWORD PTR -164[rbp]
	cmp	DWORD PTR -136[rbp], eax
	jl	.L40
.L61:
	lea	rax, -156[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -156[rbp]
	test	eax, eax
	jne	.L41
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L62
	jmp	.L63
.L41:
	mov	DWORD PTR -128[rbp], 0
	jmp	.L43
.L44:
	mov	eax, DWORD PTR -128[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -128[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -48[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -128[rbp], 1
.L43:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -128[rbp], eax
	jl	.L44
	mov	DWORD PTR -124[rbp], 0
	jmp	.L45
.L48:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L46
.L47:
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR -124[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -40[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -120[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR -124[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	edx, DWORD PTR -120[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	add	DWORD PTR -120[rbp], 1
.L46:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -120[rbp], eax
	jl	.L47
	add	DWORD PTR -124[rbp], 1
.L45:
	mov	eax, DWORD PTR -164[rbp]
	cmp	DWORD PTR -124[rbp], eax
	jl	.L48
	mov	DWORD PTR -116[rbp], 0
	mov	DWORD PTR -112[rbp], 0
	jmp	.L49
.L60:
	lea	rax, -152[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -108[rbp], 0
	jmp	.L50
.L51:
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -108[rbp], 1
.L50:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -108[rbp], eax
	jl	.L51
	cmp	DWORD PTR -112[rbp], 0
	jne	.L64
	mov	eax, DWORD PTR -116[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, DWORD PTR -160[rbp]
	mov	eax, DWORD PTR -152[rbp]
	mov	rdi, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	r8, rdi
	mov	edi, eax
	call	requestCanBeGranted
	test	eax, eax
	jne	.L54
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -112[rbp], 1
	jmp	.L53
.L54:
	mov	DWORD PTR -104[rbp], 0
	jmp	.L55
.L56:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rcx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rsi
	sub	edx, ecx
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rsi
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 2
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rcx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	lea	rsi, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	sal	rax, 2
	add	rax, rsi
	sub	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -104[rbp], 1
.L55:
	mov	eax, DWORD PTR -160[rbp]
	cmp	DWORD PTR -104[rbp], eax
	jl	.L56
	mov	esi, DWORD PTR -160[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	r8, QWORD PTR -96[rbp]
	mov	rdi, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	edi, eax
	call	isSafeState
	test	eax, eax
	je	.L57
	mov	DWORD PTR -100[rbp], 0
	jmp	.L58
.L59:
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -100[rbp], 1
.L58:
	mov	eax, DWORD PTR -164[rbp]
	cmp	DWORD PTR -100[rbp], eax
	jl	.L59
	mov	edi, 10
	call	putchar@PLT
	jmp	.L53
.L57:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	DWORD PTR -112[rbp], 1
	jmp	.L53
.L64:
	nop
.L53:
	add	DWORD PTR -116[rbp], 1
.L49:
	mov	eax, DWORD PTR -156[rbp]
	cmp	DWORD PTR -116[rbp], eax
	jl	.L60
	mov	edi, 10
	call	putchar@PLT
	jmp	.L61
.L63:
	call	__stack_chk_fail@PLT
.L62:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"709244.c"
	.text
	.align	2
	.global	requestCanBeGranted
	.syntax unified
	.arm
	.fpu softvfp
	.type	requestCanBeGranted, %function
requestCanBeGranted:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L6:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #4]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r1, [fp, #4]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L4
.L3:
	mov	r3, #0
	b	.L5
.L4:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L6
	mov	r3, #1
.L5:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	requestCanBeGranted, .-requestCanBeGranted
	.align	2
	.global	isEnoughResourcesAvailable
	.syntax unified
	.arm
	.fpu softvfp
	.type	isEnoughResourcesAvailable, %function
isEnoughResourcesAvailable:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L11:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L9
	mov	r3, #0
	b	.L10
.L9:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L11
	mov	r3, #1
.L10:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isEnoughResourcesAvailable, .-isEnoughResourcesAvailable
	.align	2
	.global	tryBanker
	.syntax unified
	.arm
	.fpu softvfp
	.type	tryBanker, %function
tryBanker:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L13
.L20:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #8]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L21
	ldr	r3, [fp, #4]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-12]
	bl	isEnoughResourcesAvailable
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L17
.L18:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-24]
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L17:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L18
	ldr	r3, [fp, #-12]
	b	.L19
.L21:
	nop
	b	.L15
.L22:
	nop
.L15:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L20
	mvn	r3, #0
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	tryBanker, .-tryBanker
	.align	2
	.global	isSafeState
	.syntax unified
	.arm
	.fpu softvfp
	.type	isSafeState, %function
isSafeState:
	@ args = 8, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	memset
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-12]
	bl	memcpy
	b	.L24
.L27:
	ldr	r3, [fp, #-16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	tryBanker
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L29
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r2, r3, #1
	str	r2, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #8]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L24:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L27
	b	.L26
.L29:
	nop
.L26:
	ldr	r0, [fp, #-16]
	bl	free
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	isSafeState, .-isSafeState
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d%d\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Request #%d: \000"
	.align	2
.LC3:
	.ascii	"Overneeded or not enough resources\000"
	.align	2
.LC4:
	.ascii	"%d \000"
	.align	2
.LC5:
	.ascii	"Unsafe\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #124
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r2, fp, #116
	sub	r3, fp, #120
	mov	r1, r3
	ldr	r0, .L65+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-120]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L31
.L32:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L65+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L31:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-104]
	cmp	r2, r3
	blt	.L32
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L33
.L36:
	ldr	r3, [fp, #-116]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L34
.L35:
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-96]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L65+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L34:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-96]
	cmp	r2, r3
	blt	.L35
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L33:
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-100]
	cmp	r2, r3
	blt	.L36
	mov	r3, #0
	str	r3, [fp, #-92]
	b	.L37
.L40:
	ldr	r3, [fp, #-116]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-116]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-116]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-116]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L38
.L39:
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L65+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-92]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-32]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	add	r3, r0, r3
	sub	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L38:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-88]
	cmp	r2, r3
	blt	.L39
	ldr	r3, [fp, #-92]
	add	r3, r3, #1
	str	r3, [fp, #-92]
.L37:
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-92]
	cmp	r2, r3
	blt	.L40
.L61:
	sub	r3, fp, #112
	mov	r1, r3
	ldr	r0, .L65+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L41
	mov	r3, #0
	ldr	r2, .L65
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L62
	b	.L63
.L41:
	mov	r3, #0
	str	r3, [fp, #-84]
	b	.L43
.L44:
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-84]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r3, #1
	str	r3, [fp, #-84]
.L43:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-84]
	cmp	r2, r3
	blt	.L44
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L45
.L48:
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L46
.L47:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L46:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-76]
	cmp	r2, r3
	blt	.L47
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L45:
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	blt	.L48
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L49
.L60:
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L65+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L50
.L51:
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L65+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L50:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	blt	.L51
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L64
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L65+12
	bl	printf
	ldr	r0, [fp, #-108]
	ldr	r1, [fp, #-116]
	ldr	r3, [fp, #-44]
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	bl	requestCanBeGranted
	mov	r3, r0
	cmp	r3, #0
	bne	.L54
	ldr	r0, .L65+16
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L53
.L54:
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L55
.L56:
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-28]
	add	r3, r0, r3
	sub	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-24]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-20]
	add	r3, r0, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	add	r3, r0, r3
	sub	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L55:
	ldr	r3, [fp, #-116]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	blt	.L56
	ldr	r0, [fp, #-120]
	ldr	r1, [fp, #-116]
	ldr	r3, [fp, #-52]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	bl	isSafeState
	mov	r3, r0
	cmp	r3, #0
	beq	.L57
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L58
.L59:
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L65+20
	bl	printf
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L58:
	ldr	r3, [fp, #-120]
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	blt	.L59
	mov	r0, #10
	bl	putchar
	b	.L53
.L57:
	ldr	r0, .L65+24
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L53
.L64:
	nop
.L53:
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L49:
	ldr	r3, [fp, #-112]
	ldr	r2, [fp, #-72]
	cmp	r2, r3
	blt	.L60
	mov	r0, #10
	bl	putchar
	b	.L61
.L63:
	bl	__stack_chk_fail
.L62:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
