	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_control_chars              ## -- Begin function set_control_chars
	.p2align	4, 0x90
_set_control_chars:                     ## @set_control_chars
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	leaq	-1040(%rbp), %rax
	movq	%rax, -1048(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-1048(%rbp), %rsi
	callq	_tgetstr
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpb	$0, 1(%rax)
	je	LBB0_4
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	leaq	-1048(%rbp), %rsi
	callq	_tgetstr
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpb	$0, 1(%rax)
	je	LBB0_4
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_tgetflag
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	$104, %edi
	callq	_CTRL
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_4:
	movb	(%rax), %bl
LBB0_8:
	movq	_erasech@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testb	%bl, %bl
	setne	%dl
	testl	%ecx, %ecx
	jne	LBB0_12
## %bb.9:
	testb	%bl, %bl
	je	LBB0_12
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	callq	_tgetflag
	movb	$1, %dl
	testq	%rax, %rax
	jne	LBB0_11
	jmp	LBB0_15
LBB0_6:
	xorl	%edx, %edx
	xorl	%ebx, %ebx
LBB0_11:
	movq	_erasech@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_12:
	testl	%ecx, %ecx
	jns	LBB0_16
## %bb.13:
	testb	%dl, %dl
	jne	LBB0_15
## %bb.14:
	movl	$104, %edi
	callq	_CTRL
	movl	%eax, %ebx
LBB0_15:
	movsbl	%bl, %ecx
	movq	_erasech@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
LBB0_16:
	movq	_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_VERASE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_18
## %bb.17:
	testl	%ecx, %ecx
	je	LBB0_21
LBB0_18:
	testl	%ecx, %ecx
	jne	LBB0_20
## %bb.19:
	movq	_CERASE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_20:
	movslq	%ecx, %rcx
	movq	%rcx, (%rax,%rdx,8)
LBB0_21:
	movq	_VINTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	movq	_intrchar@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	je	LBB0_23
## %bb.22:
	testq	%rdx, %rdx
	je	LBB0_26
LBB0_23:
	testq	%rdx, %rdx
	jne	LBB0_25
## %bb.24:
	movq	_CINTR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_25:
	movq	%rdx, (%rax,%rcx,8)
LBB0_26:
	movq	_VKILL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	movq	_killch@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	je	LBB0_28
## %bb.27:
	testq	%rdx, %rdx
	je	LBB0_31
LBB0_28:
	testq	%rdx, %rdx
	jne	LBB0_30
## %bb.29:
	movq	_CKILL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_30:
	movq	%rdx, (%rax,%rcx,8)
LBB0_31:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_33
## %bb.32:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%rbp
	retq
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kb"

L_.str.1:                               ## @.str.1
	.asciz	"bc"

L_.str.2:                               ## @.str.2
	.asciz	"bs"

	.comm	_erasech,4,2                    ## @erasech
L_.str.3:                               ## @.str.3
	.asciz	"os"

	.comm	_mode,8,3                       ## @mode
	.comm	_VERASE,8,3                     ## @VERASE
	.comm	_CERASE,4,2                     ## @CERASE
	.comm	_VINTR,8,3                      ## @VINTR
	.comm	_intrchar,8,3                   ## @intrchar
	.comm	_CINTR,8,3                      ## @CINTR
	.comm	_VKILL,8,3                      ## @VKILL
	.comm	_killch,8,3                     ## @killch
	.comm	_CKILL,8,3                      ## @CKILL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_control_chars              ; -- Begin function set_control_chars
	.p2align	2
_set_control_chars:                     ; @set_control_chars
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #1040
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x8, sp, #8
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, sp
	bl	_tgetstr
Lloh5:
	adrp	x20, _erasech@GOTPAGE
Lloh6:
	ldr	x20, [x20, _erasech@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldrb	w8, [x0, #1]
	cbz	w8, LBB0_6
LBB0_2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, sp
	bl	_tgetstr
	cbz	x0, LBB0_4
; %bb.3:
	ldrb	w8, [x0, #1]
	cbz	w8, LBB0_6
LBB0_4:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_tgetflag
	cbz	x0, LBB0_10
; %bb.5:
	mov	w0, #104
	bl	_CTRL
	mov	x19, x0
	b	LBB0_7
LBB0_6:
	ldrb	w19, [x0]
LBB0_7:
	ldr	w9, [x20]
	tst	w19, #0xff
	cset	w8, ne
	cmp	w9, #0
	and	w10, w19, #0xff
	ccmp	w10, #0, #4, eq
	b.eq	LBB0_12
; %bb.8:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_tgetflag
	cbz	x0, LBB0_15
; %bb.9:
	mov	w8, #1
	b	LBB0_11
LBB0_10:
	mov	w8, #0
	mov	w19, #0
LBB0_11:
	ldr	w9, [x20]
LBB0_12:
	tbz	w9, #31, LBB0_16
; %bb.13:
	tbnz	w8, #0, LBB0_15
; %bb.14:
	mov	w0, #104
	bl	_CTRL
	mov	x19, x0
LBB0_15:
	sxtb	w9, w19
	str	w9, [x20]
LBB0_16:
Lloh13:
	adrp	x8, _mode@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mode@GOTPAGEOFF]
Lloh15:
	adrp	x10, _VERASE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _VERASE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	ldr	x10, [x10]
	ldr	x11, [x8, x10, lsl #3]
	cmp	x11, #0
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_18
; %bb.17:
Lloh19:
	adrp	x11, _CERASE@GOTPAGE
Lloh20:
	ldr	x11, [x11, _CERASE@GOTPAGEOFF]
Lloh21:
	ldr	w11, [x11]
	cmp	w9, #0
	csel	w9, w9, w11, ne
	sxtw	x9, w9
	str	x9, [x8, x10, lsl #3]
LBB0_18:
Lloh22:
	adrp	x9, _VINTR@GOTPAGE
Lloh23:
	ldr	x9, [x9, _VINTR@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	ldr	x11, [x8, x9, lsl #3]
Lloh25:
	adrp	x10, _intrchar@GOTPAGE
Lloh26:
	ldr	x10, [x10, _intrchar@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	cmp	x11, #0
	ccmp	x10, #0, #0, ne
	b.eq	LBB0_20
; %bb.19:
Lloh28:
	adrp	x11, _CINTR@GOTPAGE
Lloh29:
	ldr	x11, [x11, _CINTR@GOTPAGEOFF]
Lloh30:
	ldr	x11, [x11]
	cmp	x10, #0
	csel	x10, x10, x11, ne
	str	x10, [x8, x9, lsl #3]
LBB0_20:
Lloh31:
	adrp	x9, _VKILL@GOTPAGE
Lloh32:
	ldr	x9, [x9, _VKILL@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	ldr	x11, [x8, x9, lsl #3]
Lloh34:
	adrp	x10, _killch@GOTPAGE
Lloh35:
	ldr	x10, [x10, _killch@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	cmp	x11, #0
	ccmp	x10, #0, #0, ne
	b.eq	LBB0_22
; %bb.21:
Lloh37:
	adrp	x11, _CKILL@GOTPAGE
Lloh38:
	ldr	x11, [x11, _CKILL@GOTPAGEOFF]
Lloh39:
	ldr	x11, [x11]
	cmp	x10, #0
	csel	x10, x10, x11, ne
	str	x10, [x8, x9, lsl #3]
LBB0_22:
	ldur	x8, [x29, #-40]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kb"

l_.str.1:                               ; @.str.1
	.asciz	"bc"

l_.str.2:                               ; @.str.2
	.asciz	"bs"

	.comm	_erasech,4,2                    ; @erasech
l_.str.3:                               ; @.str.3
	.asciz	"os"

	.comm	_mode,8,3                       ; @mode
	.comm	_VERASE,8,3                     ; @VERASE
	.comm	_CERASE,4,2                     ; @CERASE
	.comm	_VINTR,8,3                      ; @VINTR
	.comm	_intrchar,8,3                   ; @intrchar
	.comm	_CINTR,8,3                      ; @CINTR
	.comm	_VKILL,8,3                      ; @VKILL
	.comm	_killch,8,3                     ; @killch
	.comm	_CKILL,8,3                      ; @CKILL
.subsections_via_symbols
