	.file	"443864.c"
	.intel_syntax noprefix
	.text
	.globl	HUMAN
	.section	.rodata
	.align 4
	.type	HUMAN, @object
	.size	HUMAN, 4
HUMAN:
	.zero	4
	.globl	COMPUTER
	.align 4
	.type	COMPUTER, @object
	.size	COMPUTER, 4
COMPUTER:
	.long	1
.LC0:
	.string	"Welcome to NIM by Group 4!\n"
	.align 8
.LC1:
	.string	"There are %d coins in the pile.\n"
.LC2:
	.string	"- I took %d\n"
.LC3:
	.string	"Exitted!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 16
	mov	DWORD PTR -8[rbp], 1
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -16[rbp], 13
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L7:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	cmp	DWORD PTR -12[rbp], eax
	jne	.L3
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	human_choice
	mov	DWORD PTR -4[rbp], eax
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	computer_choice
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L4:
	mov	eax, DWORD PTR -4[rbp]
	sub	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 1
	jg	.L5
	mov	DWORD PTR -16[rbp], 13
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	write_winner
	mov	eax, 0
	call	play_again
	mov	DWORD PTR -8[rbp], eax
	mov	DWORD PTR -12[rbp], 0
	cmp	DWORD PTR -8[rbp], 0
	jne	.L2
	jmp	.L6
.L5:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	toggle
	mov	DWORD PTR -12[rbp], eax
.L2:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L7
.L6:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	clear_stdin
	.type	clear_stdin, @function
clear_stdin:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
.L10:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L10
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	clear_stdin, .-clear_stdin
	.section	.rodata
	.align 8
.LC4:
	.string	"Enter a number between 1-3, that is less than the pile:"
.LC5:
	.string	"%d"
	.text
	.globl	human_choice
	.type	human_choice, @function
human_choice:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L15:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 1
	je	.L13
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 2
	je	.L13
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, 3
	jne	.L12
.L13:
	mov	eax, DWORD PTR -16[rbp]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L12
	mov	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -16[rbp]
	jmp	.L16
.L12:
	cmp	DWORD PTR -12[rbp], 0
	je	.L15
	mov	eax, DWORD PTR -16[rbp]
.L16:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	human_choice, .-human_choice
	.globl	computer_choice
	.type	computer_choice, @function
computer_choice:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	add	ecx, ecx
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -20[rbp], 4
	jg	.L19
	cmp	DWORD PTR -20[rbp], 4
	jne	.L20
	mov	eax, 3
	jmp	.L18
.L20:
	cmp	DWORD PTR -20[rbp], 3
	jne	.L22
	mov	eax, 2
	jmp	.L18
.L22:
	cmp	DWORD PTR -20[rbp], 2
	jne	.L23
	mov	eax, 1
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L18
.L23:
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	computer_choice, .-computer_choice
	.section	.rodata
.LC6:
	.string	"Winner: HUMAN!"
.LC7:
	.string	"Winner: COMPUTER!"
	.text
	.globl	write_winner
	.type	write_winner, @function
write_winner:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, 0
	cmp	DWORD PTR -4[rbp], eax
	jne	.L25
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L27
.L25:
	lea	rdi, .LC7[rip]
	call	puts@PLT
.L27:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	write_winner, .-write_winner
	.section	.rodata
.LC8:
	.string	"Play again? (Y\\N)"
.LC9:
	.string	"Please input (Y\\N)!"
	.text
	.globl	play_again
	.type	play_again, @function
play_again:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	eax, 0
	call	clear_stdin
	jmp	.L29
.L35:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	cmp	BYTE PTR -1[rbp], 89
	je	.L30
	cmp	BYTE PTR -1[rbp], 121
	jne	.L31
.L30:
	mov	eax, 1
	jmp	.L28
.L31:
	cmp	BYTE PTR -1[rbp], 78
	je	.L33
	cmp	BYTE PTR -1[rbp], 110
	jne	.L36
.L33:
	mov	eax, 0
	jmp	.L28
.L36:
	nop
.L29:
	call	getchar@PLT
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 0
	jne	.L35
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	play_again, .-play_again
	.globl	toggle
	.type	toggle, @function
toggle:
.LFB12:
	.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 -4[rbp], edi
	mov	eax, 0
	cmp	DWORD PTR -4[rbp], eax
	jne	.L38
	mov	eax, 1
	jmp	.L39
.L38:
	mov	eax, 0
