	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function save_original_screen
_save_original_screen:                  ## @save_original_screen
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	callq	_PropOf
	movq	%rax, %r13
	movq	40(%rax), %r12
	movq	%r12, %rbx
	shrq	$32, %rbx
	movl	%ebx, %eax
	imull	%r12d, %eax
	movslq	%eax, %rdi
	shlq	$2, %rdi
	callq	_malloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%r12, %xmm0
	pcmpeqd	%xmm1, %xmm1
	paddd	%xmm0, %xmm1
	pxor	%xmm0, %xmm0
	movdqa	%xmm0, -64(%rbp)
	pmovsxdq	%xmm1, %xmm0
	movdqa	%xmm0, -80(%rbp)
	xorl	%edi, %edi
	callq	_T
	movl	(%r15), %edi
	movq	(%r13), %rsi
	shlq	$32, %rbx
	movl	%r12d, %edx
	orq	%rbx, %rdx
	leaq	-80(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_ReadConsoleOutput
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	testl	%r14d, %r14d
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rdi
	cmoveq	%rax, %rdi
	callq	_T
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %rdi
	callq	_T
	movq	(%r13), %rdi
	callq	_FreeAndNull
	movq	8(%r13), %rax
	movq	16(%r13), %rbx
	movq	24(%r13), %rcx
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	%eax, %r12d
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	subl	%ecx, %r12d
	incl	%r12d
	movq	32(%r13), %rax
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	subl	%eax, %ebx
	incl	%ebx
	movl	%ebx, %eax
	imull	%r12d, %eax
	movslq	%eax, %rdi
	shlq	$2, %rdi
	callq	_malloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -56(%rbp)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -64(%rbp)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -72(%rbp)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -80(%rbp)
	xorl	%edi, %edi
	callq	_T
	movl	(%r15), %edi
	movq	(%r13), %rsi
	shlq	$32, %rbx
	movl	%r12d, %edx
	orq	%rbx, %rdx
	leaq	-80(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_ReadConsoleOutput
	testq	%rax, %rax
	jne	LBB0_2
## %bb.5:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %rdi
	callq	_T
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str.4:                               ## @.str.4
	.asciz	"ok"

L_.str.5:                               ## @.str.5
	.asciz	"err"

	.no_dead_strip	_save_original_screen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function save_original_screen
_save_original_screen:                  ; @save_original_screen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_PropOf
	mov	x21, x0
	ldpsw	x22, x23, [x0, #40]
	mul	w8, w23, w22
	sbfiz	x0, x8, #2, #32
	bl	_malloc
	str	x0, [x21]
	cbz	x0, LBB0_3
; %bb.1:
	sub	x8, x23, #1
	stp	xzr, xzr, [sp, #16]
	sub	x9, x22, #1
	stp	x9, x8, [sp]
	mov	x0, #0
	bl	_T
	ldr	w0, [x20]
	ldr	x1, [x21]
	bfi	x22, x23, #32, #32
	mov	x4, sp
	mov	x2, x22
	mov	x3, #0
	bl	_ReadConsoleOutput
	cbz	x0, LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _TRUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
LBB0_3:
Lloh6:
	adrp	x8, l_.str.4@PAGE
Lloh7:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh8:
	adrp	x9, l_.str.5@PAGE
Lloh9:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	w19, #0
	csel	x0, x9, x8, eq
	bl	_T
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
	bl	_GetLastError
	bl	_T
	ldr	x0, [x21]
	bl	_FreeAndNull
	ldp	x23, x25, [x21, #8]
	ldp	x26, x27, [x21, #24]
	sub	w8, w23, w26
	add	w22, w8, #1
	sub	w8, w25, w27
	add	w24, w8, #1
	mul	w8, w24, w22
	sbfiz	x0, x8, #2, #32
	bl	_malloc
	str	x0, [x21]
	cbz	x0, LBB0_3
; %bb.5:
	stp	x26, x27, [sp, #16]
	stp	x23, x25, [sp]
	mov	x0, #0
	bl	_T
	ldr	w0, [x20]
	ldr	x1, [x21]
	bfi	x22, x24, #32, #32
	mov	x4, sp
	mov	x2, x22
	mov	x3, #0
	bl	_ReadConsoleOutput
	cbnz	x0, LBB0_2
; %bb.6:
	bl	_GetLastError
	bl	_T
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str.4:                               ; @.str.4
	.asciz	"ok"

l_.str.5:                               ; @.str.5
	.asciz	"err"

	.no_dead_strip	_save_original_screen
.subsections_via_symbols
