	.file	"29825250.c"
	.intel_syntax noprefix
	.text
	.type	xor_pattern, @function
xor_pattern:
.LFB6:
	.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	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -44[rbp], ecx
	mov	DWORD PTR -48[rbp], r8d
	mov	eax, DWORD PTR -48[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	xor	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -24[rbp], 1
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	DWORD PTR -4[rbp], edx
.L2:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -32[rbp], rdx
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	xor_pattern, .-xor_pattern
	.type	xor_data, @function
xor_data:
.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	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	DWORD PTR -4[rbp], 0
	jmp	.L6
.L7:
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	xor	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -24[rbp], 1
	add	DWORD PTR -4[rbp], 1
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	cmp	QWORD PTR -32[rbp], rax
	ja	.L7
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	xor_data, .-xor_data
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: nec-enc -i infile -o outfile -k <key>\n"
	.text
	.type	usage, @function
usage:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 45
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	usage, .-usage
	.local	buf_pattern
	.comm	buf_pattern,4096,32
	.local	buf
	.comm	buf,4096,32
	.section	.rodata
.LC1:
	.string	"i:o:k:h"
.LC2:
	.string	"illegal arg \"%s\"\n"
.LC3:
	.string	"r"
.LC4:
	.string	"can not open input file"
.LC5:
	.string	"w"
.LC6:
	.string	"can not open output file"
.LC7:
	.string	"key is not specified\n"
	.align 8
.LC8:
	.string	"key length is not in range (0,%d)\n"
.LC9:
	.string	"failed to write"
.LC10:
	.string	"failed to read"
	.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -72[rbp], 1
	mov	DWORD PTR -68[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	jmp	.L10
.L15:
	cmp	DWORD PTR -60[rbp], 111
	je	.L11
	cmp	DWORD PTR -60[rbp], 111
	jg	.L12
	cmp	DWORD PTR -60[rbp], 105
	je	.L13
	cmp	DWORD PTR -60[rbp], 107
	je	.L14
	jmp	.L12
.L13:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -56[rbp], rax
	jmp	.L10
.L11:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -48[rbp], rax
	jmp	.L10
.L14:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L10
.L12:
	call	usage
.L10:
	mov	rcx, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -84[rbp]
	lea	rdx, .LC1[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	jne	.L15
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -84[rbp], eax
	jne	.L16
	mov	eax, DWORD PTR optind[rip]
	cmp	eax, 1
	jne	.L17
.L16:
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -96[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	usage
.L17:
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L18
	lea	rdi, .LC4[rip]
	call	perror@PLT
	call	usage
.L18:
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L19
	lea	rdi, .LC6[rip]
	call	perror@PLT
	call	usage
.L19:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	call	usage
.L20:
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 17
	mov	rdi, rax
	call	strnlen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L21
	cmp	QWORD PTR -16[rbp], 16
	jbe	.L23
.L21:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 16
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	call	usage
.L28:
	mov	DWORD PTR -64[rbp], 0
	jmp	.L24
.L26:
	mov	eax, DWORD PTR -72[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	lea	rdx, buf_pattern[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -72[rbp], 1
	cmp	DWORD PTR -72[rbp], 251
	jle	.L25
	mov	DWORD PTR -72[rbp], 1
.L25:
	add	DWORD PTR -64[rbp], 1
.L24:
	mov	eax, DWORD PTR -64[rbp]
	cdqe
	cmp	QWORD PTR -8[rbp], rax
	ja	.L26
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, eax
	mov	ecx, DWORD PTR -76[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, ecx
	mov	ecx, esi
	mov	rsi, rax
	lea	rdi, buf_pattern[rip]
	call	xor_pattern
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, buf_pattern[rip]
	mov	rsi, rax
	lea	rdi, buf[rip]
	call	xor_data
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	mov	esi, 1
	lea	rdi, buf[rip]
	call	fwrite@PLT
	cmp	QWORD PTR -8[rbp], rax
	je	.L23
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	DWORD PTR -68[rbp], 1
	jmp	.L27
.L23:
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, rax
	mov	edx, 4096
	mov	esi, 1
	lea	rdi, buf[rip]
	call	fread@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L28
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L30
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	DWORD PTR -68[rbp], 1
	jmp	.L27
.L30:
	nop
.L27:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -68[rbp]
	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	"29825250.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xor_pattern, %function
xor_pattern:
	@ args = 4, 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	xor_pattern, .-xor_pattern
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xor_data, %function
xor_data:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L6
.L7:
	ldr	r3, [fp, #-16]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, r2
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L6:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bhi	.L7
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	xor_data, .-xor_data
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: nec-enc -i infile -o outfile -k <key>\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L9
	ldr	r3, [r3]
	mov	r2, #45
	mov	r1, #1
	ldr	r0, .L9+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L10:
	.align	2
.L9:
	.word	stderr
	.word	.LC0
	.size	usage, .-usage
	.local	buf_pattern
	.comm	buf_pattern,4096,4
	.local	buf
	.comm	buf,4096,4
	.section	.rodata
	.align	2
.LC1:
	.ascii	"i:o:k:h\000"
	.align	2
.LC2:
	.ascii	"illegal arg \"%s\"\012\000"
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	"can not open input file\000"
	.align	2
.LC5:
	.ascii	"w\000"
	.align	2
.LC6:
	.ascii	"can not open output file\000"
	.align	2
.LC7:
	.ascii	"key is not specified\012\000"
	.align	2
.LC8:
	.ascii	"key length is not in range (0,%d)\012\000"
	.align	2
.LC9:
	.ascii	"failed to write\000"
	.align	2
.LC10:
	.ascii	"failed to read\000"
	.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, #64
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #1
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L12
.L17:
	ldr	r3, [fp, #-24]
	cmp	r3, #111
	beq	.L13
	ldr	r3, [fp, #-24]
	cmp	r3, #111
	bgt	.L14
	ldr	r3, [fp, #-24]
	cmp	r3, #105
	beq	.L15
	ldr	r3, [fp, #-24]
	cmp	r3, #107
	beq	.L16
	b	.L14
.L15:
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	b	.L12
.L13:
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	b	.L12
.L16:
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	b	.L12
.L14:
	bl	usage
.L12:
	ldr	r2, .L33+4
	ldr	r1, [fp, #-60]
	ldr	r0, [fp, #-56]
	bl	getopt
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L17
	ldr	r3, .L33+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	bne	.L18
	ldr	r3, .L33+8
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L19
.L18:
	ldr	r3, .L33+12
	ldr	r0, [r3]
	ldr	r3, .L33+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L33+16
	bl	fprintf
	bl	usage
.L19:
	ldr	r1, .L33+20
	ldr	r0, [fp, #-40]
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L20
	ldr	r0, .L33+24
	bl	perror
	bl	usage
.L20:
	ldr	r1, .L33+28
	ldr	r0, [fp, #-36]
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L21
	ldr	r0, .L33+32
	bl	perror
	bl	usage
.L21:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L22
	ldr	r3, .L33+12
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L33+36
	bl	fwrite
	bl	usage
.L22:
	mov	r1, #17
	ldr	r0, [fp, #-32]
	bl	strnlen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-12]
	cmp	r3, #16
	bls	.L25
.L23:
	ldr	r3, .L33+12
	ldr	r3, [r3]
	mov	r2, #16
	ldr	r1, .L33+40
	mov	r0, r3
	bl	fprintf
	bl	usage
.L30:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L26
.L28:
	ldr	r3, [fp, #-48]
	and	r1, r3, #255
	ldr	r2, .L33+44
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #251
	ble	.L27
	mov	r3, #1
	str	r3, [fp, #-48]
.L27:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L26:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bhi	.L28
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-52]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+44
	bl	xor_pattern
	str	r0, [fp, #-52]
	ldr	r2, .L33+44
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+48
	bl	xor_data
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	mov	r1, #1
	ldr	r0, .L33+48
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	beq	.L25
	ldr	r0, .L33+52
	bl	perror
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L29
.L25:
	ldr	r3, [fp, #-20]
	mov	r2, #4096
	mov	r1, #1
	ldr	r0, .L33+48
	bl	fread
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L30
	ldr	r0, [fp, #-20]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L32
	ldr	r0, .L33+56
	bl	perror
	mov	r3, #1
	str	r3, [fp, #-44]
	b	.L29
.L32:
	nop
.L29:
	ldr	r0, [fp, #-20]
	bl	fclose
	ldr	r0, [fp, #-16]
	bl	fclose
	ldr	r3, [fp, #-44]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	optarg
	.word	.LC1
	.word	optind
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	buf_pattern
	.word	buf
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
