	.file	"57961.c"
	.intel_syntax noprefix
	.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -276[rbp], eax
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -276[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	encodeMatrix
	mov	rdx, rax
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edx, DWORD PTR -276[rbp]
	lea	rax, -272[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	decodeMatrix
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	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	main, .-main
	.globl	encodeMatrix
	.type	encodeMatrix, @function
encodeMatrix:
.LFB7:
	.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	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L5
.L10:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -16[rbp]
	imul	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cmp	DWORD PTR -12[rbp], eax
	jg	.L7
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1321528399
	shr	rdx, 32
	sar	edx, 3
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 26
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	lea	ecx, 97[rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -16[rbp]
	imul	eax, DWORD PTR -44[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
.L8:
	add	DWORD PTR -16[rbp], 1
.L6:
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	eax, edx
	test	eax, eax
	setg	al
	movzx	eax, al
	add	eax, ecx
	cmp	DWORD PTR -16[rbp], eax
	jl	.L9
	add	DWORD PTR -24[rbp], 1
.L5:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L10
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	encodeMatrix, .-encodeMatrix
	.globl	decodeMatrix
	.type	decodeMatrix, @function
decodeMatrix:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L13
.L16:
	mov	DWORD PTR -16[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	imul	eax, DWORD PTR -16[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -16[rbp], 1
.L14:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L15
	add	DWORD PTR -24[rbp], 1
.L13:
	mov	eax, DWORD PTR -12[rbp]
	cdq
	idiv	DWORD PTR -44[rbp]
	cmp	DWORD PTR -24[rbp], eax
	jl	.L16
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	decodeMatrix, .-decodeMatrix
	.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	"57961.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-272]
	str	r1, [fp, #-276]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-276]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-276]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, [fp, #-268]
	mov	r0, r3
	bl	encodeMatrix
	mov	r2, r0
	sub	r3, fp, #264
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #264
	mov	r0, r3
	bl	puts
	sub	r3, fp, #264
	ldr	r1, [fp, #-268]
	mov	r0, r3
	bl	decodeMatrix
	mov	r3, r0
	mov	r0, r3
	bl	puts
	mov	r3, #0
	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	.LC0
	.size	main, .-main
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
	.global	encodeMatrix
	.syntax unified
	.arm
	.fpu softvfp
	.type	encodeMatrix, %function
encodeMatrix:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L7
.L12:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L8
.L11:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	mul	r2, r3, r2
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L9
	bl	rand
	mov	r1, r0
	ldr	r3, .L14
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	and	r2, r2, #255
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	str	r1, [fp, #-28]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r1
	add	r2, r2, #97
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L10
.L9:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-44]
	mul	r2, r3, r2
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r2, r3, r2
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	str	r1, [fp, #-28]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L10:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-20]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r4, r3
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
	add	r3, r4, r3
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L11
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L7:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L12
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	1321528399
	.size	encodeMatrix, .-encodeMatrix
	.align	2
	.global	decodeMatrix
	.syntax unified
	.arm
	.fpu softvfp
	.type	decodeMatrix, %function
decodeMatrix:
	@ 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]
	str	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r3, r0
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L17
.L20:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L18
.L19:
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-12]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	mul	r2, r3, r2
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r2, r3, r2
	ldr	r3, [fp, #-20]
	add	r1, r3, #1
	str	r1, [fp, #-20]
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r1
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L18:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L19
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L17:
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-12]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-24]
	cmp	r3, r2
	blt	.L20
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	decodeMatrix, .-decodeMatrix
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
