	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_getdents_common            ## -- Begin function sys_getdents_common
	.p2align	4, 0x90
_sys_getdents_common:                   ## @sys_getdents_common
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movq	%rdx, %rcx
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_STRACE
	movl	%ebx, %edi
	callq	_f_get
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r15
	movl	8(%rax), %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_11
## %bb.2:
	movq	(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.3:
	movq	%r15, %rdi
	callq	_fd_telldir
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	leaq	-112(%rbp), %rsi
	movq	%r15, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	js	LBB0_14
## %bb.4:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, -136(%rbp)                ## 8-byte Spill
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	movq	-112(%rbp), %rdi
	callq	_strlen
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	cltq
	addq	$8, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movl	-104(%rbp), %r13d
	movq	%r15, %rdi
	callq	_fd_telldir
	movq	%rax, %r14
	movq	-112(%rbp), %r12
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	*-120(%rbp)                     ## 8-byte Folded Reload
	movq	%rax, %r15
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$19, %eax
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %esi
	movq	%r14, %rdx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	xorl	%eax, %eax
	callq	_STRACE
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	-136(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rbx
	subq	%r15, %rbx
	jb	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	%r15, %rdx
	callq	_user_write
	testq	%rax, %rax
	jne	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	addq	%r15, %r14
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_fd_telldir
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	%r15, %rdi
	leaq	-112(%rbp), %rsi
	callq	*(%rax)
	movq	%rbx, %r12
	testl	%eax, %eax
	jns	LBB0_5
	jmp	LBB0_14
LBB0_11:
	movq	__ENOTDIR@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	__EBADF@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_19
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_17:
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_fd_seekdir
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subl	%r12d, %eax
                                        ## kill: def $eax killed $eax killed $rax
	jmp	LBB0_14
LBB0_18:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getdents(%d, %#x, %#x)"

	.comm	__EBADF,4,2                     ## @_EBADF
	.comm	__ENOTDIR,4,2                   ## @_ENOTDIR
L_.str.1:                               ## @.str.1
	.asciz	" {inode=%d, offset=%d, name=%s, type=%d, reclen=%d}"

	.comm	__EFAULT,4,2                    ## @_EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_getdents_common            ; -- Begin function sys_getdents_common
	.p2align	2
_sys_getdents_common:                   ; @sys_getdents_common
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #48
	stur	x3, [x29, #-112]                ; 8-byte Folded Spill
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	str	x2, [sp, #-16]!
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_STRACE
	add	sp, sp, #16
	mov	x0, x22
	bl	_f_get
	cbz	x0, LBB0_13
; %bb.1:
	mov	x22, x0
	ldr	w0, [x0, #8]
	bl	_S_ISDIR
	cbz	w0, LBB0_12
; %bb.2:
	ldr	x8, [x22]
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.3:
	mov	x0, x22
	bl	_fd_telldir
	mov	x25, x0
	ldr	x8, [x22]
	ldr	x8, [x8]
	sub	x1, x29, #104
	mov	x0, x22
	blr	x8
	tbnz	w0, #31, LBB0_15
; %bb.4:
	mov	w23, #0
	stur	x20, [x29, #-128]               ; 8-byte Folded Spill
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w0, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	stur	x25, [x29, #-120]               ; 8-byte Folded Spill
	ldur	x0, [x29, #-104]
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	mov	x19, sp
	sxtw	x8, w0
	add	x9, x8, #8
	add	x8, x8, #23
	and	x8, x8, #0xfffffffffffffff0
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x25, x9, x8
	mov	sp, x25
	ldur	w27, [x29, #-96]
	mov	x0, x22
	bl	_fd_telldir
	mov	x28, x0
	ldp	x8, x24, [x29, #-112]           ; 8-byte Folded Reload
	mov	x0, x25
	mov	x1, x27
	mov	x2, x28
	mov	x3, x24
	mov	w4, #0
	blr	x8
	mov	x26, x0
	cmp	w23, #19
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	sp, sp, #32
	stp	xzr, x26, [sp, #8]
	str	x24, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x27
	mov	x2, x28
	bl	_STRACE
	mov	x8, x23
	add	sp, sp, #32
	add	w8, w23, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x23
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	subs	x24, x20, x26
	b.lo	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x8
	mov	x0, x21
	mov	x1, x25
	mov	x2, x26
	bl	_user_write
	cbnz	x0, LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x26, x21
	mov	sp, x19
	mov	x0, x22
	bl	_fd_telldir
	mov	x25, x0
	ldr	x8, [x22]
	ldr	x8, [x8]
	sub	x1, x29, #104
	mov	x0, x22
	blr	x8
	mov	x20, x24
	tbz	w0, #31, LBB0_5
	b	LBB0_15
LBB0_12:
Lloh9:
	adrp	x8, __ENOTDIR@GOTPAGE
Lloh10:
	ldr	x8, [x8, __ENOTDIR@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh11:
	adrp	x8, __EBADF@GOTPAGE
Lloh12:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	ldur	x8, [x29, #-88]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.16:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	sp, x19
	ldur	x25, [x29, #-120]               ; 8-byte Folded Reload
LBB0_18:
	mov	x0, x22
	mov	x1, x25
	bl	_fd_seekdir
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	sub	w0, w8, w20
	b	LBB0_15
LBB0_19:
Lloh16:
	adrp	x8, __EFAULT@GOTPAGE
Lloh17:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	sp, x19
	b	LBB0_15
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getdents(%d, %#x, %#x)"

	.comm	__EBADF,4,2                     ; @_EBADF
	.comm	__ENOTDIR,4,2                   ; @_ENOTDIR
l_.str.1:                               ; @.str.1
	.asciz	" {inode=%d, offset=%d, name=%s, type=%d, reclen=%d}"

	.comm	__EFAULT,4,2                    ; @_EFAULT
.subsections_via_symbols
