	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_M_ScreenShot                   ## -- Begin function M_ScreenShot
	.p2align	4, 0x90
_M_ScreenShot:                          ## @M_ScreenShot
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_screens@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %r14
	movq	%r14, %rdi
	callq	_I_ReadScreen
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	callq	_strcpy
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%bl, %eax
	imull	$205, %eax, %eax
	shrl	$11, %eax
	leal	48(%rax), %ecx
                                        ## kill: def $eax killed $eax killed $rax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movb	%cl, -40(%rbp)
	movl	%ebx, %ecx
	subl	%eax, %ecx
	orb	$48, %cl
	movb	%cl, -39(%rbp)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_access
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$100, %ebx
	jne	LBB0_1
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_I_Error
LBB0_4:
	movq	_SCREENWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SCREENHEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_PU_CACHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_W_CacheLumpName
	leaq	-44(%rbp), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_WritePCXfile
	movq	_players@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_consoleplayer@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	L_.str.3(%rip), %rdx
	movq	%rdx, (%rax,%rcx,8)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_screens,8,3                    ## @screens
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DOOM00.pcx"

L_.str.1:                               ## @.str.1
	.asciz	"M_ScreenShot: Couldn't create a PCX"

	.comm	_SCREENWIDTH,4,2                ## @SCREENWIDTH
	.comm	_SCREENHEIGHT,4,2               ## @SCREENHEIGHT
L_.str.2:                               ## @.str.2
	.asciz	"PLAYPAL"

	.comm	_PU_CACHE,4,2                   ## @PU_CACHE
L_.str.3:                               ## @.str.3
	.asciz	"screen shot"

	.comm	_players,8,3                    ## @players
	.comm	_consoleplayer,8,3              ## @consoleplayer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_M_ScreenShot                   ; -- Begin function M_ScreenShot
	.p2align	2
_M_ScreenShot:                          ; @M_ScreenShot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _screens@GOTPAGE
Lloh4:
	ldr	x8, [x8, _screens@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x19, [x8, #16]
	mov	x0, x19
	bl	_I_ReadScreen
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #12
	bl	_strcpy
	mov	w20, #0
	mov	w21, #205
	mov	w22, #10
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	and	w8, w20, #0xff
	mul	w8, w8, w21
	lsr	w8, w8, #11
	add	w9, w8, #48
	strb	w9, [sp, #16]
	msub	w8, w8, w22, w20
	orr	w8, w8, #0x30
	strb	w8, [sp, #17]
	add	x0, sp, #12
	mov	w1, #0
	bl	_access
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w20, w20, #1
	cmp	w20, #100
	b.ne	LBB0_1
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_I_Error
LBB0_4:
Lloh10:
	adrp	x8, _SCREENWIDTH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCREENWIDTH@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
Lloh13:
	adrp	x8, _SCREENHEIGHT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SCREENHEIGHT@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
Lloh16:
	adrp	x8, _PU_CACHE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PU_CACHE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_W_CacheLumpName
	mov	x4, x0
	add	x0, sp, #12
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_WritePCXfile
Lloh21:
	adrp	x8, _players@GOTPAGE
Lloh22:
	ldr	x8, [x8, _players@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
Lloh24:
	adrp	x9, _consoleplayer@GOTPAGE
Lloh25:
	ldr	x9, [x9, _consoleplayer@GOTPAGEOFF]
Lloh26:
	adrp	x10, l_.str.3@PAGE
Lloh27:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh28:
	ldr	x9, [x9]
	str	x10, [x8, x9, lsl #3]
	ldr	x8, [sp, #24]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_screens,8,3                    ; @screens
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DOOM00.pcx"

l_.str.1:                               ; @.str.1
	.asciz	"M_ScreenShot: Couldn't create a PCX"

	.comm	_SCREENWIDTH,4,2                ; @SCREENWIDTH
	.comm	_SCREENHEIGHT,4,2               ; @SCREENHEIGHT
l_.str.2:                               ; @.str.2
	.asciz	"PLAYPAL"

	.comm	_PU_CACHE,4,2                   ; @PU_CACHE
l_.str.3:                               ; @.str.3
	.asciz	"screen shot"

	.comm	_players,8,3                    ; @players
	.comm	_consoleplayer,8,3              ; @consoleplayer
.subsections_via_symbols
