	.file	"536896.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"PATH"
.LC1:
	.string	"/bin:/usr/bin"
.LC2:
	.string	":"
.LC3:
	.string	"mysh$ "
.LC4:
	.string	"exit"
.LC5:
	.string	" "
.LC6:
	.string	"cd"
.LC7:
	.string	"pwd"
.LC8:
	.string	"fork() fail"
	.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
	lea	r11, -16384[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 80
	mov	DWORD PTR -16452[rbp], edi
	mov	QWORD PTR -16464[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	mov	QWORD PTR -16432[rbp], rax
	cmp	QWORD PTR -16432[rbp], 0
	jne	.L2
	lea	rax, .LC1[rip]
	mov	QWORD PTR -16432[rbp], rax
.L2:
	mov	rax, QWORD PTR -16432[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	tokenise
	mov	QWORD PTR -16424[rbp], rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L13:
	lea	rax, -16400[rbp]
	mov	rdi, rax
	call	trim
	mov	QWORD PTR -16416[rbp], rax
	mov	rax, QWORD PTR -16416[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L16
	mov	rax, QWORD PTR -16416[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	test	eax, eax
	jne	.L6
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -16416[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	tokenise
	mov	QWORD PTR -16408[rbp], rax
	mov	rax, QWORD PTR -16408[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L8
	mov	rax, QWORD PTR -16408[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	chdir@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L8:
	mov	rax, QWORD PTR -16416[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	lea	rax, -8208[rbp]
	mov	esi, 8192
	mov	rdi, rax
	call	getcwd@PLT
	lea	rax, -8208[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L9:
	call	fork@PLT
	mov	DWORD PTR -16436[rbp], eax
	cmp	DWORD PTR -16436[rbp], 0
	jns	.L10
	lea	rdi, .LC8[rip]
	call	perror@PLT
	jmp	.L11
.L10:
	cmp	DWORD PTR -16436[rbp], 0
	jne	.L12
	mov	rdx, QWORD PTR environ[rip]
	mov	rcx, QWORD PTR -16424[rbp]
	mov	rax, QWORD PTR -16408[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	execute
	jmp	.L11
.L12:
	lea	rax, -16440[rbp]
	mov	rdi, rax
	call	wait@PLT
.L11:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L3:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -16400[rbp]
	mov	esi, 8192
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L13
	jmp	.L5
.L16:
	nop
.L5:
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -16424[rbp]
	mov	rdi, rax
	call	freeTokens
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC9:
	.string	"command not found"
.LC10:
	.string	"Exec failed!"
	.text
	.type	execute, @function
execute:
.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, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	je	.L18
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 46
	jne	.L19
.L18:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	isExecutable
	test	al, al
	je	.L21
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L21
.L19:
	mov	DWORD PTR -24[rbp], 0
	jmp	.L22
.L24:
	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	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	isExecutable
	test	al, al
	je	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L21
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -24[rbp], 1
.L22:
	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]
	test	rax, rax
	jne	.L24
.L21:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L25
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L25:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	execve@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L27
	lea	rdi, .LC10[rip]
	call	perror@PLT
.L27:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	execute, .-execute
	.type	isExecutable, @function
isExecutable:
.LFB8:
	.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, 184
	.cfi_offset 3, -24
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rdx, -176[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jns	.L29
	mov	eax, 0
	jmp	.L35
.L29:
	mov	eax, DWORD PTR -152[rbp]
	and	eax, 61440
	cmp	eax, 32768
	je	.L31
	mov	eax, 0
	jmp	.L35
.L31:
	mov	ebx, DWORD PTR -148[rbp]
	call	getuid@PLT
	cmp	ebx, eax
	jne	.L32
	mov	eax, DWORD PTR -152[rbp]
	and	eax, 64
	test	eax, eax
	je	.L32
	mov	eax, 1
	jmp	.L35
.L32:
	mov	ebx, DWORD PTR -144[rbp]
	call	getgid@PLT
	cmp	ebx, eax
	jne	.L33
	mov	eax, DWORD PTR -152[rbp]
	and	eax, 8
	test	eax, eax
	je	.L33
	mov	eax, 1
	jmp	.L35
.L33:
	mov	eax, DWORD PTR -152[rbp]
	and	eax, 1
	test	eax, eax
	je	.L34
	mov	eax, 1
	jmp	.L35
.L34:
	mov	eax, 0
.L35:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	isExecutable, .-isExecutable
	.type	tokenise, @function
tokenise:
.LFB9:
	.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, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -72[rbp], rdi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L38
.L39:
	add	QWORD PTR -48[rbp], 1
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -56[rbp]
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
.L38:
	mov	rdx, QWORD PTR -80[rbp]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L39
	add	QWORD PTR -48[rbp], 1
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	tokenise, .-tokenise
	.type	freeTokens, @function
freeTokens:
.LFB10:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L43
.L44:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L43:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L44
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	freeTokens, .-freeTokens
	.section	.rodata
.LC11:
	.string	" \r\n\t"
	.text
	.type	trim, @function
trim:
.LFB11:
	.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
	lea	rax, .LC11[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strrspn
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strspn@PLT
	add	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	trim, .-trim
	.type	strrspn, @function
strrspn:
.LFB12:
	.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
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -8[rbp], rax
	jmp	.L48
.L51:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	edx, al
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	strchr@PLT
	test	rax, rax
	je	.L53
	sub	QWORD PTR -8[rbp], 1
.L48:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L51
	jmp	.L50
.L53:
	nop
.L50:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	strrspn, .-strrspn
	.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	"536896.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"PATH\000"
	.align	2
.LC1:
	.ascii	"/bin:/usr/bin\000"
	.align	2
.LC2:
	.ascii	":\000"
	.align	2
.LC3:
	.ascii	"mysh$ \000"
	.align	2
.LC4:
	.ascii	"exit\000"
	.align	2
.LC5:
	.ascii	" \000"
	.align	2
.LC6:
	.ascii	"cd\000"
	.align	2
.LC7:
	.ascii	"pwd\000"
	.align	2
.LC8:
	.ascii	"fork() fail\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16424
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #16384
	sub	sp, sp, #44
	sub	r3, fp, #16384
	sub	r3, r3, #12
	str	r0, [r3, #-36]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	str	r1, [r3, #-40]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L17+4
	bl	getenv
	str	r0, [r4, #-24]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	bne	.L2
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L17+8
	str	r3, [r2, #-24]
.L2:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, .L17+12
	ldr	r0, [r3, #-24]
	bl	tokenise
	str	r0, [r4, #-20]
	ldr	r0, .L17+16
	bl	printf
	b	.L3
.L13:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	trim
	str	r0, [r4, #-16]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, .L17+20
	ldr	r0, [r3, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L17+16
	bl	printf
	b	.L3
.L6:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, .L17+24
	ldr	r0, [r3, #-16]
	bl	tokenise
	str	r0, [r4, #-12]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	ldr	r3, [r3]
	ldr	r1, .L17+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	chdir
	ldr	r0, .L17+16
	bl	printf
	b	.L3
.L8:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, .L17+32
	ldr	r0, [r3, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #8192
	mov	r0, r3
	bl	getcwd
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	ldr	r0, .L17+16
	bl	printf
	b	.L3
.L9:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	bl	fork
	mov	r3, r0
	str	r3, [r4, #-8]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L17+36
	bl	perror
	b	.L11
.L10:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L17+40
	ldr	r3, [r3]
	sub	r2, fp, #16384
	sub	r2, r2, #12
	mov	r1, r2
	sub	r2, fp, #16384
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, [r1, #-20]
	ldr	r0, [r0, #-12]
	bl	execute
	b	.L11
.L12:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	sub	r3, r3, #28
	mov	r0, r3
	bl	wait
.L11:
	ldr	r0, .L17+16
	bl	printf
.L3:
	ldr	r3, .L17+44
	ldr	r2, [r3]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #8192
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	b	.L5
.L16:
	nop
.L5:
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r0, [r3, #-20]
	bl	freeTokens
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	environ
	.word	stdin
	.size	main, .-main
	.section	.rodata
	.align	2
.LC10:
	.ascii	"/\000"
	.align	2
.LC11:
	.ascii	"command not found\000"
	.align	2
.LC12:
	.ascii	"Exec failed!\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute, %function
execute:
	@ 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L20
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L21
.L20:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r0, r3
	bl	isExecutable
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L23
.L21:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L24
.L26:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	strcpy
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	ldr	r2, .L30
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	strcat
	ldr	r0, [fp, #-12]
	bl	isExecutable
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	b	.L23
.L25:
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L24:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
.L23:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L27
	ldr	r0, .L30+4
	bl	puts
	mov	r0, #0
	bl	exit
.L27:
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-20]
	bl	execve
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L29
	ldr	r0, .L30+8
	bl	perror
.L29:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	execute, .-execute
	.section	.rodata
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isExecutable, %function
isExecutable:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #108
	str	r0, [fp, #-112]
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bge	.L33
	mov	r3, #0
	b	.L39
.L33:
	ldr	r3, [fp, #-92]
	and	r3, r3, #61440
	cmp	r3, #32768
	beq	.L35
	mov	r3, #0
	b	.L39
.L35:
	ldr	r4, [fp, #-84]
	bl	getuid
	mov	r3, r0
	cmp	r4, r3
	bne	.L36
	ldr	r3, [fp, #-92]
	and	r3, r3, #64
	cmp	r3, #0
	beq	.L36
	mov	r3, #1
	b	.L39
.L36:
	ldr	r4, [fp, #-80]
	bl	getgid
	mov	r3, r0
	cmp	r4, r3
	bne	.L37
	ldr	r3, [fp, #-92]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L37
	mov	r3, #1
	b	.L39
.L37:
	ldr	r3, [fp, #-92]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L38
	mov	r3, #1
	b	.L39
.L38:
	mov	r3, #0
.L39:
	ldr	r2, .L41
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC13
	.size	isExecutable, .-isExecutable
	.section	.rodata
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tokenise, %function
tokenise:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-40]
	bl	strdup
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-24]
	b	.L44
.L45:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	realloc
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r4, r2, r3
	ldr	r0, [fp, #-20]
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
.L44:
	sub	r3, fp, #36
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	strsep
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	realloc
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-32]
	ldr	r2, .L48
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L47
	bl	__stack_chk_fail
.L47:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC14
	.size	tokenise, .-tokenise
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	freeTokens, %function
freeTokens:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L51
.L52:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L51:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L52
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	freeTokens, .-freeTokens
	.section	.rodata
	.align	2
.LC15:
	.ascii	" \015\012\011\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	trim, %function
trim:
	@ 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]
	ldr	r3, .L55
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	strrspn
	mov	r3, r0
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	strspn
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC15
	.size	trim, .-trim
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	strrspn, %function
strrspn:
	@ 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	r0, [fp, #-16]
	bl	strlen
	str	r0, [fp, #-8]
	b	.L58
.L61:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	strchr
	mov	r3, r0
	cmp	r3, #0
	beq	.L63
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L58:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L61
	b	.L60
.L63:
	nop
.L60:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	strrspn, .-strrspn
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
