	.file	"154022.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Invalid number of arguments supplied %d"
.LC1:
	.string	"Error opening file %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
	push	r15
	push	r14
	push	r13
	push	r12
	sub	rsp, 96
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 2
	jg	.L2
	mov	eax, DWORD PTR -116[rbp]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L2:
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -80[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], -1
	jne	.L3
	mov	rax, QWORD PTR -72[rbp]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, -1
	mov	eax, 0
	call	errx@PLT
.L3:
	mov	rax, QWORD PTR -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], -1
	jne	.L4
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, -1
	mov	eax, 0
	call	errx@PLT
.L4:
	mov	eax, DWORD PTR -100[rbp]
	add	eax, 28
	movsx	rcx, eax
	mov	eax, DWORD PTR -92[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR -88[rbp], 10
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sub	rax, 1
	mov	QWORD PTR -56[rbp], rax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	mov	r14, rax
	mov	r15d, 0
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	mov	r12, rax
	mov	r13d, 0
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L5:
	cmp	rsp, rdx
	je	.L6
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L5
.L6:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L7
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L7:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -48[rbp], rax
	mov	DWORD PTR -84[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -92[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L8:
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	jg	.L9
	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	"154022.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Invalid number of arguments supplied %d\000"
	.align	2
.LC1:
	.ascii	"Error opening file %s\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	cmp	r3, #2
	bgt	.L2
	ldr	r2, [fp, #-56]
	ldr	r1, .L8+4
	mov	r0, #1
	bl	errx
.L2:
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-48]
	ldr	r0, [fp, #-48]
	bl	atoi
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-60]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-36]
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L3
	ldr	r2, [fp, #-40]
	ldr	r1, .L8+8
	mvn	r0, #0
	bl	errx
.L3:
	mov	r1, #1
	ldr	r0, [fp, #-36]
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L4
	ldr	r2, [fp, #-36]
	ldr	r1, .L8+8
	mvn	r0, #0
	bl	errx
.L4:
	ldr	r3, [fp, #-44]
	add	r3, r3, #28
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	lseek
	mov	r3, #10
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-24]
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	ldr	r3, [fp, #-24]
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L5
.L6:
	ldr	r3, [fp, #-12]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-28]
	bl	write
.L5:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L6
	mov	r0, #0
	bl	exit
.L9:
	.align	2
.L8:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
