	.file	"231186.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	".txt"
.LC1:
	.string	"maze"
.LC2:
	.string	"mazes"
.LC3:
	.string	"villag"
.LC4:
	.string	"village.dat"
	.text
	.globl	cryptkey
	.type	cryptkey, @function
cryptkey:
.LFB0:
	.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 -4[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	eax, 100
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 4
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L4
	lea	rax, .LC2[rip]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 6
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L5
	lea	rax, .LC4[rip]
	mov	QWORD PTR -24[rbp], rax
.L5:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	lea	edx, -32[rax]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	add	DWORD PTR -4[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L6:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L7
	mov	eax, DWORD PTR -4[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	cryptkey, .-cryptkey
	.section	.rodata
	.align 8
.LC5:
	.string	"Usage: %s (key) < (infile) > (outfile)\nwhere (key) happens to be the name of the file, without any preceding path.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	jne	.L9
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	mov	eax, 0
	call	cryptkey
	mov	BYTE PTR -5[rbp], al
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -4[rbp]
	xor	BYTE PTR -5[rbp], al
	movsx	eax, BYTE PTR -5[rbp]
	mov	edi, eax
	call	putchar@PLT
.L10:
	call	getchar@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L11
	jmp	.L12
.L9:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L12:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"231186.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	".txt\000"
	.align	2
.LC1:
	.ascii	"maze\000"
	.align	2
.LC2:
	.ascii	"mazes\000"
	.align	2
.LC3:
	.ascii	"villag\000"
	.align	2
.LC4:
	.ascii	"village.dat\000"
	.text
	.align	2
	.global	cryptkey
	.syntax unified
	.arm
	.fpu softvfp
	.type	cryptkey, %function
cryptkey:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r1, .L8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #100
	b	.L3
.L2:
	mov	r2, #4
	ldr	r1, .L8+4
	ldr	r0, [fp, #-16]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L8+8
	str	r3, [fp, #-16]
	b	.L5
.L4:
	mov	r2, #6
	ldr	r1, .L8+12
	ldr	r0, [fp, #-16]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L8+16
	str	r3, [fp, #-16]
.L5:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L6
.L7:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r2, r3, #32
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L6:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	cryptkey, .-cryptkey
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Usage: %s (key) < (infile) > (outfile)\012where (ke"
	.ascii	"y) happens to be the name of the file, without any "
	.ascii	"preceding path.\012\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
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L11
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	cryptkey
	mov	r3, r0
	strb	r3, [fp, #-9]
	b	.L12
.L13:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldrsb	r3, [fp, #-9]
	eor	r3, r3, r2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
.L12:
	bl	getchar
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L13
	b	.L14
.L11:
	ldr	r3, .L16
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L16+4
	bl	fprintf
.L14:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	stderr
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
