	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Screen_SaveScreenshot          ## -- Begin function Screen_SaveScreenshot
	.p2align	4, 0x90
_Screen_SaveScreenshot:                 ## @Screen_SaveScreenshot
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_striendswith
	movq	_FALSE@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %rbx
	movq	_Screen_atari@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r13
	movq	_ATARI_LEFT_MARGIN@GOTPCREL(%rip), %r12
	movslq	(%r12), %rax
	leaq	(,%rax,4), %r14
	addq	%r13, %r14
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movq	_Screen_WIDTH@GOTPCREL(%rip), %rax
	movq	%rcx, %r15
	movq	_Screen_HEIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	imull	(%rax), %edi
	callq	_Util_malloc
	movq	%rax, (%r15)
	movslq	(%r12), %rcx
	leaq	(%rax,%rcx,4), %r15
	movq	_TRUE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_ANTIC_Frame
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_Screen_SavePCX
	movq	%rbx, %rdi
	callq	_fclose
	movq	_Screen_atari@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_free
	movq	%r13, (%rbx)
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_Screen_SavePCX
	movq	%rbx, %rdi
	callq	_fclose
	movq	_TRUE@GOTPCREL(%rip), %r12
LBB0_5:
	movl	(%r12), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".pcx"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"wb"

	.comm	_Screen_atari,8,3               ## @Screen_atari
	.comm	_ATARI_LEFT_MARGIN,4,2          ## @ATARI_LEFT_MARGIN
	.comm	_Screen_WIDTH,4,2               ## @Screen_WIDTH
	.comm	_Screen_HEIGHT,4,2              ## @Screen_HEIGHT
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Screen_SaveScreenshot          ; -- Begin function Screen_SaveScreenshot
	.p2align	2
_Screen_SaveScreenshot:                 ; @Screen_SaveScreenshot
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_striendswith
	cbz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_4
; %bb.2:
	mov	x19, x0
Lloh4:
	adrp	x22, _Screen_atari@GOTPAGE
Lloh5:
	ldr	x22, [x22, _Screen_atari@GOTPAGEOFF]
	ldr	x23, [x22]
Lloh6:
	adrp	x24, _ATARI_LEFT_MARGIN@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ATARI_LEFT_MARGIN@GOTPAGEOFF]
	ldrsw	x8, [x24]
	add	x20, x23, x8, lsl #2
	cbz	w21, LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _Screen_WIDTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Screen_WIDTH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _Screen_HEIGHT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _Screen_HEIGHT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mul	w0, w9, w8
	bl	_Util_malloc
	str	x0, [x22]
	ldrsw	x8, [x24]
	add	x21, x0, x8, lsl #2
Lloh14:
	adrp	x24, _TRUE@GOTPAGE
Lloh15:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_ANTIC_Frame
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_Screen_SavePCX
	mov	x0, x19
	bl	_fclose
	ldr	x0, [x22]
	bl	_free
	str	x23, [x22]
	b	LBB0_6
LBB0_4:
Lloh16:
	adrp	x24, _FALSE@GOTPAGE
Lloh17:
	ldr	x24, [x24, _FALSE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	bl	_Screen_SavePCX
	mov	x0, x19
	bl	_fclose
Lloh18:
	adrp	x24, _TRUE@GOTPAGE
Lloh19:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x24]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".pcx"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"wb"

	.comm	_Screen_atari,8,3               ; @Screen_atari
	.comm	_ATARI_LEFT_MARGIN,4,2          ; @ATARI_LEFT_MARGIN
	.comm	_Screen_WIDTH,4,2               ; @Screen_WIDTH
	.comm	_Screen_HEIGHT,4,2              ; @Screen_HEIGHT
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
