	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getptyslave                    ## -- Begin function getptyslave
	.p2align	4, 0x90
_getptyslave:                           ## @getptyslave
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_line@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_cleanopen
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_net@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rsi
	callq	_fatalperror
LBB0_2:
	xorl	%eax, %eax
	callq	_init_termbuf
	movq	_ECHO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_termbuf@GOTPCREL(%rip), %rcx
	orl	%eax, 8(%rcx)
	movq	_ONLCR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rcx)
	movq	_ICRNL@GOTPCREL(%rip), %rax
	movl	4(%rcx), %edx
	orl	(%rax), %edx
	movq	_IXOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%edx, %eax
	movl	%eax, 4(%rcx)
	movq	_def_rspeed@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	movl	$9600, %ebx                     ## imm = 0x2580
	cmovleq	%rbx, %rdi
	callq	_tty_rspeed
	movq	_def_tspeed@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	cmovgq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_tty_tspeed
	xorl	%eax, %eax
	callq	_set_termbuf
	movl	%r14d, %edi
	callq	_login_tty
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	movq	_net@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fatalperror
LBB0_4:
	movq	_net@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$3, %edi
	jl	LBB0_6
## %bb.5:
	callq	_close
LBB0_6:
	movq	_ourpty@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	cmpl	$3, %edi
	jl	LBB0_8
## %bb.7:
	callq	_close
	movl	$-1, (%rbx)
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_line,8,3                       ## @line
	.comm	_net,4,2                        ## @net
	.comm	_ECHO,4,2                       ## @ECHO
	.comm	_termbuf,16,2                   ## @termbuf
	.comm	_ONLCR,4,2                      ## @ONLCR
	.comm	_ICRNL,4,2                      ## @ICRNL
	.comm	_IXOFF,4,2                      ## @IXOFF
	.comm	_def_rspeed,8,3                 ## @def_rspeed
	.comm	_def_tspeed,8,3                 ## @def_tspeed
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"login_tty"

	.comm	_ourpty,4,2                     ## @ourpty
	.comm	_CS8,4,2                        ## @CS8
	.comm	_ECHOE,4,2                      ## @ECHOE
	.comm	_ECHOK,4,2                      ## @ECHOK
	.comm	_EXTB,4,2                       ## @EXTB
	.comm	_HUPCL,4,2                      ## @HUPCL
	.comm	_ICANON,4,2                     ## @ICANON
	.comm	_IGNPAR,4,2                     ## @IGNPAR
	.comm	_ISIG,4,2                       ## @ISIG
	.comm	_ISTRIP,4,2                     ## @ISTRIP
	.comm	_IXON,4,2                       ## @IXON
	.comm	_OPOST,4,2                      ## @OPOST
	.comm	_OXTABS,4,2                     ## @OXTABS
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_TAB3,4,2                       ## @TAB3
	.comm	_TIOCNOTTY,4,2                  ## @TIOCNOTTY
	.comm	_TIOCSWINSZ,4,2                 ## @TIOCSWINSZ
	.comm	__PATH_TTY,4,2                  ## @_PATH_TTY
	.comm	_def_col,8,3                    ## @def_col
	.comm	_def_row,8,3                    ## @def_row
	.comm	_really_stream,8,3              ## @really_stream
	.comm	_ttyfd,4,2                      ## @ttyfd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getptyslave                    ; -- Begin function getptyslave
	.p2align	2
_getptyslave:                           ; @getptyslave
	.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
Lloh0:
	adrp	x21, _line@GOTPAGE
Lloh1:
	ldr	x21, [x21, _line@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_cleanopen
	mov	x19, x0
Lloh2:
	adrp	x20, _net@GOTPAGE
Lloh3:
	ldr	x20, [x20, _net@GOTPAGEOFF]
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	ldr	x1, [x21]
	bl	_fatalperror
LBB0_2:
	bl	_init_termbuf
Lloh4:
	adrp	x8, _ECHO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ECHO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _termbuf@GOTPAGE
Lloh8:
	ldr	x9, [x9, _termbuf@GOTPAGEOFF]
	ldp	w11, w10, [x9, #4]
	orr	w8, w10, w8
	str	w8, [x9, #8]
Lloh9:
	adrp	x8, _ONLCR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ONLCR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w10, [x9]
	orr	w8, w10, w8
Lloh12:
	adrp	x10, _ICRNL@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ICRNL@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w10, w11, w10
Lloh15:
	adrp	x11, _IXOFF@GOTPAGE
Lloh16:
	ldr	x11, [x11, _IXOFF@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	bic	w10, w10, w11
	stp	w8, w10, [x9]
Lloh18:
	adrp	x8, _def_rspeed@GOTPAGE
Lloh19:
	ldr	x8, [x8, _def_rspeed@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	mov	w21, #9600
	cmp	x8, #0
	csel	x0, x8, x21, gt
	bl	_tty_rspeed
Lloh21:
	adrp	x8, _def_tspeed@GOTPAGE
Lloh22:
	ldr	x8, [x8, _def_tspeed@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x8, #0
	csel	x0, x8, x21, gt
	bl	_tty_tspeed
	bl	_set_termbuf
	mov	x0, x19
	bl	_login_tty
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x20]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fatalperror
LBB0_4:
	ldr	w0, [x20]
	cmp	w0, #3
	b.lt	LBB0_6
; %bb.5:
	bl	_close
LBB0_6:
Lloh26:
	adrp	x19, _ourpty@GOTPAGE
Lloh27:
	ldr	x19, [x19, _ourpty@GOTPAGEOFF]
	ldr	w0, [x19]
	cmp	w0, #3
	b.lt	LBB0_8
; %bb.7:
	bl	_close
	mov	w8, #-1
	str	w8, [x19]
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_line,8,3                       ; @line
	.comm	_net,4,2                        ; @net
	.comm	_ECHO,4,2                       ; @ECHO
	.comm	_termbuf,16,2                   ; @termbuf
	.comm	_ONLCR,4,2                      ; @ONLCR
	.comm	_ICRNL,4,2                      ; @ICRNL
	.comm	_IXOFF,4,2                      ; @IXOFF
	.comm	_def_rspeed,8,3                 ; @def_rspeed
	.comm	_def_tspeed,8,3                 ; @def_tspeed
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"login_tty"

	.comm	_ourpty,4,2                     ; @ourpty
	.comm	_CS8,4,2                        ; @CS8
	.comm	_ECHOE,4,2                      ; @ECHOE
	.comm	_ECHOK,4,2                      ; @ECHOK
	.comm	_EXTB,4,2                       ; @EXTB
	.comm	_HUPCL,4,2                      ; @HUPCL
	.comm	_ICANON,4,2                     ; @ICANON
	.comm	_IGNPAR,4,2                     ; @IGNPAR
	.comm	_ISIG,4,2                       ; @ISIG
	.comm	_ISTRIP,4,2                     ; @ISTRIP
	.comm	_IXON,4,2                       ; @IXON
	.comm	_OPOST,4,2                      ; @OPOST
	.comm	_OXTABS,4,2                     ; @OXTABS
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_TAB3,4,2                       ; @TAB3
	.comm	_TIOCNOTTY,4,2                  ; @TIOCNOTTY
	.comm	_TIOCSWINSZ,4,2                 ; @TIOCSWINSZ
	.comm	__PATH_TTY,4,2                  ; @_PATH_TTY
	.comm	_def_col,8,3                    ; @def_col
	.comm	_def_row,8,3                    ; @def_row
	.comm	_really_stream,8,3              ; @really_stream
	.comm	_ttyfd,4,2                      ; @ttyfd
.subsections_via_symbols
