	.file	"563800.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Need input the file name."
.LC1:
	.string	"r"
.LC2:
	.string	"Can not open the file."
	.align 8
.LC3:
	.string	"\nFile closed and return value is %d\n"
	.align 8
.LC4:
	.string	"\nThe file %s has %ld characters\n"
	.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, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -32[rbp], 0
	cmp	DWORD PTR -36[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR stdout[rip]
	mov	rsi, rax
	mov	edi, ebx
	call	putc@PLT
	add	QWORD PTR -32[rbp], 1
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L5
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
	.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	"563800.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Need input the file name.\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"Can not open the file.\000"
	.align	2
.LC3:
	.ascii	"\012File closed and return value is %d\012\000"
	.align	2
.LC4:
	.ascii	"\012The file %s has %ld characters\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L6
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L6+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L6+8
	bl	puts
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, .L6+12
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r4
	bl	putc
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L4:
	ldr	r0, [fp, #-16]
	bl	getc
	mov	r4, r0
	cmn	r4, #1
	bne	.L5
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L6+16
	bl	printf
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	mov	r1, r3
	ldr	r0, .L6+20
	bl	printf
	mov	r0, #0
	bl	exit
.L7:
	.align	2
.L6:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	stdout
	.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
