	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_dir
_open_dir:                              ## @open_dir
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_AT_PWD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-16(%rbp), %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_generic_statat
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_S_IFDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -16(%rbp)
	je	LBB0_4
## %bb.2:
	movq	_O_RDONLY_@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_generic_open
	jmp	LBB0_6
LBB0_3:
	movl	%eax, %edi
	jmp	LBB0_5
LBB0_4:
	movq	__ENOTDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_5:
	callq	_ERR_PTR
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AT_PWD,4,2                     ## @AT_PWD
	.comm	_S_IFDIR,4,2                    ## @S_IFDIR
	.comm	__ENOTDIR,4,2                   ## @_ENOTDIR
	.comm	_O_RDONLY_,4,2                  ## @O_RDONLY_
	.no_dead_strip	_open_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_dir
_open_dir:                              ; @open_dir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _AT_PWD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AT_PWD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x2, sp, #8
	mov	x1, x19
	mov	w3, #1
	bl	_generic_statat
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	w8, [sp, #8]
Lloh3:
	adrp	x9, _S_IFDIR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S_IFDIR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _O_RDONLY_@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_RDONLY_@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_generic_open
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, __ENOTDIR@GOTPAGE
Lloh10:
	ldr	x8, [x8, __ENOTDIR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_4:
	bl	_ERR_PTR
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AT_PWD,4,2                     ; @AT_PWD
	.comm	_S_IFDIR,4,2                    ; @S_IFDIR
	.comm	__ENOTDIR,4,2                   ; @_ENOTDIR
	.comm	_O_RDONLY_,4,2                  ; @O_RDONLY_
	.no_dead_strip	_open_dir
.subsections_via_symbols
