	.file	"82950847.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"-v"
.LC1:
	.string	"(unknown)"
.LC2:
	.string	"setuid: %s@%s "
.LC3:
	.string	"unknown state\n"
	.align 8
.LC4:
	.string	"Usage:\n  %s [-v] [<USER> <COMMAND> [ARGS]]\n"
.LC5:
	.string	"Error: Unknown user: %s\n"
.LC6:
	.string	"/proc/%u/exe"
	.align 8
.LC7:
	.string	"Security: Not running! Failed to stat ourself\n"
	.align 8
.LC8:
	.string	"Security: Not running! Our setuid bit is set\n"
	.align 8
.LC9:
	.string	"Security: Not running! You are not root or the target user\n"
	.align 8
.LC10:
	.string	"Error: Failed to set GID to %i: %s\n"
	.align 8
.LC11:
	.string	"Error: Failed to set UID to %i: %s\n"
.LC12:
	.string	"Error: Failed to run %s: %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
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 240
	mov	DWORD PTR -8404[rbp], edi
	mov	QWORD PTR -8416[rbp], rsi
	mov	QWORD PTR -8424[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -8404[rbp], 2
	jne	.L2
	mov	rax, QWORD PTR -8416[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	lea	rcx, .LC1[rip]
	lea	rdx, .LC1[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, 0
	jmp	.L11
.L2:
	cmp	DWORD PTR -8404[rbp], 2
	jg	.L4
	mov	rax, QWORD PTR -8416[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L11
.L4:
	add	QWORD PTR -8416[rbp], 8
	mov	rax, QWORD PTR -8416[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8392[rbp], rax
	add	QWORD PTR -8416[rbp], 8
	mov	rax, QWORD PTR -8392[rbp]
	mov	rdi, rax
	call	getpwnam@PLT
	mov	QWORD PTR -8384[rbp], rax
	cmp	QWORD PTR -8384[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8392[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L11
.L5:
	lea	rax, -8224[rbp]
	mov	edx, 4097
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	call	getpid@PLT
	mov	edx, eax
	lea	rax, -8224[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -4112[rbp]
	mov	edx, 4097
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -4112[rbp]
	lea	rax, -8224[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	rdi, rax
	call	readlink@PLT
	mov	QWORD PTR -8376[rbp], rax
	lea	rdx, -8368[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 46
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L11
.L6:
	mov	eax, DWORD PTR -8344[rbp]
	and	eax, 2048
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 45
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L11
.L7:
	call	geteuid@PLT
	test	eax, eax
	je	.L8
	call	geteuid@PLT
	mov	rdx, QWORD PTR -8384[rbp]
	mov	edx, DWORD PTR 16[rdx]
	cmp	eax, edx
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 59
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L11
.L8:
	call	geteuid@PLT
	test	eax, eax
	jne	.L9
	mov	rax, QWORD PTR -8384[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	edi, eax
	call	setgid@PLT
	cmp	eax, -1
	jne	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8384[rbp]
	mov	eax, DWORD PTR 20[rax]
	mov	esi, eax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rdx
	mov	edx, esi
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -8384[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	setuid@PLT
	cmp	eax, -1
	jne	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8384[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	esi, eax
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rdx
	mov	edx, esi
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L11
.L9:
	mov	rax, QWORD PTR -8416[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8424[rbp]
	mov	rcx, QWORD PTR -8416[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	execve@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -8416[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	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	"82950847.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"-v\000"
	.align	2
.LC1:
	.ascii	"(unknown)\000"
	.align	2
.LC2:
	.ascii	"setuid: %s@%s \000"
	.align	2
.LC3:
	.ascii	"unknown state\012\000"
	.align	2
.LC4:
	.ascii	"Usage:\012  %s [-v] [<USER> <COMMAND> [ARGS]]\012\000"
	.align	2
.LC5:
	.ascii	"Error: Unknown user: %s\012\000"
	.align	2
.LC6:
	.ascii	"/proc/%u/exe\000"
	.align	2
.LC7:
	.ascii	"Security: Not running! Failed to stat ourself\012\000"
	.align	2
.LC8:
	.ascii	"Security: Not running! Our setuid bit is set\012\000"
	.align	2
.LC9:
	.ascii	"Security: Not running! You are not root or the targ"
	.ascii	"et user\012\000"
	.align	2
.LC10:
	.ascii	"Error: Failed to set GID to %i: %s\012\000"
	.align	2
.LC11:
	.ascii	"Error: Failed to set UID to %i: %s\012\000"
	.align	2
.LC12:
	.ascii	"Error: Failed to run %s: %s\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8328
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8320
	sub	sp, sp, #8
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-124]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-128]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r2, [r3, #-132]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #2
	bne	.L2
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L13+4
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L13+8
	ldr	r0, [r3]
	ldr	r3, .L13+12
	ldr	r2, .L13+12
	ldr	r1, .L13+16
	bl	fprintf
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L13+20
	bl	fwrite
	mov	r3, #0
	b	.L11
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-124]
	cmp	r3, #2
	bgt	.L4
	ldr	r3, .L13+8
	ldr	r0, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+24
	bl	fprintf
	mov	r3, #1
	b	.L11
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #4
	str	r3, [r2, #-128]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r3, [r3]
	str	r3, [r2, #-116]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	add	r3, r3, #4
	str	r3, [r2, #-128]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-116]
	bl	getpwnam
	str	r0, [r4, #-112]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L13+8
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-116]
	ldr	r1, .L13+28
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L11
.L5:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	ldr	r2, .L13+32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	bl	getpid
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	ldr	r1, .L13+36
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	ldr	r2, .L13+32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #8
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #4096
	mov	r0, r3
	bl	readlink
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-108]
	sub	r2, fp, #8256
	sub	r2, r2, #12
	sub	r2, r2, #40
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #46
	mov	r1, #1
	ldr	r0, .L13+40
	bl	fwrite
	mov	r3, #1
	b	.L11
.L6:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-88]
	and	r3, r3, #2048
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #45
	mov	r1, #1
	ldr	r0, .L13+44
	bl	fwrite
	mov	r3, #1
	b	.L11
.L7:
	bl	geteuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	bl	geteuid
	mov	r2, r0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	beq	.L8
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, #59
	mov	r1, #1
	ldr	r0, .L13+48
	bl	fwrite
	mov	r3, #1
	b	.L11
.L8:
	bl	geteuid
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	setgid
	mov	r3, r0
	cmn	r3, #1
	bne	.L10
	ldr	r3, .L13+8
	ldr	r4, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	ldr	r3, [r3, #12]
	mov	r5, r3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L13+52
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L11
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	setuid
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r3, .L13+8
	ldr	r4, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	ldr	r3, [r3, #8]
	mov	r5, r3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L13+56
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L11
.L9:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r3, [r3]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r1, fp, #8192
	sub	r1, r1, #12
	ldr	r2, [r2, #-132]
	ldr	r1, [r1, #-128]
	mov	r0, r3
	bl	execve
	ldr	r3, .L13+8
	ldr	r4, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-128]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L13+60
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC13
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	4097
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
