	.file	"425416.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: <filename> <cycles>\n"
.LC1:
	.string	"open"
	.align 8
.LC2:
	.string	"Writing %d bytes at offset %lu\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, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -228[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	rax, QWORD PTR -240[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -208[rbp], rax
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -224[rbp], eax
	mov	rax, QWORD PTR -208[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -216[rbp], eax
	cmp	DWORD PTR -216[rbp], -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rdx, -192[rbp]
	mov	eax, DWORD PTR -216[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	jmp	.L4
.L7:
	call	rand@PLT
	cdqe
	mov	rcx, QWORD PTR -144[rbp]
	cqo
	idiv	rcx
	mov	rax, rdx
	mov	QWORD PTR -200[rbp], rax
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, -2078209981
	shr	rdx, 32
	add	edx, eax
	sar	edx, 4
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	sal	ecx, 5
	sub	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	lea	eax, 1[rdx]
	mov	DWORD PTR -212[rbp], eax
	mov	DWORD PTR -220[rbp], 0
	jmp	.L5
.L6:
	call	rand@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -220[rbp]
	cdqe
	mov	BYTE PTR -48[rbp+rax], dl
	add	DWORD PTR -220[rbp], 1
.L5:
	mov	eax, DWORD PTR -220[rbp]
	cmp	eax, DWORD PTR -212[rbp]
	jl	.L6
	mov	rcx, QWORD PTR -200[rbp]
	mov	eax, DWORD PTR -216[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	rdx, QWORD PTR -200[rbp]
	mov	eax, DWORD PTR -212[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L4:
	mov	eax, DWORD PTR -224[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -224[rbp], edx
	test	eax, eax
	jne	.L7
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	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	"425416.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: <filename> <cycles>\012\000"
	.align	2
.LC1:
	.ascii	"open\000"
	.global	__aeabi_idivmod
	.align	2
.LC2:
	.ascii	"Writing %d bytes at offset %lu\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-160]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L10+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-164]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-164]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-156]
	mov	r1, #2
	ldr	r0, [fp, #-148]
	bl	open
	str	r0, [fp, #-144]
	ldr	r3, [fp, #-144]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L10+12
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #132
	mov	r1, r3
	ldr	r0, [fp, #-144]
	bl	fstat
	b	.L4
.L7:
	bl	rand
	mov	r2, r0
	ldr	r3, [fp, #-88]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-140]
	bl	rand
	mov	r2, r0
	ldr	r3, .L10+16
	smull	r1, r3, r2, r3
	add	r3, r3, r2
	asr	r1, r3, #4
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #5
	sub	r3, r3, r1
	sub	r1, r2, r3
	add	r3, r1, #1
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L5
.L6:
	bl	rand
	mov	r3, r0
	and	r1, r3, #255
	sub	r2, fp, #40
	ldr	r3, [fp, #-152]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L5:
	ldr	r2, [fp, #-152]
	ldr	r3, [fp, #-136]
	cmp	r2, r3
	blt	.L6
	ldr	r3, [fp, #-140]
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-144]
	bl	lseek
	ldr	r2, [fp, #-140]
	ldr	r1, [fp, #-136]
	ldr	r0, .L10+20
	bl	printf
	ldr	r2, [fp, #-136]
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-144]
	bl	write
.L4:
	ldr	r3, [fp, #-156]
	sub	r2, r3, #1
	str	r2, [fp, #-156]
	cmp	r3, #0
	bne	.L7
	mov	r3, #0
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	-2078209981
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
