	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_term
_open_term:                             ## @open_term
	.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	%rdi, %r14
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_isatty
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_ttyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_2:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_isatty
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	callq	_ttyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_4:
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_isatty
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %edi
	callq	_ttyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rbx
LBB0_7:
	movq	%rbx, %rdi
	callq	_xstrdup
	movq	%rax, (%r14)
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_open                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/tty"

	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.no_dead_strip	_open_term
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_term
_open_term:                             ; @open_term
	.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
Lloh0:
	adrp	x20, _STDERR_FILENO@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STDERR_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_ttyname
	mov	x20, x0
	cbnz	x0, LBB0_7
LBB0_2:
Lloh2:
	adrp	x20, _STDOUT_FILENO@GOTPAGE
Lloh3:
	ldr	x20, [x20, _STDOUT_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x20]
	bl	_ttyname
	mov	x20, x0
	cbnz	x0, LBB0_7
LBB0_4:
Lloh4:
	adrp	x20, _STDIN_FILENO@GOTPAGE
Lloh5:
	ldr	x20, [x20, _STDIN_FILENO@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_isatty
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x20]
	bl	_ttyname
	mov	x20, x0
	cbnz	x0, LBB0_7
LBB0_6:
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x20
	bl	_xstrdup
	str	x0, [x19]
Lloh8:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_open
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/tty"

	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.no_dead_strip	_open_term
.subsections_via_symbols
