	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_UnicodeToANSI
_CRYPT_UnicodeToANSI:                   ## @CRYPT_UnicodeToANSI
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	testl	%edi, %edi
	je	LBB0_4
## %bb.1:
	movl	%edi, %r14d
	movq	(%rbx), %r8
	testq	%r8, %r8
	je	LBB0_5
## %bb.2:
	movl	%edx, %r15d
	testl	%edx, %edx
	jns	LBB0_7
## %bb.3:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	movq	$0, (%rbx)
	jmp	LBB0_8
LBB0_5:
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	movl	%r14d, %edx
	movl	$-1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_WideCharToMultiByte
	movl	%eax, %r15d
	leal	(,%r15,4), %edi
	callq	_CRYPT_Alloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %r8
LBB0_7:
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	movl	%r14d, %edx
	movl	$-1, %ecx
	movl	%r15d, %r9d
	callq	_WideCharToMultiByte
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_CP_ACP,4,2                     ## @CP_ACP
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ## @ERROR_NOT_ENOUGH_MEMORY
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_CRYPT_UnicodeToANSI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_UnicodeToANSI
_CRYPT_UnicodeToANSI:                   ; @CRYPT_UnicodeToANSI
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	cbz	w0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x4, [x20]
Lloh0:
	adrp	x22, _CP_ACP@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CP_ACP@GOTPAGEOFF]
	cbz	x4, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w21, w8, w2, lt
	b	LBB0_6
LBB0_3:
	str	xzr, [x20]
	b	LBB0_7
LBB0_4:
	ldr	w0, [x22]
	mov	w1, #0
	mov	x2, x19
	mov	w3, #-1
	mov	w5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_WideCharToMultiByte
	mov	x21, x0
	lsl	w0, w0, #2
	bl	_CRYPT_Alloc
	str	x0, [x20]
	cbz	x0, LBB0_9
; %bb.5:
	mov	x4, x0
LBB0_6:
	ldr	w0, [x22]
	mov	w1, #0
	mov	x2, x19
	mov	w3, #-1
	mov	x5, x21
	mov	x6, #0
	mov	x7, #0
	bl	_WideCharToMultiByte
LBB0_7:
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh7:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_CP_ACP,4,2                     ; @CP_ACP
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ; @ERROR_NOT_ENOUGH_MEMORY
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_CRYPT_UnicodeToANSI
.subsections_via_symbols
