	.file	"43888208.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: %s [-n LINES] [file...]\n"
.LC1:
	.string	"n:"
.LC2:
	.string	"r"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -16[rbp], 10
	jmp	.L2
.L4:
	cmp	DWORD PTR -20[rbp], 63
	je	.L3
	cmp	DWORD PTR -20[rbp], 110
	jne	.L2
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR -16[rbp], rax
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	lea	rdx, .LC1[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L4
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -36[rbp], eax
	jne	.L5
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	do_head
	jmp	.L6
.L5:
	mov	eax, DWORD PTR optind[rip]
	mov	DWORD PTR -24[rbp], eax
	jmp	.L7
.L9:
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L8
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	do_head
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	add	DWORD PTR -24[rbp], 1
.L7:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L9
.L6:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.type	do_head, @function
do_head:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	cmp	QWORD PTR -32[rbp], 0
	jle	.L16
	jmp	.L13
.L15:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	putchar@PLT
	test	eax, eax
	jns	.L14
	mov	edi, 1
	call	exit@PLT
.L14:
	cmp	DWORD PTR -4[rbp], 10
	jne	.L13
	sub	QWORD PTR -32[rbp], 1
	cmp	QWORD PTR -32[rbp], 0
	je	.L17
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L15
	jmp	.L10
.L16:
	nop
	jmp	.L10
.L17:
	nop
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	do_head, .-do_head
	.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	"43888208.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s [-n LINES] [file...]\012\000"
	.align	2
.LC1:
	.ascii	"n:\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #10
	str	r3, [fp, #-20]
	b	.L2
.L4:
	ldr	r3, [fp, #-12]
	cmp	r3, #63
	beq	.L3
	ldr	r3, [fp, #-12]
	cmp	r3, #110
	bne	.L2
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-20]
	b	.L2
.L3:
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L10+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r2, .L10+12
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	getopt
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L10+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bne	.L5
	ldr	r3, .L10+20
	ldr	r3, [r3]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	do_head
	b	.L6
.L5:
	ldr	r3, .L10+16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L7
.L9:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L10+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	do_head
	ldr	r0, [fp, #-8]
	bl	fclose
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L7:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L9
.L6:
	mov	r0, #0
	bl	exit
.L11:
	.align	2
.L10:
	.word	optarg
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	optind
	.word	stdin
	.word	.LC2
	.size	main, .-main
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_head, %function
do_head:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L18
	b	.L15
.L17:
	ldr	r0, [fp, #-8]
	bl	putchar
	mov	r3, r0
	cmp	r3, #0
	bge	.L16
	mov	r0, #1
	bl	exit
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L15
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L19
.L15:
	ldr	r0, [fp, #-16]
	bl	getc
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L17
	b	.L12
.L18:
	nop
	b	.L12
.L19:
	nop
.L12:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	do_head, .-do_head
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
