	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_scrnmap
_load_scrnmap:                          ## @load_scrnmap
	.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	$120, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	leaq	L_.str(%rip), %rax
	movq	%rax, -48(%rbp)
	movq	_SCRNMAP_PATH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	%rdi, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	l___const.load_scrnmap.c+16(%rip), %rax
	movq	%rax, -80(%rbp)
	movaps	l___const.load_scrnmap.c(%rip), %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	l___const.load_scrnmap.d(%rip), %xmm0
	movaps	%xmm0, -112(%rbp)
	leaq	-48(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	leaq	-112(%rbp), %rcx
	leaq	-128(%rbp), %r8
	callq	_openguess
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_revert
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_2:
	leaq	-116(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_decode
	cmpl	$4, %eax
	je	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	callq	_rewind
	leaq	-116(%rbp), %rdi
	movl	$1, %esi
	movl	$4, %edx
	movq	%rbx, %rcx
	callq	_fread
	cmpq	$4, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_fclose
	xorl	%eax, %eax
	callq	_revert
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_5:
	movq	_PIO_SCRNMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-116(%rbp), %rdx
	xorl	%edi, %edi
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_revert
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_7:
	movq	%rbx, %rdi
	callq	_fclose
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-16(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$120, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_SCRNMAP_PATH,8,3               ## @SCRNMAP_PATH
L_.str.1:                               ## @.str.1
	.asciz	".scm"

	.section	__DATA,__const
	.p2align	4                               ## @__const.load_scrnmap.c
l___const.load_scrnmap.c:
	.quad	L_.str
	.quad	L_.str.1
	.quad	0

	.p2align	4                               ## @__const.load_scrnmap.d
l___const.load_scrnmap.d:
	.quad	L_.str
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"screenmap file not found"

L_.str.3:                               ## @.str.3
	.asciz	"bad screenmap file"

	.comm	_PIO_SCRNMAP,4,2                ## @PIO_SCRNMAP
L_.str.4:                               ## @.str.4
	.asciz	"loading screenmap"

	.no_dead_strip	_load_scrnmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_scrnmap
_load_scrnmap:                          ; @load_scrnmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
Lloh5:
	adrp	x9, _SCRNMAP_PATH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SCRNMAP_PATH@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	stp	x8, x9, [x29, #-48]
	stur	xzr, [x29, #-32]
	stp	x0, xzr, [sp, #64]
Lloh8:
	adrp	x8, l___const.load_scrnmap.c@PAGE
Lloh9:
	add	x8, x8, l___const.load_scrnmap.c@PAGEOFF
	ldr	q1, [x8]
	ldr	x8, [x8, #16]
	str	x8, [sp, #48]
Lloh10:
	adrp	x8, l___const.load_scrnmap.d@PAGE
Lloh11:
	add	x8, x8, l___const.load_scrnmap.d@PAGEOFF
Lloh12:
	ldr	q0, [x8]
	stp	q0, q1, [sp, #16]
	sub	x0, x29, #48
	add	x1, sp, #64
	add	x2, sp, #32
	add	x3, sp, #16
	add	x4, sp, #8
	bl	_openguess
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_revert
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	add	x1, sp, #4
	mov	x0, x19
	mov	w2, #4
	bl	_decode
	cmp	w0, #4
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_rewind
	add	x0, sp, #4
	mov	w1, #1
	mov	w2, #4
	mov	x3, x19
	bl	_fread
	cmp	x0, #4
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_fclose
	bl	_revert
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_5:
Lloh17:
	adrp	x8, _PIO_SCRNMAP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PIO_SCRNMAP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	w0, #0
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.6:
	bl	_revert
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_7:
	mov	x0, x19
	bl	_fclose
	ldur	x8, [x29, #-24]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpAddLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_SCRNMAP_PATH,8,3               ; @SCRNMAP_PATH
l_.str.1:                               ; @.str.1
	.asciz	".scm"

	.section	__DATA,__const
	.p2align	3                               ; @__const.load_scrnmap.c
l___const.load_scrnmap.c:
	.quad	l_.str
	.quad	l_.str.1
	.quad	0

	.p2align	3                               ; @__const.load_scrnmap.d
l___const.load_scrnmap.d:
	.quad	l_.str
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"screenmap file not found"

l_.str.3:                               ; @.str.3
	.asciz	"bad screenmap file"

	.comm	_PIO_SCRNMAP,4,2                ; @PIO_SCRNMAP
l_.str.4:                               ; @.str.4
	.asciz	"loading screenmap"

	.no_dead_strip	_load_scrnmap
.subsections_via_symbols
