	.file	"380214.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"file: %s\n"
.LC1:
	.string	"open"
.LC2:
	.string	"write"
.LC3:
	.string	"%s"
	.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, 240
	mov	DWORD PTR -228[rbp], edi
	mov	QWORD PTR -240[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -220[rbp], 0
	mov	DWORD PTR -216[rbp], 0
	mov	DWORD PTR -212[rbp], 0
	cmp	DWORD PTR -228[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -240[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -208[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L3
.L2:
	lea	rax, -208[rbp]
	movabs	rcx, 8315180034107995183
	mov	QWORD PTR [rax], rcx
	mov	DWORD PTR 8[rax], 1836330612
	mov	WORD PTR 12[rax], 112
.L3:
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -208[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -212[rbp], eax
	cmp	DWORD PTR -212[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L10
.L4:
	mov	DWORD PTR -216[rbp], 0
	jmp	.L6
.L9:
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -212[rbp]
	mov	edx, 127
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L7
	lea	rdi, .LC2[rip]
	call	perror@PLT
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -220[rbp]
	cdqe
	mov	BYTE PTR -144[rbp+rax], 0
	lea	rax, -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
	add	DWORD PTR -216[rbp], 1
.L6:
	cmp	DWORD PTR -216[rbp], 599
	jle	.L9
.L8:
	mov	eax, DWORD PTR -212[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -220[rbp]
.L10:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"380214.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/tmp/test.tmp\000"
	.align	2
.LC1:
	.ascii	"file: %s\012\000"
	.align	2
.LC2:
	.ascii	"open\000"
	.align	2
.LC3:
	.ascii	"write\000"
	.align	2
.LC4:
	.ascii	"%s\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 = 216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #216
	str	r0, [fp, #-216]
	str	r1, [fp, #-220]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-212]
	mov	r3, #0
	str	r3, [fp, #-208]
	mov	r3, #0
	str	r3, [fp, #-204]
	ldr	r3, [fp, #-216]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-220]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #200
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L3
.L2:
	sub	r3, fp, #200
	ldr	r2, .L12+4
	mov	ip, r3
	mov	r3, r2
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
.L3:
	sub	r3, fp, #200
	mov	r1, r3
	ldr	r0, .L12+8
	bl	printf
	sub	r3, fp, #200
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-204]
	ldr	r3, [fp, #-204]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L12+12
	bl	perror
	mov	r3, #1
	b	.L10
.L4:
	mov	r3, #0
	str	r3, [fp, #-208]
	b	.L6
.L9:
	sub	r3, fp, #136
	mov	r2, #127
	mov	r1, r3
	ldr	r0, [fp, #-204]
	bl	read
	str	r0, [fp, #-212]
	ldr	r3, [fp, #-212]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L12+16
	bl	perror
	b	.L8
.L7:
	sub	r2, fp, #136
	ldr	r3, [fp, #-212]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, .L12+20
	bl	printf
	mov	r0, #1
	bl	sleep
	ldr	r3, [fp, #-208]
	add	r3, r3, #1
	str	r3, [fp, #-208]
.L6:
	ldr	r3, [fp, #-208]
	cmp	r3, #600
	blt	.L9
.L8:
	ldr	r0, [fp, #-204]
	bl	close
	ldr	r3, [fp, #-212]
.L10:
	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	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.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
