	.file	"228578.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"u "
	.align 8
.LC1:
	.string	"Specified length %d was larger than the input!\n"
.LC2:
	.string	"Failed to allocate memory"
.LC3:
	.string	"%s"
.LC4:
	.string	"head "
.LC5:
	.string	"head input was too small\n"
.LC6:
	.string	"surprise!\n"
	.text
	.globl	process
	.type	process, @function
process:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 2
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, 2[rax]
	lea	rax, -40[rbp]
	mov	edx, 10
	mov	rsi, rax
	mov	rdi, rcx
	call	strtol@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -44[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	DWORD PTR -44[rbp], eax
	jle	.L3
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L13
.L3:
	cmp	QWORD PTR -32[rbp], 0
	jne	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L13
.L5:
	mov	DWORD PTR -48[rbp], 0
	jmp	.L6
.L7:
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	lea	ecx, -32[rax]
	mov	eax, DWORD PTR -48[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -48[rbp], 1
.L6:
	mov	eax, DWORD PTR -48[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jne	.L7
	mov	eax, DWORD PTR -44[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L8
.L2:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, 5
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L10
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 6
	jbe	.L11
	mov	rax, QWORD PTR -56[rbp]
	lea	rcx, 4[rax]
	lea	rax, -40[rbp]
	mov	edx, 10
	mov	rsi, rax
	mov	rdi, rcx
	call	strtol@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L8
.L11:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	jmp	.L8
.L10:
	mov	rax, QWORD PTR -56[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	mov	eax, 1
	mov	BYTE PTR [rax], 2
	jmp	.L8
.L12:
	mov	eax, 1
	jmp	.L13
.L8:
	mov	eax, 0
.L13:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	process, .-process
	.section	.rodata
	.align 8
.LC7:
	.ascii	"Usage: %s\nText utility - accepts com"
	.string	"mands and data on stdin and prints results to stdout.\n\tInput             | Output\n\t------------------+-----------------------\n\tu <N> <string>    | Uppercased version of the first <N> bytes of <string>.\n\thead <N> <string> | The first <N> bytes of <string>.\n"
.LC8:
	.string	"Couldn't read stdin.\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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
	lea	rax, .LC7[rip]
	mov	QWORD PTR -120[rbp], rax
	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	.L16
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
.L16:
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	process
	mov	DWORD PTR -124[rbp], eax
	cmp	DWORD PTR -124[rbp], 0
	je	.L17
	mov	rax, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -120[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L17:
	mov	eax, DWORD PTR -124[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"228578.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"u \000"
	.align	2
.LC1:
	.ascii	"Specified length %d was larger than the input!\012\000"
	.align	2
.LC2:
	.ascii	"Failed to allocate memory\000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.align	2
.LC4:
	.ascii	"head \000"
	.align	2
.LC5:
	.ascii	"head input was too small\012\000"
	.align	2
.LC6:
	.ascii	"surprise!\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	process
	.syntax unified
	.arm
	.fpu softvfp
	.type	process, %function
process:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #2
	ldr	r1, .L15+4
	ldr	r0, [fp, #-32]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-32]
	add	r3, r3, #2
	sub	r1, fp, #24
	mov	r2, #10
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	ble	.L3
	ldr	r1, [fp, #-16]
	ldr	r0, .L15+8
	bl	printf
	mov	r3, #1
	b	.L13
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L15+12
	bl	puts
	mov	r3, #1
	b	.L13
.L5:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L6
.L7:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-12]
	add	r3, r1, r3
	sub	r2, r2, #32
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bne	.L7
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	strcat
	ldr	r1, [fp, #-12]
	ldr	r0, .L15+16
	bl	printf
	ldr	r0, [fp, #-12]
	bl	free
	b	.L8
.L2:
	mov	r2, #5
	ldr	r1, .L15+20
	ldr	r0, [fp, #-32]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r3, r0
	cmp	r3, #6
	bls	.L11
	ldr	r3, [fp, #-32]
	add	r3, r3, #4
	sub	r1, fp, #24
	mov	r2, #10
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	puts
	b	.L8
.L11:
	ldr	r3, .L15+24
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L15+28
	bl	fwrite
	b	.L8
.L10:
	ldr	r1, .L15+32
	ldr	r0, [fp, #-32]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	mov	r3, #1
	mov	r2, #2
	strb	r2, [r3]
	b	.L8
.L12:
	mov	r3, #1
	b	.L13
.L8:
	mov	r3, #0
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	.LC6
	.size	process, .-process
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Usage: %s\012Text utility - accepts commands and da"
	.ascii	"ta on stdin and prints results to stdout.\012\011In"
	.ascii	"put             | Output\012\011------------------+"
	.ascii	"-----------------------\012\011u <N> <string>    | "
	.ascii	"Uppercased version of the first <N> bytes of <strin"
	.ascii	"g>.\012\011head <N> <string> | The first <N> bytes "
	.ascii	"of <string>.\012\000"
	.align	2
.LC9:
	.ascii	"Couldn't read stdin.\012\000"
	.align	2
.LC10:
	.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, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L22+4
	str	r3, [fp, #-116]
	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	.L18
	ldr	r3, .L22+8
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L22+12
	bl	fwrite
.L18:
	sub	r3, fp, #108
	mov	r0, r3
	bl	process
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	beq	.L19
	ldr	r3, .L22+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-116]
	bl	fprintf
.L19:
	ldr	r3, [fp, #-112]
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC10
	.word	.LC8
	.word	stderr
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
