	.file	"1138237.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"n:"
.LC1:
	.string	"r"
.LC2:
	.string	"head: can't read %s.\n"
.LC3:
	.string	"==> %s <==\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	r12
	push	rbx
	sub	rsp, 32
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 10
	cmp	DWORD PTR -36[rbp], 1
	jle	.L4
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L4
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	add	rax, 1
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L3
	mov	eax, 0
	call	usage
.L3:
	sub	DWORD PTR -36[rbp], 1
	add	QWORD PTR -48[rbp], 8
	jmp	.L4
.L7:
	cmp	ebx, 110
	jne	.L5
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L4
	mov	eax, 0
	call	usage
	jmp	.L4
.L5:
	mov	eax, 0
	call	usage
.L4:
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	lea	rdx, .LC0[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L7
	mov	eax, DWORD PTR optind[rip]
	sub	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR optind[rip]
	cdqe
	sal	rax, 3
	add	QWORD PTR -48[rbp], rax
	mov	DWORD PTR -24[rbp], 1
.L18:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L8
	cmp	DWORD PTR -24[rbp], 0
	jne	.L9
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	freopen@PLT
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	cmp	DWORD PTR -36[rbp], 1
	jle	.L11
	cmp	DWORD PTR -24[rbp], 0
	jne	.L12
	mov	edi, 10
	call	putchar@PLT
.L12:
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L11:
	add	QWORD PTR -48[rbp], 8
.L9:
	mov	r12d, DWORD PTR -20[rbp]
	jmp	.L13
.L16:
	mov	edi, ebx
	call	putchar@PLT
	cmp	eax, 10
	je	.L19
.L14:
	call	getchar@PLT
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L16
	jmp	.L15
.L19:
	nop
.L15:
	sub	r12d, 1
.L13:
	test	r12d, r12d
	jne	.L14
	mov	DWORD PTR -24[rbp], 0
	jmp	.L18
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC4:
	.string	"usage: head [-n line_count] [file ...]\n"
	.text
	.type	usage, @function
usage:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 39
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	usage, .-usage
	.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	"1138237.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"n:\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"head: can't read %s.\012\000"
	.align	2
.LC3:
	.ascii	"==> %s <==\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, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #10
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L4
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L4
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L3
	bl	usage
.L3:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	str	r3, [fp, #-28]
	b	.L4
.L7:
	cmp	r4, #110
	bne	.L5
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L4
	bl	usage
	b	.L4
.L5:
	bl	usage
.L4:
	ldr	r2, .L20+4
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	getopt
	mov	r4, r0
	cmn	r4, #1
	bne	.L7
	ldr	r3, .L20+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, .L20+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	str	r3, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L9
	mov	r0, #0
	bl	exit
.L8:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, .L20+12
	ldr	r2, [r2]
	ldr	r1, .L20+16
	mov	r0, r3
	bl	freopen
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L20+20
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+24
	bl	fprintf
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L11
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L12
	mov	r0, #10
	bl	putchar
.L12:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L20+28
	bl	printf
.L11:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	str	r3, [fp, #-28]
.L9:
	ldr	r5, [fp, #-16]
	b	.L13
.L16:
	mov	r0, r4
	bl	putchar
	mov	r3, r0
	cmp	r3, #10
	beq	.L19
.L14:
	bl	getchar
	mov	r4, r0
	cmn	r4, #1
	bne	.L16
	b	.L15
.L19:
	nop
.L15:
	sub	r5, r5, #1
.L13:
	cmp	r5, #0
	bne	.L14
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L18
.L21:
	.align	2
.L20:
	.word	optarg
	.word	.LC0
	.word	optind
	.word	stdin
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"usage: head [-n line_count] [file ...]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L23
	ldr	r3, [r3]
	mov	r2, #39
	mov	r1, #1
	ldr	r0, .L23+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L24:
	.align	2
.L23:
	.word	stderr
	.word	.LC4
	.size	usage, .-usage
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
