	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_COMDLG32_GetCanonicalPath      ## -- Begin function COMDLG32_GetCanonicalPath
	.p2align	4, 0x90
_COMDLG32_GetCanonicalPath:             ## @COMDLG32_GetCanonicalPath
	.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	%rdx, %rbx
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_PATH@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_COMDLG32_GetDisplayNameOf
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_GetCurrentDirectoryW
LBB0_2:
	movq	%rbx, %rdi
	callq	_PathAddBackslashW
	movq	%rbx, %rdi
	callq	_debugstr_w
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r15, %rdi
	callq	_PathIsRelativeW
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_lstrcatW
	jmp	LBB0_8
LBB0_4:
	movq	%r15, %rdi
	callq	_PathGetDriveNumberW
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	jmp	LBB0_7
LBB0_5:
	leaq	8(%rbx), %rdi
LBB0_7:
	movq	%r15, %rsi
	callq	_lstrcpyW
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_PathCanonicalizeW
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_lstrcpyW
	movq	%rbx, %rdi
	callq	_debugstr_w
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PATH,4,2                   ## @MAX_PATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"current directory=%s, file=%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"canon=%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_COMDLG32_GetCanonicalPath      ; -- Begin function COMDLG32_GetCanonicalPath
	.p2align	2
_COMDLG32_GetCanonicalPath:             ; @COMDLG32_GetCanonicalPath
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x22, _MAX_PATH@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MAX_PATH@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	mov	x1, x2
	bl	_COMDLG32_GetDisplayNameOf
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x22]
	mov	x1, x19
	bl	_GetCurrentDirectoryW
LBB0_2:
	mov	x0, x19
	bl	_PathAddBackslashW
	mov	x0, x19
	bl	_debugstr_w
	mov	x22, x0
	mov	x0, x21
	bl	_debugstr_w
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	add	sp, sp, #16
	mov	x0, x21
	bl	_PathIsRelativeW
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_lstrcatW
	b	LBB0_8
LBB0_4:
	mov	x0, x21
	bl	_PathGetDriveNumberW
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	b	LBB0_7
LBB0_6:
	add	x0, x19, #8
LBB0_7:
	mov	x1, x21
	bl	_lstrcpyW
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_PathCanonicalizeW
	mov	x0, x19
	mov	x1, x20
	bl	_lstrcpyW
	mov	x0, x19
	bl	_debugstr_w
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	sub	sp, x29, #32
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PATH,4,2                   ; @MAX_PATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"current directory=%s, file=%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"canon=%s\n"

.subsections_via_symbols
