	.file	"extr_opensolaris_vfs.c_mount_snapshot.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"mount_snapshot"
.LC1:
	.string	"from"
.LC2:
	.string	"mount: lost mount"
	.text
	.p2align 4
	.globl	mount_snapshot
	.type	mount_snapshot, @function
mount_snapshot:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	lea	rsi, .LC0[rip]
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rdi, QWORD PTR [rbx]
	mov	DWORD PTR 12[rsp], r9d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	ASSERT_VOP_ELOCKED@PLT
	mov	rbp, QWORD PTR [rbx]
	mov	rdi, r13
	mov	QWORD PTR [rbx], 0
	mov	DWORD PTR 28[rsp], 0
	call	strlen@PLT
	cmp	rax, QWORD PTR MFSNAMELEN[rip]
	jge	.L2
	mov	rdi, r14
	call	strlen@PLT
	cmp	rax, QWORD PTR MNAMELEN[rip]
	jge	.L2
.L5:
	mov	rdi, r13
	lea	rdx, 28[rsp]
	mov	rsi, r12
	call	vfs_byname_kld@PLT
	mov	r13, rax
	mov	eax, DWORD PTR 28[rsp]
	test	r13, r13
	je	.L35
.L7:
	test	eax, eax
	jne	.L14
	mov	rax, QWORD PTR VDIR[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L11
	mov	eax, DWORD PTR ENOTDIR[rip]
	mov	DWORD PTR 28[rsp], eax
	test	eax, eax
	jne	.L14
.L11:
	mov	rdi, rbp
	call	VI_LOCK@PLT
	mov	eax, DWORD PTR 8[rbp]
	mov	edx, DWORD PTR VI_MOUNT[rip]
	test	eax, edx
	je	.L9
.L10:
	mov	eax, DWORD PTR EBUSY[rip]
	mov	DWORD PTR 28[rsp], eax
.L13:
	mov	rdi, rbp
	call	VI_UNLOCK@PLT
	mov	eax, DWORD PTR 28[rsp]
	test	eax, eax
	jne	.L14
	xor	esi, esi
	mov	rdi, rbp
	call	VOP_UNLOCK@PLT
	mov	rax, QWORD PTR 24[rbp]
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, rbp
	mov	ecx, DWORD PTR [rax]
	call	vfs_mount_alloc@PLT
	mov	rdx, r15
	xor	ecx, ecx
	lea	rsi, .LC1[rip]
	mov	QWORD PTR 8[rax], 0
	mov	r13, rax
	mov	rdi, rax
	call	vfs_setmntopt@PLT
	mov	rax, QWORD PTR 24[r13]
	mov	r15, QWORD PTR [r12]
	mov	rdi, r13
	mov	r9d, DWORD PTR MNT_RDONLY[rip]
	or	r9d, DWORD PTR MNT_NOSUID[rip]
	mov	QWORD PTR 24[r13], 0
	or	r9d, DWORD PTR MNT_IGNORE[rip]
	mov	QWORD PTR 8[r13], rax
	mov	eax, DWORD PTR 12[rsp]
	and	eax, DWORD PTR MNT_UPDATEMASK[rip]
	or	r9d, eax
	mov	rax, QWORD PTR kcred[rip]
	mov	DWORD PTR 0[r13], r9d
	mov	QWORD PTR [r12], rax
	call	VFS_MOUNT@PLT
	mov	QWORD PTR [r12], r15
	mov	DWORD PTR 28[rsp], eax
	mov	r14d, eax
	test	eax, eax
	jne	.L36
	mov	rdi, QWORD PTR 24[r13]
	test	rdi, rdi
	je	.L17
	call	vfs_freeopts@PLT
.L17:
	mov	rax, QWORD PTR 8[r13]
	lea	rsi, 16[r13]
	mov	rdi, r13
	mov	QWORD PTR 24[r13], rax
	call	VFS_STATFS@PLT
	mov	QWORD PTR 8[r13], 0
	mov	esi, DWORD PTR LK_EXCLUSIVE[rip]
	mov	rdi, rbp
	or	esi, DWORD PTR LK_RETRY[rip]
	call	vn_lock@PLT
	mov	rdi, rbp
	call	VI_LOCK@PLT
	mov	eax, DWORD PTR VI_MOUNT[rip]
	mov	rdi, rbp
	not	eax
	and	DWORD PTR 8[rbp], eax
	call	VI_UNLOCK@PLT
	mov	QWORD PTR 16[rbp], r13
	lea	rdi, mountlist_mtx[rip]
	call	mtx_lock@PLT
	mov	edx, DWORD PTR mnt_list[rip]
	mov	rsi, r13
	lea	rdi, mountlist[rip]
	call	TAILQ_INSERT_TAIL@PLT
	lea	rdi, mountlist_mtx[rip]
	call	mtx_unlock@PLT
	mov	esi, DWORD PTR VQ_MOUNT[rip]
	xor	edx, edx
	xor	edi, edi
	call	vfs_event_signal@PLT
	mov	esi, DWORD PTR LK_EXCLUSIVE[rip]
	lea	rdx, 32[rsp]
	mov	rdi, r13
	call	VFS_ROOT@PLT
	test	rax, rax
	jne	.L37
.L18:
	xor	esi, esi
	mov	rdi, rbp
	call	VOP_UNLOCK@PLT
	mov	rdi, r13
	call	vfs_op_exit@PLT
	mov	rdi, r13
	call	vfs_unbusy@PLT
	mov	rax, QWORD PTR 32[rsp]
	mov	QWORD PTR [rbx], rax
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L38
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR ENAMETOOLONG[rip]
	mov	DWORD PTR 28[rsp], eax
	test	eax, eax
	je	.L5
.L14:
	mov	rdi, rbp
	call	vput@PLT
	mov	r14d, DWORD PTR 28[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	cmp	QWORD PTR 16[rbp], 0
	jne	.L10
	or	eax, edx
	mov	DWORD PTR 8[rbp], eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L37:
	lea	rdi, .LC2[rip]
	call	panic@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L36:
	mov	esi, DWORD PTR LK_EXCLUSIVE[rip]
	mov	rdi, rbp
	or	esi, DWORD PTR LK_RETRY[rip]
	call	vn_lock@PLT
	mov	rdi, rbp
	call	VI_LOCK@PLT
	mov	eax, DWORD PTR VI_MOUNT[rip]
	mov	rdi, rbp
	not	eax
	and	DWORD PTR 8[rbp], eax
	call	VI_UNLOCK@PLT
	mov	rdi, rbp
	call	vput@PLT
	mov	rdi, r13
	call	vfs_unbusy@PLT
	mov	rdi, QWORD PTR 8[r13]
	call	vfs_freeopts@PLT
	mov	QWORD PTR 32[r13], 0
	mov	rdi, r13
	call	vfs_mount_destroy@PLT
	mov	r14d, DWORD PTR 28[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	eax, DWORD PTR ENODEV[rip]
	mov	DWORD PTR 28[rsp], eax
	jmp	.L7
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mount_snapshot, .-mount_snapshot
	.comm	mountlist_mtx,4,4
	.comm	mountlist,4,4
	.comm	mnt_list,4,4
	.comm	kcred,8,8
	.comm	VQ_MOUNT,4,4
	.comm	VI_MOUNT,4,4
	.comm	VDIR,8,8
	.comm	MNT_UPDATEMASK,4,4
	.comm	MNT_RDONLY,4,4
	.comm	MNT_NOSUID,4,4
	.comm	MNT_IGNORE,4,4
	.comm	MNAMELEN,8,8
	.comm	MFSNAMELEN,8,8
	.comm	LK_RETRY,4,4
	.comm	LK_EXCLUSIVE,4,4
	.comm	ENOTDIR,4,4
	.comm	ENODEV,4,4
	.comm	ENAMETOOLONG,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_opensolaris_vfs.c_mount_snapshot.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"mount_snapshot\000"
	.align	2
.LC1:
	.ascii	"from\000"
	.align	2
.LC2:
	.ascii	"mount: lost mount\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mount_snapshot
	.syntax unified
	.arm
	.fpu softvfp
	.type	mount_snapshot, %function
mount_snapshot:
	@ args = 8, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r3
	ldr	r3, .L39
	sub	sp, sp, #20
	mov	r6, r1
	mov	r7, r0
	ldr	r0, [r1]
	ldr	r1, .L39+4
	mov	r4, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r10, [sp, #56]
	bl	ASSERT_VOP_ELOCKED
	mov	r3, #0
	mov	r0, r4
	ldr	r5, [r6]
	str	r3, [r6]
	str	r3, [sp, #8]
	bl	strlen
	ldr	r3, .L39+8
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L2
	mov	r0, fp
	bl	strlen
	ldr	r3, .L39+12
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L2
.L5:
	mov	r0, r4
	mov	r1, r7
	add	r2, sp, #8
	bl	vfs_byname_kld
	subs	r4, r0, #0
	ldrne	r3, [sp, #8]
	beq	.L35
.L7:
	cmp	r3, #0
	bne	.L14
	ldr	r3, .L39+16
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L11
	ldr	r3, .L39+20
	ldr	r3, [r3]
	cmp	r3, #0
	str	r3, [sp, #8]
	bne	.L14
.L11:
	ldr	r9, .L39+24
	mov	r0, r5
	bl	VI_LOCK
	ldr	r2, [r9]
	ldr	r3, [r5, #4]
	tst	r3, r2
	beq	.L9
.L10:
	ldr	r3, .L39+28
	ldr	r3, [r3]
	str	r3, [sp, #8]
.L13:
	mov	r0, r5
	bl	VI_UNLOCK
	ldr	r8, [sp, #8]
	cmp	r8, #0
	bne	.L14
	mov	r1, r8
	mov	r0, r5
	bl	VOP_UNLOCK
	ldr	r3, [r5, #12]
	mov	r2, fp
	mov	r1, r4
	ldr	r3, [r3]
	mov	r0, r5
	bl	vfs_mount_alloc
	mov	r4, r0
	mov	r2, r10
	mov	r3, r8
	ldr	r1, .L39+32
	str	r8, [r0, #4]
	bl	vfs_setmntopt
	ldr	r3, .L39+36
	ldr	r1, .L39+40
	ldr	r0, .L39+44
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	ip, [r0]
	ldr	r2, .L39+48
	orr	r3, r3, r1
	ldr	r2, [r2]
	orr	r3, r3, ip
	ldr	r1, .L39+52
	ldr	ip, [sp, #60]
	ldr	r0, [r4, #12]
	ldr	r1, [r1]
	and	r2, r2, ip
	orr	r3, r3, r2
	ldr	fp, [r7]
	str	r0, [r4, #4]
	str	r8, [r4, #12]
	str	r3, [r4]
	mov	r0, r4
	str	r1, [r7]
	bl	VFS_MOUNT
	cmp	r0, #0
	mov	r10, r0
	str	r0, [sp, #8]
	str	fp, [r7]
	bne	.L36
	ldr	r0, [r4, #12]
	cmp	r0, #0
	beq	.L17
	bl	vfs_freeopts
.L17:
	mov	r7, #0
	ldr	r3, [r4, #4]
	add	r1, r4, #8
	str	r3, [r4, #12]
	mov	r0, r4
	bl	VFS_STATFS
	ldr	r8, .L39+56
	ldr	r3, .L39+60
	ldr	r1, [r8]
	ldr	r3, [r3]
	mov	r0, r5
	orr	r1, r1, r3
	str	r7, [r4, #4]
	bl	vn_lock
	mov	r0, r5
	bl	VI_LOCK
	ldr	r2, [r9]
	ldr	r3, [r5, #4]
	mov	r0, r5
	bic	r3, r3, r2
	str	r3, [r5, #4]
	bl	VI_UNLOCK
	ldr	r0, .L39+64
	str	r4, [r5, #8]
	bl	mtx_lock
	ldr	r3, .L39+68
	mov	r1, r4
	ldr	r2, [r3]
	ldr	r0, .L39+72
	bl	TAILQ_INSERT_TAIL
	ldr	r0, .L39+64
	bl	mtx_unlock
	ldr	r3, .L39+76
	mov	r2, r7
	ldr	r1, [r3]
	mov	r0, r7
	bl	vfs_event_signal
	mov	r0, r4
	ldr	r1, [r8]
	add	r2, sp, #4
	bl	VFS_ROOT
	cmp	r0, r7
	bne	.L37
.L18:
	mov	r1, #0
	mov	r0, r5
	bl	VOP_UNLOCK
	mov	r0, r4
	bl	vfs_op_exit
	mov	r0, r4
	bl	vfs_unbusy
	ldr	r3, [sp, #4]
	str	r3, [r6]
.L1:
	ldr	r3, .L39
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L38
	mov	r0, r10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L39+80
	ldr	r3, [r3]
	cmp	r3, #0
	str	r3, [sp, #8]
	beq	.L5
.L14:
	mov	r0, r5
	bl	vput
	ldr	r10, [sp, #8]
	b	.L1
.L9:
	ldr	r1, [r5, #8]
	cmp	r1, #0
	orreq	r3, r3, r2
	streq	r3, [r5, #4]
	bne	.L10
	b	.L13
.L37:
	ldr	r0, .L39+84
	bl	panic
	b	.L18
.L36:
	ldr	r2, .L39+56
	ldr	r3, .L39+60
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r5
	orr	r1, r1, r3
	bl	vn_lock
	mov	r0, r5
	bl	VI_LOCK
	ldr	r2, [r9]
	ldr	r3, [r5, #4]
	mov	r0, r5
	bic	r3, r3, r2
	str	r3, [r5, #4]
	bl	VI_UNLOCK
	mov	r0, r5
	bl	vput
	mov	r0, r4
	bl	vfs_unbusy
	ldr	r0, [r4, #4]
	bl	vfs_freeopts
	mov	r0, r4
	str	r8, [r4, #16]
	bl	vfs_mount_destroy
	ldr	r10, [sp, #8]
	b	.L1
.L35:
	ldr	r3, .L39+88
	ldr	r3, [r3]
	str	r3, [sp, #8]
	b	.L7
.L38:
	bl	__stack_chk_fail
.L40:
	.align	2
.L39:
	.word	.LC3
	.word	.LC0
	.word	MFSNAMELEN
	.word	MNAMELEN
	.word	VDIR
	.word	ENOTDIR
	.word	VI_MOUNT
	.word	EBUSY
	.word	.LC1
	.word	MNT_RDONLY
	.word	MNT_NOSUID
	.word	MNT_IGNORE
	.word	MNT_UPDATEMASK
	.word	kcred
	.word	LK_EXCLUSIVE
	.word	LK_RETRY
	.word	mountlist_mtx
	.word	mnt_list
	.word	mountlist
	.word	VQ_MOUNT
	.word	ENAMETOOLONG
	.word	.LC2
	.word	ENODEV
	.size	mount_snapshot, .-mount_snapshot
	.comm	mountlist_mtx,4,4
	.comm	mountlist,4,4
	.comm	mnt_list,4,4
	.comm	kcred,4,4
	.comm	VQ_MOUNT,4,4
	.comm	VI_MOUNT,4,4
	.comm	VDIR,4,4
	.comm	MNT_UPDATEMASK,4,4
	.comm	MNT_RDONLY,4,4
	.comm	MNT_NOSUID,4,4
	.comm	MNT_IGNORE,4,4
	.comm	MNAMELEN,4,4
	.comm	MFSNAMELEN,4,4
	.comm	LK_RETRY,4,4
	.comm	LK_EXCLUSIVE,4,4
	.comm	ENOTDIR,4,4
	.comm	ENODEV,4,4
	.comm	ENAMETOOLONG,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
