	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_TakeScreenshotJPEG          ## -- Begin function RB_TakeScreenshotJPEG
	.p2align	4, 0x90
_RB_TakeScreenshotJPEG:                 ## @RB_TakeScreenshotJPEG
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %r8
	leaq	-36(%rbp), %r9
	callq	_RB_ReadPixels
	movq	%rax, %rbx
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leal	(%r12,%r12,2), %eax
	addl	-36(%rbp), %eax
	imull	%r15d, %eax
	movslq	%eax, %rsi
	movq	-48(%rbp), %rax
	leaq	(%rbx,%rax,4), %rdi
	callq	_R_GammaCorrect
LBB0_2:
	movq	_r_screenshotJpegQuality@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rax
	leaq	(%rbx,%rax,4), %r8
	movl	-36(%rbp), %r9d
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	callq	_RE_SaveJPG
	movq	_ri@GOTPCREL(%rip), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_r_screenshotJpegQuality,8,3    ## @r_screenshotJpegQuality
	.comm	_ri,8,3                         ## @ri
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_TakeScreenshotJPEG          ; -- Begin function RB_TakeScreenshotJPEG
	.p2align	2
_RB_TakeScreenshotJPEG:                 ; @RB_TakeScreenshotJPEG
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x4
	mov	x19, x3
	mov	x20, x2
	str	xzr, [sp, #8]
	add	x4, sp, #8
	add	x5, sp, #4
	bl	_RB_ReadPixels
	mov	x22, x0
Lloh0:
	adrp	x8, _glConfig@GOTPAGE
Lloh1:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	add	w8, w20, w20, lsl #1
	ldr	w9, [sp, #4]
	add	w8, w9, w8
	mul	w8, w8, w19
	sxtw	x1, w8
	ldr	x8, [sp, #8]
	add	x0, x22, x8, lsl #2
	bl	_R_GammaCorrect
LBB0_2:
Lloh3:
	adrp	x8, _r_screenshotJpegQuality@GOTPAGE
Lloh4:
	ldr	x8, [x8, _r_screenshotJpegQuality@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w1, [x8]
	ldr	x8, [sp, #8]
	add	x4, x22, x8, lsl #2
	ldr	w5, [sp, #4]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_RE_SaveJPG
Lloh6:
	adrp	x8, _ri@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_r_screenshotJpegQuality,8,3    ; @r_screenshotJpegQuality
	.comm	_ri,8,3                         ; @ri
.subsections_via_symbols
