	.file	"1045643.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s NEW-ROOT [PUT-OLD]\n"
.LC1:
	.string	"cannot pivot to new root %s"
.LC2:
	.string	"/"
.LC3:
	.string	"cannot open /"
.LC4:
	.string	"cannot open %s"
.LC5:
	.string	"."
.LC6:
	.string	"cannot re-enter old root"
.LC7:
	.string	""
	.align 8
.LC8:
	.string	"cannot disable old root mount propagation"
.LC9:
	.string	"cannot detach old root"
.LC10:
	.string	"cannot re-enter new root"
	.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 64
	jmp	.L3
.L2:
	cmp	DWORD PTR -20[rbp], 2
	jle	.L4
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	mov	edi, 155
	mov	eax, 0
	call	syscall@PLT
	test	rax, rax
	jns	.L5
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L5:
	mov	eax, 0
	jmp	.L3
.L4:
	mov	esi, 65536
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	shr	eax, 31
	and	eax, 1
	test	al, al
	je	.L6
	lea	rsi, .LC3[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L6:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 65536
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	shr	eax, 31
	and	eax, 1
	test	al, al
	je	.L7
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L7:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	fchdir@PLT
	test	eax, eax
	js	.L8
	lea	rdx, .LC5[rip]
	lea	rsi, .LC5[rip]
	mov	edi, 155
	mov	eax, 0
	call	syscall@PLT
	test	rax, rax
	jns	.L9
.L8:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L9:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	fchdir@PLT
	test	eax, eax
	jns	.L10
	lea	rsi, .LC6[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L10:
	mov	r8d, 0
	mov	ecx, 540672
	lea	rdx, .LC7[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC7[rip]
	call	mount@PLT
	test	eax, eax
	jns	.L11
	lea	rsi, .LC8[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L11:
	mov	esi, 2
	lea	rdi, .LC5[rip]
	call	umount2@PLT
	test	eax, eax
	jns	.L12
	lea	rsi, .LC9[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L12:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	fchdir@PLT
	test	eax, eax
	jns	.L13
	lea	rsi, .LC10[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L13:
	mov	eax, 0
.L3:
	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	"1045643.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s NEW-ROOT [PUT-OLD]\012\000"
	.align	2
.LC1:
	.ascii	"cannot pivot to new root %s\000"
	.align	2
.LC2:
	.ascii	"/\000"
	.align	2
.LC3:
	.ascii	"cannot open /\000"
	.align	2
.LC4:
	.ascii	"cannot open %s\000"
	.align	2
.LC5:
	.ascii	".\000"
	.align	2
.LC6:
	.ascii	"cannot re-enter old root\000"
	.align	2
.LC7:
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"cannot disable old root mount propagation\000"
	.align	2
.LC9:
	.ascii	"cannot detach old root\000"
	.align	2
.LC10:
	.ascii	"cannot re-enter new root\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L14
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L14+4
	bl	fprintf
	mov	r3, #64
	b	.L3
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	ble	.L4
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, r3
	mov	r0, #218
	bl	syscall
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L14+8
	mov	r0, #1
	bl	err
.L5:
	mov	r3, #0
	b	.L3
.L4:
	mov	r1, #16384
	ldr	r0, .L14+12
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	lsr	r3, r3, #31
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L6
	ldr	r1, .L14+16
	mov	r0, #1
	bl	err
.L6:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #16384
	mov	r0, r3
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #31
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L14+20
	mov	r0, #1
	bl	err
.L7:
	ldr	r0, [fp, #-8]
	bl	fchdir
	mov	r3, r0
	cmp	r3, #0
	blt	.L8
	ldr	r2, .L14+24
	ldr	r1, .L14+24
	mov	r0, #218
	bl	syscall
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
.L8:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L14+8
	mov	r0, #1
	bl	err
.L9:
	ldr	r0, [fp, #-12]
	bl	fchdir
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r1, .L14+28
	mov	r0, #1
	bl	err
.L10:
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #540672
	ldr	r2, .L14+32
	ldr	r1, .L14+24
	ldr	r0, .L14+32
	bl	mount
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	ldr	r1, .L14+36
	mov	r0, #1
	bl	err
.L11:
	mov	r1, #2
	ldr	r0, .L14+24
	bl	umount2
	mov	r3, r0
	cmp	r3, #0
	bge	.L12
	ldr	r1, .L14+40
	mov	r0, #1
	bl	err
.L12:
	ldr	r0, [fp, #-8]
	bl	fchdir
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	ldr	r1, .L14+44
	mov	r0, #1
	bl	err
.L13:
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
