	.file	"101097.c"
	.intel_syntax noprefix
	.text
	.type	sys_memfd_create, @function
sys_memfd_create:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 319
	mov	eax, 0
	call	syscall@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sys_memfd_create, .-sys_memfd_create
	.section	.rodata
	.align 8
.LC0:
	.string	"memfd_create(\"%s\", %u) failed: %m\n"
.LC1:
	.string	"ftruncate(%llu) failed: %m\n"
	.text
	.type	mfd_assert_new, @function
mfd_assert_new:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	sys_memfd_create
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jns	.L4
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L4:
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	ftruncate@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L5
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L5:
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mfd_assert_new, .-mfd_assert_new
	.section	.rodata
.LC2:
	.string	"GET_SEALS(%d) failed: %m\n"
	.text
	.type	mfd_assert_get_seals, @function
mfd_assert_get_seals:
.LFB8:
	.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	eax, DWORD PTR -20[rbp]
	mov	esi, 1034
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L8
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L8:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mfd_assert_get_seals, .-mfd_assert_get_seals
	.section	.rodata
.LC3:
	.string	"%llu != %llu = GET_SEALS(%d)\n"
	.text
	.type	mfd_assert_has_seals, @function
mfd_assert_has_seals:
.LFB9:
	.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
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	mfd_assert_get_seals
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -32[rbp]
	je	.L12
	mov	ecx, DWORD PTR -20[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	mfd_assert_has_seals, .-mfd_assert_has_seals
	.section	.rodata
	.align 8
.LC4:
	.string	"ADD_SEALS(%d, %llu -> %llu) failed: %m\n"
	.text
	.type	mfd_assert_add_seals, @function
mfd_assert_add_seals:
.LFB10:
	.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
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	mfd_assert_get_seals
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 1033
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L15
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L15:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	mfd_assert_add_seals, .-mfd_assert_add_seals
	.section	.rodata
	.align 8
.LC5:
	.string	"ADD_SEALS(%d, %llu -> %llu) didn't fail as expected with EBUSY: %m\n"
	.text
	.type	mfd_busy_add_seals, @function
mfd_busy_add_seals:
.LFB11:
	.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
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 1034
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L17
	mov	QWORD PTR -16[rbp], 0
	jmp	.L18
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -16[rbp], rax
.L18:
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 1033
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 16
	je	.L19
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L19:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mfd_busy_add_seals, .-mfd_busy_add_seals
	.section	.rodata
.LC6:
	.string	"mmap() failed: %m\n"
	.text
	.type	mfd_assert_mmap_shared, @function
mfd_assert_mmap_shared:
.LFB12:
	.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	eax, DWORD PTR -20[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 8192
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L22
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L22:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	mfd_assert_mmap_shared, .-mfd_assert_mmap_shared
	.type	mfd_assert_mmap_private, @function
mfd_assert_mmap_private:
.LFB13:
	.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	eax, DWORD PTR -20[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 2
	mov	edx, 3
	mov	esi, 8192
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L25
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L25:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	mfd_assert_mmap_private, .-mfd_assert_mmap_private
	.data
	.align 4
	.type	global_mfd, @object
	.size	global_mfd, 4
global_mfd:
	.long	-1
	.local	global_p
	.comm	global_p,8,8
	.section	.rodata
	.align 8
.LC7:
	.string	"HURRAY! This kernel fixed GUP races!"
	.text
	.type	sealing_thread_fn, @function
sealing_thread_fn:
.LFB14:
	.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	QWORD PTR -24[rbp], rdi
	mov	edi, 200000
	call	usleep@PLT
	mov	rax, QWORD PTR global_p[rip]
	mov	esi, 8192
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR global_mfd[rip]
	mov	esi, 8
	mov	edi, eax
	call	mfd_busy_add_seals
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	js	.L28
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L29
.L28:
	mov	edi, 1
	call	sleep@PLT
	mov	eax, DWORD PTR global_mfd[rip]
	mov	esi, 8
	mov	edi, eax
	call	mfd_assert_add_seals
.L29:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	sealing_thread_fn, .-sealing_thread_fn
	.section	.rodata
	.align 8
.LC8:
	.string	"malloc(STACK_SIZE) failed: %m\n"
.LC9:
	.string	"clone() failed: %m\n"
	.text
	.type	spawn_sealing_thread, @function
spawn_sealing_thread:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	edi, 65536
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L32
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L32:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 65536
	mov	ecx, 0
	mov	edx, 1809
	mov	rsi, rax
	lea	rdi, sealing_thread_fn[rip]
	mov	eax, 0
	call	clone@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L33
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L33:
	mov	eax, DWORD PTR -12[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	spawn_sealing_thread, .-spawn_sealing_thread
	.type	join_sealing_thread, @function
join_sealing_thread:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	waitpid@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	join_sealing_thread, .-join_sealing_thread
	.section	.rodata
	.align 8
.LC10:
	.string	"error: please pass path to file in fuse_mnt mount-point"
.LC11:
	.string	"opening: %s\n"
.LC12:
	.string	"cannot open(\"%s\"): %m\n"
.LC13:
	.string	"kern_memfd_fuse"
.LC14:
	.string	"read() failed: %m\n"
.LC15:
	.string	"unexpected EOF on read()"
	.align 8
.LC16:
	.string	"memfd sealed during read() but data not discarded"
	.align 8
.LC17:
	.string	"memfd sealed after read() but data discarded"
.LC18:
	.string	"fuse: DONE"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 1
	jg	.L37
	lea	rdi, .LC10[rip]
	call	puts@PLT
	call	abort@PLT
.L37:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 524288
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L38
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L38:
	mov	edx, 3
	mov	esi, 8192
	lea	rdi, .LC13[rip]
	call	mfd_assert_new
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	mfd_assert_mmap_shared
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR global_mfd[rip], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR global_p[rip], rax
	call	spawn_sealing_thread
	mov	DWORD PTR -20[rbp], eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 8192
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L39
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	call	abort@PLT
.L39:
	cmp	DWORD PTR -16[rbp], 0
	jne	.L40
	lea	rdi, .LC15[rip]
	call	puts@PLT
	call	abort@PLT
.L40:
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	mfd_assert_get_seals
	and	eax, 8
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	join_sealing_thread
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, 8
	mov	edi, eax
	call	mfd_assert_has_seals
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	mfd_assert_mmap_private
	mov	QWORD PTR -8[rbp], rax
	cmp	DWORD PTR -12[rbp], 0
	je	.L41
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 8192
	lea	rsi, zero.0[rip]
	mov	rdi, rax
	call	memcmp@PLT
	test	eax, eax
	je	.L41
	lea	rdi, .LC16[rip]
	call	puts@PLT
	call	abort@PLT
.L41:
	cmp	DWORD PTR -12[rbp], 0
	jne	.L42
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 8192
	lea	rsi, zero.0[rip]
	mov	rdi, rax
	call	memcmp@PLT
	test	eax, eax
	jne	.L42
	lea	rdi, .LC17[rip]
	call	puts@PLT
	call	abort@PLT
.L42:
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	main, .-main
	.section	.rodata
	.align 32
	.type	zero.0, @object
	.size	zero.0, 8192
zero.0:
	.zero	8192
	.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	"101097.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sys_memfd_create, %function
sys_memfd_create:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L3
	bl	syscall
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	385
	.size	sys_memfd_create, .-sys_memfd_create
	.section	.rodata
	.align	2
.LC0:
	.ascii	"memfd_create(\"%s\", %u) failed: %m\012\000"
	.align	2
.LC1:
	.ascii	"ftruncate(%llu) failed: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_assert_new, %function
mfd_assert_new:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r1, [fp, #4]
	ldr	r0, [fp, #-16]
	bl	sys_memfd_create
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L6
	ldr	r2, [fp, #4]
	ldr	r1, [fp, #-16]
	ldr	r0, .L9
	bl	printf
	bl	abort
.L6:
	ldr	r3, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	ftruncate
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L7
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	ldr	r0, .L9+4
	bl	printf
	bl	abort
.L7:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	.LC1
	.size	mfd_assert_new, .-mfd_assert_new
	.section	.rodata
	.align	2
.LC2:
	.ascii	"GET_SEALS(%d) failed: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_assert_get_seals, %function
mfd_assert_get_seals:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r1, .L14
	ldr	r0, [fp, #-16]
	bl	fcntl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L12
	ldr	r1, [fp, #-16]
	ldr	r0, .L14+4
	bl	printf
	bl	abort
.L12:
	ldr	r3, [fp, #-8]
	mov	r2, r3
	asr	r3, r2, #31
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	1034
	.word	.LC2
	.size	mfd_assert_get_seals, .-mfd_assert_get_seals
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%llu != %llu = GET_SEALS(%d)\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_assert_has_seals, %function
mfd_assert_has_seals:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-16]
	str	r2, [fp, #-28]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	mfd_assert_get_seals
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	beq	.L18
	ldr	r3, [fp, #-16]
	str	r3, [sp, #8]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #28
	ldmia	r3, {r2-r3}
	ldr	r0, .L19
	bl	printf
	bl	abort
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC3
	.size	mfd_assert_has_seals, .-mfd_assert_has_seals
	.section	.rodata
	.align	2
.LC4:
	.ascii	"ADD_SEALS(%d, %llu -> %llu) failed: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_assert_add_seals, %function
mfd_assert_add_seals:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	mfd_assert_get_seals
	str	r0, [fp, #-12]
	str	r1, [fp, #-8]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r1, .L24
	ldr	r0, [fp, #-24]
	bl	fcntl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L23
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-24]
	ldr	r0, .L24+4
	bl	printf
	bl	abort
.L23:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	1033
	.word	.LC4
	.size	mfd_assert_add_seals, .-mfd_assert_add_seals
	.section	.rodata
	.align	2
.LC5:
	.ascii	"ADD_SEALS(%d, %llu -> %llu) didn't fail as expected"
	.ascii	" with EBUSY: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_busy_add_seals, %function
mfd_busy_add_seals:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r1, .L31
	ldr	r0, [fp, #-24]
	bl	fcntl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L27
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	b	.L28
.L27:
	ldr	r3, [fp, #-16]
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
.L28:
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r1, .L31+4
	ldr	r0, [fp, #-24]
	bl	fcntl
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #16
	beq	.L29
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-24]
	ldr	r0, .L31+8
	bl	printf
	bl	abort
.L29:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	1034
	.word	1033
	.word	.LC5
	.size	mfd_busy_add_seals, .-mfd_busy_add_seals
	.section	.rodata
	.align	2
.LC6:
	.ascii	"mmap() failed: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_assert_mmap_shared, %function
mfd_assert_mmap_shared:
	@ 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]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #8192
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L34
	ldr	r0, .L36
	bl	printf
	bl	abort
.L34:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC6
	.size	mfd_assert_mmap_shared, .-mfd_assert_mmap_shared
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mfd_assert_mmap_private, %function
mfd_assert_mmap_private:
	@ 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]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	mov	r3, #2
	mov	r2, #3
	mov	r1, #8192
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L39
	ldr	r0, .L41
	bl	printf
	bl	abort
.L39:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC6
	.size	mfd_assert_mmap_private, .-mfd_assert_mmap_private
	.data
	.align	2
	.type	global_mfd, %object
	.size	global_mfd, 4
global_mfd:
	.word	-1
	.local	global_p
	.comm	global_p,4,4
	.section	.rodata
	.align	2
.LC7:
	.ascii	"HURRAY! This kernel fixed GUP races!\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sealing_thread_fn, %function
sealing_thread_fn:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, .L47
	bl	usleep
	ldr	r3, .L47+4
	ldr	r3, [r3]
	mov	r1, #8192
	mov	r0, r3
	bl	munmap
	ldr	r3, .L47+8
	ldr	r1, [r3]
	mov	r2, #8
	mov	r3, #0
	mov	r0, r1
	bl	mfd_busy_add_seals
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L44
	ldr	r0, .L47+12
	bl	puts
	b	.L45
.L44:
	mov	r0, #1
	bl	sleep
	ldr	r3, .L47+8
	ldr	r1, [r3]
	mov	r2, #8
	mov	r3, #0
	mov	r0, r1
	bl	mfd_assert_add_seals
.L45:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	200000
	.word	global_p
	.word	global_mfd
	.word	.LC7
	.size	sealing_thread_fn, .-sealing_thread_fn
	.section	.rodata
	.align	2
.LC8:
	.ascii	"malloc(STACK_SIZE) failed: %m\012\000"
	.align	2
.LC9:
	.ascii	"clone() failed: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	spawn_sealing_thread, %function
spawn_sealing_thread:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #65536
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L50
	ldr	r0, .L53
	bl	printf
	bl	abort
.L50:
	ldr	r3, [fp, #-12]
	add	r1, r3, #65536
	mov	r3, #0
	ldr	r2, .L53+4
	ldr	r0, .L53+8
	bl	clone
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L51
	ldr	r0, .L53+12
	bl	printf
	bl	abort
.L51:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC8
	.word	1809
	.word	sealing_thread_fn
	.word	.LC9
	.size	spawn_sealing_thread, .-spawn_sealing_thread
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	join_sealing_thread, %function
join_sealing_thread:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	waitpid
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	join_sealing_thread, .-join_sealing_thread
	.section	.rodata
	.align	2
.LC10:
	.ascii	"error: please pass path to file in fuse_mnt mount-p"
	.ascii	"oint\000"
	.align	2
.LC11:
	.ascii	"opening: %s\012\000"
	.align	2
.LC12:
	.ascii	"cannot open(\"%s\"): %m\012\000"
	.align	2
.LC13:
	.ascii	"kern_memfd_fuse\000"
	.align	2
.LC14:
	.ascii	"read() failed: %m\012\000"
	.align	2
.LC15:
	.ascii	"unexpected EOF on read()\000"
	.align	2
.LC16:
	.ascii	"memfd sealed during read() but data not discarded\000"
	.align	2
.LC17:
	.ascii	"memfd sealed after read() but data discarded\000"
	.align	2
.LC18:
	.ascii	"fuse: DONE\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #1
	bgt	.L57
	ldr	r0, .L64
	bl	puts
	bl	abort
.L57:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+4
	bl	printf
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #524288
	mov	r0, r3
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L58
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+8
	bl	printf
	bl	abort
.L58:
	mov	r3, #3
	str	r3, [sp]
	mov	r2, #8192
	mov	r3, #0
	ldr	r0, .L64+12
	bl	mfd_assert_new
	str	r0, [fp, #-24]
	ldr	r0, [fp, #-24]
	bl	mfd_assert_mmap_shared
	str	r0, [fp, #-20]
	ldr	r2, .L64+16
	ldr	r3, [fp, #-24]
	str	r3, [r2]
	ldr	r2, .L64+20
	ldr	r3, [fp, #-20]
	str	r3, [r2]
	bl	spawn_sealing_thread
	str	r0, [fp, #-16]
	mov	r2, #8192
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-28]
	bl	read
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L59
	ldr	r0, .L64+24
	bl	printf
	bl	abort
.L59:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L60
	ldr	r0, .L64+28
	bl	puts
	bl	abort
.L60:
	ldr	r0, [fp, #-24]
	bl	mfd_assert_get_seals
	mov	r2, r0
	mov	r3, r1
	mov	r3, r2
	and	r3, r3, #8
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	join_sealing_thread
	mov	r2, #8
	mov	r3, #0
	ldr	r0, [fp, #-24]
	bl	mfd_assert_has_seals
	ldr	r0, [fp, #-24]
	bl	mfd_assert_mmap_private
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L61
	mov	r2, #8192
	ldr	r1, .L64+32
	ldr	r0, [fp, #-20]
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L61
	ldr	r0, .L64+36
	bl	puts
	bl	abort
.L61:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L62
	mov	r2, #8192
	ldr	r1, .L64+32
	ldr	r0, [fp, #-20]
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L62
	ldr	r0, .L64+40
	bl	puts
	bl	abort
.L62:
	ldr	r0, [fp, #-24]
	bl	close
	ldr	r0, [fp, #-28]
	bl	close
	ldr	r0, .L64+44
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	global_mfd
	.word	global_p
	.word	.LC14
	.word	.LC15
	.word	zero.7158
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	zero.7158, %object
	.size	zero.7158, 8192
zero.7158:
	.space	8192
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
