	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function devpts_stat_num
_devpts_stat_num:                       ## @devpts_stat_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	%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, %r12
	cmpl	$-1, %edi
	je	LBB0_1
## %bb.2:
	movl	%edi, %r15d
	movq	_ttys_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_lock
	movq	_pty_slave@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_lock
	movq	_S_IFCHR@GOTPCREL(%rip), %rax
	movl	4(%rbx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movl	12(%rbx), %eax
	movl	%eax, 16(%r12)
	movl	8(%rbx), %eax
	movl	%eax, 12(%r12)
	leal	3(%r15), %eax
	movl	%eax, 4(%r12)
	movq	_TTY_PSEUDO_SLAVE_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_dev_make
	movl	%eax, 8(%r12)
	movq	%rbx, %rdi
	callq	_unlock
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_unlock                         ## TAILCALL
LBB0_1:
	movq	_S_IFDIR@GOTPCREL(%rip), %rax
	movl	$493, %ecx                      ## imm = 0x1ED
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movl	$1, 4(%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_IFDIR,4,2                    ## @S_IFDIR
	.comm	_ttys_lock,4,2                  ## @ttys_lock
	.comm	_pty_slave,8,3                  ## @pty_slave
	.comm	_S_IFCHR,4,2                    ## @S_IFCHR
	.comm	_TTY_PSEUDO_SLAVE_MAJOR,4,2     ## @TTY_PSEUDO_SLAVE_MAJOR
	.no_dead_strip	_devpts_stat_num
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function devpts_stat_num
_devpts_stat_num:                       ; @devpts_stat_num
	.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
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _ttys_lock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ttys_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_lock
Lloh2:
	adrp	x8, _pty_slave@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pty_slave@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x22, [x8, w20, sxtw #3]
	cmp	x22, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x22
	bl	_lock
Lloh5:
	adrp	x8, _S_IFCHR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _S_IFCHR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x22, #4]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	d0, [x22, #8]
	stur	d0, [x19, #12]
	add	w8, w20, #3
	str	w8, [x19, #4]
Lloh8:
	adrp	x8, _TTY_PSEUDO_SLAVE_MAJOR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TTY_PSEUDO_SLAVE_MAJOR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_dev_make
	str	w0, [x19, #8]
	mov	x0, x22
	bl	_unlock
	mov	x0, x21
	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
	b	_unlock
LBB0_2:
Lloh11:
	adrp	x8, _S_IFDIR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _S_IFDIR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w9, #493
	orr	w8, w8, w9
	mov	w9, #1
	stp	w8, w9, [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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_S_IFDIR,4,2                    ; @S_IFDIR
	.comm	_ttys_lock,4,2                  ; @ttys_lock
	.comm	_pty_slave,8,3                  ; @pty_slave
	.comm	_S_IFCHR,4,2                    ; @S_IFCHR
	.comm	_TTY_PSEUDO_SLAVE_MAJOR,4,2     ; @TTY_PSEUDO_SLAVE_MAJOR
	.no_dead_strip	_devpts_stat_num
.subsections_via_symbols