.L39:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	toggle, .-toggle
	.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	"443864.c"
	.text
	.global	HUMAN
	.section	.rodata
	.align	2
	.type	HUMAN, %object
	.size	HUMAN, 4
HUMAN:
	.space	4
	.global	COMPUTER
	.align	2
	.type	COMPUTER, %object
	.size	COMPUTER, 4
COMPUTER:
	.word	1
	.align	2
.LC0:
	.ascii	"Welcome to NIM by Group 4!\012\000"
	.align	2
.LC1:
	.ascii	"There are %d coins in the pile.\012\000"
	.align	2
.LC2:
	.ascii	"- I took %d\012\000"
	.align	2
.LC3:
	.ascii	"Exitted!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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	r3, #1
	str	r3, [fp, #-12]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r0, .L9
	bl	puts
	mov	r3, #13
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L7:
	ldr	r1, [fp, #-20]
	ldr	r0, .L9+4
	bl	printf
	mov	r2, #0
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	bne	.L3
	ldr	r0, [fp, #-20]
	bl	human_choice
	str	r0, [fp, #-8]
	b	.L4
.L3:
	ldr	r0, [fp, #-20]
	bl	computer_choice
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L9+8
	bl	printf
.L4:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bgt	.L5
	mov	r3, #13
	str	r3, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	write_winner
	bl	play_again
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L2
	b	.L6
.L5:
	ldr	r0, [fp, #-16]
	bl	toggle
	str	r0, [fp, #-16]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L7
.L6:
	ldr	r0, .L9+12
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.align	2
	.global	clear_stdin
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_stdin, %function
clear_stdin:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	nop
.L12:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L12
	nop
	nop
	pop	{fp, pc}
	.size	clear_stdin, .-clear_stdin
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Enter a number between 1-3, that is less than the p"
	.ascii	"ile:\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	human_choice
	.syntax unified
	.arm
	.fpu softvfp
	.type	human_choice, %function
human_choice:
	@ 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]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L14
.L17:
	ldr	r0, .L20+4
	bl	puts
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L20+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	beq	.L15
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L15
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L14
.L15:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L14
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	b	.L18
.L14:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-16]
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC6
	.word	.LC4
	.word	.LC5
	.size	human_choice, .-human_choice
	.align	2
	.global	computer_choice
	.syntax unified
	.arm
	.fpu softvfp
	.type	computer_choice, %function
computer_choice:
	@ 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]
	bl	rand
	mov	r1, r0
	ldr	r3, .L28
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	add	r3, r2, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bgt	.L23
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	bne	.L24
	mov	r3, #3
	b	.L22
.L24:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	bne	.L26
	mov	r3, #2
	b	.L22
.L26:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L27
	mov	r3, #1
	b	.L22
.L23:
	ldr	r3, [fp, #-8]
	b	.L22
.L27:
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	1431655766
	.size	computer_choice, .-computer_choice
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Winner: HUMAN!\000"
	.align	2
.LC8:
	.ascii	"Winner: COMPUTER!\000"
	.text
	.align	2
	.global	write_winner
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_winner, %function
write_winner:
	@ 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]
	mov	r2, #0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	bne	.L31
	ldr	r0, .L34
	bl	puts
	b	.L33
.L31:
	ldr	r0, .L34+4
	bl	puts
.L33:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC7
	.word	.LC8
	.size	write_winner, .-write_winner
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Play again? (Y\\N)\000"
	.align	2
.LC10:
	.ascii	"Please input (Y\\N)!\000"
	.text
	.align	2
	.global	play_again
	.syntax unified
	.arm
	.fpu softvfp
	.type	play_again, %function
play_again:
	@ 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	r0, .L45
	bl	puts
	bl	clear_stdin
	b	.L37
.L43:
	ldr	r0, .L45+4
	bl	puts
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #89
	beq	.L38
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #121
	bne	.L39
.L38:
	mov	r3, #1
	b	.L36
.L39:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #78
	beq	.L41
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #110
	bne	.L44
.L41:
	mov	r3, #0
	b	.L36
.L44:
	nop
.L37:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L43
.L36:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC9
	.word	.LC10
	.size	play_again, .-play_again
	.align	2
	.global	toggle
	.syntax unified
	.arm
	.fpu softvfp
	.type	toggle, %function
toggle:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	mov	r2, #0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	bne	.L48
	mov	r3, #1
	b	.L49
.L48:
	mov	r3, #0
.L49:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	toggle, .-toggle
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
