	.file	"768399.c"
	.intel_syntax noprefix
	.text
	.globl	myenv_used
	.bss
	.align 4
	.type	myenv_used, @object
	.size	myenv_used, 4
myenv_used:
	.zero	4
	.globl	myenv
	.align 32
	.type	myenv, @object
	.size	myenv, 168
myenv:
	.zero	168
	.globl	fp
	.align 8
	.type	fp, @object
	.size	fp, 8
fp:
	.zero	8
	.section	.rodata
.LC0:
	.string	"chrootshell: "
.LC1:
	.string	"; died on line %d, errno %d\n"
	.text
	.globl	_die
	.type	_die, @function
_die:
.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 -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 13
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR fp[rip]
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR fp[rip]
	mov	rcx, rax
	mov	edx, 13
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR fp[rip]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR fp[rip]
	mov	ecx, DWORD PTR -4[rbp]
	mov	edx, DWORD PTR -20[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L2:
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	_die, .-_die
	.section	.rodata
.LC2:
	.string	"Environment overflow"
.LC3:
	.string	"Out of memory"
.LC4:
	.string	"%s=%s"
	.text
	.globl	mysetenv
	.type	mysetenv, @function
mysetenv:
.LFB7:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	eax, DWORD PTR myenv_used[rip]
	cmp	eax, 19
	jle	.L4
	mov	edx, 0
	lea	rsi, .LC2[rip]
	mov	edi, 102
	call	_die
.L4:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	ebx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	eax, ebx
	add	eax, 2
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	ebx, DWORD PTR myenv_used[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	rcx, rax
	movsx	rax, ebx
	lea	rdx, 0[0+rax*8]
	lea	rax, myenv[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR myenv_used[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, myenv[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L5
	mov	edx, 0
	lea	rsi, .LC3[rip]
	mov	edi, 107
	call	_die
.L5:
	mov	eax, DWORD PTR myenv_used[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, myenv[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR myenv_used[rip]
	add	eax, 1
	mov	DWORD PTR myenv_used[rip], eax
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mysetenv, .-mysetenv
	.section	.rodata
.LC5:
	.string	"USER"
.LC6:
	.string	"USER not set?!"
.LC7:
	.string	"LOGNAME"
.LC8:
	.string	"USER does not match LOGNAME\n"
.LC9:
	.string	"no such user %s\n"
.LC10:
	.string	"shell contains no / ?"
.LC11:
	.string	"shell '%s', argv[0] '%s'\n"
.LC12:
	.string	"%s not chrootshell\n"
.LC13:
	.string	"chdir(%s) fails"
.LC14:
	.string	"chroot(%s) fails"
.LC15:
	.string	"setuid(%d) fails"
.LC16:
	.string	"no such user %s in jail\n"
.LC17:
	.string	"SHELL"
.LC18:
	.string	"HOME"
.LC19:
	.string	"/bin:/usr/bin"
.LC20:
	.string	"PATH"
.LC21:
	.string	"malloc fails?!\n"
.LC22:
	.string	"-%s"
.LC23:
	.string	"-c"
	.align 8
.LC24:
	.string	"Expected argc==1 || (argc==3 && argv[1] == '-c')"
.LC25:
	.string	"exec %s fails"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 192
	mov	DWORD PTR -8372[rbp], edi
	mov	QWORD PTR -8384[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC5[rip]
	call	getenv@PLT
	mov	QWORD PTR -8336[rbp], rax
	cmp	QWORD PTR -8336[rbp], 0
	jne	.L7
	mov	edx, 0
	lea	rsi, .LC6[rip]
	mov	edi, 131
	call	_die
.L7:
	lea	rdi, .LC7[rip]
	call	getenv@PLT
	mov	QWORD PTR -8328[rbp], rax
	cmp	QWORD PTR -8328[rbp], 0
	je	.L8
	mov	rax, QWORD PTR -8328[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L8
	mov	rdx, QWORD PTR -8328[rbp]
	mov	rax, QWORD PTR -8336[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L8
	mov	edx, 0
	lea	rsi, .LC8[rip]
	mov	edi, 134
	call	_die
.L8:
	mov	rax, QWORD PTR -8336[rbp]
	mov	rdi, rax
	call	getpwnam@PLT
	mov	QWORD PTR -8320[rbp], rax
	cmp	QWORD PTR -8320[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR -8336[rbp]
	mov	rdx, rax
	lea	rsi, .LC9[rip]
	mov	edi, 138
	call	_die
.L9:
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -8312[rbp], rax
	cmp	QWORD PTR -8312[rbp], 0
	jne	.L10
	mov	edx, 0
	lea	rsi, .LC10[rip]
	mov	edi, 141
	call	_die
.L10:
	add	QWORD PTR -8312[rbp], 1
	mov	rax, QWORD PTR -8384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8352[rbp], rax
	mov	rax, QWORD PTR -8352[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 45
	jne	.L11
	add	QWORD PTR -8352[rbp], 1
.L11:
	mov	rdx, QWORD PTR -8352[rbp]
	mov	rax, QWORD PTR -8312[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L12
	mov	rax, QWORD PTR -8384[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR fp[rip]
	mov	rdx, QWORD PTR -8312[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8312[rbp]
	mov	rdx, rax
	lea	rsi, .LC12[rip]
	mov	edi, 150
	call	_die
.L12:
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L13
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdx, rax
	lea	rsi, .LC13[rip]
	mov	edi, 154
	call	_die
.L13:
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	chroot@PLT
	test	eax, eax
	je	.L14
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdx, rax
	lea	rsi, .LC14[rip]
	mov	edi, 156
	call	_die
.L14:
	mov	rax, QWORD PTR -8320[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	setuid@PLT
	test	eax, eax
	je	.L15
	mov	rax, QWORD PTR -8320[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	eax, eax
	mov	rdx, rax
	lea	rsi, .LC15[rip]
	mov	edi, 159
	call	_die
.L15:
	call	endpwent@PLT
	mov	rax, QWORD PTR -8336[rbp]
	mov	rdi, rax
	call	getpwnam@PLT
	mov	QWORD PTR -8320[rbp], rax
	cmp	QWORD PTR -8320[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR -8336[rbp]
	mov	rdx, rax
	lea	rsi, .LC16[rip]
	mov	edi, 164
	call	_die
.L16:
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L17
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdx, rax
	lea	rsi, .LC13[rip]
	mov	edi, 167
	call	_die
.L17:
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	call	mysetenv
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	call	mysetenv
	lea	rsi, .LC19[rip]
	lea	rdi, .LC20[rip]
	call	mysetenv
	mov	rax, QWORD PTR -8336[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	call	mysetenv
	cmp	QWORD PTR -8328[rbp], 0
	je	.L18
	mov	rax, QWORD PTR -8328[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L18
	mov	rax, QWORD PTR -8336[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	call	mysetenv
.L18:
	mov	eax, DWORD PTR myenv_used[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, myenv[rip]
	mov	QWORD PTR [rdx+rax], 0
	lea	rax, myenv[rip]
	mov	QWORD PTR environ[rip], rax
	call	endpwent@PLT
	mov	eax, DWORD PTR -8372[rbp]
	add	eax, 3
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8304[rbp], rax
	cmp	QWORD PTR -8304[rbp], 0
	jne	.L19
	mov	edx, 0
	lea	rsi, .LC21[rip]
	mov	edi, 188
	call	_die
.L19:
	mov	DWORD PTR -8360[rbp], 0
	mov	DWORD PTR -8356[rbp], 1
	cmp	DWORD PTR -8372[rbp], 1
	jne	.L20
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8296[rbp], rax
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -8344[rbp], rax
	mov	rax, QWORD PTR -8320[rbp]
	mov	rdx, QWORD PTR 40[rax]
	mov	rax, QWORD PTR -8296[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, DWORD PTR -8360[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8360[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8304[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8296[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L21
.L20:
	cmp	DWORD PTR -8372[rbp], 1
	jle	.L22
	mov	rax, QWORD PTR -8384[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L22
	mov	eax, DWORD PTR -8360[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8360[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8304[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8320[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -8344[rbp], rax
	mov	eax, DWORD PTR -8360[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8360[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8304[rbp]
	add	rax, rdx
	lea	rdx, .LC23[rip]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR -8360[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8360[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8304[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8384[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR [rdx], rax
	jmp	.L21
.L22:
	mov	edx, 0
	lea	rsi, .LC24[rip]
	mov	edi, 204
	call	_die
.L21:
	mov	eax, DWORD PTR -8360[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8360[rbp], edx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8304[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rdx, QWORD PTR -8304[rbp]
	mov	rax, QWORD PTR -8344[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	mov	rax, QWORD PTR -8304[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC25[rip]
	mov	edi, 207
	call	_die
	mov	eax, 1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"768399.c"
	.text
	.global	myenv_used
	.bss
	.align	2
	.type	myenv_used, %object
	.size	myenv_used, 4
myenv_used:
	.space	4
	.comm	myenv,84,4
	.global	fp
	.align	2
	.type	fp, %object
	.size	fp, 4
fp:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"chrootshell: \000"
	.align	2
.LC1:
	.ascii	"; died on line %d, errno %d\012\000"
	.text
	.align	2
	.global	_die
	.syntax unified
	.arm
	.fpu softvfp
	.type	_die, %function
_die:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L3
	ldr	r3, [r3]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, .L3+4
	bl	fwrite
	ldr	r3, .L3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L3+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L3+8
	ldr	r3, [r3]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, .L3+4
	bl	fwrite
	ldr	r3, .L3+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L3+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r1, .L3+12
	bl	fprintf
.L2:
	mov	r0, #1
	bl	exit
.L4:
	.align	2
.L3:
	.word	stderr
	.word	.LC0
	.word	fp
	.word	.LC1
	.size	_die, .-_die
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Environment overflow\000"
	.align	2
.LC3:
	.ascii	"Out of memory\000"
	.align	2
.LC4:
	.ascii	"%s=%s\000"
	.text
	.align	2
	.global	mysetenv
	.syntax unified
	.arm
	.fpu softvfp
	.type	mysetenv, %function
mysetenv:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L8
	ldr	r3, [r3]
	cmp	r3, #19
	ble	.L6
	mov	r2, #0
	ldr	r1, .L8+4
	mov	r0, #102
	bl	_die
.L6:
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, .L8
	ldr	r4, [r2]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L8+8
	str	r2, [r3, r4, lsl #2]
	ldr	r3, .L8
	ldr	r3, [r3]
	ldr	r2, .L8+8
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L7
	mov	r2, #0
	ldr	r1, .L8+12
	mov	r0, #107
	bl	_die
.L7:
	ldr	r3, .L8
	ldr	r3, [r3]
	ldr	r2, .L8+8
	ldr	r0, [r2, r3, lsl #2]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r1, .L8+16
	bl	sprintf
	ldr	r3, .L8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L8
	str	r3, [r2]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	myenv_used
	.word	.LC2
	.word	myenv
	.word	.LC3
	.word	.LC4
	.size	mysetenv, .-mysetenv
	.section	.rodata
	.align	2
.LC5:
	.ascii	"USER\000"
	.align	2
.LC6:
	.ascii	"USER not set?!\000"
	.align	2
.LC7:
	.ascii	"LOGNAME\000"
	.align	2
.LC8:
	.ascii	"USER does not match LOGNAME\012\000"
	.align	2
.LC9:
	.ascii	"no such user %s\012\000"
	.align	2
.LC10:
	.ascii	"shell contains no / ?\000"
	.align	2
.LC11:
	.ascii	"shell '%s', argv[0] '%s'\012\000"
	.align	2
.LC12:
	.ascii	"%s not chrootshell\012\000"
	.align	2
.LC13:
	.ascii	"chdir(%s) fails\000"
	.align	2
.LC14:
	.ascii	"chroot(%s) fails\000"
	.align	2
.LC15:
	.ascii	"setuid(%d) fails\000"
	.align	2
.LC16:
	.ascii	"no such user %s in jail\012\000"
	.align	2
.LC17:
	.ascii	"SHELL\000"
	.align	2
.LC18:
	.ascii	"HOME\000"
	.align	2
.LC19:
	.ascii	"/bin:/usr/bin\000"
	.align	2
.LC20:
	.ascii	"PATH\000"
	.align	2
.LC21:
	.ascii	"malloc fails?!\012\000"
	.align	2
.LC22:
	.ascii	"-%s\000"
	.align	2
.LC23:
	.ascii	"-c\000"
	.align	2
.LC24:
	.ascii	"Expected argc==1 || (argc==3 && argv[1] == '-c')\000"
	.align	2
.LC25:
	.ascii	"exec %s fails\000"
	.align	2
.LC26:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8256
	sub	sp, sp, #36
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-92]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-96]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L29+4
	bl	getenv
	str	r0, [r4, #-72]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-72]
	cmp	r3, #0
	bne	.L11
	mov	r2, #0
	ldr	r1, .L29+8
	mov	r0, #131
	bl	_die
.L11:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L29+12
	bl	getenv
	str	r0, [r4, #-68]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L12
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r2, #-68]
	ldr	r0, [r3, #-72]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	mov	r2, #0
	ldr	r1, .L29+16
	mov	r0, #134
	bl	_die
.L12:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-72]
	bl	getpwnam
	str	r0, [r4, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #0
	bne	.L13
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-72]
	ldr	r1, .L29+20
	mov	r0, #138
	bl	_die
.L13:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #24]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #47
	mov	r0, r3
	bl	strrchr
	str	r0, [r4, #-60]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-60]
	cmp	r3, #0
	bne	.L14
	mov	r2, #0
	ldr	r1, .L29+24
	mov	r0, #141
	bl	_die
.L14:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-60]
	add	r3, r3, #1
	str	r3, [r2, #-60]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-96]
	ldr	r3, [r3]
	str	r3, [r2, #-80]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-80]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L15
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-80]
	add	r3, r3, #1
	str	r3, [r2, #-80]
.L15:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r2, #-80]
	ldr	r0, [r3, #-60]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r3, .L29+28
	ldr	r0, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-96]
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-60]
	ldr	r1, .L29+32
	bl	fprintf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-60]
	ldr	r1, .L29+36
	mov	r0, #150
	bl	_die
.L16:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L17
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r2, r3
	ldr	r1, .L29+40
	mov	r0, #154
	bl	_die
.L17:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	chroot
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r2, r3
	ldr	r1, .L29+44
	mov	r0, #156
	bl	_die
.L18:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r1, .L29+48
	mov	r0, #159
	bl	_die
.L19:
	bl	endpwent
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-72]
	bl	getpwnam
	str	r0, [r4, #-64]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	cmp	r3, #0
	bne	.L20
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r2, [r3, #-72]
	ldr	r1, .L29+52
	mov	r0, #164
	bl	_die
.L20:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r2, r3
	ldr	r1, .L29+40
	mov	r0, #167
	bl	_die
.L21:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #24]
	mov	r1, r3
	ldr	r0, .L29+56
	bl	mysetenv
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r0, .L29+60
	bl	mysetenv
	ldr	r1, .L29+64
	ldr	r0, .L29+68
	bl	mysetenv
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-72]
	ldr	r0, .L29+4
	bl	mysetenv
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	cmp	r3, #0
	beq	.L22
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-68]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L22
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r3, #-72]
	ldr	r0, .L29+12
	bl	mysetenv
.L22:
	ldr	r3, .L29+72
	ldr	r3, [r3]
	ldr	r2, .L29+76
	mov	r1, #0
	str	r1, [r2, r3, lsl #2]
	ldr	r3, .L29+80
	ldr	r2, .L29+76
	str	r2, [r3]
	bl	endpwent
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-92]
	add	r3, r3, #3
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #-56]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	cmp	r3, #0
	bne	.L23
	mov	r2, #0
	ldr	r1, .L29+84
	mov	r0, #188
	bl	_die
.L23:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-84]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-52]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-92]
	cmp	r3, #1
	bne	.L24
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #24]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #-48]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #24]
	str	r3, [r2, #-76]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #24]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, .L29+88
	ldr	r0, [r0, #-48]
	bl	sprintf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-84]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-56]
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-48]
	str	r2, [r3]
	b	.L25
.L24:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-92]
	cmp	r3, #1
	ble	.L26
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-96]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L29+92
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L26
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-84]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-56]
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-64]
	ldr	r2, [r2, #24]
	str	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-64]
	ldr	r3, [r3, #24]
	str	r3, [r2, #-76]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-84]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-56]
	add	r3, r2, r3
	ldr	r2, .L29+92
	str	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-84]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-56]
	add	r3, r2, r3
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-96]
	ldr	r2, [r2, #8]
	str	r2, [r3]
	b	.L25
.L26:
	mov	r2, #0
	ldr	r1, .L29+96
	mov	r0, #204
	bl	_die
.L25:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-84]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-84]
	lsl	r3, r3, #2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-56]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r1, [r2, #-56]
	ldr	r0, [r3, #-76]
	bl	execvp
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-56]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L29+100
	mov	r0, #207
	bl	_die
	mov	r3, #1
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC26
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	fp
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	myenv_used
	.word	myenv
	.word	environ
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
