	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RB_TakeVideoFrameCmd           ## -- Begin function RB_TakeVideoFrameCmd
	.p2align	4, 0x90
_RB_TakeVideoFrameCmd:                  ## @RB_TakeVideoFrameCmd
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GL_PACK_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_qglGetIntegerv
	movslq	(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %r15
	movl	-48(%rbp), %esi
	movq	%r15, %rdi
	callq	_PAD
	movl	%eax, %r12d
	movq	_AVI_LINE_PADDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_PAD
	movl	%eax, %r13d
	movl	24(%r14), %edi
	movl	-48(%rbp), %esi
	callq	_PADP
	movq	%rax, %rbx
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	movq	_GL_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, (%rsp)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_qglReadPixels
	movl	%r12d, %esi
	movslq	4(%r14), %rax
	movslq	%r12d, %r12
	imulq	%rax, %r12
	movq	_glConfig@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	%esi, %r13d
	movq	%r12, %rsi
	callq	_R_GammaCorrect
	movl	%r13d, %esi
LBB0_2:
	subl	%r15d, %esi
	cmpq	$0, 16(%r14)
	je	LBB0_4
## %bb.3:
	movq	8(%r14), %rdi
	movslq	4(%r14), %r8
	imulq	%r8, %r15
	movq	_r_aviMotionJpegQuality@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movl	%esi, (%rsp)
	movq	%r15, %rsi
	movq	%rbx, %r9
	callq	_RE_SaveJPGToBuffer
	movq	_ri@GOTPCREL(%rip), %rcx
	movq	8(%r14), %rdi
	movl	%eax, %esi
	callq	*(%rcx)
	jmp	LBB0_11
LBB0_4:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	subl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	leaq	(%rbx,%r12,8), %r14
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %r12
	movslq	%eax, %r13
	movslq	%esi, %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_Com_Memset
	leaq	(%r12,%r13,8), %r12
	leaq	(%rbx,%r15,8), %rbx
	cmpq	%r14, %rbx
	jae	LBB0_10
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,8), %rax
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%rbx), %rcx
	movq	%rcx, (%r12)
	movq	8(%rbx), %rcx
	movq	%rcx, 8(%r12)
	movq	(%rbx), %rcx
	movq	%rcx, 16(%r12)
	addq	$24, %r12
	addq	$24, %rbx
	cmpq	%rax, %rbx
	jb	LBB0_8
	jmp	LBB0_9
LBB0_10:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r14), %rdi
	movl	4(%r14), %esi
	imull	-44(%rbp), %esi                 ## 4-byte Folded Reload
	callq	*(%rax)
LBB0_11:
	addq	$32, %r14
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GL_PACK_ALIGNMENT,4,2          ## @GL_PACK_ALIGNMENT
	.comm	_AVI_LINE_PADDING,4,2           ## @AVI_LINE_PADDING
	.comm	_GL_RGB,4,2                     ## @GL_RGB
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_r_aviMotionJpegQuality,8,3     ## @r_aviMotionJpegQuality
	.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_TakeVideoFrameCmd           ; -- Begin function RB_TakeVideoFrameCmd
	.p2align	2
