	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audit_sysclose                 ## -- Begin function audit_sysclose
	.p2align	4, 0x90
_audit_sysclose:                        ## @audit_sysclose
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%eax, %eax
	callq	_currecord
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	%ebx, %edi
	callq	_audit_arg_fd
	leaq	-28(%rbp), %rdi
	callq	_cap_rights_init
	leaq	-24(%rbp), %rcx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_getvnode
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movq	_LK_SHARED@GOTPCREL(%rip), %rax
	movq	_LK_RETRY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_vn_lock
	movq	%rbx, %rdi
	callq	_audit_arg_vnode1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_VOP_UNLOCK
	movq	-24(%rbp), %rdi
	movq	%r14, %rsi
	callq	_fdrop
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"audit_sysclose: td == NULL"

	.comm	_LK_SHARED,4,2                  ## @LK_SHARED
	.comm	_LK_RETRY,4,2                   ## @LK_RETRY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audit_sysclose                 ; -- Begin function audit_sysclose
	.p2align	2
_audit_sysclose:                        ; @audit_sysclose
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	bl	_currecord
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_audit_arg_fd
	add	x0, sp, #12
	bl	_cap_rights_init
	mov	x2, x0
	mov	x3, sp
	mov	x0, x19
	mov	x1, x20
	bl	_getvnode
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x8, [sp]
Lloh2:
	adrp	x9, _LK_SHARED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _LK_SHARED@GOTPAGEOFF]
	ldr	x20, [x8]
Lloh4:
	ldr	w8, [x9]
Lloh5:
	adrp	x9, _LK_RETRY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LK_RETRY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_vn_lock
	mov	x0, x20
	bl	_audit_arg_vnode1
	mov	x0, x20
	mov	w1, #0
	bl	_VOP_UNLOCK
	ldr	x0, [sp]
	mov	x1, x19
	bl	_fdrop
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"audit_sysclose: td == NULL"

	.comm	_LK_SHARED,4,2                  ; @LK_SHARED
	.comm	_LK_RETRY,4,2                   ; @LK_RETRY
.subsections_via_symbols
