	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getptyslave
_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_termbuf@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_VERASE@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movb	(%rax,%rcx), %r13b
	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	_CRMOD@GOTPCREL(%rip), %rax
	movq	_ANYP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ECHO@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_XTABS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 8(%r15)
	movq	_def_rspeed@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	movl	$9600, %ebx                     ## imm = 0x2580
	cmovlel	%ebx, %edi
	callq	_tty_rspeed
	movq	_def_tspeed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	cmovgl	%eax, %ebx
	movl	%ebx, %edi
	callq	_tty_tspeed
	testb	%r13b, %r13b
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rax
	movq	(%r12), %rcx
	movb	%r13b, (%rax,%rcx)
LBB0_4:
	xorl	%eax, %eax
	callq	_set_termbuf
	movl	%r14d, %edi
	callq	_login_tty
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	movq	_net@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fatalperror
LBB0_6:
	movq	_net@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	cmpl	$3, %edi
	jl	LBB0_7
## %bb.8:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_termbuf,16,3                   ## @termbuf
	.comm	_VERASE,8,3                     ## @VERASE
	.comm	_line,8,3                       ## @line
	.comm	_net,4,2                        ## @net
	.comm	_CRMOD,4,2                      ## @CRMOD
	.comm	_ANYP,4,2                       ## @ANYP
	.comm	_ECHO,4,2                       ## @ECHO
	.comm	_XTABS,4,2                      ## @XTABS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"login_tty"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_TIOCNOTTY,4,2                  ## @TIOCNOTTY
	.comm	_TIOCSWINSZ,4,2                 ## @TIOCSWINSZ
	.comm	__PATH_TTY,4,2                  ## @_PATH_TTY
	.comm	_pty,4,2                        ## @pty
	.no_dead_strip	_getptyslave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getptyslave
_getptyslave:                           ; @getptyslave
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x21, _termbuf@GOTPAGE
Lloh1:
	ldr	x21, [x21, _termbuf@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x22, _VERASE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _VERASE@GOTPAGEOFF]
	ldr	x9, [x22]
	ldrb	w23, [x8, x9]
Lloh4:
	adrp	x24, _line@GOTPAGE
Lloh5:
	ldr	x24, [x24, _line@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_cleanopen
	mov	x19, x0
Lloh6:
	adrp	x20, _net@GOTPAGE
Lloh7:
	ldr	x20, [x20, _net@GOTPAGEOFF]
	tbz	w0, #31, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	ldr	x1, [x24]
	bl	_fatalperror
LBB0_2:
	bl	_init_termbuf
Lloh8:
	adrp	x8, _CRMOD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CRMOD@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ANYP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ANYP@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _ECHO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ECHO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _XTABS@GOTPAGE
Lloh18:
	ldr	x10, [x10, _XTABS@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh19:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x21, #8]
	orr	w8, w8, w9
	str	w8, [x21, #8]
Lloh20:
	adrp	x8, _def_rspeed@GOTPAGE
Lloh21:
	ldr	x8, [x8, _def_rspeed@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	mov	w24, #9600
	cmp	w8, #0
	csel	w0, w8, w24, gt
	bl	_tty_rspeed
Lloh23:
	adrp	x8, _def_tspeed@GOTPAGE
Lloh24:
	ldr	x8, [x8, _def_tspeed@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w8, #0
	csel	w0, w8, w24, gt
	bl	_tty_tspeed
	cbz	w23, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	x9, [x22]
	strb	w23, [x8, x9]
LBB0_4:
	bl	_set_termbuf
	mov	x0, x19
	bl	_login_tty
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x20]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fatalperror
LBB0_6:
	ldr	w0, [x20]
	cmp	w0, #3
	b.lt	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_close
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_termbuf,16,3                   ; @termbuf
	.comm	_VERASE,8,3                     ; @VERASE
	.comm	_line,8,3                       ; @line
	.comm	_net,4,2                        ; @net
	.comm	_CRMOD,4,2                      ; @CRMOD
	.comm	_ANYP,4,2                       ; @ANYP
	.comm	_ECHO,4,2                       ; @ECHO
	.comm	_XTABS,4,2                      ; @XTABS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"login_tty"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_TIOCNOTTY,4,2                  ; @TIOCNOTTY
	.comm	_TIOCSWINSZ,4,2                 ; @TIOCSWINSZ
	.comm	__PATH_TTY,4,2                  ; @_PATH_TTY
	.comm	_pty,4,2                        ; @pty
	.no_dead_strip	_getptyslave
.subsections_via_symbols
