	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function gxDrawScreenshot
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_gxDrawScreenshot
	.p2align	4, 0x90
_gxDrawScreenshot:                      ## @gxDrawScreenshot
	.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	_rmode@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.1:
	movl	%edi, %r14d
	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	-52(%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
	leaq	-44(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	callq	_gxSetAspectRatio
	movq	_vmode@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rdi), %eax
	movl	4(%rdi), %ebx
	imull	-44(%rbp), %eax
	cltd
	idivl	%ebx
	movl	%eax, %ecx
	movl	%eax, -44(%rbp)
	movq	_config@GOTPCREL(%rip), %r8
	movl	(%rdi), %eax
	movl	8(%rdi), %esi
	imull	(%r8), %eax
	cltd
	idivl	%ebx
	movl	%eax, %r15d
	imull	4(%r8), %esi
	movl	%esi, %eax
	cltd
	idivl	12(%rdi)
	movl	%eax, %r12d
	subl	%ecx, %r15d
	movl	-48(%rbp), %eax
	subl	%eax, %r12d
	subl	%eax, %r12d
	leal	(%rcx,%rcx), %r13d
	leal	(,%rax,4), %ebx
	cmpl	$320, %ecx                      ## imm = 0x140
	jl	LBB0_3
## %bb.2:
	cmpl	$119, %eax
	jg	LBB0_4
LBB0_3:
	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_4:
	movq	_GX_QUADS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GX_VTXFMT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_GX_Begin
	addl	%r12d, %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	%r14d, %ecx
	callq	_GX_Color4u8
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	xorps	%xmm0, %xmm0
	callq	_GX_TexCoord2f32
	addl	%r15d, %r13d
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	%r14d, %ecx
	callq	_GX_Color4u8
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movaps	%xmm0, %xmm1
	callq	_GX_TexCoord2f32
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	%r14d, %ecx
	callq	_GX_Color4u8
	xorps	%xmm1, %xmm1
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_GX_TexCoord2f32
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_GX_Position2s16
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	movl	%r14d, %ecx
	callq	_GX_Color4u8
	xorps	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	callq	_GX_TexCoord2f32
	xorl	%eax, %eax
	callq	_GX_End
	xorl	%eax, %eax
	callq	_GX_DrawDone
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rmode,4,2                      ## @rmode
	.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	_vmode,8,3                      ## @vmode
	.comm	_config,8,2                     ## @config
	.comm	_BLACK,8,3                      ## @BLACK
	.comm	_GX_QUADS,4,2                   ## @GX_QUADS
	.comm	_GX_VTXFMT0,4,2                 ## @GX_VTXFMT0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gxDrawScreenshot               ; -- Begin function gxDrawScreenshot
	.p2align	2
_gxDrawScreenshot:                      ; @gxDrawScreenshot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _rmode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rmode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _texturemem@GOTPAGE
Lloh4:
	ldr	x8, [x8, _texturemem@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _vwidth@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vwidth@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _vheight@GOTPAGE
Lloh10:
	ldr	x8, [x8, _vheight@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x8, _GX_TF_RGB565@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GX_TF_RGB565@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
Lloh15:
	adrp	x8, _GX_CLAMP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GX_CLAMP@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
Lloh18:
	adrp	x8, _GX_FALSE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GX_FALSE@GOTPAGEOFF]
Lloh20:
	ldr	w7, [x8]
	add	x0, sp, #12
	mov	x6, x5
	bl	_GX_InitTexObj
Lloh21:
	adrp	x8, _GX_TEXMAP0@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GX_TEXMAP0@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x0, sp, #12
	bl	_GX_LoadTexObj
	bl	_GX_InvalidateTexAll
	add	x0, sp, #8
	add	x1, sp, #4
	bl	_gxSetAspectRatio
Lloh24:
	adrp	x8, _vmode@GOTPAGE
Lloh25:
	ldr	x8, [x8, _vmode@GOTPAGEOFF]
	ldr	w9, [sp, #8]
Lloh26:
	ldr	x8, [x8]
	ldp	w10, w11, [x8]
	mul	w9, w10, w9
	sdiv	w9, w9, w11
	str	w9, [sp, #8]
Lloh27:
	adrp	x10, _config@GOTPAGE
Lloh28:
	ldr	x10, [x10, _config@GOTPAGEOFF]
	ldr	w12, [x8]
	ldp	w13, w10, [x10]
	mul	w12, w12, w13
	ldp	w13, w8, [x8, #8]
	mul	w10, w13, w10
	sdiv	w10, w10, w8
	ldr	w8, [sp, #4]
	sub	w20, w10, w8, lsl #1
	sdiv	w10, w12, w11
	sub	w21, w10, w9
	lsl	w23, w9, #1
	lsl	w22, w8, #2
	cmp	w9, #320
	b.lt	LBB0_3
; %bb.2:
	cmp	w8, #119
	b.gt	LBB0_4
LBB0_3:
Lloh29:
	adrp	x8, _BLACK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BLACK@GOTPAGEOFF]
Lloh31:
	ldr	w5, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #640
	mov	w3, #480
	mov	w4, #255
	bl	_gxDrawRectangle
LBB0_4:
Lloh32:
	adrp	x8, _GX_QUADS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GX_QUADS@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x8, _GX_VTXFMT0@GOTPAGE
Lloh36:
	ldr	x8, [x8, _GX_VTXFMT0@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_GX_Begin
	add	w22, w20, w22
	mov	x0, x21
	mov	x1, x22
	bl	_GX_Position2s16
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	x3, x19
	bl	_GX_Color4u8
	movi	d0, #0000000000000000
	fmov	d1, #1.00000000
	bl	_GX_TexCoord2f32
	add	w23, w21, w23
	mov	x0, x23
	mov	x1, x22
	bl	_GX_Position2s16
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	mov	x3, x19
	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	x3, x19
	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	x3, x19
	bl	_GX_Color4u8
	movi	d0, #0000000000000000
	movi	d1, #0000000000000000
	bl	_GX_TexCoord2f32
	bl	_GX_End
	bl	_GX_DrawDone
LBB0_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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_rmode,4,2                      ; @rmode
	.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	_vmode,8,3                      ; @vmode
	.comm	_config,8,2                     ; @config
	.comm	_BLACK,8,3                      ; @BLACK
	.comm	_GX_QUADS,4,2                   ; @GX_QUADS
	.comm	_GX_VTXFMT0,4,2                 ; @GX_VTXFMT0
.subsections_via_symbols
