	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_opendir                        ## -- Begin function opendir
	.p2align	4, 0x90
_opendir:                               ## @opendir
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_GetFileAttributes
	movq	_INVALID_FILE_ATTRIBUTES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_2:
	movq	_FILE_ATTRIBUTE_DIRECTORY@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.3:
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	4(%rax), %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_strcpy
	movq	(%r14), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	cmpb	$47, -1(%rax,%rbx)
	je	LBB0_8
## %bb.6:
	movq	(%r14), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	cmpb	$92, -1(%rax,%rbx)
	je	LBB0_8
## %bb.7:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcat
LBB0_8:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcat
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r14)
	jmp	LBB0_13
LBB0_9:
	movq	_ENOTDIR@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_12:
	xorl	%r14d, %r14d
LBB0_13:
	movq	%r14, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_FILE_ATTRIBUTES,4,2    ## @INVALID_FILE_ATTRIBUTES
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.comm	_FILE_ATTRIBUTE_DIRECTORY,4,2   ## @FILE_ATTRIBUTE_DIRECTORY
	.comm	_ENOTDIR,4,2                    ## @ENOTDIR
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\\"

L_.str.1:                               ## @.str.1
	.asciz	"*"

	.comm	_INVALID_HANDLE_VALUE,4,2       ## @INVALID_HANDLE_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_opendir                        ; -- Begin function opendir
	.p2align	2
_opendir:                               ; @opendir
	.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, x0
	bl	_GetFileAttributes
Lloh0:
	adrp	x8, _INVALID_FILE_ATTRIBUTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVALID_FILE_ATTRIBUTES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x19, #0
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
Lloh5:
	adrp	x8, _FILE_ATTRIBUTE_DIRECTORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FILE_ATTRIBUTE_DIRECTORY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bics	wzr, w8, w0
	b.ne	LBB0_9
; %bb.3:
	mov	w0, #32
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.4:
	mov	x0, x20
	bl	_strlen
	add	w0, w0, #4
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.5:
	mov	x1, x20
	bl	_strcpy
	ldr	x20, [x19]
	mov	x0, x20
	bl	_strlen
	add	x8, x20, w0, sxtw
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.eq	LBB0_8
; %bb.6:
	ldr	x20, [x19]
	mov	x0, x20
	bl	_strlen
	add	x8, x20, w0, sxtw
	ldurb	w8, [x8, #-1]
	cmp	w8, #92
	b.eq	LBB0_8
; %bb.7:
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcat
LBB0_8:
	ldr	x0, [x19]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcat
Lloh12:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	stp	xzr, xzr, [x19, #8]
	b	LBB0_12
LBB0_9:
	mov	x19, #0
Lloh15:
	adrp	x8, _ENOTDIR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOTDIR@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _errno@GOTPAGE
Lloh20:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh21:
	str	w8, [x9]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _errno@GOTPAGE
Lloh26:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh27:
	str	w8, [x9]
	mov	x0, x19
	bl	_free
	mov	x19, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_FILE_ATTRIBUTES,4,2    ; @INVALID_FILE_ATTRIBUTES
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.comm	_FILE_ATTRIBUTE_DIRECTORY,4,2   ; @FILE_ATTRIBUTE_DIRECTORY
	.comm	_ENOTDIR,4,2                    ; @ENOTDIR
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\\"

l_.str.1:                               ; @.str.1
	.asciz	"*"

	.comm	_INVALID_HANDLE_VALUE,4,2       ; @INVALID_HANDLE_VALUE
.subsections_via_symbols
