	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_forkpty                        ## -- Begin function forkpty
	.p2align	4, 0x90
_forkpty:                               ## @forkpty
	.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
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rsi, %rdx
	movq	%rdi, %r14
	leaq	-32(%rbp), %rdi
	leaq	-28(%rbp), %rsi
	callq	_openpty
	movl	$-1, %r15d
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.1:
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.3:
	movl	-28(%rbp), %edi
	callq	_close
	jmp	LBB0_6
LBB0_4:
	movl	-32(%rbp), %edi
	callq	_close
	movl	-28(%rbp), %edi
	callq	_login_tty
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_5:
	movl	-32(%rbp), %eax
	movl	%eax, (%r14)
	movl	-28(%rbp), %edi
	callq	_close
	movl	%ebx, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_forkpty                        ; -- Begin function forkpty
	.p2align	2
_forkpty:                               ; @forkpty
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x4, x3
	mov	x3, x2
	mov	x2, x1
	mov	x20, x0
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_openpty
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.1:
	bl	_fork
	mov	x19, x0
	cbz	w0, LBB0_6
; %bb.2:
	cmn	w19, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [sp, #12]
	str	w8, [x20]
LBB0_4:
	ldr	w0, [sp, #8]
	bl	_close
	b	LBB0_7
LBB0_5:
	mov	w19, #-1
	b	LBB0_7
LBB0_6:
	ldr	w0, [sp, #12]
	bl	_close
	ldr	w0, [sp, #8]
	bl	_login_tty
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
