	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function swap_audit_file
_swap_audit_file:                       ## @swap_audit_file
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TIMESTAMP_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	incl	%ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_getTSstr
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_13
## %bb.1:
	movq	_lastfile@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.2:
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	incq	%rax
	movl	(%r15), %edx
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movq	_audit_review_gid@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_audit_warn_getacdir@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_auditd_swap_trail
	movl	%eax, %r15d
	movq	_ADE_NOERR@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_7
## %bb.6:
	movl	%r15d, %edi
	callq	_auditd_strerror
	movslq	%eax, %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_auditd_log_err
	movq	_ADE_ACTL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_13
LBB0_7:
	movq	%rbx, %r14
	xorl	%eax, %eax
	callq	_auditd_get_state
	movq	_AUD_STATE_ENABLED@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	cmpq	%rdi, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_close_lastfile
	movq	(%rbx), %rdi
LBB0_9:
	callq	_auditd_set_state
	movq	-56(%rbp), %rdi
	callq	_auditd_new_curlink
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	-56(%rbp), %rbx
	movl	%r15d, %edi
	callq	_auditd_strerror
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_auditd_log_err
LBB0_11:
	movq	-56(%rbp), %rsi
	movq	%rsi, (%r14)
	leaq	L_.str.3(%rip), %rdi
	callq	_auditd_log_notice
LBB0_12:
	xorl	%r14d, %r14d
LBB0_13:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_auditd_log_debug
	jmp	LBB0_12
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TIMESTAMP_LEN,4,2              ## @TIMESTAMP_LEN
	.comm	_lastfile,8,3                   ## @lastfile
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Not ready to terminate trail file yet."

	.comm	_audit_review_gid,4,2           ## @audit_review_gid
	.comm	_audit_warn_getacdir,4,2        ## @audit_warn_getacdir
	.comm	_ADE_NOERR,4,2                  ## @ADE_NOERR
L_.str.1:                               ## @.str.1
	.asciz	"%s: %m"

	.comm	_ADE_ACTL,4,2                   ## @ADE_ACTL
	.comm	_AUD_STATE_ENABLED,8,3          ## @AUD_STATE_ENABLED
L_.str.2:                               ## @.str.2
	.asciz	"auditd_new_curlink(\"%s\") failed: %s: %m"

L_.str.3:                               ## @.str.3
	.asciz	"New audit file is %s"

	.no_dead_strip	_swap_audit_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function swap_audit_file
_swap_audit_file:                       ; @swap_audit_file
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x21, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x20, _TIMESTAMP_LEN@GOTPAGE
Lloh4:
	ldr	x20, [x20, _TIMESTAMP_LEN@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w2, w8, #1
	mov	x9, x2
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_getTSstr
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #-1
	b	LBB0_13
LBB0_2:
Lloh7:
	adrp	x22, _lastfile@GOTPAGE
Lloh8:
	ldr	x22, [x22, _lastfile@GOTPAGEOFF]
	ldr	x0, [x22]
	cbz	x0, LBB0_5
; %bb.3:
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_5
; %bb.4:
	add	x0, x0, #1
	ldr	w2, [x20]
	mov	x1, x19
	bl	_strncmp
	cbz	x0, LBB0_15
LBB0_5:
Lloh9:
	adrp	x8, _audit_review_gid@GOTPAGE
Lloh10:
	ldr	x8, [x8, _audit_review_gid@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _audit_warn_getacdir@GOTPAGE
Lloh13:
	ldr	x8, [x8, _audit_warn_getacdir@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	sub	x1, x29, #64
	mov	x0, x19
	bl	_auditd_swap_trail
	mov	x20, x0
Lloh15:
	adrp	x8, _ADE_NOERR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ADE_NOERR@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_auditd_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_auditd_log_err
Lloh20:
	adrp	x8, _ADE_ACTL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADE_ACTL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_1
LBB0_7:
	bl	_auditd_get_state
	mov	x8, x0
Lloh23:
	adrp	x23, _AUD_STATE_ENABLED@GOTPAGE
Lloh24:
	ldr	x23, [x23, _AUD_STATE_ENABLED@GOTPAGEOFF]
	ldr	x0, [x23]
	cmp	x8, x0
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_close_lastfile
	ldr	x0, [x23]
LBB0_9:
	bl	_auditd_set_state
	ldur	x0, [x29, #-64]
	bl	_auditd_new_curlink
	cbz	x0, LBB0_11
; %bb.10:
	ldur	x19, [x29, #-64]
	mov	x0, x20
	bl	_auditd_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_auditd_log_err
	add	sp, sp, #16
LBB0_11:
	ldur	x1, [x29, #-64]
	str	x1, [x22]
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_auditd_log_notice
LBB0_12:
	mov	w0, #0
LBB0_13:
	mov	sp, x21
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
	bl	_auditd_log_debug
	b	LBB0_12
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_TIMESTAMP_LEN,4,2              ; @TIMESTAMP_LEN
	.comm	_lastfile,8,3                   ; @lastfile
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Not ready to terminate trail file yet."

	.comm	_audit_review_gid,4,2           ; @audit_review_gid
	.comm	_audit_warn_getacdir,4,2        ; @audit_warn_getacdir
	.comm	_ADE_NOERR,4,2                  ; @ADE_NOERR
l_.str.1:                               ; @.str.1
	.asciz	"%s: %m"

	.comm	_ADE_ACTL,4,2                   ; @ADE_ACTL
	.comm	_AUD_STATE_ENABLED,8,3          ; @AUD_STATE_ENABLED
l_.str.2:                               ; @.str.2
	.asciz	"auditd_new_curlink(\"%s\") failed: %s: %m"

l_.str.3:                               ; @.str.3
	.asciz	"New audit file is %s"

	.no_dead_strip	_swap_audit_file
.subsections_via_symbols
