	.file	"429378.c"
	.intel_syntax noprefix
	.text
	.globl	yendor_version
	.data
	.align 4
	.type	yendor_version, @object
	.size	yendor_version, 4
yendor_version:
	.long	3
	.section	.rodata
.LC0:
	.string	"-----------------------"
.LC1:
	.string	"          MP: %d\n"
.LC2:
	.string	"       Nuore: %d\n"
.LC3:
	.string	"Attack Sound: "
.LC4:
	.string	"%03d.voc\n"
.LC5:
	.string	"-"
.LC6:
	.string	" Heal Points: %d\n"
.LC7:
	.string	"  Max Damage: %d\n"
	.text
	.globl	printSpell
	.type	printSpell, @function
printSpell:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 24[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 26[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 32[rax]
	test	ax, ax
	je	.L2
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 32[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L2:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L3:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 34[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 46[rax]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	printSpell, .-printSpell
	.globl	fetchSpells
	.type	fetchSpells, @function
fetchSpells:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	DWORD PTR -124[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR yendor_version[rip]
	cmp	eax, 3
	jne	.L5
	mov	eax, 107
	jmp	.L6
.L5:
	mov	eax, 105
.L6:
	mov	DWORD PTR -100[rbp], eax
	mov	DWORD PTR -104[rbp], 0
	jmp	.L7
.L8:
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR -124[rbp]
	add	eax, edx
	movsx	rcx, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -120[rbp]
	lea	rax, -96[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 80
	mov	rdi, rax
	call	fread@PLT
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	printSpell
	add	DWORD PTR -104[rbp], 1
.L7:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L8
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	fetchSpells, .-fetchSpells
	.section	.rodata
.LC8:
	.string	"-f"
.LC9:
	.string	"-y2"
.LC10:
	.string	"-y3"
.LC11:
	.string	"-?"
	.align 8
.LC12:
	.string	"Usage: %s <optional parameters>\n"
	.align 8
.LC13:
	.string	"-f X - specify name of the WORLD.DAT file (default: WORLD.DAT)"
	.align 8
.LC14:
	.string	"-y2  - extract Yendorian Tales 2 spells"
	.align 8
.LC15:
	.string	"-y3  - extract Yendorian Tales 3 spells"
.LC16:
	.string	"rb"
.LC17:
	.string	"Could not load %s!\n"
	.align 8
.LC18:
	.string	"Extracting Yendorian Tales 2 spells."
	.align 8
.LC19:
	.string	"Extracting Yendorian Tales 3 spells."
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 4702934781754756951
	mov	edx, 84
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -60[rbp], 1
	jmp	.L11
.L17:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	cmp	DWORD PTR -60[rbp], eax
	jge	.L12
	lea	rax, -48[rbp]
	mov	edx, 32
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	add	rax, 1
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	lea	rax, -48[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
.L12:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	DWORD PTR yendor_version[rip], 2
.L13:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L14
	mov	DWORD PTR yendor_version[rip], 3
.L14:
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -80[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L21
.L15:
	add	DWORD PTR -60[rbp], 1
.L11:
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -68[rbp]
	jl	.L17
	lea	rax, -48[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L18
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L21
.L18:
	mov	eax, DWORD PTR yendor_version[rip]
	cmp	eax, 2
	jne	.L19
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 1746526
	mov	rdi, rax
	call	fetchSpells
.L19:
	mov	eax, DWORD PTR yendor_version[rip]
	cmp	eax, 3
	jne	.L20
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 4306367
	mov	rdi, rax
	call	fetchSpells
.L20:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L21:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"429378.c"
	.text
	.global	yendor_version
	.data
	.align	2
	.type	yendor_version, %object
	.size	yendor_version, 4
yendor_version:
	.word	3
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-----------------------\000"
	.align	2
.LC1:
	.ascii	"          MP: %d\012\000"
	.align	2
.LC2:
	.ascii	"       Nuore: %d\012\000"
	.align	2
.LC3:
	.ascii	"Attack Sound: \000"
	.align	2
.LC4:
	.ascii	"%03d.voc\012\000"
	.align	2
.LC5:
	.ascii	"-\000"
	.align	2
.LC6:
	.ascii	" Heal Points: %d\012\000"
	.align	2
.LC7:
	.ascii	"  Max Damage: %d\012\000"
	.text
	.align	2
	.global	printSpell
	.syntax unified
	.arm
	.fpu softvfp
	.type	printSpell, %function
printSpell:
	@ 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]
	mov	r0, r3
	bl	puts
	ldr	r0, .L4
	bl	puts
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #24]
	mov	r1, r3
	ldr	r0, .L4+4
	bl	printf
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #26]
	mov	r1, r3
	ldr	r0, .L4+8
	bl	printf
	ldr	r0, .L4+12
	bl	printf
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #32]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #32]
	mov	r1, r3
	ldr	r0, .L4+16
	bl	printf
	b	.L3
.L2:
	ldr	r0, .L4+20
	bl	puts
.L3:
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #34]
	mov	r1, r3
	ldr	r0, .L4+24
	bl	printf
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3, #46]
	mov	r1, r3
	ldr	r0, .L4+28
	bl	printf
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	printSpell, .-printSpell
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fetchSpells
	.syntax unified
	.arm
	.fpu softvfp
	.type	fetchSpells, %function
fetchSpells:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L12+4
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L7
	mov	r3, #107
	b	.L8
.L7:
	mov	r3, #105
.L8:
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L9
.L10:
	ldr	r2, [fp, #-96]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	mov	r2, r3
	ldr	r3, [fp, #-108]
	add	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	fseek
	sub	r0, fp, #88
	ldr	r3, [fp, #-104]
	mov	r2, #1
	mov	r1, #80
	bl	fread
	sub	r3, fp, #88
	mov	r0, r3
	bl	printSpell
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L9:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L10
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC8
	.word	yendor_version
	.size	fetchSpells, .-fetchSpells
	.section	.rodata
	.align	2
.LC10:
	.ascii	"-f\000"
	.align	2
.LC11:
	.ascii	"-y2\000"
	.align	2
.LC12:
	.ascii	"-y3\000"
	.align	2
.LC13:
	.ascii	"-?\000"
	.align	2
.LC14:
	.ascii	"Usage: %s <optional parameters>\012\000"
	.align	2
.LC15:
	.ascii	"-f X - specify name of the WORLD.DAT file (default:"
	.ascii	" WORLD.DAT)\000"
	.align	2
.LC16:
	.ascii	"-y2  - extract Yendorian Tales 2 spells\000"
	.align	2
.LC17:
	.ascii	"-y3  - extract Yendorian Tales 3 spells\000"
	.align	2
.LC18:
	.ascii	"rb\000"
	.align	2
.LC19:
	.ascii	"Could not load %s!\012\000"
	.align	2
.LC20:
	.ascii	"Extracting Yendorian Tales 2 spells.\000"
	.align	2
.LC21:
	.ascii	"Extracting Yendorian Tales 3 spells.\000"
	.align	2
.LC9:
	.ascii	"WORLD.DAT\000"
	.space	22
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L27+4
	sub	r3, fp, #40
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #30
	mov	r2, #22
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L15
.L21:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	bge	.L16
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r1, [r3]
	sub	r3, fp, #40
	mov	r2, #32
	mov	r0, r3
	bl	strncpy
.L16:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L27+16
	mov	r2, #2
	str	r2, [r3]
.L17:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L27+16
	mov	r2, #3
	str	r2, [r3]
.L18:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L27+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-60]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L27+28
	bl	printf
	ldr	r0, .L27+32
	bl	puts
	ldr	r0, .L27+36
	bl	puts
	ldr	r0, .L27+40
	bl	puts
	mov	r3, #0
	b	.L25
.L19:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L15:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L21
	sub	r3, fp, #40
	ldr	r1, .L27+44
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L22
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L27+48
	bl	printf
	mov	r3, #1
	b	.L25
.L22:
	ldr	r3, .L27+16
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L23
	ldr	r0, .L27+52
	bl	puts
	ldr	r1, .L27+56
	ldr	r0, [fp, #-44]
	bl	fetchSpells
.L23:
	ldr	r3, .L27+16
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L24
	ldr	r0, .L27+60
	bl	puts
	ldr	r1, .L27+64
	ldr	r0, [fp, #-44]
	bl	fetchSpells
.L24:
	ldr	r0, [fp, #-44]
	bl	fclose
	mov	r3, #0
.L25:
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC22
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	yendor_version
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	1746526
	.word	.LC21
	.word	4306367
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
