	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_auditd_new_curlink             ## -- Begin function auditd_new_curlink
	.p2align	4, 0x90
_auditd_new_curlink:                    ## @auditd_new_curlink
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	(%r14), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_AUDIT_CURRENT_LINK@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leal	-1(%rbx), %edx
	movq	%r13, %rsi
	callq	_readlink
	testl	%eax, %eax
	jle	LBB0_10
## %bb.1:
	movl	%eax, %eax
	movb	$0, (%r13,%rax)
	leaq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	xorl	%r15d, %r15d
LBB0_3:
	movl	(%r14), %edi
	callq	_unlink
	movq	_AUE_audit_recovery@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_auditd_gen_record
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_4
LBB0_10:
	jns	LBB0_4
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_4:
	movl	(%r14), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_symlink
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.5:
	movq	_ADE_SYMLINK@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_6:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_strlcpy
	movq	_NOT_TERMINATED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_CRASH_RECOVERY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_POSTFIX_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_auditd_rename
	testq	%rax, %rax
	je	LBB0_3
## %bb.8:
	movq	_ADE_RENAME@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_9:
	movq	_ADE_STRERR@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_ADE_READLINK@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_AUDIT_CURRENT_LINK,4,2         ## @AUDIT_CURRENT_LINK
	.comm	_NOT_TERMINATED,4,2             ## @NOT_TERMINATED
	.comm	_CRASH_RECOVERY,4,2             ## @CRASH_RECOVERY
	.comm	_POSTFIX_LEN,4,2                ## @POSTFIX_LEN
	.comm	_ADE_RENAME,4,2                 ## @ADE_RENAME
	.comm	_ADE_STRERR,4,2                 ## @ADE_STRERR
	.comm	_AUE_audit_recovery,4,2         ## @AUE_audit_recovery
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ADE_READLINK,4,2               ## @ADE_READLINK
	.comm	_ADE_SYMLINK,4,2                ## @ADE_SYMLINK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_auditd_new_curlink             ; -- Begin function auditd_new_curlink
	.p2align	2
_auditd_new_curlink:                    ; @auditd_new_curlink
	.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	x19, x0
	mov	x23, 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	x12, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MAXPATHLEN@GOTPAGEOFF]
	ldr	w8, [x12]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x21, x9, x10
	mov	sp, x21
	ldr	w22, [x12]
	mov	x9, x22
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x22, #15
	and	x10, x10, #0x1fffffff0
	sub	x20, x9, x10
	mov	sp, x20
Lloh9:
	adrp	x24, _AUDIT_CURRENT_LINK@GOTPAGE
Lloh10:
	ldr	x24, [x24, _AUDIT_CURRENT_LINK@GOTPAGEOFF]
	ldr	w0, [x24]
	sub	w2, w8, #1
	mov	x1, x21
	bl	_readlink
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	strb	wzr, [x21, w0, uxtw]
	sub	x1, x29, #64
	mov	x0, x21
	bl	_stat
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, #0
LBB0_3:
	ldr	w0, [x24]
	bl	_unlink
Lloh11:
	adrp	x8, _AUE_audit_recovery@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AUE_audit_recovery@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_auditd_gen_record
	cbnz	w0, LBB0_13
	b	LBB0_6
LBB0_4:
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _ENOENT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_6:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_symlink
Lloh20:
	adrp	x8, _ADE_SYMLINK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADE_SYMLINK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
	b	LBB0_13
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_strlcpy
Lloh23:
	adrp	x8, _NOT_TERMINATED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NOT_TERMINATED@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_strstr
	cbz	x0, LBB0_10
; %bb.8:
Lloh26:
	adrp	x8, _CRASH_RECOVERY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CRASH_RECOVERY@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _POSTFIX_LEN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _POSTFIX_LEN@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	bl	_memcpy
	mov	x0, x21
	mov	x1, x20
	bl	_auditd_rename
	cbz	x0, LBB0_3
; %bb.9:
Lloh32:
	adrp	x8, _ADE_RENAME@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ADE_RENAME@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh34:
	adrp	x8, _ADE_STRERR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ADE_STRERR@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh36:
	adrp	x8, _ADE_READLINK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ADE_READLINK@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
LBB0_13:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %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:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_AUDIT_CURRENT_LINK,4,2         ; @AUDIT_CURRENT_LINK
	.comm	_NOT_TERMINATED,4,2             ; @NOT_TERMINATED
	.comm	_CRASH_RECOVERY,4,2             ; @CRASH_RECOVERY
	.comm	_POSTFIX_LEN,4,2                ; @POSTFIX_LEN
	.comm	_ADE_RENAME,4,2                 ; @ADE_RENAME
	.comm	_ADE_STRERR,4,2                 ; @ADE_STRERR
	.comm	_AUE_audit_recovery,4,2         ; @AUE_audit_recovery
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ADE_READLINK,4,2               ; @ADE_READLINK
	.comm	_ADE_SYMLINK,4,2                ; @ADE_SYMLINK
.subsections_via_symbols
