	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wceex_wchdir                   ## -- Begin function wceex_wchdir
	.p2align	4, 0x90
_wceex_wchdir:                          ## @wceex_wchdir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.3:
	movq	_SHGFI_ATTRIBUTES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %ecx
	callq	_SHGetFileInfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	_SFGAO_FOLDER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -16(%rbp)
	je	LBB0_2
## %bb.5:
	movq	_Cwd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_wcscpy
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.comm	_SHGFI_ATTRIBUTES,4,2           ## @SHGFI_ATTRIBUTES
	.comm	_SFGAO_FOLDER,4,2               ## @SFGAO_FOLDER
	.comm	_Cwd,4,2                        ## @Cwd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wceex_wchdir                   ; -- Begin function wceex_wchdir
	.p2align	2
_wceex_wchdir:                          ; @wceex_wchdir
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _SHGFI_ATTRIBUTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SHGFI_ATTRIBUTES@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #0
	mov	w3, #4
	bl	_SHGetFileInfo
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w8, [sp, #8]
Lloh3:
	adrp	x9, _SFGAO_FOLDER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SFGAO_FOLDER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _Cwd@GOTPAGE
Lloh7:
	ldr	x8, [x8, _Cwd@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_wcscpy
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.comm	_SHGFI_ATTRIBUTES,4,2           ; @SHGFI_ATTRIBUTES
	.comm	_SFGAO_FOLDER,4,2               ; @SFGAO_FOLDER
	.comm	_Cwd,4,2                        ; @Cwd
.subsections_via_symbols
