	.file	"802345.c"
	.intel_syntax noprefix
	.text
	.globl	bigbufnum
	.data
	.align 4
	.type	bigbufnum, @object
	.size	bigbufnum, 4
bigbufnum:
	.long	1024
	.globl	bigbuf
	.bss
	.align 32
	.type	bigbuf, @object
	.size	bigbuf, 4096
bigbuf:
	.zero	4096
	.text
	.globl	write_buf
	.type	write_buf, @function
write_buf:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	unlink@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	creat@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rdx, bigbuf[rip]
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR bigbufnum[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L3
	mov	eax, DWORD PTR bigbufnum[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, bigbuf[rip]
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	write_buf, .-write_buf
	.section	.rodata
.LC0:
	.string	"test0.txt"
.LC1:
	.string	"failed on bigbuf[%d] = %d\n"
	.text
	.globl	validate_buf
	.type	validate_buf, @function
validate_buf:
.LFB1:
	.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
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR bigbufnum[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	eax, DWORD PTR -8[rbp]
	lea	rsi, bigbuf[rip]
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bigbuf[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -12[rbp], eax
	je	.L6
	mov	eax, DWORD PTR -12[rbp]
	imul	eax, eax, 1000000
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bigbuf[rip]
	mov	eax, DWORD PTR [rdx+rax]
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, bigbuf[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	exit@PLT
.L6:
	add	DWORD PTR -12[rbp], 1
.L5:
	mov	eax, DWORD PTR bigbufnum[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	validate_buf, .-validate_buf
	.section	.rodata
.LC2:
	.string	"test1.txt"
.LC3:
	.string	"test2.txt"
.LC4:
	.string	"work?"
.LC5:
	.string	"worked"
.LC6:
	.string	"Passed"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	lea	rdi, .LC0[rip]
	call	write_buf
	lea	rdi, .LC2[rip]
	call	write_buf
	lea	rdi, .LC3[rip]
	call	write_buf
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
	call	validate_buf
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, -1000
	call	exit@PLT
	.cfi_endproc
.LFE2:
	.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	"802345.c"
	.text
	.global	bigbufnum
	.data
	.align	2
	.type	bigbufnum, %object
	.size	bigbufnum, 4
bigbufnum:
	.word	1024
	.comm	bigbuf,4096,4
	.text
	.align	2
	.global	write_buf
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_buf, %function
write_buf:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	unlink
	ldr	r0, [fp, #-16]
	bl	creat
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r1, .L4
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L4+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L3
	ldr	r3, .L4+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, .L4
	ldr	r0, [fp, #-8]
	bl	write
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	bigbuf
	.word	bigbufnum
	.size	write_buf, .-write_buf
	.section	.rodata
	.align	2
.LC0:
	.ascii	"test0.txt\000"
	.align	2
.LC1:
	.ascii	"failed on bigbuf[%d] = %d\012\000"
	.text
	.align	2
	.global	validate_buf
	.syntax unified
	.arm
	.fpu softvfp
	.type	validate_buf, %function
validate_buf:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r0, .L10
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r1, .L10+8
	ldr	r0, [fp, #-12]
	bl	read
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L7
.L9:
	ldr	r2, .L10+8
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	beq	.L8
	ldr	r1, [fp, #-16]
	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
	str	r3, [fp, #-8]
	ldr	r2, .L10+8
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r2, .L10+8
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, .L10+12
	bl	printf
	ldr	r0, [fp, #-8]
	bl	exit
.L8:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L7:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L9
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	bigbufnum
	.word	bigbuf
	.word	.LC1
	.size	validate_buf, .-validate_buf
	.section	.rodata
	.align	2
.LC2:
	.ascii	"test1.txt\000"
	.align	2
.LC3:
	.ascii	"test2.txt\000"
	.align	2
.LC4:
	.ascii	"work?\000"
	.align	2
.LC5:
	.ascii	"worked\000"
	.align	2
.LC6:
	.ascii	"Passed\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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	r0, .L13
	bl	write_buf
	ldr	r0, .L13+4
	bl	write_buf
	ldr	r0, .L13+8
	bl	write_buf
	ldr	r0, .L13+12
	bl	puts
	bl	validate_buf
	ldr	r0, .L13+16
	bl	puts
	ldr	r0, .L13+20
	bl	puts
	ldr	r0, .L13+24
	bl	exit
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	-1000
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
