	.file	"873816.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"w+"
.LC1:
	.string	"fopen error"
.LC2:
	.string	"w"
.LC3:
	.string	"file_0"
.LC4:
	.string	"fopen error "
.LC5:
	.string	"test"
	.text
	.globl	main
	.type	main, @function
main:
.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -128[rbp], 1701603686
	mov	WORD PTR -124[rbp], 12383
	mov	BYTE PTR -122[rbp], 0
	mov	DWORD PTR -121[rbp], 1701603686
	mov	WORD PTR -117[rbp], 12639
	mov	BYTE PTR -115[rbp], 0
	mov	DWORD PTR -114[rbp], 1701603686
	mov	WORD PTR -110[rbp], 12895
	mov	BYTE PTR -108[rbp], 0
	mov	DWORD PTR -107[rbp], 1701603686
	mov	WORD PTR -103[rbp], 13151
	mov	BYTE PTR -101[rbp], 0
	mov	DWORD PTR -100[rbp], 1701603686
	mov	WORD PTR -96[rbp], 13407
	mov	BYTE PTR -94[rbp], 0
	mov	DWORD PTR -93[rbp], 1701603686
	mov	WORD PTR -89[rbp], 13663
	mov	BYTE PTR -87[rbp], 0
	mov	DWORD PTR -86[rbp], 1701603686
	mov	WORD PTR -82[rbp], 13919
	mov	BYTE PTR -80[rbp], 0
	mov	DWORD PTR -79[rbp], 1701603686
	mov	WORD PTR -75[rbp], 14175
	mov	BYTE PTR -73[rbp], 0
	mov	DWORD PTR -72[rbp], 1701603686
	mov	WORD PTR -68[rbp], 14431
	mov	BYTE PTR -66[rbp], 0
	mov	DWORD PTR -65[rbp], 1701603686
	mov	WORD PTR -61[rbp], 14687
	mov	BYTE PTR -59[rbp], 0
	mov	DWORD PTR -152[rbp], 0
	jmp	.L2
.L5:
	lea	rcx, -128[rbp]
	mov	eax, DWORD PTR -152[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	add	rax, rcx
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	jne	.L3
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L4
.L3:
	lea	rcx, -128[rbp]
	mov	eax, DWORD PTR -152[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	add	rax, rcx
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	lea	rcx, -128[rbp]
	mov	eax, DWORD PTR -152[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	sub	rax, rdx
	lea	rdi, [rcx+rax]
	mov	rax, QWORD PTR -144[rbp]
	mov	rcx, rax
	mov	edx, 1
	call	fwrite@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L4:
	add	DWORD PTR -152[rbp], 1
.L2:
	cmp	DWORD PTR -152[rbp], 4
	jle	.L5
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	jne	.L6
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L7
.L6:
	movabs	rax, 2338328219631577172
	movabs	rdx, 128038972170337
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -144[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -148[rbp], 0
	jmp	.L8
.L11:
	lea	rsi, .LC2[rip]
	lea	rdi, .LC5[rip]
	call	fopen@PLT
	mov	QWORD PTR -144[rbp], rax
	cmp	QWORD PTR -144[rbp], 0
	je	.L13
	movabs	rax, 2338328219631577172
	movabs	rdx, 128038972170337
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	mov	rdx, QWORD PTR -144[rbp]
	lea	rax, -32[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L10
.L13:
	nop
.L10:
	add	DWORD PTR -148[rbp], 1
.L8:
	cmp	DWORD PTR -148[rbp], 6
	jle	.L11
	mov	eax, 0
.L7:
	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
.LFE0:
	.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	"873816.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"w+\000"
	.align	2
.LC2:
	.ascii	"fopen error\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"file_0\000"
	.align	2
.LC5:
	.ascii	"fopen error \000"
	.align	2
.LC7:
	.ascii	"test\000"
	.align	2
.LC0:
	.ascii	"file_0\000"
	.ascii	"file_1\000"
	.ascii	"file_2\000"
	.ascii	"file_3\000"
	.ascii	"file_4\000"
	.ascii	"file_5\000"
	.ascii	"file_6\000"
	.ascii	"file_7\000"
	.ascii	"file_8\000"
	.ascii	"file_9\000"
	.align	2
.LC6:
	.ascii	"This is a test\000"
	.space	1
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #132
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r2, .L14+4
	sub	r3, fp, #120
	mov	r1, r2
	mov	r2, #70
	mov	r0, r3
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L2
.L5:
	sub	r1, fp, #120
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	add	r3, r1, r3
	ldr	r1, .L14+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L14+12
	bl	puts
	b	.L4
.L3:
	sub	r1, fp, #120
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	add	r4, r1, r3
	sub	r1, fp, #120
	ldr	r2, [fp, #-136]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	add	r3, r1, r3
	mov	r0, r3
	bl	strlen
	mov	r1, r0
	ldr	r3, [fp, #-128]
	mov	r2, #1
	mov	r0, r4
	bl	fwrite
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-128]
	bl	fclose
.L4:
	ldr	r3, [fp, #-136]
	add	r3, r3, #1
	str	r3, [fp, #-136]
.L2:
	ldr	r3, [fp, #-136]
	cmp	r3, #4
	ble	.L5
	ldr	r1, .L14+16
	ldr	r0, .L14+20
	bl	fopen
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L14+24
	bl	puts
	mov	r3, #1
	b	.L7
.L6:
	ldr	r3, .L14+28
	sub	ip, fp, #48
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r3, #16
	strb	r3, [ip]
	mov	r3, #0
	strb	r3, [fp, #-33]
	sub	r3, fp, #48
	mov	r0, r3
	bl	strlen
	mov	r1, r0
	sub	r0, fp, #48
	ldr	r3, [fp, #-128]
	mov	r2, #1
	bl	fwrite
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-128]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-132]
	b	.L8
.L11:
	ldr	r1, .L14+16
	ldr	r0, .L14+32
	bl	fopen
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	beq	.L13
	ldr	r3, .L14+28
	sub	ip, fp, #32
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r3, #16
	strb	r3, [ip]
	mov	r3, #0
	strb	r3, [fp, #-17]
	sub	r3, fp, #32
	mov	r0, r3
	bl	strlen
	mov	r1, r0
	sub	r0, fp, #32
	ldr	r3, [fp, #-128]
	mov	r2, #1
	bl	fwrite
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-128]
	bl	fclose
	b	.L10
.L13:
	nop
.L10:
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L8:
	ldr	r3, [fp, #-132]
	cmp	r3, #6
	ble	.L11
	mov	r3, #0
.L7:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
