	.file	"31387233.c"
	.intel_syntax noprefix
	.text
	.globl	netns_template
	.section	.rodata
.LC0:
	.string	"/var/run/netns/user.%s"
	.section	.data.rel.local,"aw"
	.align 8
	.type	netns_template, @object
	.size	netns_template, 8
netns_template:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"Could not initialize"
	.align 8
.LC2:
	.string	"Error: Must be a setuid binary"
	.align 8
.LC3:
	.string	"Error: As root, use `ip netns exec <ns name>` instead"
.LC4:
	.string	"Could not identify user"
.LC5:
	.string	"Could not find user namespace"
	.align 8
.LC6:
	.string	"You might want to contact your system administrator"
.LC7:
	.string	"Could not join namespace"
	.align 8
.LC8:
	.string	"Could not execute specified command"
	.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, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -184[rbp], 0
	lea	rdx, -192[rbp]
	lea	rcx, -196[rbp]
	lea	rax, -200[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getresuid@PLT
	test	eax, eax
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 5
	jmp	.L10
.L2:
	mov	eax, DWORD PTR -196[rbp]
	test	eax, eax
	je	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L10
.L4:
	mov	eax, DWORD PTR -200[rbp]
	test	eax, eax
	jne	.L5
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L10
.L5:
	mov	eax, DWORD PTR -200[rbp]
	mov	edi, eax
	call	getpwuid@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jne	.L6
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 6
	jmp	.L10
.L6:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR netns_template[rip]
	mov	rcx, rdx
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	mov	eax, 0
	call	snprintf@PLT
	cdqe
	mov	QWORD PTR -168[rbp], rax
	add	QWORD PTR -168[rbp], 1
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -184[rbp], rax
	cmp	QWORD PTR -184[rbp], 0
	jne	.L7
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 6
	jmp	.L10
.L7:
	mov	rax, QWORD PTR -176[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR netns_template[rip]
	mov	rsi, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 2
	jmp	.L10
.L8:
	mov	rax, QWORD PTR -184[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -188[rbp]
	mov	esi, 1073741824
	mov	edi, eax
	call	setns@PLT
	test	eax, eax
	jns	.L9
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	eax, 3
	jmp	.L10
.L9:
	mov	edx, DWORD PTR -200[rbp]
	mov	ecx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -200[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	setresuid@PLT
	mov	eax, DWORD PTR -212[rbp]
	sub	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	memmove@PLT
	mov	eax, DWORD PTR -212[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -224[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 4
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	"31387233.c"
	.text
	.global	netns_template
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/var/run/netns/user.%s\000"
	.data
	.align	2
	.type	netns_template, %object
	.size	netns_template, 4
netns_template:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Could not initialize\000"
	.align	2
.LC2:
	.ascii	"Error: Must be a setuid binary\000"
	.align	2
.LC3:
	.ascii	"Error: As root, use `ip netns exec <ns name>` inste"
	.ascii	"ad\000"
	.align	2
.LC4:
	.ascii	"Could not identify user\000"
	.align	2
.LC5:
	.ascii	"Could not find user namespace\000"
	.align	2
.LC6:
	.ascii	"You might want to contact your system administrator"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"Could not join namespace\000"
	.align	2
.LC8:
	.ascii	"Could not execute specified command\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 = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	str	r0, [fp, #-136]
	str	r1, [fp, #-140]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-116]
	sub	r2, fp, #120
	sub	r1, fp, #124
	sub	r3, fp, #128
	mov	r0, r3
	bl	getresuid
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L12+4
	bl	perror
	mov	r3, #5
	b	.L10
.L2:
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L12+8
	bl	puts
	mov	r3, #1
	b	.L10
.L4:
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L12+12
	bl	puts
	mov	r3, #1
	b	.L10
.L5:
	ldr	r3, [fp, #-128]
	mov	r0, r3
	bl	getpwuid
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L12+16
	bl	perror
	mov	r3, #6
	b	.L10
.L6:
	ldr	r3, .L12+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, #0
	bl	snprintf
	mov	r3, r0
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
	ldr	r0, [fp, #-108]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-116]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L12+16
	bl	perror
	mov	r3, #6
	b	.L10
.L7:
	ldr	r3, .L12+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	ldr	r1, [fp, #-108]
	ldr	r0, [fp, #-116]
	bl	snprintf
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-116]
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L12+24
	bl	perror
	ldr	r0, .L12+28
	bl	puts
	mov	r3, #2
	b	.L10
.L8:
	mov	r1, #0
	ldr	r0, [fp, #-116]
	bl	open
	str	r0, [fp, #-104]
	mov	r1, #1073741824
	ldr	r0, [fp, #-104]
	bl	setns
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L12+32
	bl	perror
	mov	r3, #3
	b	.L10
.L9:
	ldr	r3, [fp, #-128]
	ldr	r1, [fp, #-128]
	ldr	r2, [fp, #-128]
	mov	r0, r3
	bl	setresuid
	ldr	r3, [fp, #-140]
	ldr	r0, [r3]
	ldr	r3, [fp, #-140]
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	r3, [fp, #-136]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	mov	r2, r3
	bl	memmove
	ldr	r3, [fp, #-136]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-140]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-140]
	ldr	r3, [r3]
	ldr	r1, [fp, #-140]
	mov	r0, r3
	bl	execvp
	ldr	r0, .L12+36
	bl	perror
	mov	r3, #4
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC9
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	netns_template
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
