	.file	"713592.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"wb"
	.align 8
.LC2:
	.string	"\344\275\277\347\224\250\346\263\225: crypt infile outfile [key]\n"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 2
	jle	.L2
	cmp	DWORD PTR -36[rbp], 4
	jg	.L2
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L2
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L3
.L2:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 38
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L4
.L3:
	cmp	DWORD PTR -36[rbp], 4
	jne	.L6
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	edi, eax
	call	srand@PLT
	jmp	.L6
.L7:
	call	rand@PLT
	shr	eax, 23
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 255
	jg	.L7
	mov	eax, DWORD PTR -24[rbp]
	xor	eax, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	putc@PLT
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L7
	mov	eax, 0
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"713592.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"wb\000"
	.align	2
.LC2:
	.ascii	"\344\275\277\347\224\250\346\263\225: crypt infile "
	.ascii	"outfile [key]\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	ble	.L2
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	bgt	.L2
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L8+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, .L8+8
	ldr	r3, [r3]
	mov	r2, #38
	mov	r1, #1
	ldr	r0, .L8+12
	bl	fwrite
	mov	r3, #1
	b	.L4
.L3:
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	bne	.L6
	ldr	r3, [fp, #-28]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r0, r3
	bl	srand
	b	.L6
.L7:
	bl	rand
	mov	r3, r0
	lsr	r3, r3, #23
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #255
	bgt	.L7
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	eor	r3, r3, r2
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	putc
.L6:
	ldr	r0, [fp, #-20]
	bl	getc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L7
	mov	r3, #0
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
