	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wceex_getcwd                   ## -- Begin function wceex_getcwd
	.p2align	4, 0x90
_wceex_getcwd:                          ## @wceex_getcwd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	jne	LBB0_3
## %bb.1:
	movl	%r14d, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_InitCwd
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_Cwd@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	movl	$-1, %ecx
	movq	%rbx, %r8
	movl	%r14d, %r9d
	callq	_WideCharToMultiByte
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	xorl	%eax, %eax
	callq	_GetLastError
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
	.comm	_CP_ACP,4,2                     ## @CP_ACP
	.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_getcwd                   ; -- Begin function wceex_getcwd
	.p2align	2
_wceex_getcwd:                          ; @wceex_getcwd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_6
LBB0_2:
	bl	_InitCwd
	cbz	x0, LBB0_4
; %bb.3:
	mov	x19, #0
	b	LBB0_8
LBB0_4:
Lloh0:
	adrp	x8, _CP_ACP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CP_ACP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _Cwd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Cwd@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #-1
	mov	x4, x19
	mov	x5, x20
	mov	x6, #0
	mov	x7, #0
	bl	_WideCharToMultiByte
	cbnz	w0, LBB0_8
; %bb.5:
	bl	_GetLastError
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_7:
	mov	x19, #0
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	str	w0, [x8]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
	.comm	_CP_ACP,4,2                     ; @CP_ACP
	.comm	_Cwd,4,2                        ; @Cwd
.subsections_via_symbols
