	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_mode
_set_mode:                              ## @set_mode
	.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
	cmpl	$0, (%rdi)
	js	LBB0_26
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r13
	xorl	%r15d, %r15d
	testl	%esi, %esi
	setne	%r15b
	leal	(%r15,%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	$-1, %rbx
	leaq	LJTI0_0(%rip), %r12
	jmp	LBB0_2
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 44(%r13)
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r13), %rax
	incq	%rbx
	cmpq	%rax, %rbx
	jge	LBB0_26
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 56(%r13)
	movq	8(%r13), %rax
	movl	4(%rax,%rbx,4), %eax
	je	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rax), %ecx
	cmpl	$24, %ecx
	ja	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r12,%rcx,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_decckm@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$20, %eax
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$4, %eax
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$3, %eax
	jne	LBB0_25
## %bb.21:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 40(%r13)
	jmp	LBB0_25
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1000, %eax                     ## imm = 0x3E8
	jne	LBB0_25
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 32(%r13)
	jmp	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_lnm@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 16(%r13)
	jmp	LBB0_25
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, 20(%r13)
	je	LBB0_25
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 20(%r13)
	movl	48(%r13), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_invert_screen
	movq	%r13, %rdi
	callq	_update_attr
	jmp	LBB0_25
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 24(%r13)
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_gotoxay
	jmp	LBB0_25
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 28(%r13)
	jmp	LBB0_25
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_decarm@GOTPCREL(%rip), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %esi
	movq	%r13, %rdi
	testl	%r14d, %r14d
	je	LBB0_24
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_set_kbd
	jmp	LBB0_25
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_clr_kbd
	jmp	LBB0_25
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, 32(%r13)
	jmp	LBB0_25
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, 36(%r13)
	jmp	LBB0_25
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_25
	.long	L0_0_set_10
	.long	L0_0_set_25
	.long	L0_0_set_11
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_25
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_decckm,4,2                     ## @decckm
	.comm	_decarm,4,2                     ## @decarm
	.comm	_lnm,4,2                        ## @lnm
	.comm	_deccolm,4,2                    ## @deccolm
	.no_dead_strip	_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_mode
_set_mode:                              ; @set_mode
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_25
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x21, #0
	cmp	w1, #0
	cset	w22, ne
	lsl	w23, w22, #1
Lloh0:
	adrp	x24, _lnm@GOTPAGE
Lloh1:
	ldr	x24, [x24, _lnm@GOTPAGEOFF]
Lloh2:
	adrp	x25, lJTI0_0@PAGE
Lloh3:
	add	x25, x25, lJTI0_0@PAGEOFF
Lloh4:
	adrp	x26, _decckm@GOTPAGE
Lloh5:
	ldr	x26, [x26, _decckm@GOTPAGEOFF]
Lloh6:
	adrp	x27, _decarm@GOTPAGE
Lloh7:
	ldr	x27, [x27, _decarm@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	cbz	w19, LBB0_22
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_set_kbd
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x21, #1
	ldrsw	x9, [x20]
	cmp	x21, x9
	mov	x21, x8
	b.ge	LBB0_25
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #56]
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x21, lsl #2]
	cbz	x9, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w9, w8, #1
	cmp	w9, #24
	b.hi	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	adr	x8, LBB0_4
	ldrb	w10, [x25, x9]
	add	x8, x8, x10, lsl #2
	br	x8
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x26]
	cbnz	w19, LBB0_3
	b	LBB0_22
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #20
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #4
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #3
	b.ne	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #40]
	b	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #44]
	b	LBB0_4
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #1000
	b.ne	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w23, [x20, #32]
	b	LBB0_4
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #16]
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #20]
	cmp	w8, w19
	b.eq	LBB0_4
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #20]
	ldr	w2, [x20, #48]
	mov	x0, x20
	mov	w1, #0
	mov	w3, #0
	bl	_invert_screen
	mov	x0, x20
	bl	_update_attr
	b	LBB0_4
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #24]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_gotoxay
	b	LBB0_4
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #28]
	b	LBB0_4
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x27]
	cbnz	w19, LBB0_3
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_clr_kbd
	b	LBB0_4
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w22, [x20, #32]
	b	LBB0_4
LBB0_24:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w19, [x20, #36]
	b	LBB0_4
LBB0_25:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_16-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_17-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_20-LBB0_4)>>2
	.byte	(LBB0_21-LBB0_4)>>2
	.byte	(LBB0_23-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_24-LBB0_4)>>2
                                        ; -- End function
	.comm	_decckm,4,2                     ; @decckm
	.comm	_decarm,4,2                     ; @decarm
	.comm	_lnm,4,2                        ; @lnm
	.comm	_deccolm,4,2                    ; @deccolm
	.no_dead_strip	_set_mode
.subsections_via_symbols
