	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VideoFadeOut                   ## -- Begin function VideoFadeOut
	.p2align	4, 0x90
_VideoFadeOut:                          ## @VideoFadeOut
	.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	_RGB_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	LBB0_18
## %bb.1:
	movq	%rdi, %r13
	leaq	-64(%rbp), %r14
	leaq	-56(%rbp), %r15
	leaq	-48(%rbp), %r12
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_RGB_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rax, %rcx
	jge	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testq	%r13, %r13
	jle	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	callq	_MachVideoSetPaletteColor
	incq	%rbx
	cmpq	%rbx, %r13
	je	LBB0_16
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_RGB_MAX_PER_ITERATION@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jne	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	xorl	%eax, %eax
	callq	_MachVideoSync
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_MachVideoGetPaletteColor
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	decq	%rsi
	movq	%rsi, -64(%rbp)
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %rdx
	testq	%rdx, %rdx
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	decq	%rdx
	movq	%rdx, -56(%rbp)
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-48(%rbp), %rcx
	testq	%rcx, %rcx
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	decq	%rcx
	movq	%rcx, -48(%rbp)
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_9
	jmp	LBB0_8
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RGB_MAX,8,3                    ## @RGB_MAX
	.comm	_RGB_MAX_PER_ITERATION,8,3      ## @RGB_MAX_PER_ITERATION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VideoFadeOut                   ; -- Begin function VideoFadeOut
	.p2align	2
_VideoFadeOut:                          ; @VideoFadeOut
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x21, _RGB_MAX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RGB_MAX@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x19, x0
	mov	x22, #0
Lloh2:
	adrp	x23, _RGB_MAX_PER_ITERATION@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RGB_MAX_PER_ITERATION@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	cmp	x22, x8
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	x19, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x20
	bl	_MachVideoSetPaletteColor
	add	x20, x20, #1
	cmp	x19, x20
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23]
	sdiv	x9, x20, x8
	msub	x8, x9, x8, x20
	cbnz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	bl	_MachVideoSync
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x1, sp, #24
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x20
	bl	_MachVideoGetPaletteColor
	ldr	x1, [sp, #24]
	subs	x8, x1, #1
	b.lt	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	str	x8, [sp, #24]
	mov	x1, x8
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x2, [sp, #16]
	subs	x8, x2, #1
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=2
	str	x8, [sp, #16]
	mov	x2, x8
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x3, [sp, #8]
	subs	x8, x3, #1
	b.lt	LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=2
	str	x8, [sp, #8]
	mov	x3, x8
	b	LBB0_6
LBB0_15:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_RGB_MAX,8,3                    ; @RGB_MAX
	.comm	_RGB_MAX_PER_ITERATION,8,3      ; @RGB_MAX_PER_ITERATION
.subsections_via_symbols
