	.file	"84384.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Couldn't read stdin.\n"
.LC1:
	.string	"%lu "
.LC2:
	.string	"%s"
.LC3:
	.string	"head"
.LC4:
	.string	"head input was too small\n"
.LC5:
	.string	"surprise!\n"
	.align 8
.LC6:
	.string	"Usage: %s\nText utility - accepts commands on stdin and prints results to stdout:\n"
.LC7:
	.string	"\tInput           | Output\n"
	.align 8
.LC8:
	.string	"\t----------------+-----------------------\n"
	.align 8
.LC9:
	.string	"\tec<string>      | <string> (simple echo)\n"
	.align 8
.LC10:
	.string	"\thead<N><string> | The first <N> bytes of <string>\n"
	.align 8
.LC11:
	.string	"\tc<string>       | The length of <string>, followed by <string>\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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	lea	rax, -112[rbp]
	mov	edx, 100
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	test	rax, rax
	jns	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
.L2:
	movzx	eax, BYTE PTR -112[rbp]
	cmp	al, 99
	jne	.L3
	mov	edi, 102
	call	malloc@PLT
	mov	QWORD PTR -120[rbp], rax
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -120[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -112[rbp]
	add	rax, 1
	mov	rdx, QWORD PTR -120[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcat@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L4
.L3:
	movzx	eax, BYTE PTR -112[rbp]
	cmp	al, 101
	jne	.L5
	movzx	eax, BYTE PTR -111[rbp]
	cmp	al, 99
	jne	.L5
	lea	rax, -112[rbp]
	add	rax, 2
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L5:
	lea	rax, -112[rbp]
	mov	edx, 4
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L6
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 5
	jbe	.L7
	movzx	eax, BYTE PTR -108[rbp]
	movsx	eax, al
	cdqe
	mov	BYTE PTR -112[rbp+rax], 0
	lea	rax, -112[rbp]
	add	rax, 4
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	jmp	.L4
.L6:
	lea	rax, -112[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	mov	eax, 1
	mov	BYTE PTR [rax], 2
	jmp	.L4
.L8:
	mov	rax, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 42
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 42
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 51
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 64
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
.L4:
	mov	eax, 0
	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
	.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	"84384.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Couldn't read stdin.\012\000"
	.align	2
.LC1:
	.ascii	"%lu \000"
	.align	2
.LC2:
	.ascii	"%s\000"
	.align	2
.LC3:
	.ascii	"head\000"
	.align	2
.LC4:
	.ascii	"head input was too small\012\000"
	.align	2
.LC5:
	.ascii	"surprise!\012\000"
	.align	2
.LC6:
	.ascii	"Usage: %s\012Text utility - accepts commands on std"
	.ascii	"in and prints results to stdout:\012\000"
	.align	2
.LC7:
	.ascii	"\011Input           | Output\012\000"
	.align	2
.LC8:
	.ascii	"\011----------------+-----------------------\012\000"
	.align	2
.LC9:
	.ascii	"\011ec<string>      | <string> (simple echo)\012\000"
	.align	2
.LC10:
	.ascii	"\011head<N><string> | The first <N> bytes of <strin"
	.ascii	"g>\012\000"
	.align	2
.LC11:
	.ascii	"\011c<string>       | The length of <string>, follo"
	.ascii	"wed by <string>\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-108]
	sub	r3, fp, #104
	mov	r2, #96
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L11+8
	bl	fwrite
.L2:
	ldrb	r3, [fp, #-108]	@ zero_extendqisi2
	cmp	r3, #99
	bne	.L3
	mov	r0, #102
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-112]
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L11+12
	ldr	r0, [fp, #-112]
	bl	sprintf
	sub	r3, fp, #108
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	strcat
	ldr	r1, [fp, #-112]
	ldr	r0, .L11+16
	bl	printf
	ldr	r0, [fp, #-112]
	bl	free
	b	.L4
.L3:
	ldrb	r3, [fp, #-108]	@ zero_extendqisi2
	cmp	r3, #101
	bne	.L5
	ldrb	r3, [fp, #-107]	@ zero_extendqisi2
	cmp	r3, #99
	bne	.L5
	sub	r3, fp, #108
	add	r3, r3, #2
	mov	r0, r3
	bl	printf
	b	.L4
.L5:
	sub	r3, fp, #108
	mov	r2, #4
	ldr	r1, .L11+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	sub	r3, fp, #108
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #5
	bls	.L7
	ldrb	r3, [fp, #-104]	@ zero_extendqisi2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-104]
	sub	r3, fp, #108
	add	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L11+16
	bl	printf
	b	.L4
.L7:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L11+24
	bl	fwrite
	b	.L4
.L6:
	sub	r3, fp, #108
	ldr	r1, .L11+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	mov	r3, #1
	mov	r2, #2
	strb	r2, [r3]
	b	.L4
.L8:
	ldr	r3, .L11+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L11+32
	bl	fprintf
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L11+36
	bl	fwrite
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #42
	mov	r1, #1
	ldr	r0, .L11+40
	bl	fwrite
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #42
	mov	r1, #1
	ldr	r0, .L11+44
	bl	fwrite
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #51
	mov	r1, #1
	ldr	r0, .L11+48
	bl	fwrite
	ldr	r3, .L11+4
	ldr	r3, [r3]
	mov	r2, #64
	mov	r1, #1
	ldr	r0, .L11+52
	bl	fwrite
.L4:
	mov	r3, #0
	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	.LC12
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
