	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_terminal_emulator
_set_terminal_emulator:                 ## @set_terminal_emulator
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	-40(%rbp), %rsi
	xorl	%edi, %edi
	callq	_get_terminal_emulator
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_strlcpy
	movq	_CONS_SETTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	xorl	%edi, %edi
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_warn
LBB0_2:
	leaq	-24(%rbp), %rsi
	xorl	%edi, %edi
	callq	_get_terminal_emulator
	movq	-40(%rbp), %rsi
	movq	-32(%rbp), %rdx
	movq	-24(%rbp), %rcx
	movq	-16(%rbp), %r8
	leaq	L_.str.1(%rip), %rdi
	callq	_printf
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONS_SETTERM,4,2               ## @CONS_SETTERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SETTERM '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"%s (%s) -> %s (%s)\n"

	.no_dead_strip	_set_terminal_emulator
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_terminal_emulator
_set_terminal_emulator:                 ; @set_terminal_emulator
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	add	x1, sp, #16
	mov	w0, #0
	bl	_get_terminal_emulator
	mov	x1, x19
	mov	w2, #8
	bl	_strlcpy
Lloh0:
	adrp	x8, _CONS_SETTERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONS_SETTERM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, sp
	mov	w0, #0
	bl	_ioctl
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_warn
LBB0_2:
	mov	x1, sp
	mov	w0, #0
	bl	_get_terminal_emulator
	ldp	x1, x2, [sp, #16]
	ldp	x3, x4, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_CONS_SETTERM,4,2               ; @CONS_SETTERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SETTERM '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"%s (%s) -> %s (%s)\n"

	.no_dead_strip	_set_terminal_emulator
.subsections_via_symbols
