	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libsmbc_delete
_libsmbc_delete:                        ## @libsmbc_delete
	.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
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	callq	_libsmbc_connect
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	(%r14), %edi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_smbc_open
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	leaq	-32(%rbp), %rsi
	movl	%eax, %edi
	callq	_smbc_fstat
	testq	%rax, %rax
	js	LBB0_7
## %bb.3:
	movl	(%r15), %edi
	callq	_smbc_close
	movl	$-1, (%r15)
	movl	-32(%rbp), %edi
	callq	_S_ISDIR
	movl	(%r14), %edi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	callq	_smbc_rmdir
	jmp	LBB0_6
LBB0_5:
	callq	_smbc_unlink
LBB0_6:
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jns	LBB0_9
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_libsmbc_close
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_libsmbc_delete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libsmbc_delete
_libsmbc_delete:                        ; @libsmbc_delete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_libsmbc_connect
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #438
	bl	_smbc_open
	str	w0, [x21]
	tbnz	w0, #31, LBB0_7
; %bb.2:
	add	x1, sp, #8
	bl	_smbc_fstat
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	w0, [x21]
	bl	_smbc_close
	mov	w8, #-1
	str	w8, [x21]
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	mov	x8, x0
	ldr	w0, [x19]
	cbz	x8, LBB0_6
; %bb.4:
	bl	_smbc_rmdir
	tbnz	x0, #63, LBB0_7
LBB0_5:
	mov	w20, #0
	b	LBB0_9
LBB0_6:
	bl	_smbc_unlink
	tbz	x0, #63, LBB0_5
LBB0_7:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_8:
	mov	x20, x0
LBB0_9:
	mov	x0, x19
	bl	_libsmbc_close
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_libsmbc_delete
.subsections_via_symbols
