	.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, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, %r14d
	movq	_ri@GOTPCREL(%rip), %rcx
	movq	_glConfig@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	imull	4(%rdx), %eax
	leal	(%rax,%rax,2), %edi
	addl	$18, %edi
	callq	*(%rcx)
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$18, %edx
	callq	_Com_Memset
	movl	$2, 8(%rbx)
	movzbl	%r15b, %eax
	movl	%eax, 48(%rbx)
	movl	%r15d, %eax
	sarl	$8, %eax
	movl	%eax, 52(%rbx)
	movzbl	%r12b, %eax
	movl	%eax, 56(%rbx)
	movl	%r12d, %eax
	sarl	$8, %eax
	movl	%eax, 60(%rbx)
	movl	$24, 64(%rbx)
	movq	_GL_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, %r13
	addq	$72, %r13
	movq	%r13, (%rsp)
	movl	%r14d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_qglReadPixels
	imull	%r12d, %r15d
	leal	(%r15,%r15,2), %eax
	leal	(%r15,%r15,2), %r14d
	addl	$18, %r14d
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movl	%r14d, %eax
	movl	$18, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rcx,4), %edx
	movl	8(%rbx,%rcx,4), %esi
	movl	%esi, (%rbx,%rcx,4)
	movl	%edx, 8(%rbx,%rcx,4)
	addq	$3, %rcx
	cmpq	%rax, %rcx
	jb	LBB0_2
LBB0_3:
	movq	_tr@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_glConfig@GOTPCREL(%rip), %rcx
	jle	LBB0_6
## %bb.4:
	cmpq	$0, 8(%rcx)
	je	LBB0_6
## %bb.5:
	movl	(%rcx), %eax
	imull	4(%rcx), %eax
	leal	(%rax,%rax,2), %esi
	movq	%r13, %rdi
	callq	_R_GammaCorrect
LBB0_6:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	_ri@GOTPCREL(%rip), %r14
	callq	*16(%r14)
	movq	%rbx, %rdi
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ri,24,3                        ## @ri
	.comm	_glConfig,16,3                  ## @glConfig
	.comm	_GL_RGB,4,2                     ## @GL_RGB
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_tr,8,3                         ## @tr
.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:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x26, _ri@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ri@GOTPAGEOFF]
Lloh2:
	adrp	x27, _glConfig@GOTPAGE
Lloh3:
	ldr	x27, [x27, _glConfig@GOTPAGEOFF]
	ldr	x8, [x26]
	ldp	w9, w10, [x27]
	mul	w9, w9, w10
	add	w9, w9, w9, lsl #1
	add	w0, w9, #18
	blr	x8
	mov	x20, x0
	mov	w1, #0
	mov	w2, #18
	bl	_Com_Memset
	mov	w8, #2
	str	w8, [x20, #8]
	and	w8, w23, #0xff
	asr	w9, w23, #8
	stp	w8, w9, [x20, #48]
	and	w8, w22, #0xff
	asr	w9, w22, #8
	stp	w8, w9, [x20, #56]
	mov	w8, #24
Lloh4:
	adrp	x9, _GL_RGB@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GL_RGB@GOTPAGEOFF]
	str	w8, [x20, #64]
Lloh6:
	ldr	w4, [x9]
Lloh7:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh9:
	ldr	w5, [x8]
	add	x21, x20, #72
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x6, x21
	bl	_qglReadPixels
	mul	w8, w23, w22
	add	w8, w8, w8, lsl #1
	add	w22, w8, #18
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w8, #21
	cmp	x22, #21
	csel	x8, x22, x8, hi
	cmp	w22, #21
	cset	w9, hi
	sub	x8, x8, x9
	sub	x8, x8, #21
	cmp	w22, #21
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsr	x8, x8, #1
	cinc	x8, x8, hi
	cbz	x8, LBB0_5
; %bb.2:
	add	x9, x8, #1
	and	x10, x9, #0xfffffffffffffffe
	add	x8, x10, x10, lsl #1
	add	x8, x8, #18
	add	x11, x20, #92
	mov	x12, x10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w13, [x11, #-20]
	ldp	w15, w14, [x11, #-12]
	ldr	w16, [x11]
	stur	w15, [x11, #-20]
	stp	w13, w16, [x11, #-12]
	str	w14, [x11], #24
	subs	x12, x12, #2
	b.ne	LBB0_3
; %bb.4:
	cmp	x9, x10
	b.ne	LBB0_6
	b	LBB0_7
LBB0_5:
	mov	w8, #18
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x9, x20, x8, lsl #2
	ldr	w10, [x9]
	ldr	w11, [x9, #8]
	str	w11, [x9]
	str	w10, [x9, #8]
	add	x8, x8, #3
	cmp	x8, x22
	b.lo	LBB0_6
LBB0_7:
Lloh10:
	adrp	x8, _tr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _tr@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x9, [x27, #8]
	cmp	x8, #1
	ccmp	x9, #0, #4, ge
	b.eq	LBB0_9
; %bb.8:
	ldp	w8, w9, [x27]
	mul	w8, w8, w9
	add	w1, w8, w8, lsl #1
	mov	x0, x21
	bl	_R_GammaCorrect
LBB0_9:
	ldr	x8, [x26, #16]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	blr	x8
	ldr	x1, [x26, #8]
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	br	x1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ri,24,3                        ; @ri
	.comm	_glConfig,16,3                  ; @glConfig
	.comm	_GL_RGB,4,2                     ; @GL_RGB
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_tr,8,3                         ; @tr
.subsections_via_symbols
