	.file	"554072.c"
	.intel_syntax noprefix
	.text
	.globl	score
	.bss
	.type	score, @object
	.size	score, 1
score:
	.zero	1
	.text
	.globl	read_int
	.type	read_int, @function
read_int:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -18[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -18[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_int, .-read_int
	.section	.rodata
.LC0:
	.string	"/bin/sh"
	.text
	.globl	get_shell
	.type	get_shell, @function
get_shell:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, 0
	mov	esi, 0
	lea	rdi, .LC0[rip]
	call	execve@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_shell, .-get_shell
	.section	.rodata
.LC1:
	.string	"Choose an attack:\n"
.LC2:
	.string	"1. Knife\n"
.LC3:
	.string	"2. A bigger knife\n"
.LC4:
	.string	"3. Her Majesty's knife\n"
.LC5:
	.string	"4. A cr0wn\n"
.LC6:
	.string	"l0zers don't get cr0wns\n"
	.align 8
.LC7:
	.string	"Please select a valid attack next time\n"
	.text
	.globl	choose_attack
	.type	choose_attack, @function
choose_attack:
.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
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	call	read_int
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 1
	jne	.L6
	mov	QWORD PTR -16[rbp], 1
	mov	QWORD PTR -8[rbp], 10
	jmp	.L7
.L6:
	cmp	DWORD PTR -20[rbp], 2
	jne	.L8
	mov	QWORD PTR -16[rbp], 2
	mov	QWORD PTR -8[rbp], 20
	jmp	.L7
.L8:
	cmp	DWORD PTR -20[rbp], 3
	jne	.L9
	mov	QWORD PTR -16[rbp], 3
	mov	QWORD PTR -8[rbp], 30
	jmp	.L7
.L9:
	cmp	DWORD PTR -20[rbp], 4
	jne	.L10
	movzx	eax, BYTE PTR score[rip]
	test	al, al
	jne	.L11
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L7
.L11:
	mov	QWORD PTR -16[rbp], 4
	mov	QWORD PTR -8[rbp], 40
	jmp	.L7
.L10:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -8[rbp], 0
.L7:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	choose_attack, .-choose_attack
	.section	.rodata
	.align 8
.LC8:
	.string	"You are fighting the rarf boss!\n"
.LC9:
	.string	"What is your name?\n"
.LC10:
	.string	"You choose attack %llu\n"
.LC11:
	.string	"You deal %llu dmg\n"
.LC12:
	.string	"The boss deals %llu dmg\n"
.LC13:
	.string	"You won!\n"
.LC14:
	.string	"You lost!\n"
	.align 8
.LC15:
	.string	"Congratulations! You may now declare yourself the winner:\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -36[rbp], 100
	mov	QWORD PTR -32[rbp], 1936944994
	mov	WORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 100
	mov	rax, QWORD PTR stdin[rip]
	mov	ecx, 0
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	setvbuf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, 0
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	setvbuf@PLT
	mov	edi, 0
	call	srand@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -48[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	fgets@PLT
	mov	BYTE PTR score[rip], 10
	jmp	.L14
.L17:
	mov	eax, 0
	call	choose_attack
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -20[rbp], eax
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	DWORD PTR -68[rbp], edx
	mov	edx, DWORD PTR -68[rbp]
	imul	edx, edx, 100
	sub	eax, edx
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, DWORD PTR -68[rbp]
	mov	DWORD PTR -36[rbp], eax
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	jle	.L15
	lea	rdi, .LC13[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR score[rip]
	add	eax, 1
	mov	BYTE PTR score[rip], al
	jmp	.L16
.L15:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	movzx	eax, BYTE PTR score[rip]
	sub	eax, 1
	mov	BYTE PTR score[rip], al
.L16:
	mov	DWORD PTR -36[rbp], 100
	mov	DWORD PTR -20[rbp], 100
.L14:
	movzx	eax, BYTE PTR score[rip]
	cmp	al, 99
	jbe	.L17
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -48[rbp]
	mov	esi, 48
	mov	rdi, rax
	call	fgets@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"554072.c"
	.text
	.comm	score,1,1
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_int, %function
read_int:
	@ 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, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L4+4
	ldr	r2, [r3]
	sub	r3, fp, #20
	mov	r1, #10
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #20
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC1
	.word	stdin
	.size	read_int, .-read_int
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/bin/sh\000"
	.text
	.align	2
	.global	get_shell
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_shell, %function
get_shell:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L7
	bl	execve
	nop
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC2
	.size	get_shell, .-get_shell
	.section	.rodata
	.align	2
.LC3:
	.ascii	"Choose an attack:\012\000"
	.align	2
.LC4:
	.ascii	"1. Knife\012\000"
	.align	2
.LC5:
	.ascii	"2. A bigger knife\012\000"
	.align	2
.LC6:
	.ascii	"3. Her Majesty's knife\012\000"
	.align	2
.LC7:
	.ascii	"4. A cr0wn\012\000"
	.align	2
.LC8:
	.ascii	"l0zers don't get cr0wns\012\000"
	.align	2
.LC9:
	.ascii	"Please select a valid attack next time\012\000"
	.text
	.align	2
	.global	choose_attack
	.syntax unified
	.arm
	.fpu softvfp
	.type	choose_attack, %function
choose_attack:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r0, .L17
	bl	puts
	ldr	r0, .L17+4
	bl	puts
	ldr	r0, .L17+8
	bl	puts
	ldr	r0, .L17+12
	bl	puts
	ldr	r0, .L17+16
	bl	puts
	bl	read_int
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L10
	mov	r2, #1
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #10
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L11
.L10:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L12
	mov	r2, #2
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #20
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L11
.L12:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	bne	.L13
	mov	r2, #3
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #30
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L11
.L13:
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	bne	.L14
	ldr	r3, .L17+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L15
	ldr	r0, .L17+24
	bl	puts
	b	.L11
.L15:
	mov	r2, #4
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #40
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L11
.L14:
	ldr	r0, .L17+28
	bl	puts
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
.L11:
	ldr	r3, [fp, #-32]
	mov	ip, r3
	sub	r3, fp, #20
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, [fp, #-32]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	score
	.word	.LC8
	.word	.LC9
	.size	choose_attack, .-choose_attack
	.section	.rodata
	.align	2
.LC10:
	.ascii	"You are fighting the rarf boss!\012\000"
	.align	2
.LC11:
	.ascii	"What is your name?\012\000"
	.align	2
.LC12:
	.ascii	"You choose attack %llu\012\000"
	.align	2
.LC13:
	.ascii	"You deal %llu dmg\012\000"
	.align	2
.LC14:
	.ascii	"The boss deals %llu dmg\012\000"
	.align	2
.LC15:
	.ascii	"You won!\012\000"
	.align	2
.LC16:
	.ascii	"You lost!\012\000"
	.align	2
.LC17:
	.ascii	"Congratulations! You may now declare yourself the w"
	.ascii	"inner:\012\000"
	.align	2
.LC0:
	.ascii	"boss\000"
	.space	5
	.space	2
	.word	100
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #100
	str	r3, [fp, #-28]
	ldr	r3, .L26+4
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, .L26+8
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	mov	r1, #0
	bl	setvbuf
	ldr	r3, .L26+12
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	mov	r1, #0
	bl	setvbuf
	mov	r0, #0
	bl	srand
	ldr	r0, .L26+16
	bl	puts
	ldr	r0, .L26+20
	bl	puts
	ldr	r3, .L26+8
	ldr	r2, [r3]
	sub	r3, fp, #40
	mov	r1, #10
	mov	r0, r3
	bl	fgets
	ldr	r3, .L26+24
	mov	r2, #10
	strb	r2, [r3]
	b	.L20
.L23:
	sub	r3, fp, #60
	mov	r0, r3
	bl	choose_attack
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	ldr	r0, .L26+28
	bl	printf
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	ldr	r0, .L26+32
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r1, r3
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	mov	r3, r2
	sub	r3, r1, r3
	str	r3, [fp, #-12]
	bl	rand
	mov	r2, r0
	ldr	r3, .L26+36
	smull	r1, r3, r2, r3
	asr	r1, r3, #5
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #2
	add	r3, r3, r1
	lsl	r1, r3, #2
	add	r3, r3, r1
	lsl	r3, r3, #2
	sub	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r1, [fp, #-64]
	ldr	r0, .L26+40
	bl	printf
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-64]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L21
	ldr	r0, .L26+44
	bl	puts
	ldr	r3, .L26+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, .L26+24
	strb	r2, [r3]
	b	.L22
.L21:
	ldr	r0, .L26+48
	bl	puts
	ldr	r3, .L26+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, .L26+24
	strb	r2, [r3]
.L22:
	mov	r3, #100
	str	r3, [fp, #-28]
	mov	r3, #100
	str	r3, [fp, #-12]
.L20:
	ldr	r3, .L26+24
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #99
	bls	.L23
	ldr	r0, .L26+52
	bl	puts
	ldr	r3, .L26+8
	ldr	r2, [r3]
	sub	r3, fp, #40
	mov	r1, #48
	mov	r0, r3
	bl	fgets
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC18
	.word	.LC0
	.word	stdin
	.word	stdout
	.word	.LC10
	.word	.LC11
	.word	score
	.word	.LC12
	.word	.LC13
	.word	1374389535
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
