	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unlnk_exist                    ## -- Begin function unlnk_exist
	.p2align	4, 0x90
_unlnk_exist:                           ## @unlnk_exist
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	-32(%rbp), %rsi
	callq	_lstat
	xorl	%ebx, %ebx
	testq	%rax, %rax
	js	LBB0_10
## %bb.1:
	movq	_kflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
LBB0_9:
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	-32(%rbp), %edi
	callq	_S_ISDIR
	movq	%r14, %rdi
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	callq	_rmdir
	testq	%rax, %rax
	jns	LBB0_10
## %bb.4:
	movq	_PAX_DIR@GOTPCREL(%rip), %rax
	movl	$1, %ebx
	cmpl	%r15d, (%rax)
	je	LBB0_10
## %bb.5:
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_8
LBB0_6:
	callq	_unlink
	testq	%rax, %rax
	jns	LBB0_10
## %bb.7:
	leaq	L_.str.1(%rip), %rdx
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	movq	%r14, %rcx
	callq	_syswarn
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_kflag,8,3                      ## @kflag
	.comm	_PAX_DIR,4,2                    ## @PAX_DIR
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to remove directory %s"

L_.str.1:                               ## @.str.1
	.asciz	"Could not unlink %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unlnk_exist                    ; -- Begin function unlnk_exist
	.p2align	2
_unlnk_exist:                           ; @unlnk_exist
	.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
	add	x1, sp, #8
	bl	_lstat
	tbnz	x0, #63, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _kflag@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kflag@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
LBB0_2:
	mov	w0, #-1
	b	LBB0_9
LBB0_3:
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_rmdir
	tbz	x0, #63, LBB0_8
; %bb.5:
Lloh3:
	adrp	x8, _PAX_DIR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAX_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_11
; %bb.6:
	mov	w0, #1
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_unlink
	tbnz	x0, #63, LBB0_10
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
LBB0_12:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w0, #1
	mov	x3, x19
	bl	_syswarn
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_kflag,8,3                      ; @kflag
	.comm	_PAX_DIR,4,2                    ; @PAX_DIR
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to remove directory %s"

l_.str.1:                               ; @.str.1
	.asciz	"Could not unlink %s"

.subsections_via_symbols
