	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pty_open_fake                  ## -- Begin function pty_open_fake
	.p2align	4, 0x90
_pty_open_fake:                         ## @pty_open_fake
	.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
	xorl	%eax, %eax
	callq	_pty_reserve_next
	movq	_MAX_PTYS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.4:
	movq	__ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_1:
	movq	_pty_slave@GOTPCREL(%rip), %rcx
	movl	4(%rcx), %edx
	movl	%edx, 4(%rbx)
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
	movq	_TTY_PSEUDO_SLAVE_MAJOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_tty_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_pty_slave_init_inode
LBB0_3:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PTYS,4,2                   ## @MAX_PTYS
	.comm	__ENOSPC,4,2                    ## @_ENOSPC
	.comm	_pty_slave,8,2                  ## @pty_slave
	.comm	_TTY_PSEUDO_SLAVE_MAJOR,4,2     ## @TTY_PSEUDO_SLAVE_MAJOR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pty_open_fake                  ; -- Begin function pty_open_fake
	.p2align	2
_pty_open_fake:                         ; @pty_open_fake
	.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
	bl	_pty_reserve_next
Lloh0:
	adrp	x8, _MAX_PTYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PTYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, __ENOSPC@GOTPAGE
Lloh4:
	ldr	x8, [x8, __ENOSPC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_2:
	mov	x2, x0
Lloh6:
	adrp	x8, _pty_slave@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pty_slave@GOTPAGEOFF]
Lloh8:
	ldr	d0, [x8]
	str	d0, [x19]
Lloh9:
	adrp	x8, _TTY_PSEUDO_SLAVE_MAJOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TTY_PSEUDO_SLAVE_MAJOR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tty_get
	mov	x19, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_pty_slave_init_inode
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PTYS,4,2                   ; @MAX_PTYS
	.comm	__ENOSPC,4,2                    ; @_ENOSPC
	.comm	_pty_slave,8,2                  ; @pty_slave
	.comm	_TTY_PSEUDO_SLAVE_MAJOR,4,2     ; @TTY_PSEUDO_SLAVE_MAJOR
.subsections_via_symbols
