	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function devpts_get_pty_num
_devpts_get_pty_num:                    ## @devpts_get_pty_num
	.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
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpb	$47, (%rbx)
	jne	LBB0_8
## %bb.3:
	cmpb	$0, 1(%rbx)
	je	LBB0_8
## %bb.4:
	incq	%rbx
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_5
LBB0_8:
	movq	__ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_isdigits
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_atol
	movq	%rax, %rbx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jg	LBB0_8
## %bb.7:
	movl	%ebx, %edi
	callq	_devpts_pty_exists
	testl	%eax, %eax
	je	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	__ENOENT,4,2                    ## @_ENOENT
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.no_dead_strip	_devpts_get_pty_num
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function devpts_get_pty_num
_devpts_get_pty_num:                    ; @devpts_get_pty_num
	.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	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.1:
	ldrb	w8, [x19]
	cmp	w8, #47
	b.ne	LBB0_4
; %bb.2:
	ldrb	w8, [x19, #1]!
	cbz	w8, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #47
	bl	_strchr
	cbz	x0, LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, __ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, __ENOENT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	bl	_isdigits
	cbz	w0, LBB0_4
; %bb.8:
	mov	x0, x19
	bl	_atol
Lloh5:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.gt	LBB0_4
; %bb.9:
	mov	x19, x0
	bl	_devpts_pty_exists
Lloh8:
	adrp	x8, __ENOENT@GOTPAGE
Lloh9:
	ldr	x8, [x8, __ENOENT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, w8, w19, eq
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	__ENOENT,4,2                    ; @_ENOENT
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.no_dead_strip	_devpts_get_pty_num
.subsections_via_symbols
