	.file	"603261.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Failed to allocate memory"
.LC1:
	.string	"w"
	.align 8
.LC2:
	.string	"Failed to open file FPGA.data\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
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	esi, 8
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -44[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	lea	rbx, [rdx+rax]
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	add	DWORD PTR -44[rbp], 1
.L2:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L4
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L6
.L5:
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L7
.L14:
	mov	DWORD PTR -40[rbp], 0
	jmp	.L8
.L9:
	call	rand@PLT
	cdq
	shr	edx, 24
	add	eax, edx
	movzx	eax, al
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, 15
	sub	eax, DWORD PTR -40[rbp]
	cdqe
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -40[rbp], 1
.L8:
	cmp	DWORD PTR -40[rbp], 7
	jle	.L9
	mov	DWORD PTR -40[rbp], 8
	jmp	.L10
.L13:
	cmp	DWORD PTR -40[rbp], 11
	jg	.L11
	call	rand@PLT
	cdq
	shr	edx, 24
	add	eax, edx
	movzx	eax, al
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, 15
	sub	eax, DWORD PTR -40[rbp]
	cdqe
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	jmp	.L12
.L11:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, 15
	sub	eax, DWORD PTR -40[rbp]
	cdqe
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L12:
	add	DWORD PTR -40[rbp], 1
.L10:
	cmp	DWORD PTR -40[rbp], 15
	jle	.L13
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 16
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -44[rbp], 1
.L7:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L14
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -44[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -44[rbp], 1
.L15:
	mov	eax, DWORD PTR -44[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L16
	mov	eax, 0
.L6:
	mov	rbx, QWORD PTR -8[rbp]
	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	"603261.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Failed to allocate memory\000"
	.align	2
.LC1:
	.ascii	"w\000"
	.align	2
.LC2:
	.ascii	"Failed to open file FPGA.data\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r1, #4
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L2
.L4:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r4, r2, r3
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L17
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L2:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L17+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L17+8
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L17+12
	bl	fwrite
	mov	r3, #1
	b	.L6
.L5:
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L7
.L14:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L8
.L9:
	bl	rand
	mov	r3, r0
	rsbs	r2, r3, #0
	and	r3, r3, #255
	and	r2, r2, #255
	rsbpl	r3, r2, #0
	ldr	r2, [fp, #-32]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-20]
	add	r2, r1, r2
	ldr	r2, [r2]
	ldr	r1, [fp, #-28]
	rsb	r1, r1, #15
	add	r2, r2, r1
	and	r3, r3, #255
	strb	r3, [r2]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L8:
	ldr	r3, [fp, #-28]
	cmp	r3, #7
	ble	.L9
	mov	r3, #8
	str	r3, [fp, #-28]
	b	.L10
.L13:
	ldr	r3, [fp, #-28]
	cmp	r3, #11
	bgt	.L11
	bl	rand
	mov	r3, r0
	rsbs	r2, r3, #0
	and	r3, r3, #255
	and	r2, r2, #255
	rsbpl	r3, r2, #0
	ldr	r2, [fp, #-32]
	lsl	r2, r2, #2
	ldr	r1, [fp, #-20]
	add	r2, r1, r2
	ldr	r2, [r2]
	ldr	r1, [fp, #-28]
	rsb	r1, r1, #15
	add	r2, r2, r1
	and	r3, r3, #255
	strb	r3, [r2]
	b	.L12
.L11:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	rsb	r2, r2, #15
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L12:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L10:
	ldr	r3, [fp, #-28]
	cmp	r3, #15
	ble	.L13
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #16
	mov	r1, #1
	bl	fwrite
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L7:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L14
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L15
.L16:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L15:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L16
	mov	r3, #0
.L6:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.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
