	.file	"793339.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	FILE_DESCRIPTOR, @object
	.size	FILE_DESCRIPTOR, 4
FILE_DESCRIPTOR:
	.long	-1
	.section	.rodata
.LC0:
	.string	"%s Error\n"
	.text
	.globl	check_io_error
	.type	check_io_error, @function
check_io_error:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], -1
	jne	.L2
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR FILE_DESCRIPTOR[rip]
	cmp	eax, -1
	je	.L3
	mov	eax, DWORD PTR FILE_DESCRIPTOR[rip]
	mov	edi, eax
	call	close@PLT
.L3:
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR FILE_DESCRIPTOR[rip]
	cmp	eax, -1
	jne	.L5
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR FILE_DESCRIPTOR[rip], eax
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	check_io_error, .-check_io_error
	.section	.rodata
.LC1:
	.string	"testfile"
.LC2:
	.string	"File Open"
.LC3:
	.string	"File Write"
.LC4:
	.string	"Random Write took %lld \302\265s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -96[rbp], 4096
	mov	DWORD PTR -92[rbp], 25600
	mov	QWORD PTR -80[rbp], 0
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	mov	rdi, rax
	call	valloc@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	eax, DWORD PTR -92[rbp]
	cdqe
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -104[rbp], 0
	jmp	.L7
.L8:
	call	rand@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	cdq
	idiv	DWORD PTR -96[rbp]
	mov	ecx, edx
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -84[rbp]
	sub	edx, ecx
	mov	DWORD PTR [rax], edx
	add	DWORD PTR -104[rbp], 1
.L7:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jl	.L8
	mov	edx, 448
	mov	esi, 1
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	lea	rsi, .LC2[rip]
	mov	edi, eax
	call	check_io_error
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	DWORD PTR -100[rbp], 0
	jmp	.L9
.L10:
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	movsx	rcx, eax
	mov	eax, DWORD PTR FILE_DESCRIPTOR[rip]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	eax, DWORD PTR -96[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR FILE_DESCRIPTOR[rip]
	mov	rcx, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -80[rbp], rax
	add	DWORD PTR -100[rbp], 1
.L9:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jl	.L10
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	check_io_error
	mov	eax, DWORD PTR FILE_DESCRIPTOR[rip]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	imul	rdx, rax, 1000000
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	sub	rax, rcx
	add	rax, rdx
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"793339.c"
	.text
	.data
	.align	2
	.type	FILE_DESCRIPTOR, %object
	.size	FILE_DESCRIPTOR, 4
FILE_DESCRIPTOR:
	.word	-1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s Error\012\000"
	.text
	.align	2
	.global	check_io_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_io_error, %function
check_io_error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L2
	ldr	r1, [fp, #-12]
	ldr	r0, .L6
	bl	printf
	ldr	r3, .L6+4
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L3
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L3:
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, .L6+4
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L5
	ldr	r2, .L6+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
.L5:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	FILE_DESCRIPTOR
	.size	check_io_error, .-check_io_error
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC1:
	.ascii	"testfile\000"
	.align	2
.LC2:
	.ascii	"File Open\000"
	.align	2
.LC3:
	.ascii	"File Write\000"
	.align	2
.LC4:
	.ascii	"Random Write took %lld \302\265s\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #4096
	str	r3, [fp, #-60]
	mov	r3, #25600
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-60]
	mov	r0, r3
	bl	valloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L9
.L10:
	bl	rand
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	ldr	r1, [fp, #-60]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r1, r3
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	sub	r2, r2, r1
	str	r2, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L9:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L10
	mov	r2, #448
	mov	r1, #1
	ldr	r0, .L15+4
	bl	open
	str	r0, [fp, #-44]
	ldr	r1, .L15+8
	ldr	r0, [fp, #-44]
	bl	check_io_error
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L11
.L12:
	ldr	r3, .L15+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-64]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, r3
	bl	lseek
	ldr	r3, .L15+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	write
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L11:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	blt	.L12
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r1, .L15+16
	ldr	r0, [fp, #-72]
	bl	check_io_error
	ldr	r3, .L15+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r0, [fp, #-52]
	bl	free
	ldr	r0, [fp, #-48]
	bl	free
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	mov	r1, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	add	r3, r1, r3
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r0, .L15+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC5
	.word	.LC1
	.word	.LC2
	.word	FILE_DESCRIPTOR
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
