	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function gxCopyScreenshot
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_gxCopyScreenshot
	.p2align	4, 0x90
_gxCopyScreenshot:                      ## @gxCopyScreenshot
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_texturemem@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_vwidth@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_vheight@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GX_TF_RGB565@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_GX_CLAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_GX_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	pushq	%rax
	pushq	%r9
	callq	_GX_InitTexObj
	addq	$16, %rsp
	movq	_GX_TEXMAP0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_GX_LoadTexObj
	xorl	%eax, %eax
	callq	_GX_InvalidateTexAll
	movq	_bitmap@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ecx
	movl	4(%rsi), %eax
	leal	(%rcx,%rax,2), %eax
	shll	$7, %eax
	leal	(%rax,%rax,4), %eax
	cltd
	idivl	%ecx
	movl	%eax, %r14d
	movl	12(%rsi), %ebx
	addl	%ebx, %ebx
	movl	8(%rsi), %r13d
	addl	%ebx, %r13d
	cmpl	$640, %eax                      ## imm = 0x280
	jl	LBB0_2
## %bb.1:
	cmpl	$239, %r13d
	jg	LBB0_3
LBB0_2:
	movq	_BLACK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$640, %edx                      ## imm = 0x280
	movl	$480, %ecx                      ## imm = 0x1E0
	movl	$255, %r8d
	callq	_gxDrawRectangle
LBB0_3:
	movl	$-240, %r15d
	subl	%ebx, %r15d
	movl	%r14d, %r12d
	shrl	$31, %r12d
	addl	%r14d, %r12d
	sarl	%r12d
	movl	%r12d, %ebx
	negl	%ebx
	movq	_GX_QUADS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GX_VTXFMT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_GX_Begin
	leal	(%r15,%r13,2), %r13d
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	$255, %ecx
	callq	_GX_Color4u8
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	xorps	%xmm0, %xmm0
	callq	_GX_TexCoord2f32
	subl	%r12d, %r14d
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	$255, %ecx
	callq	_GX_Color4u8
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movaps	%xmm0, %xmm1
	callq	_GX_TexCoord2f32
	movl	%r14d, %edi
	movl	%r15d, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	$255, %ecx
	callq	_GX_Color4u8
	xorps	%xmm1, %xmm1
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_GX_TexCoord2f32
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	$255, %ecx
	callq	_GX_Color4u8
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	callq	_GX_TexCoord2f32
	xorl	%eax, %eax
	callq	_GX_End
	movq	_GX_TF_RGBA8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 12(%rbx)
	movl	$320, (%rbx)                    ## imm = 0x140
	movq	_bitmap@GOTPCREL(%rip), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 4(%rbx)
	movq	_screenshot@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	addl	%ecx, %ecx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$640, %edx                      ## imm = 0x280
	callq	_GX_SetTexCopySrc
	movl	(%rbx), %edi
	movl	4(%rbx), %esi
	movl	12(%rbx), %edx
	movq	_GX_TRUE@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	callq	_GX_SetTexCopyDst
	xorl	%eax, %eax
	callq	_GX_DrawDone
	movl	8(%rbx), %edi
	movl	(%r14), %esi
	callq	_GX_CopyTex
	xorl	%eax, %eax
	callq	_GX_Flush
	xorl	%eax, %eax
	callq	_GX_PixModeSync
	movq	_GX_TEXMAP0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdi
	callq	_GX_LoadTexObj
	xorl	%eax, %eax
	callq	_GX_InvalidateTexAll
	xorl	%eax, %eax
	callq	_GX_Flush
	movl	(%rbx), %esi
	movl	8(%rbx), %edi
	imull	4(%rbx), %esi
	shll	$2, %esi
	callq	_DCFlushRange
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_texturemem,4,2                 ## @texturemem
	.comm	_vwidth,4,2                     ## @vwidth
	.comm	_vheight,4,2                    ## @vheight
	.comm	_GX_TF_RGB565,4,2               ## @GX_TF_RGB565
	.comm	_GX_CLAMP,4,2                   ## @GX_CLAMP
	.comm	_GX_FALSE,4,2                   ## @GX_FALSE
	.comm	_GX_TEXMAP0,4,2                 ## @GX_TEXMAP0
	.comm	_bitmap,16,2                    ## @bitmap
	.comm	_BLACK,8,3                      ## @BLACK
	.comm	_GX_QUADS,4,2                   ## @GX_QUADS
	.comm	_GX_VTXFMT0,4,2                 ## @GX_VTXFMT0
	.comm	_GX_TF_RGBA8,4,2                ## @GX_TF_RGBA8
	.comm	_screenshot,4,2                 ## @screenshot
	.comm	_GX_TRUE,4,2                    ## @GX_TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gxCopyScreenshot               ; -- Begin function gxCopyScreenshot
	.p2align	2
_gxCopyScreenshot:                      ; @gxCopyScreenshot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _texturemem@GOTPAGE
Lloh1:
	ldr	x8, [x8, _texturemem@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _vwidth@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vwidth@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _vheight@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vheight@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _GX_TF_RGB565@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GX_TF_RGB565@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _GX_CLAMP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GX_CLAMP@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
Lloh15:
	adrp	x8, _GX_FALSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GX_FALSE@GOTPAGEOFF]
