	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function devpts_readdir
_devpts_readdir:                        ## @devpts_readdir
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	xorl	%edi, %edi
	cmpl	$-1, 4(%r15)
	sete	%dil
	callq	_assert
	movl	(%r15), %ebx
	movq	_MAX_PTYS@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edi
	callq	_devpts_pty_exists
	testl	%eax, %eax
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	jmp	LBB0_1
LBB0_3:
	movl	(%r12), %ecx
LBB0_4:
	xorl	%eax, %eax
	cmpl	%ecx, %ebx
	jge	LBB0_6
## %bb.5:
	leal	1(%rbx), %eax
	movl	%eax, (%r15)
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_sprintf
	addl	$3, %ebx
	movl	%ebx, (%r14)
	movl	$1, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PTYS,4,2                   ## @MAX_PTYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.no_dead_strip	_devpts_readdir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function devpts_readdir
_devpts_readdir:                        ; @devpts_readdir
	.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	x19, x1
	mov	x21, x0
	ldr	w8, [x0, #4]
	cmn	w8, #1
	cset	w0, eq
	bl	_assert
	ldr	w20, [x21]
Lloh0:
	adrp	x22, _MAX_PTYS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_PTYS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmp	w20, w8
	b.ge	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_devpts_pty_exists
	cbnz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w20, w20, #1
	b	LBB0_1
LBB0_4:
	ldr	w8, [x22]
LBB0_5:
	cmp	w20, w8
	b.ge	LBB0_7
; %bb.6:
	add	w8, w20, #1
	str	w8, [x21]
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_sprintf
	add	w8, w20, #3
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PTYS,4,2                   ; @MAX_PTYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.no_dead_strip	_devpts_readdir
.subsections_via_symbols
