	.file	"29824093.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Current Game Status -> "
.LC1:
	.string	"%d "
	.text
	.globl	showPiles
	.type	showPiles, @function
showPiles:
.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	DWORD PTR -28[rbp], esi
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L3
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	showPiles, .-showPiles
	.globl	gameOver
	.type	gameOver, @function
gameOver:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L7
	mov	eax, 0
	jmp	.L8
.L7:
	add	DWORD PTR -4[rbp], 1
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L9
	mov	eax, 1
.L8:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	gameOver, .-gameOver
	.section	.rodata
.LC2:
	.string	"\nHUMAN won\n"
.LC3:
	.string	"\nCOMPUTER won\n"
	.text
	.globl	declareWinner
	.type	declareWinner, @function
declareWinner:
.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	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 1
	jne	.L11
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L10
.L11:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	nop
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	declareWinner, .-declareWinner
	.globl	calculateNimSum
	.type	calculateNimSum, @function
calculateNimSum:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 1
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	xor	DWORD PTR -4[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L15:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L16
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	calculateNimSum, .-calculateNimSum
	.globl	makeMove
	.type	makeMove, @function
makeMove:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -108[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	calculateNimSum
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	je	.L19
	mov	DWORD PTR -80[rbp], 0
	jmp	.L20
.L23:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	xor	eax, DWORD PTR -76[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L21
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, DWORD PTR -80[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	xor	eax, DWORD PTR -76[rbp]
	sub	edx, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -80[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -104[rbp]
	add	rdx, rcx
	xor	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L24
.L21:
	add	DWORD PTR -80[rbp], 1
.L20:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jl	.L23
	jmp	.L18
.L19:
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	edi, 16
	mov	edx, 0
	div	rdi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L25:
	cmp	rsp, rdx
	je	.L26
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L25
.L26:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L27
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L27:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -84[rbp], 0
	jmp	.L28
.L30:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jle	.L29
	mov	eax, DWORD PTR -84[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -84[rbp], edx
	mov	rdx, QWORD PTR -64[rbp]
	cdqe
	mov	ecx, DWORD PTR -80[rbp]
	mov	DWORD PTR [rdx+rax*4], ecx
.L29:
	add	DWORD PTR -80[rbp], 1
.L28:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -108[rbp]
	jl	.L30
	call	rand@PLT
	cdq
	idiv	DWORD PTR -84[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	DWORD PTR [rax], edx
	call	rand@PLT
	mov	rdx, QWORD PTR -120[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -104[rbp]
	add	rdx, rcx
	mov	ecx, DWORD PTR [rdx]
	cdq
	idiv	ecx
	mov	eax, edx
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rsi
	sub	edx, ecx
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L31
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -104[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
.L31:
	mov	rsp, rbx
.L24:
	nop
.L18:
	mov	rax, QWORD PTR -56[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	makeMove, .-makeMove
	.section	.rodata
.LC4:
	.string	"\nGAME STARTS\n"
	.align 8
.LC5:
	.string	"COMPUTER removes %d stones from pile at index %d\n"
	.align 8
.LC6:
	.string	"HUMAN removes %d stones from pile at index %d\n"
	.text
	.globl	playGame
	.type	playGame, @function
playGame:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L35
.L37:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	showPiles
	lea	rdx, -16[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	makeMove
	cmp	DWORD PTR -32[rbp], 1
	jne	.L36
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -32[rbp], 2
	jmp	.L35
.L36:
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -32[rbp], 1
.L35:
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	gameOver
	xor	eax, 1
	test	al, al
	jne	.L37
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	showPiles
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	declareWinner
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	playGame, .-playGame
	.section	.rodata
	.align 8
.LC7:
	.string	"Prediction before playing the game -> "
.LC8:
	.string	"COMPUTER will win"
.LC9:
	.string	"HUMAN will win"
	.text
	.globl	knowWinnerBeforePlaying
	.type	knowWinnerBeforePlaying, @function
knowWinnerBeforePlaying:
.LFB12:
	.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	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	calculateNimSum
	test	eax, eax
	je	.L41
	cmp	DWORD PTR -16[rbp], 1
	jne	.L42
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L40
.L42:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L40
.L41:
	cmp	DWORD PTR -16[rbp], 1
	jne	.L44
	lea	rdi, .LC9[rip]
	call	puts@PLT
	jmp	.L40
.L44:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	nop
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	knowWinnerBeforePlaying, .-knowWinnerBeforePlaying
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 3
	mov	DWORD PTR -16[rbp], 4
	mov	DWORD PTR -12[rbp], 5
	mov	DWORD PTR -24[rbp], 3
	mov	ecx, DWORD PTR -24[rbp]
	lea	rax, -20[rbp]
	mov	edx, 1
	mov	esi, ecx
	mov	rdi, rax
	call	knowWinnerBeforePlaying
	mov	ecx, DWORD PTR -24[rbp]
	lea	rax, -20[rbp]
	mov	edx, 1
	mov	esi, ecx
	mov	rdi, rax
	call	playGame
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"29824093.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Current Game Status -> \000"
	.align	2
.LC2:
	.ascii	"%d \000"
	.text
	.align	2
	.global	showPiles
	.syntax unified
	.arm
	.fpu softvfp
	.type	showPiles, %function
showPiles:
	@ 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	r0, .L5
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L5+4
	bl	printf
	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	.L3
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.word	.LC2
	.size	showPiles, .-showPiles
	.align	2
	.global	gameOver
	.syntax unified
	.arm
	.fpu softvfp
	.type	gameOver, %function
gameOver:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L11:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.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	gameOver, .-gameOver
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012HUMAN won\012\000"
	.align	2
.LC4:
	.ascii	"\012COMPUTER won\012\000"
	.text
	.align	2
	.global	declareWinner
	.syntax unified
	.arm
	.fpu softvfp
	.type	declareWinner, %function
declareWinner:
	@ 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]
	cmp	r3, #1
	bne	.L13
	ldr	r0, .L16
	bl	puts
	b	.L12
.L13:
	ldr	r0, .L16+4
	bl	puts
	nop
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	.LC4
	.size	declareWinner, .-declareWinner
	.align	2
	.global	calculateNimSum
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculateNimSum, %function
calculateNimSum:
	@ 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]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	eor	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L19:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L20
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	calculateNimSum, .-calculateNimSum
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	makeMove
	.syntax unified
	.arm
	.fpu softvfp
	.type	makeMove, %function
makeMove:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	calculateNimSum
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L23
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L24
.L27:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	eor	r2, r2, r3
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-40]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L25
	ldr	r3, [fp, #-48]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-40]
	add	r3, r1, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-28]
	eor	r3, r3, r1
	sub	r2, r2, r3
	ldr	r3, [fp, #-48]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	eor	r2, r2, r1
	str	r2, [r3]
	b	.L28
.L25:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L24:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L27
	b	.L22
.L23:
	mov	r3, sp
	mov	r4, r3
	ldr	ip, [fp, #-44]
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L29
.L31:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L30
	ldr	r3, [fp, #-36]
	add	r2, r3, #1
	str	r2, [fp, #-36]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-32]
	str	r1, [r2, r3, lsl #2]
.L30:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L29:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L31
	bl	rand
	mov	r3, r0
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-48]
	str	r2, [r3]
	bl	rand
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	add	r2, r3, #1
	ldr	r3, [fp, #-48]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-48]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-40]
	add	r3, r0, r3
	sub	r2, r1, r2
	str	r2, [r3]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L32
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L32:
	mov	sp, r4
.L28:
	nop
.L22:
	ldr	r3, .L35
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC5
	.size	makeMove, .-makeMove
	.section	.rodata
	.align	2
.LC6:
	.ascii	"\012GAME STARTS\012\000"
	.align	2
.LC7:
	.ascii	"COMPUTER removes %d stones from pile at index %d\012"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"HUMAN removes %d stones from pile at index %d\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	playGame
	.syntax unified
	.arm
	.fpu softvfp
	.type	playGame, %function
playGame:
	@ 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	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L43+4
	bl	puts
	b	.L38
.L40:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	showPiles
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	makeMove
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bne	.L39
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L43+8
	bl	printf
	mov	r3, #2
	str	r3, [fp, #-32]
	b	.L38
.L39:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L43+12
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-32]
.L38:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	gameOver
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L40
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	showPiles
	ldr	r0, [fp, #-32]
	bl	declareWinner
	nop
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC9
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	playGame, .-playGame
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Prediction before playing the game -> \000"
	.align	2
.LC11:
	.ascii	"COMPUTER will win\000"
	.align	2
.LC12:
	.ascii	"HUMAN will win\000"
	.text
	.align	2
	.global	knowWinnerBeforePlaying
	.syntax unified
	.arm
	.fpu softvfp
	.type	knowWinnerBeforePlaying, %function
knowWinnerBeforePlaying:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r0, .L51
	bl	printf
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	calculateNimSum
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L47
	ldr	r0, .L51+4
	bl	puts
	b	.L45
.L47:
	ldr	r0, .L51+8
	bl	puts
	b	.L45
.L46:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L49
	ldr	r0, .L51+8
	bl	puts
	b	.L45
.L49:
	ldr	r0, .L51+4
	bl	puts
	nop
.L45:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	knowWinnerBeforePlaying, .-knowWinnerBeforePlaying
	.section	.rodata
	.align	2
.LC0:
	.word	3
	.word	4
	.word	5
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L56
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L56+4
	sub	r3, fp, #20
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mov	r3, #3
	str	r3, [fp, #-24]
	sub	r3, fp, #20
	mov	r2, #1
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	knowWinnerBeforePlaying
	sub	r3, fp, #20
	mov	r2, #1
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	playGame
	mov	r3, #0
	ldr	r2, .L56
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L55
	bl	__stack_chk_fail
.L55:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	.LC13
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
