	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function devpts_pty_exists
_devpts_pty_exists:                     ## @devpts_pty_exists
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	testl	%edi, %edi
	js	LBB0_3
## %bb.1:
	movl	%edi, %ebx
	movq	_MAX_PTYS@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jl	LBB0_3
## %bb.2:
	movq	_ttys_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_lock
	movq	_pty_slave@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	xorl	%r14d, %r14d
	cmpq	$0, (%rax,%rcx,8)
	setne	%r14b
	movq	%r15, %rdi
	callq	_unlock
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PTYS,4,2                   ## @MAX_PTYS
	.comm	_ttys_lock,4,2                  ## @ttys_lock
	.comm	_pty_slave,8,3                  ## @pty_slave
	.no_dead_strip	_devpts_pty_exists
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function devpts_pty_exists
_devpts_pty_exists:                     ; @devpts_pty_exists
	.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	w19, #0
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _MAX_PTYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PTYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.lt	LBB0_3
; %bb.2:
Lloh3:
	adrp	x21, _ttys_lock@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ttys_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_lock
Lloh5:
	adrp	x8, _pty_slave@GOTPAGE
Lloh6:
	ldr	x8, [x8, _pty_slave@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x8, [x8, w20, uxtw #3]
	cmp	x8, #0
	cset	w19, ne
	mov	x0, x21
	bl	_unlock
LBB0_3:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PTYS,4,2                   ; @MAX_PTYS
	.comm	_ttys_lock,4,2                  ; @ttys_lock
	.comm	_pty_slave,8,3                  ; @pty_slave
	.no_dead_strip	_devpts_pty_exists
.subsections_via_symbols