Lloh17:
	ldr	w7, [x8]
	add	x0, sp, #12
	mov	x6, x5
	bl	_GX_InitTexObj
Lloh18:
	adrp	x24, _GX_TEXMAP0@GOTPAGE
Lloh19:
	ldr	x24, [x24, _GX_TEXMAP0@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x0, sp, #12
	bl	_GX_LoadTexObj
	bl	_GX_InvalidateTexAll
Lloh20:
	adrp	x25, _bitmap@GOTPAGE
Lloh21:
	ldr	x25, [x25, _bitmap@GOTPAGEOFF]
	ldp	w8, w9, [x25]
	add	w9, w8, w9, lsl #1
	add	w9, w9, w9, lsl #2
	lsl	w9, w9, #7
	sdiv	w23, w9, w8
	ldp	w8, w9, [x25, #8]
	lsl	w20, w9, #1
	add	w22, w20, w8
	cmp	w23, #640
	b.lt	LBB0_2
; %bb.1:
	cmp	w22, #239
	b.gt	LBB0_3
LBB0_2:
Lloh22:
	adrp	x8, _BLACK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BLACK@GOTPAGEOFF]
Lloh24:
	ldr	w5, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #640
	mov	w3, #480
	mov	w4, #255
	bl	_gxDrawRectangle
LBB0_3:
	mov	w8, #-240
	sub	w20, w8, w20
	cmp	w23, #0
	cinc	w8, w23, lt
	asr	w26, w8, #1
	neg	w21, w26
Lloh25:
	adrp	x8, _GX_QUADS@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GX_QUADS@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _GX_VTXFMT0@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GX_VTXFMT0@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_GX_Begin
	add	w22, w20, w22, lsl #1
	mov	x0, x21
	mov	x1, x22
	bl	_GX_Position2s16
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	w3, #255
	bl	_GX_Color4u8
	movi	d0, #0000000000000000
	fmov	d1, #1.00000000
	bl	_GX_TexCoord2f32
	sub	w23, w23, w26
	mov	x0, x23
	mov	x1, x22
	bl	_GX_Position2s16
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	w3, #255
	bl	_GX_Color4u8
	fmov	d0, #1.00000000
	fmov	d1, #1.00000000
	bl	_GX_TexCoord2f32
	mov	x0, x23
	mov	x1, x20
	bl	_GX_Position2s16
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	w3, #255
	bl	_GX_Color4u8
	fmov	d0, #1.00000000
	movi	d1, #0000000000000000
	bl	_GX_TexCoord2f32
	mov	x0, x21
	mov	x1, x20
	bl	_GX_Position2s16
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	w3, #255
	bl	_GX_Color4u8
	movi	d0, #0000000000000000
	movi	d1, #0000000000000000
	bl	_GX_TexCoord2f32
	bl	_GX_End
Lloh31:
	adrp	x8, _GX_TF_RGBA8@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GX_TF_RGBA8@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	mov	w9, #320
	ldr	w10, [x25, #8]
	stp	w9, w10, [x19]
Lloh34:
	adrp	x9, _screenshot@GOTPAGE
Lloh35:
	ldr	x9, [x9, _screenshot@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #8]
	lsl	w3, w10, #1
	mov	w0, #0
	mov	w1, #0
	mov	w2, #640
	bl	_GX_SetTexCopySrc
	ldp	w0, w1, [x19]
	ldr	w2, [x19, #12]
Lloh37:
	adrp	x20, _GX_TRUE@GOTPAGE
Lloh38:
	ldr	x20, [x20, _GX_TRUE@GOTPAGEOFF]
	ldr	w3, [x20]
	bl	_GX_SetTexCopyDst
	bl	_GX_DrawDone
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	bl	_GX_CopyTex
	bl	_GX_Flush
	bl	_GX_PixModeSync
	ldr	w1, [x24]
	add	x0, sp, #12
	bl	_GX_LoadTexObj
	bl	_GX_InvalidateTexAll
	bl	_GX_Flush
	ldp	w9, w0, [x19, #4]
	ldr	w8, [x19]
	mul	w8, w8, w9
	lsl	w1, w8, #2
	bl	_DCFlushRange
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_texturemem,4,2                 ; @texturemem
	.comm	_vwidth,4,2                     ; @vwidth
	.comm	_vheight,4,2                    ; @vheight
	.comm	_GX_TF_RGB565,4,2               ; @GX_TF_RGB565
	.comm	_GX_CLAMP,4,2                   ; @GX_CLAMP
	.comm	_GX_FALSE,4,2                   ; @GX_FALSE
	.comm	_GX_TEXMAP0,4,2                 ; @GX_TEXMAP0
	.comm	_bitmap,16,2                    ; @bitmap
	.comm	_BLACK,8,3                      ; @BLACK
	.comm	_GX_QUADS,4,2                   ; @GX_QUADS
	.comm	_GX_VTXFMT0,4,2                 ; @GX_VTXFMT0
	.comm	_GX_TF_RGBA8,4,2                ; @GX_TF_RGBA8
	.comm	_screenshot,4,2                 ; @screenshot
	.comm	_GX_TRUE,4,2                    ; @GX_TRUE
.subsections_via_symbols
