	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function memfd_truncate_test
_memfd_truncate_test:                   ## @memfd_truncate_test
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_MFD_ALLOW_SEALING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_memfd_create
	movl	%eax, %r12d
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_ftruncate
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ATF_REQUIRE
	movq	_F_ADD_SEALS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	movl	%r15d, %edx
	callq	_fcntl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	movl	%r12d, %edi
	movl	%r14d, %esi
	callq	_ftruncate
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movl	%r12d, %edi
	callq	_close
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"..."

	.comm	_MFD_ALLOW_SEALING,4,2          ## @MFD_ALLOW_SEALING
	.comm	_F_ADD_SEALS,4,2                ## @F_ADD_SEALS
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_memfd_truncate_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function memfd_truncate_test
_memfd_truncate_test:                   ; @memfd_truncate_test
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MFD_ALLOW_SEALING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MFD_ALLOW_SEALING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_memfd_create
	mov	x22, x0
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	mov	x0, x22
	mov	x1, x21
	bl	_ftruncate
	cmp	w0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
Lloh5:
	adrp	x8, _F_ADD_SEALS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _F_ADD_SEALS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x19
	bl	_fcntl
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	mov	x0, x22
	mov	x1, x20
	bl	_ftruncate
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w19, wzr, w8, eq
	mov	x0, x22
	bl	_close
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"..."

	.comm	_MFD_ALLOW_SEALING,4,2          ; @MFD_ALLOW_SEALING
	.comm	_F_ADD_SEALS,4,2                ; @F_ADD_SEALS
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_memfd_truncate_test
.subsections_via_symbols
