	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_au_close_buffer                ## -- Begin function au_close_buffer
	.p2align	4, 0x90
_au_close_buffer:                       ## @au_close_buffer
	.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
	movq	%rcx, %r14
	movq	_open_desc_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %r12
	testq	%r12, %r12
	je	LBB0_7
## %bb.1:
	cmpq	$0, (%r12)
	je	LBB0_7
## %bb.2:
	movq	%rdx, %r15
	movq	_MAX_AUDIT_HEADER_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	8(%r12), %rdx
	movq	_AUDIT_TRAILER_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	_MAX_AUDIT_RECORD_SIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	ja	LBB0_4
## %bb.3:
	cmpq	(%r14), %rdx
	jbe	LBB0_9
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	movl	$-1, %ebx
LBB0_6:
	movq	%r12, %rdi
	callq	_au_teardown
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movswl	%si, %esi
	movq	%r12, %rdi
	callq	_au_assemble
	testq	%rax, %rax
	js	LBB0_5
## %bb.10:
	movl	16(%r12), %esi
	movq	8(%r12), %rdx
	movq	%r15, %rdi
	callq	_memcpy
	movq	8(%r12), %rax
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_open_desc_table,8,3            ## @open_desc_table
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_MAX_AUDIT_HEADER_SIZE,8,3      ## @MAX_AUDIT_HEADER_SIZE
	.comm	_AUDIT_TRAILER_SIZE,8,3         ## @AUDIT_TRAILER_SIZE
	.comm	_MAX_AUDIT_RECORD_SIZE,8,3      ## @MAX_AUDIT_RECORD_SIZE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"au_close_buffer failed %zd"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_au_close_buffer                ; -- Begin function au_close_buffer
	.p2align	2
_au_close_buffer:                       ; @au_close_buffer
	.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
Lloh0:
	adrp	x8, _open_desc_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _open_desc_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x19, [x8, w0, sxtw #3]
	cbz	x19, LBB0_7
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x21, x2
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _MAX_AUDIT_HEADER_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_AUDIT_HEADER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _AUDIT_TRAILER_SIZE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AUDIT_TRAILER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x2, x8, x10
Lloh9:
	adrp	x8, _MAX_AUDIT_RECORD_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_AUDIT_RECORD_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x2, x8
	b.hi	LBB0_4
; %bb.3:
	mov	x20, x3
	ldr	x8, [x3]
	cmp	x2, x8
	b.ls	LBB0_9
LBB0_4:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _errno@GOTPAGE
Lloh21:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
LBB0_5:
	mov	w21, #-1
LBB0_6:
	mov	x0, x19
	bl	_au_teardown
	b	LBB0_8
LBB0_7:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _errno@GOTPAGE
Lloh27:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh28:
	str	w8, [x9]
	mov	w21, #-1
LBB0_8:
	mov	x0, x21
	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
LBB0_9:
	mov	x0, x19
	bl	_au_assemble
	tbnz	x0, #63, LBB0_5
; %bb.10:
	ldr	w1, [x19, #16]
	ldr	x2, [x19, #8]
	mov	x0, x21
	bl	_memcpy
	mov	w21, #0
	ldr	x8, [x19, #8]
	str	x8, [x20]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_open_desc_table,8,3            ; @open_desc_table
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_MAX_AUDIT_HEADER_SIZE,8,3      ; @MAX_AUDIT_HEADER_SIZE
	.comm	_AUDIT_TRAILER_SIZE,8,3         ; @AUDIT_TRAILER_SIZE
	.comm	_MAX_AUDIT_RECORD_SIZE,8,3      ; @MAX_AUDIT_RECORD_SIZE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"au_close_buffer failed %zd"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
