	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_TakeScreenshot              ## -- Begin function RB_TakeScreenshot
	.p2align	4, 0x90
_RB_TakeScreenshot:                     ## @RB_TakeScreenshot
	.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	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movq	$18, -48(%rbp)
	leaq	-48(%rbp), %r8
	leaq	-52(%rbp), %r9
	callq	_RB_ReadPixels
	movq	%rax, %r13
	movq	-48(%rbp), %rbx
	leaq	(%rax,%rbx,8), %r15
	addq	$-144, %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$18, %edx
	callq	_Com_Memset
	movq	$2, -128(%r13,%rbx,8)
	movzbl	%r14b, %eax
	movq	%rax, -48(%r13,%rbx,8)
	movl	%r14d, %eax
	sarl	$8, %eax
	cltq
	movq	%rax, -40(%r13,%rbx,8)
	movzbl	%r12b, %eax
	movq	%rax, -32(%r13,%rbx,8)
	movl	%r12d, %eax
	sarl	$8, %eax
	cltq
	movq	%rax, -24(%r13,%rbx,8)
	movq	$24, -16(%r13,%rbx,8)
	leal	(%r14,%r14,2), %r8d
	movq	-48(%rbp), %rax
	leaq	(,%rax,8), %rdi
	addq	%r13, %rdi
	movslq	-52(%rbp), %r10
	leal	(%r10,%r8), %eax
	imull	%r12d, %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	cltq
	leaq	(%rdi,%rax,8), %r11
	movslq	%r8d, %r9
	movq	%rdi, %rax
	movq	%rdi, %rsi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%r10,8), %rax
	cmpq	%r11, %rax
	jae	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%r14d, %r14d
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%r9,8), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rax), %rcx
	movq	16(%rax), %rdx
	movq	%rdx, (%rsi)
	movq	8(%rax), %rdx
	movq	%rdx, 8(%rsi)
	movq	%rcx, 16(%rsi)
	addq	$24, %rsi
	addq	$24, %rax
	cmpq	%rbx, %rax
	jb	LBB0_4
	jmp	LBB0_5
LBB0_6:
	imull	%r12d, %r8d
	movslq	%r8d, %rbx
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rsi
	callq	_R_GammaCorrect
LBB0_8:
	movq	_ri@GOTPCREL(%rip), %r14
	addq	$18, %rbx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	*8(%r14)
	movq	%r13, %rdi
	callq	*(%r14)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_ri,16,3                        ## @ri
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_TakeScreenshot              ; -- Begin function RB_TakeScreenshot
	.p2align	2
_RB_TakeScreenshot:                     ; @RB_TakeScreenshot
	.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
	mov	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	w8, #18
	str	x8, [sp]
	mov	x4, sp
	add	x5, sp, #12
	bl	_RB_ReadPixels
	mov	x20, x0
	ldr	x8, [sp]
	add	x24, x0, x8, lsl #3
	sub	x22, x24, #144
	mov	x0, x22
	mov	w1, #0
	mov	w2, #18
	bl	_Com_Memset
	mov	w8, #2
	stur	x8, [x24, #-128]
	and	w8, w23, #0xff
	sbfx	x9, x23, #8, #24
	stp	x8, x9, [x24, #-48]
	and	w8, w21, #0xff
	sbfx	x9, x21, #8, #24
	stp	x8, x9, [x24, #-32]
	mov	w8, #24
	stur	x8, [x24, #-16]
	add	w8, w23, w23, lsl #1
	ldr	x9, [sp]
	add	x0, x20, x9, lsl #3
	ldrsw	x9, [sp, #12]
	add	w10, w9, w8
	mul	w12, w10, w21
	cmp	w12, #1
	b.lt	LBB0_7
; %bb.1:
	sxtw	x10, w8
	mov	x11, x0
	mov	x13, x0
	add	x12, x0, w12, sxtw #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, x9, lsl #3
	cmp	x11, x12
	b.hs	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w23, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x14, x11, x10, lsl #3
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x16, [x11]
	ldr	x15, [x11, #16]
	str	x15, [x13]
	ldr	x17, [x11, #8]
	add	x15, x13, #24
	stp	x17, x16, [x13, #8]
	add	x11, x11, #24
	mov	x13, x15
	cmp	x11, x14
	b.lo	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x13, x15
	b	LBB0_2
LBB0_7:
	mul	w8, w8, w21
	sxtw	x21, w8
Lloh0:
	adrp	x8, _glConfig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x1, x21
	bl	_R_GammaCorrect
LBB0_9:
Lloh3:
	adrp	x23, _ri@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ri@GOTPAGEOFF]
	ldr	x8, [x23, #8]
	add	x2, x21, #18
	mov	x0, x19
	mov	x1, x22
	blr	x8
	ldr	x8, [x23]
	mov	x0, x20
	blr	x8
	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	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_ri,16,3                        ; @ri
.subsections_via_symbols
