	.file	"165765310.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"UID %d %d\n"
.LC1:
	.string	"Not running as setuid root\n"
	.align 8
.LC2:
	.string	"%s: no write access mountpoint %s: %s\n"
	.align 8
.LC3:
	.string	"%s: failed to access mountpoint %s: %s\n"
.LC4:
	.string	"/dev/fuse"
	.align 8
.LC5:
	.string	"%s: failed to open /dev/fuse: %s\n"
	.align 8
.LC6:
	.string	"fd=%i,rootmode=%o,user_id=%u,group_id=%u"
.LC7:
	.string	"fuse"
.LC8:
	.string	""
	.align 8
.LC9:
	.string	"%s: failed to mount -o %s /dev/fuse %s: %s\n"
	.align 8
.LC10:
	.string	"%s: failed to drop gid privilege: %s\n"
	.align 8
.LC11:
	.string	"%s: did not successfully drop root privilege\n"
.LC12:
	.string	"/dev/fd/%d"
.LC13:
	.string	"+ "
.LC14:
	.string	"%s "
.LC15:
	.string	"failed to execvp"
	.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
	push	rbx
	sub	rsp, 344
	.cfi_offset 3, -24
	mov	DWORD PTR -340[rbp], edi
	mov	QWORD PTR -352[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	call	getuid@PLT
	mov	ebx, eax
	call	geteuid@PLT
	mov	edx, ebx
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	call	geteuid@PLT
	test	eax, eax
	jne	.L2
	call	getuid@PLT
	test	eax, eax
	jne	.L3
.L2:
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L3:
	mov	eax, DWORD PTR -340[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -312[rbp], rax
	mov	rax, QWORD PTR -312[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	access@PLT
	test	eax, eax
	je	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -312[rbp]
	mov	r8, rsi
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L5:
	lea	rdx, -304[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	DWORD PTR -320[rbp], eax
	cmp	DWORD PTR -320[rbp], -1
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -312[rbp]
	mov	r8, rsi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L6:
	mov	esi, 2
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -316[rbp], eax
	cmp	DWORD PTR -316[rbp], -1
	jne	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L7:
	call	getgid@PLT
	mov	ebx, eax
	call	getuid@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -280[rbp]
	and	eax, 61440
	mov	esi, eax
	mov	edx, DWORD PTR -316[rbp]
	lea	rax, -160[rbp]
	sub	rsp, 8
	push	rbx
	mov	r9d, ecx
	mov	r8d, esi
	mov	ecx, edx
	lea	rdx, .LC6[rip]
	mov	esi, 128
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	add	rsp, 16
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -312[rbp]
	mov	r8, rdx
	mov	ecx, 0
	lea	rdx, .LC7[rip]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	call	mount@PLT
	mov	DWORD PTR -320[rbp], eax
	cmp	DWORD PTR -320[rbp], -1
	jne	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, QWORD PTR -312[rbp]
	lea	rcx, -160[rbp]
	mov	r9, rsi
	mov	r8, rdi
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L8:
	call	getgid@PLT
	mov	edi, eax
	call	setgid@PLT
	test	eax, eax
	je	.L9
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L9:
	call	getuid@PLT
	mov	edi, eax
	call	setuid@PLT
	test	eax, eax
	je	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L10:
	mov	edi, 0
	call	setuid@PLT
	test	eax, eax
	je	.L11
	mov	edi, 0
	call	seteuid@PLT
	test	eax, eax
	jne	.L12
.L11:
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L15
.L12:
	mov	edx, DWORD PTR -316[rbp]
	lea	rax, -160[rbp]
	mov	ecx, edx
	lea	rdx, .LC12[rip]
	mov	esi, 128
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	eax, DWORD PTR -340[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -352[rbp]
	add	rdx, rax
	lea	rax, -160[rbp]
	mov	QWORD PTR [rdx], rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -324[rbp], 1
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -324[rbp], 1
.L13:
	mov	eax, DWORD PTR -324[rbp]
	cmp	eax, DWORD PTR -340[rbp]
	jl	.L14
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -352[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC15[rip]
	call	perror@PLT
	mov	eax, 1
.L15:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	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	"165765310.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"UID %d %d\012\000"
	.align	2
.LC1:
	.ascii	"Not running as setuid root\012\000"
	.align	2
.LC2:
	.ascii	"%s: no write access mountpoint %s: %s\012\000"
	.align	2
.LC3:
	.ascii	"%s: failed to access mountpoint %s: %s\012\000"
	.align	2
.LC4:
	.ascii	"/dev/fuse\000"
	.align	2
.LC5:
	.ascii	"%s: failed to open /dev/fuse: %s\012\000"
	.align	2
.LC6:
	.ascii	"fd=%i,rootmode=%o,user_id=%u,group_id=%u\000"
	.align	2
.LC7:
	.ascii	"fuse\000"
	.align	2
.LC8:
	.ascii	"\000"
	.align	2
.LC9:
	.ascii	"%s: failed to mount -o %s /dev/fuse %s: %s\012\000"
	.align	2
.LC10:
	.ascii	"%s: failed to drop gid privilege: %s\012\000"
	.align	2
.LC11:
	.ascii	"%s: did not successfully drop root privilege\012\000"
	.align	2
.LC12:
	.ascii	"/dev/fd/%d\000"
	.align	2
.LC13:
	.ascii	"+ \000"
	.align	2
.LC14:
	.ascii	"%s \000"
	.align	2
.LC15:
	.ascii	"failed to execvp\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 248
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #264
	str	r0, [fp, #-256]
	str	r1, [fp, #-260]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	geteuid
	mov	r4, r0
	bl	getuid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L17+4
	bl	printf
	bl	geteuid
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	bl	getuid
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r3, .L17+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-260]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L17+12
	bl	fprintf
	mov	r3, #1
	b	.L15
.L3:
	ldr	r3, [fp, #-256]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-260]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-248]
	mov	r1, #2
	ldr	r0, [fp, #-248]
	bl	access
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-260]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-248]
	mov	r2, r5
	ldr	r1, .L17+16
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L15
.L5:
	sub	r3, fp, #236
	mov	r1, r3
	ldr	r0, [fp, #-248]
	bl	stat
	str	r0, [fp, #-244]
	ldr	r3, [fp, #-244]
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-260]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	ldr	r3, [fp, #-248]
	mov	r2, r5
	ldr	r1, .L17+20
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L15
.L6:
	mov	r1, #2
	ldr	r0, .L17+24
	bl	open
	str	r0, [fp, #-240]
	ldr	r3, [fp, #-240]
	cmn	r3, #1
	bne	.L7
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-260]
	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, .L17+28
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L15
.L7:
	ldr	r3, [fp, #-220]
	and	r4, r3, #61440
	bl	getuid
	mov	r5, r0
	bl	getgid
	mov	r3, r0
	sub	r0, fp, #144
	str	r3, [sp, #8]
	str	r5, [sp, #4]
	str	r4, [sp]
	ldr	r3, [fp, #-240]
	ldr	r2, .L17+32
	mov	r1, #128
	bl	snprintf
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	ldr	r2, .L17+36
	ldr	r1, [fp, #-248]
	ldr	r0, .L17+40
	bl	mount
	str	r0, [fp, #-244]
	ldr	r3, [fp, #-244]
	cmn	r3, #1
	bne	.L8
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-260]
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #144
	str	r3, [sp, #4]
	ldr	r3, [fp, #-248]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r5
	ldr	r1, .L17+44
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L15
.L8:
	bl	getgid
	mov	r3, r0
	mov	r0, r3
	bl	setgid
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-260]
	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, .L17+48
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L15
.L9:
	bl	getuid
	mov	r3, r0
	mov	r0, r3
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L17+8
	ldr	r4, [r3]
	ldr	r3, [fp, #-260]
	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, .L17+48
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L15
.L10:
	mov	r0, #0
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	mov	r0, #0
	bl	seteuid
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
.L11:
	ldr	r3, .L17+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-260]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L17+52
	bl	fprintf
	mov	r3, #1
	b	.L15
.L12:
	sub	r0, fp, #144
	ldr	r3, [fp, #-240]
	ldr	r2, .L17+56
	mov	r1, #128
	bl	snprintf
	ldr	r3, [fp, #-256]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-260]
	add	r3, r2, r3
	sub	r2, fp, #144
	str	r2, [r3]
	ldr	r0, .L17+60
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-252]
	b	.L13
.L14:
	ldr	r3, [fp, #-252]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-260]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+64
	bl	printf
	ldr	r3, [fp, #-252]
	add	r3, r3, #1
	str	r3, [fp, #-252]
.L13:
	ldr	r2, [fp, #-252]
	ldr	r3, [fp, #-256]
	cmp	r2, r3
	blt	.L14
	mov	r0, #10
	bl	putchar
	ldr	r3, .L17+68
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-260]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-260]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	execvp
	ldr	r0, .L17+72
	bl	perror
	mov	r3, #1
.L15:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC16
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	stdout
	.word	.LC15
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
