	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function COMDLG32_StrRetToStrNW
_COMDLG32_StrRetToStrNW:                ## @COMDLG32_StrRetToStrNW
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movl	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_TRACE
	movl	(%rbx), %eax
	cmpl	$130, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_8
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_11
## %bb.3:
	movl	24(%rbx), %esi
	movl	%r14d, %edi
	movl	%r15d, %edx
	callq	_lstrcpynW
	movl	24(%rbx), %edi
	callq	_CoTaskMemFree
	movq	_TRUE@GOTPCREL(%rip), %r13
	jmp	LBB0_13
LBB0_4:
	movq	_TRUE@GOTPCREL(%rip), %r13
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.5:
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%rbx), %rdx
	xorl	%esi, %esi
	jmp	LBB0_6
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %r13
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.9:
	testq	%r12, %r12
	je	LBB0_13
## %bb.10:
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	8(%rbx), %r12
	xorl	%esi, %esi
	movq	%r12, %rdx
LBB0_6:
	movl	$-1, %ecx
	movl	%r14d, %r8d
	movl	%r15d, %r9d
	callq	_MultiByteToWideChar
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movslq	%r14d, %rax
	movslq	%r15d, %rcx
	movb	$0, -1(%rcx,%rax)
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movq	_FALSE@GOTPCREL(%rip), %r13
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.12:
	movslq	%r14d, %rax
	movb	$0, (%rax)
LBB0_13:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dest=%p len=0x%x strret=%p pidl=%p\n"

	.comm	_CP_ACP,4,2                     ## @CP_ACP
L_.str.1:                               ## @.str.1
	.asciz	"unknown type!\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_COMDLG32_StrRetToStrNW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function COMDLG32_StrRetToStrNW
_COMDLG32_StrRetToStrNW:                ; @COMDLG32_StrRetToStrNW
	.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	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	bl	_TRACE
	ldr	w8, [x21]
	cmp	w8, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.3:
	ldr	w1, [x21, #24]
	mov	x0, x19
	mov	x2, x20
	bl	_lstrcpynW
	ldr	w0, [x21, #24]
	bl	_CoTaskMemFree
	b	LBB0_11
LBB0_4:
	cbz	w20, LBB0_11
; %bb.5:
Lloh2:
	adrp	x8, _CP_ACP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CP_ACP@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x2, [x21, #16]
	mov	w1, #0
	mov	w3, #-1
	mov	x4, x19
	mov	x5, x20
	bl	_MultiByteToWideChar
	cbnz	w0, LBB0_11
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	cbz	w20, LBB0_15
; %bb.7:
	cbz	x22, LBB0_15
; %bb.8:
Lloh7:
	adrp	x8, _CP_ACP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CP_ACP@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
	add	x2, x8, x22
	mov	w1, #0
	mov	w3, #-1
	mov	x4, x19
	mov	x5, x20
	bl	_MultiByteToWideChar
	cbnz	w0, LBB0_11
; %bb.9:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_10:
	sxtw	x8, w20
	add	x8, x8, w19, sxtw
	sturb	wzr, [x8, #-1]
LBB0_11:
Lloh10:
	adrp	x8, _TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	cbz	w20, LBB0_14
; %bb.13:
	sxtw	x8, w19
	strb	wzr, [x8]
LBB0_14:
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_15:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dest=%p len=0x%x strret=%p pidl=%p\n"

	.comm	_CP_ACP,4,2                     ; @CP_ACP
l_.str.1:                               ; @.str.1
	.asciz	"unknown type!\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_COMDLG32_StrRetToStrNW
.subsections_via_symbols
