	.file	"643003.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Provide the name of the file."
.LC1:
	.string	"Cannot create or open file"
.LC2:
	.string	"%d\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
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -52[rbp], 1
	je	.L2
	lea	rdi, .LC0[rip]
	call	print
	mov	eax, 1
	jmp	.L9
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 420
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	print
	mov	eax, 1
	jmp	.L9
.L4:
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	BYTE PTR -41[rbp], 1
	mov	BYTE PTR -43[rbp], 1
	mov	BYTE PTR -42[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -40[rbp], 1
	jmp	.L5
.L8:
	cmp	BYTE PTR -43[rbp], 0
	je	.L6
	movzx	eax, BYTE PTR -9[rbp]
	movsx	eax, al
	mov	edi, eax
	call	isDigit
	test	al, al
	je	.L7
	mov	BYTE PTR -42[rbp], 1
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	movzx	eax, BYTE PTR -9[rbp]
	movsx	eax, al
	sub	eax, 48
	add	eax, edx
	mov	DWORD PTR -16[rbp], eax
	add	DWORD PTR -40[rbp], 1
	jmp	.L6
.L7:
	movzx	eax, BYTE PTR -9[rbp]
	movsx	eax, al
	mov	edi, eax
	call	isDigit
	xor	eax, 1
	test	al, al
	je	.L6
	cmp	BYTE PTR -42[rbp], 0
	je	.L6
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -40[rbp]
	neg	eax
	movsx	rcx, eax
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	movsx	rdx, eax
	lea	rcx, -16[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	BYTE PTR -43[rbp], 0
.L6:
	movzx	eax, BYTE PTR -9[rbp]
	cmp	al, 10
	jne	.L5
	mov	BYTE PTR -43[rbp], 1
	mov	BYTE PTR -42[rbp], 0
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -16[rbp], 0
.L5:
	lea	rcx, -9[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jg	.L8
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L9:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	print
	.type	print, @function
print:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print, .-print
	.globl	isDigit
	.type	isDigit, @function
isDigit:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	cmp	BYTE PTR -4[rbp], 47
	jle	.L13
	cmp	BYTE PTR -4[rbp], 57
	jg	.L13
	mov	eax, 1
	jmp	.L14
.L13:
	mov	eax, 0
.L14:
	and	eax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	isDigit, .-isDigit
	.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	"643003.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Provide the name of the file.\000"
	.align	2
.LC1:
	.ascii	"Cannot create or open file\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	beq	.L2
	ldr	r0, .L11+4
	bl	print
	mov	r3, #1
	b	.L9
.L2:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #420
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L11+8
	bl	print
	mov	r3, #1
	b	.L9
.L4:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #1
	strb	r3, [fp, #-33]
	mov	r3, #1
	strb	r3, [fp, #-35]
	mov	r3, #0
	strb	r3, [fp, #-34]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-32]
	b	.L5
.L8:
	ldrb	r3, [fp, #-35]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L6
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	mov	r0, r3
	bl	isDigit
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	mov	r3, #1
	strb	r3, [fp, #-34]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L6
.L7:
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	mov	r0, r3
	bl	isDigit
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L6
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L11+12
	bl	printf
	ldr	r1, [fp, #-32]
	ldr	r0, .L11+12
	bl	printf
	ldr	r3, [fp, #-32]
	rsb	r3, r3, #0
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	lseek
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	mov	r2, r3
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	write
	mov	r3, #0
	strb	r3, [fp, #-35]
.L6:
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L5
	mov	r3, #1
	strb	r3, [fp, #-35]
	mov	r3, #0
	strb	r3, [fp, #-34]
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
.L5:
	sub	r3, fp, #12
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L8
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, #0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-8]
	mov	r0, #1
	bl	write
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	print, .-print
	.align	2
	.global	isDigit
	.syntax unified
	.arm
	.fpu softvfp
	.type	isDigit, %function
isDigit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L15
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L15
	mov	r3, #1
	b	.L16
.L15:
	mov	r3, #0
.L16:
	and	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isDigit, .-isDigit
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