_RB_TakeVideoFrameCmd:                  ; @RB_TakeVideoFrameCmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x0
Lloh0:
	adrp	x8, _GL_PACK_ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GL_PACK_ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #28
	bl	_qglGetIntegerv
	ldrsw	x25, [x19]
	add	x20, x25, x25, lsl #1
	ldr	w1, [sp, #28]
	mov	x0, x20
	bl	_PAD
	mov	x23, x0
Lloh3:
	adrp	x8, _AVI_LINE_PADDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVI_LINE_PADDING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_PAD
	mov	x21, x0
	ldr	w0, [x19, #24]
	ldr	w1, [sp, #28]
	bl	_PADP
	mov	x28, x0
	ldp	w2, w3, [x19]
Lloh6:
	adrp	x8, _GL_RGB@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GL_RGB@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
Lloh9:
	adrp	x8, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	x6, x28
	bl	_qglReadPixels
	ldrsw	x8, [x19, #4]
	sxtw	x9, w23
	mul	x24, x8, x9
Lloh12:
	adrp	x8, _glConfig@GOTPAGE
Lloh13:
	ldr	x8, [x8, _glConfig@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x28
	mov	x1, x24
	bl	_R_GammaCorrect
LBB0_2:
	sub	w6, w23, w20
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
	ldp	w3, w4, [x19]
                                        ; kill: def $w4 killed $w4 def $x4
	sxtw	x4, w4
	mul	x1, x4, x20
Lloh15:
	adrp	x8, _r_aviMotionJpegQuality@GOTPAGE
Lloh16:
	ldr	x8, [x8, _r_aviMotionJpegQuality@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	w2, [x8]
	mov	x5, x28
                                        ; kill: def $w6 killed $w6 killed $x6
	bl	_RE_SaveJPGToBuffer
	mov	x1, x0
Lloh18:
	adrp	x8, _ri@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x0, [x19, #8]
                                        ; kill: def $w1 killed $w1 killed $x1
	b	LBB0_19
LBB0_4:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	cmp	w24, #1
	b.lt	LBB0_18
; %bb.5:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	sub	w23, w8, w20
	sxtw	x26, w23
	ldr	x8, [x19, #8]
	sxtw	x27, w6
	lsl	x9, x20, #3
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	add	x21, x28, x24, lsl #3
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, x28
	mov	x24, x8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x24
	mov	w1, #0
	mov	x2, x23
	bl	_Com_Memset
	add	x8, x24, x26, lsl #3
	add	x28, x22, x27, lsl #3
	cmp	x28, x21
	b.hs	LBB0_18
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	cmp	w25, #1
	b.lt	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x10, x28, #24
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	add	x11, x9, x28
	cmp	x11, x10
	csel	x9, x11, x10, hi
	sub	x9, x9, #24
	subs	x9, x9, x28
	cset	w12, ne
	sub	x9, x9, x12
	mov	w12, #1
	cinc	x12, x12, ne
	mov	x13, #-6148914691236517206
	movk	x13, #43691
	umulh	x9, x9, x13
	add	x9, x12, x9, lsr #4
	cmp	x9, #4
	b.lo	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	x11, x10
	csel	x11, x11, x10, hi
	sub	x11, x11, #24
	cmp	x11, x28
	cinc	x12, x28, ne
	sub	x12, x11, x12
	cmp	x11, x28
	umulh	x11, x12, x13
	lsr	x11, x11, #4
	cinc	x11, x11, ne
	add	x11, x11, x11, lsl #1
	lsl	x11, x11, #3
	add	x12, x8, x11
	add	x12, x12, #24
	add	x10, x10, x11
	cmp	x8, x10
	ccmp	x28, x12, #2, lo
	b.lo	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	and	x10, x9, #0x1ffffffffffffffc
	add	x11, x10, x10, lsl #1
	lsl	x11, x11, #3
	add	x24, x8, x11
	add	x22, x28, x11
	mov	x11, x10
	mov	x12, x28
LBB0_12:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x13, x12
	ld3.2d	{ v0, v1, v2 }, [x13], #48
	mov.16b	v3, v2
	mov.16b	v4, v1
	mov.16b	v5, v0
	ld3.2d	{ v0, v1, v2 }, [x13]
	mov.16b	v16, v2
	mov.16b	v17, v1
	mov.16b	v18, v0
	add	x13, x8, #96
	st3.2d	{ v3, v4, v5 }, [x8], #48
	st3.2d	{ v16, v17, v18 }, [x8]
	add	x12, x12, #96
	mov	x8, x13
	subs	x11, x11, #4
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	cmp	x9, x10
	b.eq	LBB0_7
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, x8
	mov	x22, x28
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x28, x20, lsl #3
LBB0_16:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x22, #16]
	str	x9, [x24]
	ldr	x9, [x22, #8]
	str	x9, [x24, #8]
	ldr	x10, [x22], #24
	add	x9, x24, #24
	str	x10, [x24, #16]
	mov	x24, x9
	cmp	x22, x8
	b.lo	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x24, x9
	b	LBB0_7
LBB0_18:
Lloh21:
	adrp	x8, _ri@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x0, [x19, #8]
	ldr	w9, [x19, #4]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	mul	w1, w9, w10
LBB0_19:
	blr	x8
	add	x0, x19, #32
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.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	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GL_PACK_ALIGNMENT,4,2          ; @GL_PACK_ALIGNMENT
	.comm	_AVI_LINE_PADDING,4,2           ; @AVI_LINE_PADDING
	.comm	_GL_RGB,4,2                     ; @GL_RGB
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_r_aviMotionJpegQuality,8,3     ; @r_aviMotionJpegQuality
	.comm	_ri,8,3                         ; @ri
.subsections_via_symbols
