	.file	"307865.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"lseek.out"
.LC1:
	.string	"open(lseek.out) failed"
.LC2:
	.string	"rw"
.LC3:
	.string	"fopen(lseek.out) failed"
	.align 8
.LC4:
	.string	"write() failed to write %zi bytes (wrote %li): "
.LC5:
	.string	""
.LC6:
	.string	"the_stack_data/307865.c"
.LC7:
	.string	"tmp == 0"
	.align 8
.LC8:
	.string	"ftell() failed, we wanted pos %i but got %li: "
	.align 8
.LC9:
	.string	"lseek(%li,%i) failed (wanted %li, got %li): "
	.align 8
.LC10:
	.string	"fseek(%li,%i) failed (wanted 0, got %li): "
.LC11:
	.string	"Success!"
	.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, 2096
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -2064[rbp], 0
	mov	DWORD PTR -2056[rbp], 0
	mov	QWORD PTR -2048[rbp], 1
	mov	DWORD PTR -2040[rbp], 0
	mov	QWORD PTR -2032[rbp], 255
	mov	DWORD PTR -2024[rbp], 0
	mov	edx, 384
	mov	esi, 66
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -2088[rbp], eax
	cmp	DWORD PTR -2088[rbp], -1
	jne	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L2:
	lea	rdi, .LC0[rip]
	call	unlink@PLT
	mov	eax, DWORD PTR -2088[rbp]
	lea	rsi, .LC2[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -2080[rbp], rax
	cmp	QWORD PTR -2080[rbp], 0
	jne	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L4:
	lea	rax, -2016[rbp]
	mov	edx, 2000
	mov	esi, 171
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -2016[rbp]
	mov	eax, DWORD PTR -2088[rbp]
	mov	edx, 2000
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -2072[rbp], rax
	cmp	QWORD PTR -2072[rbp], 2000
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -2072[rbp]
	mov	rcx, rdx
	mov	edx, 2000
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L5:
	mov	rax, QWORD PTR -2080[rbp]
	mov	edx, 0
	mov	esi, 1024
	mov	rdi, rax
	call	fseeko@PLT
	mov	DWORD PTR -2084[rbp], eax
	cmp	DWORD PTR -2084[rbp], 0
	je	.L6
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 49
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	call	__assert_fail@PLT
.L6:
	mov	rax, QWORD PTR -2080[rbp]
	mov	edx, 1
	mov	rsi, -16
	mov	rdi, rax
	call	fseeko@PLT
	mov	DWORD PTR -2084[rbp], eax
	cmp	DWORD PTR -2084[rbp], 0
	je	.L7
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 51
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	call	__assert_fail@PLT
.L7:
	mov	rax, QWORD PTR -2080[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -2072[rbp], rax
	cmp	QWORD PTR -2072[rbp], 1008
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -2072[rbp]
	mov	rcx, rdx
	mov	edx, 1008
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L8:
	mov	DWORD PTR -2092[rbp], 0
	jmp	.L9
.L12:
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2056
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2064
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR -2088[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	QWORD PTR -2072[rbp], rax
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2064
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR -2072[rbp], rax
	je	.L10
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2064
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2056
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2064
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, QWORD PTR -2072[rbp]
	mov	r9, rdi
	mov	r8, rsi
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L10:
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2056
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2064
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -2080[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	cdqe
	mov	QWORD PTR -2072[rbp], rax
	cmp	QWORD PTR -2072[rbp], 0
	je	.L11
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2056
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -2092[rbp]
	cdqe
	sal	rax, 4
	add	rax, rbp
	sub	rax, 2064
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, QWORD PTR -2072[rbp]
	mov	r8, rsi
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L11:
	add	DWORD PTR -2092[rbp], 1
.L9:
	mov	eax, DWORD PTR -2092[rbp]
	cmp	eax, 2
	jbe	.L12
	mov	rax, QWORD PTR -2080[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -2088[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"307865.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"lseek.out\000"
	.align	2
.LC2:
	.ascii	"open(lseek.out) failed\000"
	.align	2
.LC3:
	.ascii	"rw\000"
	.align	2
.LC4:
	.ascii	"fopen(lseek.out) failed\000"
	.align	2
.LC5:
	.ascii	"write() failed to write %zi bytes (wrote %li): \000"
	.align	2
.LC6:
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"the_stack_data/307865.c\000"
	.align	2
.LC8:
	.ascii	"tmp == 0\000"
	.align	2
.LC9:
	.ascii	"ftell() failed, we wanted pos %i but got %li: \000"
	.align	2
.LC10:
	.ascii	"lseek(%li,%i) failed (wanted %li, got %li): \000"
	.align	2
.LC11:
	.ascii	"fseek(%li,%i) failed (wanted 0, got %li): \000"
	.align	2
.LC12:
	.ascii	"Success!\000"
	.align	2
.LC0:
	.word	0
	.word	0
	.word	1
	.word	0
	.word	255
	.word	0
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2048
	sub	sp, sp, #8
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L15+4
	sub	ip, fp, #2016
	sub	ip, ip, #4
	sub	ip, ip, #12
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	mov	r2, #384
	mov	r1, #66
	ldr	r0, .L15+8
	bl	open
	str	r0, [fp, #-2048]
	ldr	r3, [fp, #-2048]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L15+12
	bl	perror
	mov	r3, #1
	b	.L13
.L2:
	ldr	r0, .L15+8
	bl	unlink
	ldr	r1, .L15+16
	ldr	r0, [fp, #-2048]
	bl	fdopen
	str	r0, [fp, #-2044]
	ldr	r3, [fp, #-2044]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L15+20
	bl	perror
	mov	r3, #1
	b	.L13
.L4:
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #2000
	mov	r1, #171
	mov	r0, r3
	bl	memset
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #2000
	mov	r1, r3
	ldr	r0, [fp, #-2048]
	bl	write
	str	r0, [fp, #-2040]
	ldr	r3, [fp, #-2040]
	cmp	r3, #2000
	beq	.L5
	ldr	r3, .L15+24
	ldr	r0, [r3]
	ldr	r3, [fp, #-2040]
	mov	r2, #2000
	ldr	r1, .L15+28
	bl	fprintf
	ldr	r0, .L15+32
	bl	perror
	mov	r3, #1
	b	.L13
.L5:
	mov	r2, #0
	mov	r1, #1024
	ldr	r0, [fp, #-2044]
	bl	fseeko
	str	r0, [fp, #-2036]
	ldr	r3, [fp, #-2036]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L15+36
	mov	r2, #49
	ldr	r1, .L15+40
	ldr	r0, .L15+44
	bl	__assert_fail
.L6:
	mov	r2, #1
	mvn	r1, #15
	ldr	r0, [fp, #-2044]
	bl	fseeko
	str	r0, [fp, #-2036]
	ldr	r3, [fp, #-2036]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L15+36
	mov	r2, #51
	ldr	r1, .L15+40
	ldr	r0, .L15+44
	bl	__assert_fail
.L7:
	ldr	r0, [fp, #-2044]
	bl	ftell
	str	r0, [fp, #-2040]
	ldr	r3, [fp, #-2040]
	cmp	r3, #1008
	beq	.L8
	ldr	r3, .L15+24
	ldr	r0, [r3]
	ldr	r3, [fp, #-2040]
	mov	r2, #1008
	ldr	r1, .L15+48
	bl	fprintf
	ldr	r0, .L15+32
	bl	perror
	mov	r3, #1
	b	.L13
.L8:
	mov	r3, #0
	str	r3, [fp, #-2052]
	b	.L9
.L12:
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-2028]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-2024]
	mov	r2, r3
	ldr	r0, [fp, #-2048]
	bl	lseek
	str	r0, [fp, #-2040]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-2028]
	ldr	r2, [fp, #-2040]
	cmp	r2, r3
	beq	.L10
	ldr	r3, .L15+24
	ldr	r0, [r3]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-2028]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	ip, [r3, #-2024]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-2028]
	ldr	r2, [fp, #-2040]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r1
	ldr	r1, .L15+52
	bl	fprintf
	ldr	r0, .L15+32
	bl	perror
	mov	r3, #1
	b	.L13
.L10:
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-2028]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-2024]
	mov	r2, r3
	ldr	r0, [fp, #-2044]
	bl	fseek
	str	r0, [fp, #-2040]
	ldr	r3, [fp, #-2040]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L15+24
	ldr	r0, [r3]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-2028]
	ldr	r3, [fp, #-2052]
	lsl	r3, r3, #3
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-2024]
	ldr	r3, [fp, #-2040]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L15+56
	bl	fprintf
	ldr	r0, .L15+32
	bl	perror
	mov	r3, #1
	b	.L13
.L11:
	ldr	r3, [fp, #-2052]
	add	r3, r3, #1
	str	r3, [fp, #-2052]
.L9:
	ldr	r3, [fp, #-2052]
	cmp	r3, #2
	bls	.L12
	ldr	r0, [fp, #-2044]
	bl	fclose
	ldr	r0, [fp, #-2048]
	bl	close
	ldr	r0, .L15+60
	bl	puts
	mov	r3, #0
.L13:
	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	.LC13
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	__PRETTY_FUNCTION__.6064
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6064, %object
	.size	__PRETTY_FUNCTION__.6064, 5
__PRETTY_FUNCTION__.6064:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
