	.file	"343582.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"This seems to have worked"
.LC1:
	.string	"the_stack_data/343582.c"
	.align 8
.LC2:
	.string	"total_write_len == strlen(str)"
.LC3:
	.string	"hello"
.LC4:
	.string	"open"
.LC5:
	.string	"Source file empty"
.LC6:
	.string	"Source file content: \"%s\"\n"
	.align 8
.LC7:
	.string	"Writev start position: %d, length: %d\n"
	.align 8
.LC8:
	.string	"Written bytes number %ld is not equal to expected %d"
	.align 8
.LC9:
	.string	"File offset at the end of writev is not correct: expected %d != actual %d\n"
	.align 8
.LC10:
	.string	"read fail: expecting %d bytes, rv: %ld \n"
.LC11:
	.string	"write fail: string mismatch"
.LC12:
	.string	"Expected: \"%s\", actual: \"%s\"\n"
.LC13:
	.string	"write test passed"
	.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, 392
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movabs	rax, 7306372553690933332
	mov	QWORD PTR -300[rbp], rax
	mov	DWORD PTR -292[rbp], 2126701
	movabs	rax, 2334402142592331636
	mov	QWORD PTR -309[rbp], rax
	mov	BYTE PTR -301[rbp], 0
	mov	DWORD PTR -316[rbp], 1802661751
	mov	WORD PTR -312[rbp], 25701
	mov	BYTE PTR -310[rbp], 0
	lea	rax, .LC0[rip]
	mov	QWORD PTR -384[rbp], rax
	lea	rax, -300[rbp]
	mov	QWORD PTR -368[rbp], rax
	lea	rax, -300[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -360[rbp], rax
	lea	rax, -309[rbp]
	mov	QWORD PTR -352[rbp], rax
	lea	rax, -309[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -344[rbp], rax
	lea	rax, -316[rbp]
	mov	QWORD PTR -336[rbp], rax
	lea	rax, -316[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -328[rbp], rax
	mov	rax, QWORD PTR -360[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -344[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -328[rbp]
	add	eax, edx
	mov	DWORD PTR -400[rbp], eax
	mov	eax, DWORD PTR -400[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	je	.L2
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 45
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L2:
	mov	esi, 2
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -396[rbp], eax
	cmp	DWORD PTR -396[rbp], 0
	jns	.L3
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -396[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -376[rbp], rax
	cmp	QWORD PTR -376[rbp], 0
	jne	.L4
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L5
.L4:
	lea	rdx, -288[rbp]
	mov	rax, QWORD PTR -376[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -288[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	mov	DWORD PTR -392[rbp], 10
	mov	eax, DWORD PTR -392[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -396[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -376[rbp], rax
	mov	edx, DWORD PTR -400[rbp]
	mov	eax, DWORD PTR -392[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rcx, -368[rbp]
	mov	eax, DWORD PTR -396[rbp]
	mov	edx, 3
	mov	rsi, rcx
	mov	edi, eax
	call	writev@PLT
	mov	QWORD PTR -376[rbp], rax
	mov	eax, DWORD PTR -400[rbp]
	cdqe
	cmp	QWORD PTR -376[rbp], rax
	je	.L6
	mov	edx, DWORD PTR -400[rbp]
	mov	rax, QWORD PTR -376[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -396[rbp]
	mov	edx, 1
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR -388[rbp], eax
	mov	edx, DWORD PTR -392[rbp]
	mov	eax, DWORD PTR -400[rbp]
	add	eax, edx
	cmp	DWORD PTR -388[rbp], eax
	je	.L7
	mov	edx, DWORD PTR -392[rbp]
	mov	eax, DWORD PTR -400[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -388[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -392[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -396[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -376[rbp], rax
	lea	rax, -288[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -400[rbp]
	movsx	rdx, eax
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -396[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -376[rbp], rax
	mov	eax, DWORD PTR -400[rbp]
	cdqe
	cmp	QWORD PTR -376[rbp], rax
	je	.L8
	mov	rdx, QWORD PTR -376[rbp]
	mov	eax, DWORD PTR -400[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -384[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -288[rbp]
	mov	rax, QWORD PTR -384[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L9
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rdx, -288[rbp]
	mov	rax, QWORD PTR -376[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rdx, -288[rbp]
	mov	rax, QWORD PTR -384[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -396[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"343582.c"
	.text
	.section	.rodata
	.align	2
.LC3:
	.ascii	"This seems to have worked\000"
	.align	2
.LC4:
	.ascii	"the_stack_data/343582.c\000"
	.align	2
.LC5:
	.ascii	"total_write_len == strlen(str)\000"
	.align	2
.LC6:
	.ascii	"hello\000"
	.align	2
.LC7:
	.ascii	"open\000"
	.align	2
.LC8:
	.ascii	"Source file empty\000"
	.align	2
.LC9:
	.ascii	"Source file content: \"%s\"\012\000"
	.align	2
.LC10:
	.ascii	"Writev start position: %d, length: %d\012\000"
	.align	2
.LC11:
	.ascii	"Written bytes number %ld is not equal to expected %"
	.ascii	"d\000"
	.align	2
.LC12:
	.ascii	"File offset at the end of writev is not correct: ex"
	.ascii	"pected %d != actual %d\012\000"
	.align	2
.LC13:
	.ascii	"read fail: expecting %d bytes, rv: %ld \012\000"
	.align	2
.LC14:
	.ascii	"write fail: string mismatch\000"
	.align	2
.LC15:
	.ascii	"Expected: \"%s\", actual: \"%s\"\012\000"
	.align	2
.LC16:
	.ascii	"write test passed\000"
	.align	2
.LC0:
	.ascii	"This seems \000"
	.align	2
.LC1:
	.ascii	"to have \000"
	.align	2
.LC2:
	.ascii	"worked\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 344
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #344
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L12+4
	sub	r3, fp, #276
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r2, .L12+8
	sub	r3, fp, #288
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strb	r2, [r3]
	ldr	r2, .L12+12
	sub	r3, fp, #296
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strh	r1, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r1, #16
	strb	r2, [r3]
	ldr	r3, .L12+16
	str	r3, [fp, #-344]
	sub	r3, fp, #276
	str	r3, [fp, #-320]
	sub	r3, fp, #276
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-316]
	sub	r3, fp, #288
	str	r3, [fp, #-312]
	sub	r3, fp, #288
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-308]
	sub	r3, fp, #296
	str	r3, [fp, #-304]
	sub	r3, fp, #296
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-300]
	ldr	r2, [fp, #-316]
	ldr	r3, [fp, #-308]
	add	r2, r2, r3
	ldr	r3, [fp, #-300]
	add	r3, r2, r3
	str	r3, [fp, #-340]
	ldr	r0, [fp, #-344]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-340]
	cmp	r2, r3
	beq	.L2
	ldr	r3, .L12+20
	mov	r2, #45
	ldr	r1, .L12+24
	ldr	r0, .L12+28
	bl	__assert_fail
.L2:
	mov	r1, #2
	ldr	r0, .L12+32
	bl	open
	str	r0, [fp, #-336]
	ldr	r3, [fp, #-336]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L12+36
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, r3
	ldr	r0, [fp, #-336]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-332]
	ldr	r3, [fp, #-332]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L12+40
	bl	puts
	b	.L5
.L4:
	sub	r2, fp, #264
	ldr	r3, [fp, #-332]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L12+44
	bl	printf
.L5:
	mov	r3, #10
	str	r3, [fp, #-328]
	mov	r2, #0
	ldr	r1, [fp, #-328]
	ldr	r0, [fp, #-336]
	bl	lseek
	mov	r3, r0
	str	r3, [fp, #-332]
	ldr	r2, [fp, #-340]
	ldr	r1, [fp, #-328]
	ldr	r0, .L12+48
	bl	printf
	sub	r3, fp, #320
	mov	r2, #3
	mov	r1, r3
	ldr	r0, [fp, #-336]
	bl	writev
	mov	r3, r0
	str	r3, [fp, #-332]
	ldr	r3, [fp, #-340]
	ldr	r2, [fp, #-332]
	cmp	r2, r3
	beq	.L6
	ldr	r2, [fp, #-340]
	ldr	r1, [fp, #-332]
	ldr	r0, .L12+52
	bl	printf
	mov	r0, #1
	bl	exit
.L6:
	mov	r2, #1
	mov	r1, #0
	ldr	r0, [fp, #-336]
	bl	lseek
	str	r0, [fp, #-324]
	ldr	r2, [fp, #-328]
	ldr	r3, [fp, #-340]
	add	r3, r2, r3
	ldr	r2, [fp, #-324]
	cmp	r2, r3
	beq	.L7
	ldr	r2, [fp, #-328]
	ldr	r3, [fp, #-340]
	add	r3, r2, r3
	ldr	r2, [fp, #-324]
	mov	r1, r3
	ldr	r0, .L12+56
	bl	printf
	mov	r0, #1
	bl	exit
.L7:
	mov	r2, #0
	ldr	r1, [fp, #-328]
	ldr	r0, [fp, #-336]
	bl	lseek
	mov	r3, r0
	str	r3, [fp, #-332]
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r2, [fp, #-340]
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-336]
	bl	read
	mov	r3, r0
	str	r3, [fp, #-332]
	ldr	r3, [fp, #-340]
	ldr	r2, [fp, #-332]
	cmp	r2, r3
	beq	.L8
	ldr	r2, [fp, #-332]
	ldr	r1, [fp, #-340]
	ldr	r0, .L12+60
	bl	printf
	mov	r0, #1
	bl	exit
.L8:
	ldr	r0, [fp, #-344]
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-344]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r0, .L12+64
	bl	puts
	sub	r2, fp, #264
	ldr	r3, [fp, #-332]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #264
	mov	r2, r3
	ldr	r1, [fp, #-344]
	ldr	r0, .L12+68
	bl	printf
	mov	r0, #1
	bl	exit
.L9:
	ldr	r0, [fp, #-336]
	bl	close
	ldr	r0, .L12+72
	bl	puts
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC17
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	__PRETTY_FUNCTION__.5992
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5992, %object
	.size	__PRETTY_FUNCTION__.5992, 5
__PRETTY_FUNCTION__.5992:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
